Reading Comfort restores its toggle on launch but not its typography
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Read docs/specs/12-dyslexia-mode.md and trace startup in src/main.ts, alongside applyReadingComfort() in src/lib/reading-comfort.ts; check how src/components/settings-screen.ts reads the stored state. Add a regression test for the launch path that asserts the applied attribute and computed scale. Done means stored settings are applied before the first screen paints, the toggle and DOM agree even on first run, and terminals opened after restoration use the stored font settings.
Written by the indexing model from the issue text.
Description
Goal
Make Reading Comfort actually take effect on launch when it is already enabled, as docs/specs/12-dyslexia-mode.md requires.
Priority
p2. A persisted preference silently stops working across restarts, and the status-bar toggle actively reports the wrong thing (aria-pressed="true" with no visual effect). The workaround is to toggle the mode off and on again, which a user only discovers by accident.
Current gap
With comnd-reading-comfort stored as {"enabled":true,"prevFontSize":14,"lastFontSize":16,"uiScale":1.15,"lineHeight":1.4,"letterSpacing":2}, after a reload:
- the status-bar toggle reports
aria-pressed="true"; data-reading-comfortis absent from<html>;--text-scaleis unset;- host names render at 13px instead of 14.95px.
Toggling the mode off and on applies everything correctly (data-reading-comfort="on", --text-scale: 1.15, 14.95px), so the state round-trips and only the startup application is missing. Spec 12's manual step 2 says "Restart app → mode + all values persist".
Likely cause
src/lib/reading-comfort.ts exports applyReadingComfort() and calls it from enable(), update() and resetToPreset(), but nothing calls it during startup. src/main.ts imports isReadingComfortEnabled and wires the comnd:reading-comfort event, and src/components/settings-screen.ts reads isReadingComfortEnabled() to render the toggle — so the UI reads the stored state while the DOM never receives it.
Recorded in PR #96 (docs/testing/manual-matrix.md §Findings, F-1) and deliberately not fixed there, because that change is documentation only.
Scope
Apply the stored mode once during startup, before the first screen paints, so the app does not flash unstyled text. Reuse the existing applyReadingComfort() path rather than duplicating it; if terminals need a size notification on startup, emit the same comnd:reading-comfort event the other entry points emit.
Acceptance criteria
- With the mode stored as enabled, a fresh launch sets
data-reading-comfort="on"and--text-scaleto the storeduiScalewithout any user interaction. - Host names and other UI text render at the scaled size on the first paint, not after a toggle.
- The status-bar toggle's
aria-pressedand the applied DOM state agree on every launch path, including a first run where nothing is stored. - A regression test covers the launch path and fails if the startup call is removed. It must assert the applied attribute and computed scale, not merely that a function ran.
- Terminals opened after a restored session use the stored Reading Comfort font settings.
Boundaries
Do not change the storage format or the preset values, and do not add a second persistence path. Terminal font handling stays where it is; this is the UI-text application at startup.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 6h 28m
- Merged PRs (30d)
- 77
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bonzo81/comnd
-
p3 testing
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
cargo test --release fails: registry test asserts a debug-only providerPossibly taken @bonzo81 claimed this today. Openmaintenance p2 rust testing
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Flaky smoke: element-handle races abort the suite before the mutation runsPossibly taken A pull request linked to this issue is open or already merged. Openci p2 testing
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
bug p2
Difficulty 3/5 1-2 days Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug p3
Difficulty 3/5 1-2 days Newbie friendliness 65/100
Maintainers usually reply within 1 day
Similar issues
-
account bug communication lecture
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area:tui bug platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anthropics/claude-code#109005 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
openedx/end-to-end-tests#196 ·
Maintainers usually reply within 1 day
-
area:tooling good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
interledger/publisher-tools#1007 ·
Maintainers usually reply within 1 day
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
databrickslabs/ontos#1420 ·
Maintainers usually reply within 3 days