Skip to content

fix(editor): colour the caret from the theme, and v2.32.1 (#283) - #284

Merged
jeiel85 merged 4 commits into
mainfrom
claude/github-issue-response-7d6253
Jul 27, 2026
Merged

fix(editor): colour the caret from the theme, and v2.32.1 (#283)#284
jeiel85 merged 4 commits into
mainfrom
claude/github-issue-response-7d6253

Conversation

@jeiel85

@jeiel85 jeiel85 commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Closes #283.

What was wrong

The note editor's BasicTextField never passed cursorBrush, 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 primary is what they use.

What changed

  • cursorBrush = SolidColor(colorScheme.primary) at the one call site.
  • ThemedCaretTest scans src/main and fails any BasicTextField( call site that omits cursorBrush. 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_phone re-recorded on the Linux runner — it renders the real EditorScreen with the field focused, so the caret is in the image. 61 of the 62 goldens came back byte-identical.
  • v2.32.1 release prep: versionCode 123, both CHANGELOG editions, six store changelogs, landing ×6 and README ×6, and THANKS.md.

Verification

  • testDebugUnitTest (548 tests) + lintRelease locally.

  • The guard was checked by removing the fix and confirming it named EditorScreen.kt:886.

  • Device pass on the markleaf-phone-api36 emulator, caret core pixels sampled from a screenshot burst (the caret blinks, so one capture catches it half the time):

    Theme Caret Background Contrast
    Markleaf Green, dark #81C784 #191C19 8.7:1
    Material You, dark (176,198,255) (18,19,24) 11.2:1
    Material You, light (71,93,146) (250,248,255) 6.1:1
    Markleaf Green, light #2E7D32 #F9FBF9 4.9:1

    The same measurement before the fix was black on #191C19 — 1.2:1, which is the report.

🤖 Generated with Claude Code

jeiel85 and others added 4 commits July 27, 2026 09:23
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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jeiel85
jeiel85 merged commit ecc79d5 into main Jul 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cursor barely visible with dark theming

1 participant