Skip to content

fix(mobile): keep disabled primary button labels legible - #6354

Open
iscekic wants to merge 1 commit into
mainfrom
kwf/explorer-composer-repo-chosen-the-primary-start-session-l-dfecb-2c84
Open

iscekic wants to merge 1 commit into
mainfrom
kwf/explorer-composer-repo-chosen-the-primary-start-session-l-dfecb-2c84

Conversation

@iscekic

@iscekic iscekic commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Changelog for users

  • A disabled primary button keeps a legible label in both light and dark themes instead of fading into its fill.
  • The disabled Start session button on the new-session form now reads as inactive but stays readable.
  • A primary button that is busy keeps its brand fill and shows a spinner, so it still reads as working.
  • Disabled buttons that are not primary keep their existing dimmed appearance.

Changelog for maintainers

  • Finding accepted: the disabled primary dimmed via opacity-50, compositing the brand fill and ink into olive-on-olive; the disabled primary no longer dims.
  • Added a --primary-disabled token (light #6F6A61, dark #8A8680) in apps/mobile/src/global.css, generated into theme-colors.generated.ts by generate-theme-colors.mjs.
  • Disabled, non-busy default-variant buttons paint bg-primary-disabled and skip opacity-50; non-default variants keep opacity-50.
  • A loading primary keeps bg-primary and the inline spinner; new-session-start-button.tsx passes loading instead of rendering its own ActivityIndicator.
  • Contrast tests assert primaryForeground on primaryDisabled clears 4.5:1 in both themes; mounted Button and bootstrap-error-screen tests cover the class precedence.
  • Review hint: confirm bg-primary-disabled merges after the variant fill so it wins over bg-primary, and that the busy path never takes the muted fill.

E2E proof — log excerpts

[e1] composer-repo-chosen: primary 'Start session' label contrast in the dark theme — e2e-mobile-app/e1-composer-repo-chosen-dark.png

[e1] composer-repo-chosen: primary 'Start session' label contrast in the dark th -> pass :: Android emulator-5554, app Appearance=Dark (e1x-theme-dark-scene.xml: content-desc="Dark" checkable="true" checked="true"); with the repository chosen (e1-composer-repo-chosen-dark-scene.xml: content-desc="Repository: GitHub · iscekic/panon-deking") and the prompt empty (e1x-composer-top-dark-scene.xml: showing-hint="true") the primary control renders disabled (e1-composer-repo-chosen-dark-scene.xml: content-desc="Start session" checkable="false" checked="false" clickable="true" enabled="false"); the disabled-label contrast judgement is the visual reviewer's on capture e1-composer-repo-chosen-dark.png.

Open findings (not fixed here)

  • e1: Observed: The primary 'Start session' label is low-contrast olive-on-olive in the dark theme even though the form is complete, so the main action reads as disabled and is hard to read. Expected: the screen renders without this defect
  • [e1] Observed: The primary 'Start session' label is low-contrast olive-on-olive in the dark theme even though the form is complete, so the main action reads as disabled and is hard to read. Expected: the screen renders without this defect
  • [e1] composer-repo-chosen: primary 'Start session' label low-contrast in the dark theme: android emulator-5554: the pack carries no change for this finding (files/change.diff is empty, worktree $WT clean at the reported revision fd04ca1), so the expected fixed rendering is not delivered; on the de

e1-composer-repo-chosen-dark

Explorer finding: composer-repo-chosen: The primary 'Start session' label is low-contrast olive-on-olive in the dark theme even though the form is complete, so the main action reads as disabled and is hard to read.

The user-agent explorer found this while using the app like a user.
One finding per item; the explorer never edits product code.

Flow: composer-repo-chosen
Found on revision: fd04ca1

Repro:
1. set this state first: account e2e-mobile-cloud-android@example.com signed in, $10 credits, 3 Code Reviewer pull requests, a second organization to switch to, display size 1440x3200, system day mode, portrait.
2. open the app on emulator-5554
3. reach the screen the capture names (composer-repo-chosen)
4. the capture shows the defect named below

Observed: The primary 'Start session' label is low-contrast olive-on-olive in the dark theme even though the form is complete, so the main action reads as disabled and is hard to read.
Expected: the screen renders without this defect

Evidence (from the device run):
- ~/.local/share/kwf/findings/explorer-composer-repo-chosen-the-primary-start-session-l-dfecb6b6/composer-repo-chosen.png
@iscekic
iscekic marked this pull request as draft September 19, 2026 08:38
@kilo-code-bot

kilo-code-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the disabled-primary button treatment (new --primary-disabled token, class precedence in Button, busy spinner wiring, and the accompanying tests); no correctness, security, or regression issues found.

Files Reviewed (9 files)
  • apps/mobile/scripts/generate-theme-colors.mjs
  • apps/mobile/src/components/agents/markdown-palette.test.ts
  • apps/mobile/src/components/agents/new-session-start-button.tsx
  • apps/mobile/src/components/bootstrap-error-screen.mounted.test.tsx
  • apps/mobile/src/components/ui/button.mounted.test.tsx
  • apps/mobile/src/components/ui/button.tsx
  • apps/mobile/src/global.css
  • apps/mobile/src/lib/hooks/theme-colors.generated.ts
  • apps/mobile/src/lib/hooks/use-theme-colors.contrast.test.ts

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@iscekic
iscekic marked this pull request as ready for review September 19, 2026 08:46
@iscekic iscekic added the human-ready The PR is ready for human review. label Sep 19, 2026
@iscekic iscekic self-assigned this Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-ready The PR is ready for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant