No reviewers
Labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
schaefera/utStudyBIble!106
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/remove-night"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
The Night mode setting is gone. The app now follows the system theme live: the window, the pages and the verse text.
qml/platform/SystemColours.qml:platform/ut/);Command::SetDark.text.nightrow is ignored.Closes #85
Closes #41
Blast radius
Tier: trunk
Trunk paths touched:
qml/Main.qml,qml/pages/ReadingPane.qml,qt/glue (reading_model.rs),core/src/worker*,tools/e2e/Testing tier: standard. It mostly removes code, but it is a UI change, so it needed the phone.
Gate / rollback: revert this merge. There is no migration and no flag. No memory or start-up effect is expected (mem-check on
d97afa1: 156–161 MB).Proof
d97afa1: rust, audit, app, e2e and click all succeed.dark true, window #111111, text #f7f7f7.Review
Reviewer: claude-review
Review-Confidence: 80
🤖 Generated with Claude Code
Review level: high (trunk). Reviewed commit:
bbf8ebd99b. Range: origin/main...HEAD.Files read in context: qml/Main.qml, qml/pages/ReadingPane.qml, qml/pages/DisplaySettings.qml, qml/theme/Theme.qml, qt/src/reading_model.rs, core/src/worker.rs, core/src/worker/session.rs, core/src/worker/session/jump.rs, core/src/render.rs, core/src/settings.rs, core/src/bible/reader.rs, tools/e2e/lib.sh, tools/e2e/cases/display-settings.sh, tools/e2e/cases/display-settings-kill.sh, plus docs and po changes.
Findings: no defects with a concrete failure scenario.
Traced:
_ => returnarm in ReadingModel::setting. The rows are still applied, and no property is changed.text.nightrow in app.sqlite3 is simply ignored (the test covers apply()).display size) are consistent between QML and lib.sh.Notes only (not defects):
palette.window.hslLightnessbinding is only checked on the phone.Phone check, docs/09 "On the phone". The build of this head (
bbf8ebd) was installed on the phone at 15:02. Before step 1, hold the reading pane's footer: it should readfix/remove-night@bbf8ebd…. If it readsrefactor/shared-controls@f5dd50a, the phone still has the old install; tell me and I'll reinstall.Reply with ✅ or ⚠️ per step, as before.
Steps:
Step 4 cause: on the phone, Suru's controls take their colours from Suru's own attached object, not the Qt palette. The palette stays light when the system theme is dark, and the reading pane coloured its verse text from the palette. That left near-black text on Suru's dark background, and
darknever became true, so the red stayed the day red. The footer and menus were already fine because they are Suru controls.Fix
e3dad59:qml/platform/SystemColours.qmltakes the colours from Suru underqml/platform/ut/and falls back to the palette on desktop. The reading pane takes its text colour and the dark flag from it. On the phone, dark theme now logsdark true, window #111111, text #f7f7f7: white verse text and the lighter red.That build is installed and running now (the footer may read
…bbf8ebd99-dirty, the same code ase3dad59). Please carry on from step 4: check it yourself in dark, then 5–7. Local gates are running one3dad59. It gets pushed when they pass, then CI and a fresh review of the delta.Review of bbf8ebd..e3dad59 (trunk path, high depth). No blocker; two things to check.
qml/platform/SystemColours.qml:11-12 (medium, unverified): the fallback reads
palette.textandpalette.windowon a plainItem. On Qt 5.15 (clickable.yaml)Itemhas nopalette; it exists only on Controls 2 types (Control, Popup, Window) and became an Item property in Qt 6. If so, the fallback is a ReferenceError andtextandbackgroundfall back to the default (black), so the desktop reading pane would be black on black in a dark theme, anddarkwould always be false. The old code usedpane.palette(a Page), which was valid. The e2e cases will not catch it if the docker image has QtQuick.Controls.Suru, because the fallback is never taken there. Suggest making the root aControl(or taking the palette from a Control instance, e.g.Control { id: probe }andprobe.palette.text), then checking by forcing the fallback (point the Loader source at a missing file) and looking at a shot. I could not run it here.qml/platform/SystemColours.qml:15-17 (low): unlike Connectivity.qml, which loads lazily, this Loader is active at startup. Where Suru is missing (desktop) a "module QtQuick.Controls.Suru is not installed" warning is printed on every launch. Harmless, but it is new startup log noise. Also the fallback has no e2e coverage (see 1).
Checked and fine:
dark true, window #111111, text #f7f7f7) confirms it.darkandtextboth derive from the sameloader.itembindings, so they change together on any live change. Suru.backgroundColor and foregroundColor are bindable properties.import "../platform"are all registered.platform/ut/SystemColours.qmlis imported only from the Loader, so Suru stays underplatform/ut/as CLAUDE.md requires.modulesItem.palette.windowTextandmenu.palette.windowlog in ReadingPane.qml:190-191 (not rendering). The remaining rawTextitems in the reading pane (delegate, ornament, book, chapter) all moved tocolours.text. Everything else isLabel, which Suru colours itself. I found noRectanglecolours that read palette.utsb: menu icon color ..., not theutsb: dark ...line, so appending, text #...breaks nothing.windowis now the Suru background rather than the palette; the e2e greps for it are unaffected.Review 295:
Itemhas nopaletteon Qt 5: confirmed and fixed ind97afa1. I checked it withqmltestrunnerin the CI image (Qt 5.15.13). On anItem,palette.textthrowsReferenceError: palette is not defined; on aControlit gives#353637 #ffffff.SystemColoursis now aControl.Controlhas a FINALbackground, so the colours are renamedtextColourandwindowColour. I loaded the real file both ways in the CI image. Withoutut/(the fallback) it gives text#353637on#ffffff; with Suru,#111111on#ffffff. On the phone the rebuilt app logsdark false, window #ffffff, text #111111(light theme). The Suru path is the one the owner's steps 4–7 passed, and this change does not touch it.Local on
d97afa1:cargo make app-dockerpassed (PSS 161277 kB normal and 156389 kB slow; budget 165000 kB).display-settings,display-settings-killandred-letterse2e: 3 passed.Approved at
d97afa1.bbf8ebd): no findings.e3dad59): the medium is fixed ind97afa1, as explained in comment 2213. The low was answered there.Fresh audit: Review-Confidence 80.
Optional follow-up: an automated test for the fallback and the dark theme.
WIP: Remove Night mode; follow the system theme (#85, #41)to Follow the system theme: remove the Night setting (#85, #41)