Repository navigation
Conversation
… shared roles Qt's composer drew on the page's own colour, so it read as part of the transcript, while Textual's prompt sits on PromptToneColour. The composer's area tone is now one declaration on the shared PromptComposer (`area_tone`); Textual's Prompt points its TonePaint at it and Qt's Composer paints its area with it. The open tab is raised a tier off the tab bar in both frontends (ui_theme's SelectedTabToneColour). Qt had drawn it darker than the other tabs; the TUI had marked it only by the underline. Needs ui-theme's tier derivation (TIER_GAP, SelectedTabToneColour) and pyqt-reactive's tab_bg / selected_tab_bg roles, so it merges after both and a runtime rebuild. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Tristan, on the phone app: the colours of adjacent UX items "don't differ enough … so it all looks like one thing"; later, "slightly more contrast between the colours of adjacent UX elements".
The owner of the cause is ui_theme's tone derivation, which both frontends draw from. Area tones were fixed shares of the background→foreground distance, and the page and sidebar landed 1.4–3.4 L* apart. That is fixed in OpenHCSDev/ui-theme#33, and the Qt tab roles in OpenHCSDev/PyQT-reactive#64. This PR is toad's part, two places where Qt and Textual disagreed:
Promptsits onPromptToneColour. Qt'sComposerdrew on the page itself (page/composer ΔL* = 0 in every scheme), so the input area read as part of the transcript.PromptComposer,area_tone = PromptToneColour. Textual'sPromptpoints itsTonePaint.toneat it;TonePaintprecedesPromptComposerin its bases, so the class attribute would otherwise hide it. Qt'sComposerpaints its area with it and follows theme changes inpaint_colours.SelectedTabToneColour, Qt through pyqt-reactive'sselected_tab_bgand Textual throughSessionLabel.tone.paint_currentrefreshes the cached paint, because the tone follows selection.No widget picks a colour. Each names its role.
The floor and its number
Every area tone sits at least
TIER_GAP = 6CIELAB L* past the surfaces it sits on or beside, solved per scheme.Why 6: a just-noticeable lightness difference is about 2 L*. Daylight reflected off a phone's glass washes out dark tones most, which is where a dark theme's surfaces live (L* 5–25). Three times the JND reads as a separate surface outdoors. The tiers:
Muted text keeps 4.5:1 on the page and every area tone, as far as the scheme's own foreground reads there. Rules keep 3:1.
Measured on the rendered app (textual-dark, the phone's theme, 412×915 offscreen,
qt_drive chrome)Pixels sampled from
chrome-2-channel.png, main → this branch with both library branches:catppuccin-latte (
chrome-4-thread-pane.png): page/sidebar 2.1 → 6.2, sidebar/rows 2.4 → 6.0, open tab sunken → raised 6.1, page/composer 0 → 6.2.The per-scheme table for all 19 drawable schemes is in ui-theme#33. Every pair is ≥ 6.0 on the branch, against 1.4–5.8 on main.
What I saw in the screenshots (read, not just measured):
Gates, once, on the final head
These ran on an overlay runtime: the installed runtime hardlink-copied, with ui-theme#33 and PyQT-reactive#64 dropped in. The installed runtime itself is untouched.
On the final head, rebased onto main 19058d2 (which has #2112 and #2115):
qt_inherit_ratchetshadow_checkglyph_checktools/android/check.sh(PYTHONFAULTHANDLER=1)qt_drivearrival, history, chrome, menuThe four drives need the live bus, and it was down. At 04:53 the host ran out of memory and the OOM killer took the systemd user manager. After that,
systemctl --userrefuses connections andagent-comms statusreturns no threads. All four drives timed out at "welcome rows", before any step ran.Run on the same change before the rebase, against the live bus:
qt_drive.py:649's one-shot sidebarnext()The history failure also happens on unmodified main. #2112, now in this head, replaces that lookup with a waiting one. The four drives must run on this head once the bus is back, before merge.
Library tests:
test_color_scheme_from_theme.py38 passed. Of the 20 other files touchingColorScheme, 28 tests fail, an identical set on main.Rollout
SelectedTabToneColour)mainThis PR imports
SelectedTabToneColour, so it must not merge before the runtime has it.Notes for other forks
The role API (
FloatToneColour,FloatHoverToneColour,RuleColour,SurfaceHoverColour, the tier members) is in ui-theme#33. The menu and header-rule forks consume it.🤖 Generated with Claude Code
https://claude.ai/code/session_01RnH6dT7wdh7i4tjJZQdFu3