Light adaptation follow-ups: palette provenance, minimum-contrast, settings, iOS - #66
Merged
Merged
Conversation
…tting TRF1 gains section 13 (StylePalette): for styles whose explicit colors came from the terminal palette, the palette index beside the resolved RGB. It is additive — old decoders skip it and render the same RGB — and omitted when no style has provenance. Style ids include provenance only when present, so one RGB reached by palette and by truecolor stays two definitions. The phase-1 golden frame is regenerated for that intentional change. Light adaptation keeps a light theme's own chromatic ANSI colors (1–6, 9–14) when they stay legible on the remapped surface; neutral entries still remap by role. `minimum-contrast` (Ghostty key, 1–21) is now applied to text glyphs and their decorations, hue-preserving rather than snapping to black or white; box drawing, block elements, and color glyphs are exempt. `ghosttea-light-adaptation = auto|off` is the first Ghosttea extension key, accepted beside the pinned Ghostty schema. Both settings reach remote views through the terminal presentation, the protocol validates them, and Settings → Appearance → Readability writes them into the managed block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… in Metal Ports the WebGPU remap to GhostteaMetalRenderer: the TRF1 decoder reads section 13, the theme carries the two new settings from the presentation config, styles resolve once per mesh with text/fill colors, and the adaptation key joins the geometry and row-cache keys. Settings → Appearance gains a Readability section that writes the same keys as the desktop. Verified in the iOS simulator against a core built from this branch; the published Apple native artifact needs its next rebuild before devices see section 13 or the new keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-ups to #65.
What changes
StylePalette) records which palette index a style's explicit color came from. Additive: old decoders skip it and render the same RGB; it is omitted when no style has provenance. Style ids include provenance only when present, so ANSI red and the same RGB as truecolor stay two definitions. The phase-1 golden frame (native/ghosttea/fixtures/phase1/ansi-baseline.json) is regenerated for this intentional TRF1 change; TS and Swift decoders both read it.minimum-contrast(Ghostty key, 1–21) is applied to text glyphs and underline/strikethrough. It keeps hue and moves OKLab lightness only as far as needed (Ghostty snaps to black/white). Box drawing, block elements, and color glyphs are exempt, as in Ghostty.ghosttea-light-adaptation = auto|off— first Ghosttea extension key, accepted beside the generated Ghostty schema (known-keys.txtstays untouched). Both settings flow throughRendererConfig, the remoteTerminalPresentationConfig, and protocol validation.minimum-contrast.Verification
cargo test --workspacegreen (incl. new frame and config tests).minimum-contrastand the adaptation toggle live.GhostteaTerminalMetalViewrender a dark-painted scene and recorded Grok output as a light design;off,minimum-contrast = 4.5, and the Readability settings screen all checked visually.Expected CI notes
audit-publishedwill flag that the pinned Apple native artifact predates these native changes; it needs the usual rebuild/pin at the next release. Until then, devices on the published artifact won't see section 13 or the new keys.dependency-auditfailures are pre-existing (also failing onmain).🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.