Conversation
Introduces a new draft RFD covering the design for a frontend-neutral style model and terminal-specific color adapter for the CLI. The RFD addresses two user-visible failures: inline code rendering as black text on near-black backgrounds on light terminals, and incorrect syntax-highlighted output on 256-color terminals due to unconditional truecolor emission. The proposed design separates three concerns into distinct layers: a shared semantic style vocabulary in a new `jp_style` crate, per-frontend renderers that resolve semantic scopes while context is still available, and a terminal sink in `jp_printer` that adapts ANSI bytes to the active terminal profile. This ensures truecolor downgrading and light/dark readability are handled in one place rather than repeated at every call site. The RFD also defines a `ColorProfile` model in `jp_term`, environment and config precedence rules for color enablement and depth, and a phased implementation plan covering terminal profile detection, inline code readability, the shared style model, and CLI chrome scopes. Signed-off-by: Jean Mertz <git@jeanmertz.com>
…tation Signed-off-by: Jean Mertz <git@jeanmertz.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.
Introduces a new draft RFD covering the design for a frontend-neutral style model and terminal-specific color adapter for the CLI.
The RFD addresses two user-visible failures: inline code rendering as black text on near-black backgrounds on light terminals, and incorrect syntax-highlighted output on 256-color terminals due to unconditional truecolor emission.
The proposed design separates three concerns into distinct layers: a shared semantic style vocabulary in a new
jp_stylecrate, per-frontend renderers that resolve semantic scopes while context is still available, and a terminal sink injp_printerthat adapts ANSI bytes to the active terminal profile. This ensures truecolor downgrading and light/dark readability are handled in one place rather than repeated at every call site.The RFD also defines a
ColorProfilemodel injp_term, environment and config precedence rules for color enablement and depth, and a phased implementation plan covering terminal profile detection, inline code readability, the shared style model, and CLI chrome scopes.