Repository navigation
Conversation
Collaborator
✅ Integration test reportCommit: 47eb25f
Top 3 slowest tests (at least 2 minutes):
|
Contributor
Author
|
/review |
| cmdio.LogString(ctx, fmt.Sprintf("dark_background=%t", r.HasDarkBackground())) | ||
| cmdio.LogString(ctx, fmt.Sprintf("dark_background=%t", cmdio.HasDarkBackground())) | ||
|
|
||
| // The blurred button colour is an AdaptiveColor, which hides the choice |
There was a problem hiding this comment.
This comment says the blurred button colour is an AdaptiveColor, but this PR changes AppkitTheme to resolve the variant eagerly with cmdio.LightDark, so GetForeground() now returns a plain lipgloss.Color. The if adaptive, ok branch on line 83 is dead for the appkit theme and the comment describes something that no longer happens. Can you update the comment and either drop the AdaptiveColor branch or note that it's kept only for non-appkit themes?
pietern
force-pushed
the
pietern/charm-v2/02a-renderer
branch
from
November 18, 2026 13:07
61fd417 to
f9e24c5
Compare
pietern
force-pushed
the
pietern/charm-v2/02a-renderer
branch
from
November 18, 2026 15:55
f9e24c5 to
c8050e5
Compare
pietern
force-pushed
the
pietern/charm-v2/02a-renderer
branch
from
November 18, 2026 16:07
c8050e5 to
d7b1888
Compare
Contributor
Author
|
/review |
Adds the seam the charm.land v2 swap needs without changing output on v1. cmdio.Renderer carries the color profile for one writer: NewStyle, Profile, Writer, Render. Color, LightDark and Hyperlink stand in for the lipgloss helpers whose shape changes in v2. NewRenderer keeps #7700's rules: termenv's profile, Ascii when color is off, and the MSYS2 pty raise to ANSI unless CLICOLOR=0. Callers move to it: cmd/air writes through Renderer.Writer, and the selftest profile and huh probes read the profile and dark background through cmdio. Ruleguard bans lipgloss.AdaptiveColor and termenv.Hyperlink in new code so the v2 swap does not reintroduce them. No output changes: LogString still writes to stderr unstripped, and no pin golden moves. Co-authored-by: Isaac <no-reply@databricks.com>
pietern
force-pushed
the
pietern/charm-v2/02a-renderer
branch
from
November 20, 2026 13:23
d7b1888 to
47eb25f
Compare
This branch has not been deployed
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.
Changes
Adds the renderer seam the charm.land v2 swap needs, with no output change on v1:
libs/cmdio/lipgloss.go:Renderer(NewStyle,Profile,Writer,Render),Color,LightDark,Hyperlink.NewRendererkeeps cmdio: make NO_COLOR only affect color #7700's rules: termenv's profile, Ascii when color is off, and the MSYS2 pty raise to ANSI unlessCLICOLOR=0.cmd/airwrites throughRenderer.Writer.cmd/selftest/tuiprofile and huh probes read the profile and dark background throughcmdio.libs/gorules/rule_lipgloss.gobanslipgloss.AdaptiveColorandtermenv.Hyperlinkin new code.libs/apps/prompt:Themealias for the huh theme; the appkit theme builder isappkitStyles.cmd/appsusesprompt.Theme.Why
v2 removes
AdaptiveColor,termenv.Hyperlinkand the*Renderermethods the callers used, so every caller needs a version-agnostic seam first. Landing it on v1 first keeps the swap a mechanical change.LogStringis not in this PR, so stderr output is unchanged; that is the next PR.Tests
go build ./...;go veton touched packages; golangci-lint (0 issues); gofmt clean.TERM=xterm-256color go test -race -count=3 ./libs/cmdio/...passes.go testforlibs/tableview,libs/apps/...,cmd/air,cmd/apps,cmd/fs,cmd/aitools,cmd/selftest/...,internal/buildpasses.go test ./acceptance/...) passes.-update. No golden changes.Stack: based on
pietern/charm-v2/01-termtest-emulator. The branch after this one ispietern/charm-v2/02b-logstring-strip, which changes stderr output.Manual checks for real terminals: none for this PR (no behaviour change).
This pull request and its description were written by Isaac.