fix(editor): colour the caret from the theme, and v2.32.1 (#283) - #284
Conversation
The note editor's `BasicTextField` never passed `cursorBrush`, so Compose's default — `SolidColor(Color.Black)` — was in effect. On a dark background that left a black caret on a near-black page, in both Markleaf Green and Material You, while the drag handle beside it was themed all along. It is the only raw foundation text field in the app; every Material field already takes its cursor colour from the theme, and `primary` is what they use. `ThemedCaretTest` scans `src/main` and fails if a `BasicTextField` call site omits `cursorBrush`. Nothing else could catch this class of defect: the caret blinks, so a Roborazzi golden cannot assert it, and lint has no opinion about a Compose default. Verified by removing the fix and watching the test name the call site. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Version bump, both CHANGELOG editions, six store changelogs (428 chars at the longest, against the 500-char Play cap — every locale now keeps more than the 50 characters of headroom `verify-release-notes.ps1` warns below), and the version strings on the six landing pages and six READMEs. THANKS.md gains @ElizabethWega for #283, and picks up #279 and #280 on @bit2bold's row — those two were reported after the file was last touched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`editor_screen_quiet_appbar_phone` renders the real `EditorScreen` with the field focused, so the caret is in the image — the only golden the colour change touches. Recorded by the `record_roborazzi` dispatch rather than locally, where font hinting moves half the snapshots; the artifact came back with 61 of 62 goldens byte-identical, which is the evidence that nothing else moved. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e19b09592
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // while the drag handle beside it was themed, in both | ||
| // Markleaf Green and Material You (#283). `primary` is what | ||
| // the Material fields use, so the caret now matches them. | ||
| cursorBrush = SolidColor(colorScheme.primary), |
There was a problem hiding this comment.
Record the release in HISTORY.md
This code change and v2.32.1 release leave HISTORY.md unchanged, so the required work-unit record omits issue #283 along with its implementation, verification, and release details. Add the corresponding history entry before shipping.
AGENTS.md reference: AGENTS.md:L219-L223
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Already done — the review ran against 2e19b09, and the entry landed in 6fba512 ("docs: log the caret fix and v2.32.1") a few minutes later. HISTORY.md now opens with The editor caret takes the theme's colour, and v2.32.1 (#283), carrying the trigger, the analysis, the contract, this PR as the implementation, the four measured contrast readings, and the release lines.
Closes #283.
What was wrong
The note editor's
BasicTextFieldnever passedcursorBrush, so Compose's default —SolidColor(Color.Black)— was in effect. On a dark background that is a black caret on a near-black page, in both Markleaf Green and Material You, while the drag handle right beside it was themed all along. The reporter's screenshots show exactly that mismatch.It is the only raw foundation text field in the app. Every Material field (search, rename, settings, passcode) already takes its cursor colour from the theme, and
primaryis what they use.What changed
cursorBrush = SolidColor(colorScheme.primary)at the one call site.ThemedCaretTestscanssrc/mainand fails anyBasicTextField(call site that omitscursorBrush. Nothing else in the suite can see this: the caret blinks, so a Roborazzi golden cannot assert it, and lint has no opinion about a Compose default. The scan also fails when it matches nothing, so a text field renamed out from under it cannot pass for the wrong reason.editor_screen_quiet_appbar_phonere-recorded on the Linux runner — it renders the realEditorScreenwith the field focused, so the caret is in the image. 61 of the 62 goldens came back byte-identical.Verification
testDebugUnitTest(548 tests) +lintReleaselocally.The guard was checked by removing the fix and confirming it named
EditorScreen.kt:886.Device pass on the
markleaf-phone-api36emulator, caret core pixels sampled from a screenshot burst (the caret blinks, so one capture catches it half the time):#81C784#191C19(176,198,255)(18,19,24)(71,93,146)(250,248,255)#2E7D32#F9FBF9The same measurement before the fix was black on
#191C19— 1.2:1, which is the report.🤖 Generated with Claude Code