Skip to content

Add system top bar and settings app - #486

Draft
Eeems wants to merge 44 commits into
masterfrom
issue/387
Draft

Add system top bar and settings app#486
Eeems wants to merge 44 commits into
masterfrom
issue/387

Conversation

@Eeems

@Eeems Eeems commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features
    • Added the Stain top bar with live clock, notifications, Wi‑Fi, battery, and power controls.
    • Introduced a standalone Settings app with General, Display, Power, Gestures, Wi‑Fi, and Notifications pages.
    • Added configurable reserved top/bottom system space across supported windows.
    • Improved launcher app listing and refresh behavior.
  • Bug Fixes
    • Improved app interrupt/resume reliability and system permission enforcement.
    • Updated app launching to handle forking applications more reliably.
  • Documentation
    • Documented the new privileged flag and default-application controls.

@Eeems Eeems linked an issue Jul 18, 2026 that may be closed by this pull request
@Eeems Eeems changed the title Issue/387 Add system top bar Jul 18, 2026
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0b36ad77-a0eb-4b3c-9264-590bcb7a5061

📥 Commits

Reviewing files that changed from the base of the PR and between 0e356ab and ea419d7.

📒 Files selected for processing (1)
  • VELBUILD
🚧 Files skipped from review as they are similar to previous changes (1)
  • VELBUILD

📝 Walkthrough

<hidden_range_assignment><range_id>range_3106daf57ab6</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_26aa7728b99b</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_d9215033067a</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_7d3e9eb70e9f</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_55704761c0d4</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_3707f1a5c514</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_41018d575c48</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_7d3485678ce0</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_4bcef419d4f8</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_fd17f306b311</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_3055b48f3bd9</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_c9adf3415117</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_f7c34d2652df</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_5a9b51a34c0a</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_b1f4d157d92a</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_e57413b99139</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_e788c6770c7d</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_0b96fa97fdab</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_4b44685bac57</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_6e4e40bd7ed1</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_917f7735a91d</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_62609e1fd9c7</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_ee7759e49c72</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_0cd0d1a37aea</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_204cfe489606</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_15d7db72c070</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_e1ebd2ae5e93</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_a3d0fd42150d</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_914c0bf1a4ea</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_6b6ab194a51b</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_bc0a10093849</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_7f19b79aa9bc</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_7d35bdf815d8</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_add506cd7d1c</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_fc6db830e64c</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_43c73aa4fa13</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_a45bc17652c0</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_a916e7ef4cf4</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_68abe9709504</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_533cd116df87</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_da607bad6dd5</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_d27b7295111b</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_606c1484d205</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_4791d161fcba</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_41d8b66083aa</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_d72b96b78f95</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_1256e18e1363</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_ae18e8755376</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_77859675a807</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_406b25857431</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_6ad03d808816</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_0174adefc70e</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_4babe8623fdd</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_5dbdfc920551</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_c5bfe6bf37a3</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_046d06e75d31</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_1fb7eccd359b</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_0afd325bd701</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_403a160842a8</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_f19140e7ae1a</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_208b3506e38d</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_64e03d20809c</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_6b62aced9973</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_e250aeeebf90</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_af1ada3c0c5a</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_sentry</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_6fd10749c5fc</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_b0adcb896518</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_5888fcb6d230</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_ad6d4d8533a1</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_c887366cb63f</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_480745175699</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_46cc1a1ff3d1</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_apps</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_c2d37cb2d068</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_502cb7feea48</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_d876186255b8</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_abc46ee885d5</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_54a6d561c5b2</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_87eb45fca3a2</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_d4b42df48091</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_1aa79adc5a70</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_874d5a1276fb</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>
<hidden_range_assignment><range_id>range_ec43cc7761d0</range_id><cohort_id>cohort_main</cohort_id><layer_id>layer_platform</layer_id></hidden_range_assignment>

Mergeability Score: ⚪ Minimal · up to ea419

The PR adds a system top bar and settings app without any supplied evidence of an actionable merge-blocking risk; it is merge-ready after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.31% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the pull request's main changes: adding the system top bar and settings application.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue/387

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

codacy-production Bot commented Jul 18, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 174 complexity · 6 duplication

Metric Results
Complexity 174
Duplication 6

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@Eeems Eeems changed the title Add system top bar Add system top bar and settings app Jul 18, 2026
@Eeems Eeems linked an issue Jul 18, 2026 that may be closed by this pull request
coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@Eeems

This comment was marked as resolved.

@coderabbitai

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 22, 2026
coderabbitai[bot]

This comment was marked as resolved.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
applications/launcher/controller.cpp (1)

41-58: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Blocking startup wait can stall the launcher for up to 30 seconds.

