Note markers and a note sheet, tap a reference to jump (#13, 6c) #129
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!129
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/13-6c-markers"
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?
Refs #13 (PR 6c of 4)
What
Notes show as small raised markers (a, b, …) in the reading text, in both verse and running-text modes. Tapping a marker opens a bottom sheet with the note's text and a row for each reference it cites. 6b's parser reads those references, and each row shows the start of that verse's text. Tapping a row jumps to the verse, and Back returns to the exact place you left. The worker reads the sheet when you ask for it; notes are not kept in memory with the rows.
Blast radius
Tier: trunk
Trunk paths touched:
core/src/render.rs,core/src/bible.rs,core/src/bible/{note,reader,reader/sheet}.rs,core/src/worker.rs,core/src/worker/session{,/jump}.rs,qt/src/reading_model.rs,qml/pages/ReadingPane.qml,tools/e2e/,tools/mem-check/run.sh,.forgejo/workflows/ci.ymlTesting tier: maximum (CI config: the e2e job fetches BSB and caches modules under its own key). Also standard (the feature).
Gate / rollback: revert this merge. There is no schema change and no migration.
Budgets (docs/07):
31d3ce4measured 166886 kB normal and 162492 kB slow.Proof
cargo make: fmt, clippy, 276 core tests and the workspace, release check, deny and audit all pass.cargo make app-docker: passes (lint, -Werror build, clang-tidy, PSS check).note-sheetcase passes: tap a marker, the sheet opens, tap a reference, it jumps, Back returns.39a0f18: run 237: changes, rust, audit, app, e2e and click all succeeded. The e2e log hasPASS note-sheet (11s)(marker → sheet → 2 Cor 4:6, Back to the same place), no SKIP, and the new cache key missed once then was saved.rich_markedforrichand breaking the label repeat makesputs_note_markers_in_the_text_at_their_placesandlabels_past_z_double_upfail.208d643failed in e2e because note-sheet was skipped (BSB was not in the runner).cargo make shots, all viewed):31d3ce4, and checked again on the phone: it is now grey with no line.Not covered:
Choices and deviations:
Row. The rich text carries only the marker links, and the sheet re-reads the verse on the worker.<sup>. RichText ignoreslinkColorand underlines links, so the colour andtext-decoration:nonego on the anchor.--e2eargument that turns on the marker probe log.tools/e2e/lib.shpasses it throughE2E_APP_ARGS, and mem-check sets that empty, so the PSS check measures the production path.For the owner (feel only):
Review
Reviewer:
40dc8d2, had 4 lows. All were fixed in208d643; the answers are in review 335.39a0f18(comment 2537), with no further review round.208d643, the fixes to review 334. Review 337, at medium on 40dc8d2..208d643, then found nothing.Review-Confidence: 65/100, from the second audit. It found no missed defect. It took 15 off because nothing exercises "Show all N" (no BSB note has more than 5 references; 6d's TSK sheet will). It took another 15 off for the dark theme, which is unchecked. It took 5 off because the
39a0f18cache-key fix got no review; CI run 237 proves it.Open:
Confidence by part
🤖 Generated with Claude Code
Fresh-context review. Level: high. Blast radius: trunk.
Reviewed commit:
40dc8d28e4Range: origin/main...HEAD (CI was still pending at review time; commits reviewed, not CI).
Files reviewed: core/src/bible.rs, core/src/bible/note.rs, core/src/bible/reader.rs, core/src/bible/reader/sheet.rs, core/src/bible/block.rs (context: plain_len), core/src/render.rs, core/src/worker.rs, core/src/worker/session.rs, core/src/worker/session/jump.rs, qt/src/reading_model.rs, qml/controls/BottomSheet.qml, qml/controls/qmldir, qml/pages/NoteSheet.qml, qml/pages/ReadingPane.qml, qml/qml.qrc, po/de.po, po/utstudybible.schaefera.pot, tools/e2e/cases/note-sheet.sh, tools/e2e/lib.sh.
No high or medium defects found. Checked and fine: marker offsets vs plain_len (markers' letters are counted by Block::plain_len, so verseStart/verseEnd/positionAt stay consistent in running text); rich_marked char-boundary handling, boundary and past-end marks; parse_link rejections and out-of-range index (labels().nth before swap_remove); JSON escaping; Event::Note bypassing the stale-id check (intended, like Notice); .pot strings match the new qsTr calls.
Findings outside the diff:
@ -0,0 +24,4 @@width: ApplicationWindow.window ? ApplicationWindow.window.width : 0height: tall ? Math.round(windowHeight * 0.92): Math.min(Math.round(windowHeight * shortFraction),head.implicitHeight + column.implicitHeight + Theme.margin)low: the title Label has Layout.margins: Theme.margin (top and bottom, 2x) but the height adds only head.implicitHeight + column.implicitHeight + Theme.margin, so a short sheet is one margin too short: the Flickable's content is slightly taller than its viewport and the last row is clipped / scrollable by that amount. Use head.implicitHeight + 2 * Theme.margin + column.implicitHeight.
@ -449,6 +492,12 @@ Page {persistentSelection: falsewrapMode: TextEdit.WraptextFormat: TextEdit.RichTextonLinkActivated: pane.noteTapped(link)low: Text has linkColor (set above for verse mode) but TextEdit has none, so in running-text mode the markers use the palette link colour (default blue, underlined). On the dark theme that may be hard to read against colours.mutedColour used elsewhere. Not verified on the phone; check the dark running-text shot, or style the marker with an explicit from the core.
Round 1 answers (fixed in
208d643):On the phone (
80300cb, then 31d3ce4's change)I checked these with ute2e taps, screenshots and the journal (
utsb: build 0.0.1 feat/13-6c-markers@80300cb71):31d3ce4): in verse mode the marker was blue, with an underline at the baseline that read as "feet_a". RichText ignoreslinkColorand underlines links. The colour andtext-decoration:nonenow go on the anchor in both modes. On the phone, the marker is now muted grey with no line.saved BSB 27638 0.000).saved BSB 27575 0.469), with the same screen as before the tap.Not checked on the phone:
For the owner (feel only): whether the small raised marker is easy enough to hit with a finger, and how the sheet feels to open and close.
🤖 Generated with Claude Code
Review level: medium (delta). Commit
31d3ce4b05. Range 208d643..31d3ce4.Files reviewed: .forgejo/workflows/ci.yml, qml/pages/ReadingPane.qml, tools/golden/fetch.sh, tools/e2e/cases/note-sheet.sh.
No high or medium findings.
fetch.shtakes the module list as arguments and downloads any zip missing from the cache. A cache restored from before this change (KJV only) therefore still gets BSB fetched, so the e2e fix works.marked()leaves thehrefunchanged, solinkAtinlogMarkersandnoteTappedstill seenote:...links. The verse-mode Text uses RichText only for rows that contain a marker, and themarked()split is a no-op for other rows.cargo make shotsor a phone look cover that.Low, outside the diff:
fetch.sh, so on an exact cache hit the cache is not re-saved. The BSB zip is then downloaded from crosswire on every e2e run, and a crosswire outage fails the job. Fix: add the module list to the key, or bump a key prefix.🤖 Generated with Claude Code
Delta review 336: response
.forgejo/workflows/ci.yml:251(cache key): fixed in39a0f18. The app job saves a KJV-only cache under the sharedsword-modules-<hash>key. Because an exact hit is never re-saved, the e2e job would have downloaded BSB from CrossWire on every run. The e2e job now uses its own key,sword-modules-e2e-KJV-BSB-<hash>. The first run misses that key, fetches the modules and saves them; later runs hit the cache. Per the shipping skill, this fix to a delta-review finding gets no further review round. It goes to the audit along with this finding.🤖 Generated with Claude Code
Review level: medium (delta review, blast radius trunk)
Commit:
208d643bcfRange: 40dc8d2..208d643
Files:
Findings: none with a concrete failure scenario.
Checked:
${E2E_APP_ARGS---e2e}expands to--e2ewhen unset and to nothing when set empty. All other e2e_start callers leave it unset, so only mem-check changes.utsb: showing(ReadingPane.qml:60) andwindow loaded after(qt/main.cpp:82). Neither is gated on --e2e, so mem-check still gets its markers without the flag.--e2etest aspane.e2e.model.text, not the rewritten text, so the check is unchanged.🤖 Generated with Claude Code
WIP: reader: note markers, a bottom sheet for notes, tap a reference to jump (#13, 6c)to Note markers and a note sheet, tap a reference to jump (#13, 6c)Merge gate at medium on head
39a0f18.Checked:
208d643,39a0f18).git show 39a0f18. It only gives the e2e job's module cache its own key (sword-modules-e2e-KJV-BSB-...), so the KJV-only cache the app job saves can't shadow it. The cache path and the fetch step are unchanged.PASS note-sheet (11s), with no SKIP and no FAIL. This is the maximum tier's targeted check.🤖 Generated with Claude Code