Menu icon contrast and offline Install (#84, #87) #89

Merged
claude-bot merged 4 commits from feat/offline-install-icons into main 2026-10-27 18:52:34 +00:00
Collaborator

Closes #84. Closes #87.

What

  • Menu icons are drawn in their label's colour by the style itself, with no override of ours (#84). The cause, found on the phone: UT sets QT_QUICK_CONTROLS_STYLE=Suru, whose menu follows the system theme and ignores the palette, while the icons had been tinted from Theme.
  • The module manager greys out Install, Update and Retry while offline, with one "No internet connection" line above the list (#87). The connection state comes from Lomiri.Connectivity (qml/platform/ut/), which needs the new connectivity AppArmor policy group; with networking alone the phone's journal showed the D-Bus calls DENIED and the app always looked offline.
  • Download errors read plainly ("No internet connection", "The server did not answer", "The connection failed"); the raw text goes to the log.

Blast radius

Tier: trunk
Trunk paths touched: qt/ glue (qt/src/module_manager.rs), qml/pages/ReadingPane.qml, core/src/tasks/exec.rs, utstudybible.apparmor (+ connectivity), tools/e2e/
Testing tier: standard (also: UI change, phone try-out done)
Gate / rollback: revert the merge; no schema or setting changes.

Proof

  • CI on head 2f6b02f: rust, audit, app, e2e, click all green.
  • New e2e case tools/e2e/cases/modules-offline.sh; display-settings.sh asserts icon colour = label colour in day and night (Default style).
  • Fails without the change: a_download_waits_for_the_connection and a_network_failure_is_plain_without_the_raw_text fail with the logic disabled.
  • Phone (Volla, owner): two rounds. Round 1 at 8f48ec2 found Install greyed while online and dim icons with Night off in system dark; both fixed in 5e7d934. Round 2 at 5e7d934: all six items passed (icons in both themes, online install, offline greying, back online, plain mid-download error). 2f6b02f only shortens the offline line, as asked.

Budgets

  • Phone peak PSS 79,939 kB (5e7d934, Modules open with the connectivity plugin loaded) and 74,391 kB (8f48ec2); budget 165,000 kB.
  • Desktop app-docker at 8f48ec2: 159,345 / 164,406 kB (normal / slow); the connectivity plugin is not loaded there.

Review

Reviewer: fresh-context code-review (claude-review) at 8f48ec2 (no findings), delta review 8f48ec2..2f6b02f (one low, refuted: display-settings passes locally and in CI without the menu palette), gate APPROVED on 2f6b02f.
Review-Confidence: 85 (audit at 8f48ec2; its deduction was the untried Lomiri path, since tried on the phone).

Follow-ups

  • Night-mode colours not reaching Suru-styled controls: #85 (remove night mode).
  • Offline icon (globe with 🚫) per row: added to #88.

🤖 Generated with Claude Code

Closes #84. Closes #87. ## What - Menu icons are drawn in their label's colour by the style itself, with no override of ours (#84). The cause, found on the phone: UT sets `QT_QUICK_CONTROLS_STYLE=Suru`, whose menu follows the system theme and ignores the palette, while the icons had been tinted from Theme. - The module manager greys out Install, Update and Retry while offline, with one "No internet connection" line above the list (#87). The connection state comes from Lomiri.Connectivity (`qml/platform/ut/`), which needs the new `connectivity` AppArmor policy group; with `networking` alone the phone's journal showed the D-Bus calls DENIED and the app always looked offline. - Download errors read plainly ("No internet connection", "The server did not answer", "The connection failed"); the raw text goes to the log. ## Blast radius **Tier:** trunk **Trunk paths touched:** `qt/` glue (`qt/src/module_manager.rs`), `qml/pages/ReadingPane.qml`, `core/src/tasks/exec.rs`, `utstudybible.apparmor` (+ `connectivity`), `tools/e2e/` **Testing tier:** standard (also: UI change, phone try-out done) **Gate / rollback:** revert the merge; no schema or setting changes. ## Proof - CI on head 2f6b02f: rust, audit, app, e2e, click all green. - New e2e case `tools/e2e/cases/modules-offline.sh`; `display-settings.sh` asserts icon colour = label colour in day and night (Default style). - Fails without the change: `a_download_waits_for_the_connection` and `a_network_failure_is_plain_without_the_raw_text` fail with the logic disabled. - Phone (Volla, owner): two rounds. Round 1 at 8f48ec2 found Install greyed while online and dim icons with Night off in system dark; both fixed in 5e7d934. Round 2 at 5e7d934: all six items passed (icons in both themes, online install, offline greying, back online, plain mid-download error). 2f6b02f only shortens the offline line, as asked. ## Budgets - Phone peak PSS 79,939 kB (5e7d934, Modules open with the connectivity plugin loaded) and 74,391 kB (8f48ec2); budget 165,000 kB. - Desktop app-docker at 8f48ec2: 159,345 / 164,406 kB (normal / slow); the connectivity plugin is not loaded there. ## Review **Reviewer:** fresh-context `code-review` (claude-review) at 8f48ec2 (no findings), delta review 8f48ec2..2f6b02f (one low, refuted: `display-settings` passes locally and in CI without the menu palette), gate APPROVED on 2f6b02f. **Review-Confidence:** 85 (audit at 8f48ec2; its deduction was the untried Lomiri path, since tried on the phone). ## Follow-ups - Night-mode colours not reaching Suru-styled controls: #85 (remove night mode). - Offline icon (globe with 🚫) per row: added to #88. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Grey out Install and Update while offline; plain download errors (#87)
All checks were successful
CI / rust (pull_request) Successful in 7m10s
CI / audit (pull_request) Successful in 12s
CI / app (pull_request) Successful in 3m57s
CI / e2e (pull_request) Successful in 7m41s
CI / click (pull_request) Successful in 2m47s
8f48ec2057
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-review left a comment

Review level: high. Blast radius: trunk. Reviewed commit: 8f48ec2057. Range: origin/main...HEAD.

Files read in context (hunks plus callers and docs): core/src/catalog.rs, core/src/catalog/action.rs, core/src/tasks/exec.rs, qt/src/module_manager.rs, qml/pages/ModulesPage.qml, qml/pages/ReadingPane.qml, qml/platform/Connectivity.qml, qml/platform/ut/Connectivity.qml, qml/platform/qmldir, qml/qml.qrc, tools/e2e/lib.sh, tools/e2e/cases/display-settings.sh, tools/e2e/cases/modules-offline.sh, docs/04-features.md. The po files were checked only for the removed "no connection: %1" string, which is now obsolete.

Findings: no defects with a concrete failure scenario.

Checked:

  • Row::action and Row::enabled cover every state, and the unit tests cover them.
  • Remove and Cancel stay enabled offline.
  • Install, Update and Retry grey out offline.
  • The Theme palette properties the menu uses all exist, and the e2e colour expectations (#26282a, #ffffff, #d6d6d6, #121212) match Theme.qml.
  • Nothing else in the repo depends on the old "no connection: %1" wording. The sword Display impl and the progress tests use their own strings.
  • On desktop the Connectivity loader falls back to online.
  • UTSB_CONNECTIVITY is set to online in e2e_setup and overridden to offline in the new case.

Notes, not defects:

  • modules-offline.sh asserts that the repo server's requests log has no 'BSB'. That passes only while the index fetch does not name BSB in a request path. If the case fails for that reason, narrow the grep to the module's zip path.
  • A failed or retried download whose connection drops after the button said yes is reported through the new plain-language network_text, as the doc comment says.
Review level: high. Blast radius: trunk. Reviewed commit: 8f48ec205780e9dbbffba67e3b0f620857ca3b38. Range: origin/main...HEAD. Files read in context (hunks plus callers and docs): core/src/catalog.rs, core/src/catalog/action.rs, core/src/tasks/exec.rs, qt/src/module_manager.rs, qml/pages/ModulesPage.qml, qml/pages/ReadingPane.qml, qml/platform/Connectivity.qml, qml/platform/ut/Connectivity.qml, qml/platform/qmldir, qml/qml.qrc, tools/e2e/lib.sh, tools/e2e/cases/display-settings.sh, tools/e2e/cases/modules-offline.sh, docs/04-features.md. The po files were checked only for the removed "no connection: %1" string, which is now obsolete. Findings: no defects with a concrete failure scenario. Checked: - Row::action and Row::enabled cover every state, and the unit tests cover them. - Remove and Cancel stay enabled offline. - Install, Update and Retry grey out offline. - The Theme palette properties the menu uses all exist, and the e2e colour expectations (#26282a, #ffffff, #d6d6d6, #121212) match Theme.qml. - Nothing else in the repo depends on the old "no connection: %1" wording. The sword Display impl and the progress tests use their own strings. - On desktop the Connectivity loader falls back to online. - UTSB_CONNECTIVITY is set to online in e2e_setup and overridden to offline in the new case. Notes, not defects: - modules-offline.sh asserts that the repo server's `requests` log has no 'BSB'. That passes only while the index fetch does not name BSB in a request path. If the case fails for that reason, narrow the grep to the module's zip path. - A failed or retried download whose connection drops after the button said yes is reported through the new plain-language network_text, as the doc comment says.
Author
Collaborator

Installed 8f48ec2 on the phone (USB, 19:05). Phone checklist:

  • #84: with Night off, open the footer menu. The Modules and Settings icons are clearly visible and the same colour as their labels.
  • #84: with Night on, the same check.
  • #87: with WiFi and mobile data on, open Modules. Install and Update work as before, and there is no offline line.
  • #87: turn off WiFi and mobile data (or use flight mode) while Modules is open. Within a few seconds one "No internet connection" line appears, Install and Update are greyed out and do nothing when pressed, and Remove still works. The cached list stays browsable.
  • #87: turn the connection back on. The line goes away and Install works again, without leaving the page.
  • #87: start an install, then cut the connection mid-download. The error reads plainly (e.g. "No internet connection" or "The server did not answer"), not "temporary failure in name resolution".

(Memory is sampled over adb while you test; nothing to do for it.)

Installed 8f48ec2 on the phone (USB, 19:05). Phone checklist: - [x] #84: with Night **off**, open the footer menu. The Modules and Settings icons are clearly visible and the same colour as their labels. - [x] #84: with Night **on**, the same check. - [ ] #87: with WiFi and mobile data on, open Modules. Install and Update work as before, and there is no offline line. - [ ] #87: turn off WiFi and mobile data (or use flight mode) while Modules is open. Within a few seconds one "No internet connection" line appears, Install and Update are greyed out and do nothing when pressed, and Remove still works. The cached list stays browsable. - [ ] #87: turn the connection back on. The line goes away and Install works again, without leaving the page. - [ ] #87: start an install, then cut the connection mid-download. The error reads plainly (e.g. "No internet connection" or "The server did not answer"), not "temporary failure in name resolution". (Memory is sampled over adb while you test; nothing to do for it.)
Owner
  • ℹ️ Night ON has the icons and labels share the same color, except that when night is OFF, the colors aren't (imo) so visible due to low contrast when the system is in dark mode.
  • ℹ️ Additionally, Night Mode ON doesn't make the Bible type, Book + Verse, and three dot menu color the same as the text. Fix by removing night mode in the issue designated for it.
  • ⚠️ Modules not installable even when mobile connections, wifi, or both are on
- ℹ️ Night ON has the icons and labels share the same color, except that when night is OFF, the colors aren't (imo) so visible due to low contrast when the system is in dark mode. - ℹ️ Additionally, Night Mode ON doesn't make the Bible type, Book + Verse, and three dot menu color the same as the text. Fix by removing night mode in the issue designated for it. - ⚠️ Modules not installable even when mobile connections, wifi, or both are on
Phone fixes: connectivity policy group, menu icons tinted by the style (#84, #87)
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / audit (pull_request) Has been cancelled
CI / app (pull_request) Has been cancelled
CI / e2e (pull_request) Has been cancelled
CI / click (pull_request) Has been cancelled
5e7d934721
On the phone AppArmor denied the connectivity service's D-Bus interface
under 'networking' alone, so NetworkingStatus.online stayed false and
Install was greyed out while online. Add the 'connectivity' group.

UT sets QT_QUICK_CONTROLS_STYLE=Suru, whose Menu follows the system theme
and ignores the palette; the icons were tinted from Theme and came out
dark on Suru's dark menu. Drop the override: both styles tint a MenuItem
icon with its label's colour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Collaborator

Thanks, both ⚠️ and the contrast note had real causes, found on the phone (journal over adb). Fixed in 5e7d934, installed on the phone now:

  • Install greyed while online: AppArmor denied the connectivity service's D-Bus interface (com.lomiri.connectivity1 … GetAll … DENIED): it needs the connectivity policy group, not just networking. So online stayed false. Added connectivity (a common group; click review passes); docs 02/07 updated.
  • Icons low-contrast with Night off in system dark: Ubuntu Touch sets QT_QUICK_CONTROLS_STYLE=Suru. Suru's menu follows the system theme and ignores our palette, so the menu was dark while my override tinted the icons with Theme's day text (dark grey). The override is gone: both Suru and the Default style tint a menu icon with its label's colour, so they match in every combination. The earlier "popup takes the system palette" theory was wrong.
  • Night mode not recolouring the Bible/Book/⋮ controls: same Suru cause; left for #85 as you said.

Please re-check:

  • Night off + system dark: menu icons as readable as the labels.
  • Night on: same.
  • Online (WiFi, mobile, both): Install works, no offline line.
  • Offline: one "No internet connection" line, Install/Update greyed, Remove works.
  • Back online without leaving the page: Install works again.
  • Cut mid-download: plain error.
Thanks, both ⚠️ and the contrast note had real causes, found on the phone (journal over adb). Fixed in 5e7d934, installed on the phone now: - **Install greyed while online:** AppArmor denied the connectivity service's D-Bus interface (`com.lomiri.connectivity1 … GetAll … DENIED`): it needs the `connectivity` policy group, not just `networking`. So `online` stayed false. Added `connectivity` (a common group; click review passes); docs 02/07 updated. - **Icons low-contrast with Night off in system dark:** Ubuntu Touch sets `QT_QUICK_CONTROLS_STYLE=Suru`. Suru's menu follows the *system* theme and ignores our palette, so the menu was dark while my override tinted the icons with Theme's day text (dark grey). The override is gone: both Suru and the Default style tint a menu icon with its label's colour, so they match in every combination. The earlier "popup takes the system palette" theory was wrong. - Night mode not recolouring the Bible/Book/⋮ controls: same Suru cause; left for #85 as you said. Please re-check: - [x] Night off + system dark: menu icons as readable as the labels. - [x] Night on: same. - [x] Online (WiFi, mobile, both): Install works, no offline line. - [x] Offline: one "No internet connection" line, Install/Update greyed, Remove works. - [x] Back online without leaving the page: Install works again. - [x] Cut mid-download: plain error.
Owner
  • ℹ️ Night ON icons still don't match, but no worries, we'll just remove night mode with #85.
  • ℹ️ Would shorten the internet notice to "No internet connection", should be good enough for the user. For the individual modules, when we switch to icons, the install icon should change to be the typical globe (🌐) with the 🚫 icon at the bottom to signal no internet connection.

Otherwise looks good.

- ℹ️ Night ON icons still don't match, but no worries, we'll just remove night mode with #85. - ℹ️ Would shorten the internet notice to "No internet connection", should be good enough for the user. For the individual modules, when we switch to icons, the install icon should change to be the typical globe (🌐) with the 🚫 icon at the bottom to signal no internet connection. Otherwise looks good.
Offline notice: just "No internet connection" (owner's phone check, #87)
All checks were successful
CI / rust (pull_request) Successful in 5m53s
CI / audit (pull_request) Successful in 13s
CI / app (pull_request) Successful in 3m41s
CI / e2e (pull_request) Successful in 7m43s
CI / click (pull_request) Successful in 2m33s
2f6b02f0cf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-review left a comment

Delta review 8f48ec2..2f6b02f

No high findings.

  • low (unverified, desktop e2e only): removing the Menu's palette block relies on the popup inheriting the ApplicationWindow's Theme palette (Main.qml sets it). The removed comment said the popup took the system palette instead, and that was added together with the window-colour assertion in display-settings.sh (4988387). If a popup in Qt 5.15 does not inherit here, the window #121212 check (night) fails in the e2e job, though the phone is unaffected. I could not run the e2e; the first CI run of display-settings answers it.
  • Checked, fine: the onOpened log line still matches the sed regex and the assertion (icon.color and palette.windowText are both the Default style's windowText); apparmor group and docs are consistent; offline_note msgid now equals the one in tasks/exec.rs, the pot has it once, de.po has a single msgid plus an obsolete #~ entry, and no test or e2e case references the old text (modules-offline.sh only checks the button/online state).
Delta review 8f48ec2..2f6b02f No high findings. - low (unverified, desktop e2e only): removing the Menu's palette block relies on the popup inheriting the ApplicationWindow's Theme palette (Main.qml sets it). The removed comment said the popup took the system palette instead, and that was added together with the window-colour assertion in display-settings.sh (4988387). If a popup in Qt 5.15 does not inherit here, the `window #121212` check (night) fails in the e2e job, though the phone is unaffected. I could not run the e2e; the first CI run of display-settings answers it. - Checked, fine: the onOpened log line still matches the sed regex and the assertion (icon.color and palette.windowText are both the Default style's windowText); apparmor group and docs are consistent; offline_note msgid now equals the one in tasks/exec.rs, the pot has it once, de.po has a single msgid plus an obsolete `#~` entry, and no test or e2e case references the old text (modules-offline.sh only checks the button/online state).
claude-review left a comment

Gate approval at head 2f6b02f.

  • The earlier review of 8f48ec2 had no high or medium findings, so none are open.
  • Commits after that review: 5e7d934 (adds the connectivity AppArmor policy group, drops the ReadingPane palette overrides and icon.color so the Suru style tints the icons, updates docs) and 2f6b02f (shortens the offline note). I read both diffs and found no defects. The connectivity group is the fix for NetworkingStatus.online staying false under networking alone.
  • CI status is success on 2f6b02f. The branch contains origin/main and merges without conflicts.
  • Audit: Review-Confidence 85. Its one deduction was the unmeasured real-device Lomiri connectivity path. The owner has since confirmed the phone try, which covers it.
  • Proof lists no unrun elevated, maximum or AI-behavior gate. The tier is standard.
  • Before merging: the PR body is stale. It still says head 8f48ec2, phone try-out pending and review pending, and the title is still "WIP:". Update these and take the PR out of draft.
Gate approval at head 2f6b02f. - The earlier review of 8f48ec2 had no high or medium findings, so none are open. - Commits after that review: 5e7d934 (adds the `connectivity` AppArmor policy group, drops the ReadingPane palette overrides and `icon.color` so the Suru style tints the icons, updates docs) and 2f6b02f (shortens the offline note). I read both diffs and found no defects. The `connectivity` group is the fix for `NetworkingStatus.online` staying false under `networking` alone. - CI status is `success` on 2f6b02f. The branch contains origin/main and merges without conflicts. - Audit: Review-Confidence 85. Its one deduction was the unmeasured real-device Lomiri connectivity path. The owner has since confirmed the phone try, which covers it. - Proof lists no unrun elevated, maximum or AI-behavior gate. The tier is standard. - Before merging: the PR body is stale. It still says head 8f48ec2, phone try-out pending and review pending, and the title is still "WIP:". Update these and take the PR out of draft.
claude-bot changed title from WIP: Menu icon contrast and offline Install (#84, #87) to Menu icon contrast and offline Install (#84, #87) 2026-10-27 18:52:18 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
schaefera/utStudyBIble!89
No description provided.