This polls D-Bus synchronously with nanosleep in the constructor, before the event loop starts. If tarnish is slow to register, the launcher blocks for up to 30s with no feedback before qFatal. Consider QDBusServiceWatcher for an event-driven wait instead of busy-polling.

♻️ Sketch of an event-driven alternative
-  qDebug() << "Waiting for tarnish to start up";
-  int retries = 30;
-  while (!bus.interface()->registeredServiceNames().value().contains(
-    OXIDE_SERVICE
-  )) {
-    if (!retries--) {
-      qFatal("Timed out waiting for %s to register on D-Bus", OXIDE_SERVICE);
-    }
-    struct timespec args{
-      .tv_sec = 1,
-      .tv_nsec = 0,
-    },
-      res;
-    nanosleep(&args, &res);
-  }
+  if (!bus.interface()->registeredServiceNames().value().contains(OXIDE_SERVICE)) {
+    QDBusServiceWatcher watcher(OXIDE_SERVICE, bus, QDBusServiceWatcher::WatchForRegistration);
+    QEventLoop loop;
+    QTimer::singleShot(30000, &loop, &QEventLoop::quit);
+    QObject::connect(&watcher, &QDBusServiceWatcher::serviceRegistered, &loop, &QEventLoop::quit);
+    loop.exec();
+    if (!bus.interface()->registeredServiceNames().value().contains(OXIDE_SERVICE)) {
+      qFatal("Timed out waiting for %s to register on D-Bus", OXIDE_SERVICE);
+    }
+  }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@applications/launcher/controller.cpp` around lines 41 - 58, Replace the
synchronous polling loop in the launcher constructor with an event-driven
QDBusServiceWatcher for OXIDE_SERVICE. Start the watcher when the service is not
yet registered, continue startup when its registration signal arrives, and
retain a clear timeout/fatal path without blocking the event loop or using
nanosleep.
🧹 Nitpick comments (1)
applications/launcher/controller.cpp (1)

276-401: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated root-guard + findChild("batteryLevel") lookup across 6 handlers.

Extracting a small QObject* Controller::batteryUi() helper (return root ? root->findChild<QObject*>("batteryLevel") : nullptr) would remove the repeated pattern in batteryAlert, batteryLevelChanged, batteryStateChanged, batteryTemperatureChanged, batteryWarning, and chargerStateChanged.

♻️ Example helper extraction
+QObject* Controller::batteryUi() {
+  return root != nullptr ? root->findChild<QObject*>("batteryLevel") : nullptr;
+}
+
 void
 Controller::batteryAlert() {
-  if (root == nullptr) {
-    return;
-  }
-  QObject* ui = root->findChild<QObject*>("batteryLevel");
+  QObject* ui = batteryUi();
   if (ui) {
     ui->setProperty("alert", true);
   }
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@applications/launcher/controller.cpp` around lines 276 - 401, Extract a
Controller::batteryUi() helper that returns the batteryLevel QObject when root
is available, otherwise nullptr. Replace the repeated root null checks and
findChild lookups in batteryAlert, batteryLevelChanged, batteryStateChanged,
batteryTemperatureChanged, batteryWarning, and chargerStateChanged with this
helper while preserving each handler’s existing property updates and
early-return behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@applications/launcher/appitem.cpp`:
- Around line 99-103: The icon URL construction in AppItem::update and
AppItem::onIconChanged must encode local paths correctly. Replace the "file:" +
path construction in both sites with
QUrl::fromLocalFile(path).toString(QUrl::FullyEncoded), preserving the existing
fallback icon behavior; affected sites are applications/launcher/appitem.cpp
lines 99-103 and applications/launcher/appitem.h lines 66-70.

---

Outside diff comments:
In `@applications/launcher/controller.cpp`:
- Around line 41-58: Replace the synchronous polling loop in the launcher
constructor with an event-driven QDBusServiceWatcher for OXIDE_SERVICE. Start
the watcher when the service is not yet registered, continue startup when its
registration signal arrives, and retain a clear timeout/fatal path without
blocking the event loop or using nanosleep.

---

Nitpick comments:
In `@applications/launcher/controller.cpp`:
- Around line 276-401: Extract a Controller::batteryUi() helper that returns the
batteryLevel QObject when root is available, otherwise nullptr. Replace the
repeated root null checks and findChild lookups in batteryAlert,
batteryLevelChanged, batteryStateChanged, batteryTemperatureChanged,
batteryWarning, and chargerStateChanged with this helper while preserving each
handler’s existing property updates and early-return behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 05eb204a-31b3-41a0-930e-dbfafdd5637c

📥 Commits

Reviewing files that changed from the base of the PR and between dc996df and 0e356ab.

📒 Files selected for processing (6)
  • applications/launcher/appitem.cpp
  • applications/launcher/appitem.h
  • applications/launcher/applistmodel.h
  • applications/launcher/controller.cpp
  • applications/launcher/controller.h
  • applications/launcher/main.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • applications/launcher/controller.h

Comment on lines +99 to +103
setProperty(
"imgFile",
(!imgFile.isEmpty() && QFile(imgFile).exists()) ? "file:" + imgFile
: "qrc:/img/icon.png"
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Locate files:"
git ls-files | rg '(^|/)appitem\.(cpp|h)$|^.*\.qml$|^.*\.qrc$' | sed -n '1,120p'

echo
echo "Inspect appitem.cpp appitem.h around referenced lines:"
for f in applications/launcher/appitem.cpp applications/launcher/appitem.h; do
  if [ -f "$f" ]; then
    echo "--- $fwc -l $f"
    wc -l "$f"
    echo "--- $f first 160 lines"
    sed -n '1,160p' "$f" | nl -ba | sed -n '80,110p;60,75p'
  fi
done

echo
echo "Search for icon/imgFile usage:"
rg -n "imgFile|onIconChanged|QUrl|toLocalFile|fromLocalFile|qrc:/img/icon|icon.png" applications/launcher -S

Repository: Eeems-Org/oxide

Length of output: 2384


🏁 Script executed:

#!/bin/bash
set -euo pipefail

for f in applications/launcher/appitem.cpp applications/launcher/appitem.h; do
  echo "--- lines $f"
  wc -l "$f"
  echo "--- appitem.cpp lines 1-140"
  sed -n '1,140p' "$f" | nl -ba
  echo "--- appitem.h lines 1-120"
  sed -n '1,120p' "$f" | nl -ba
done

echo "--- imgFile/icon usages in launcher files"
rg -n "imgFile|onIconChanged|QUrl|toLocalFile|fromLocalFile|qrc:/img/icon|icon.png|Image" applications/launcher -S

echo "--- relevant widgets.qml image section"
sed -n '1,180p' applications/launcher/widgets/AppItem.qml | nl -ba | sed -n '1,140p'

echo "--- URL-significant character decoding behavior relevant to concatenated file paths"
python3 - <<'PY'
import urllib.parse, pathlib
samples = [
    "/home/user/Apps/My App/app.png",
    "/home/user/Apps/app%2Fname.png",
    "/home/user/Apps/app#name.png",
    "/home/user/Apps/app space&icon.png",
]
for p in samples:
    concatenated = "file:" + p
    # What a strict URL parser would decode from the path component before interpreting q#fragments
    # URL path decoding is necessary to see whether spaces/#/% affect parsing.
    u = connected = f"file:{p}"
    pathcomp = urllib.parse.urlparse(u).path
    decoded = urllib.parse.unquote(pathcomp)
    print({"input": p, "concatenated": concatenated, "parsed_path": pathcomp, "decoded": decoded, "matches_input": (decoded == p)})
PY

Repository: Eeems-Org/oxide

Length of output: 303


🏁 Script executed:

#!/bin/bash
set -euo pipefail

for f in applications/launcher/appitem.cpp applications/launcher/appitem.h; do
  echo "--- file: $f"
  wc -l "$f"
  echo "--- appitem.cpp lines 1-140"
  awk '{printf "%5d\t%s\n", NR, $0}' "$f" | sed -n '1,140p'
done

echo "--- imgFile/icon usages in launcher files"
rg -n "imgFile|onIconChanged|QUrl|fromLocalFile|qrc:/img/icon|icon.png|Image" applications/launcher -S || true

echo "--- launcher AppItem.qml relevant sections"
awk '{printf "%5d\t%s\n", NR, $0}' applications/launcher/widgets/AppItem.qml | sed -n '1,160p'

Repository: Eeems-Org/oxide

Length of output: 13093


Encode both icon file paths before building the QUrl.

"file:" + path is not a valid QUrl::fromLocalFile replacement; it leaves spaces unencoded and treats characters like # as fragment separators. Use QUrl::fromLocalFile(path).toString(QUrl::FullyEncoded) in both AppItem::update and AppItem::onIconChanged.

📍 Affects 2 files
  • applications/launcher/appitem.cpp#L99-L103 (this comment)
  • applications/launcher/appitem.h#L66-L70
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@applications/launcher/appitem.cpp` around lines 99 - 103, The icon URL
construction in AppItem::update and AppItem::onIconChanged must encode local
paths correctly. Replace the "file:" + path construction in both sites with
QUrl::fromLocalFile(path).toString(QUrl::FullyEncoded), preserving the existing
fallback icon behavior; affected sites are applications/launcher/appitem.cpp
lines 99-103 and applications/launcher/appitem.h lines 66-70.

@Eeems
Eeems force-pushed the issue/387 branch 2 times, most recently from 469022d to c78ce45 Compare August 5, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System level top-bar Create settings application

1 participant