Skip to content

Update x/ansi to v0.11.9 and restore the prompt's background - #31

Merged
junior merged 3 commits into
p10node:mainfrom
junior:xansi-prompt-bg
Nov 8, 2026
Merged

junior merged 3 commits into
p10node:mainfrom
junior:xansi-prompt-bg

Conversation

@junior

@junior junior commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Two follow-ups to #20 and #21.

Commit 1 updates github.com/charmbracelet/x/ansi from v0.11.6 to v0.11.9. With #20 and #21 in, it is the only direct dependency that still has a newer release on its module path. Dependabot's charm group skipped it in its 2026-11-05 run because bubbles v1.0.0 had already moved it to v0.11.6. It brings displaywidth v0.11.0, uax29/v2 v2.7.0, go-runewidth v0.0.27 and go-colorful v1.4.1 along and drops stringish; go 1.26.0 stays. k10s itself only calls ansi.Truncate and ansi.TruncateLeft. It fixes no vulnerability: govulncheck v1.9.0 finds none before or after, and trivy 0.76.2 found 0 in each of the five release binaries built with these dependencies.

Commit 2 brings the prompt's background back. Since v0.21.1, bubbles pads an empty text input's placeholder with unstyled spaces; up to v0.21.0 they were drawn in PlaceholderStyle, which k10s gives the theme background. So since #21 the bottom prompt row, the empty palette query and the /settings custom row show the terminal's own background after the placeholder: about 94 cells of the prompt row at 140 columns. inputView paints that run in PlaceholderStyle again, at the four places that draw the input. A frame probe at 140x44 (demo source, tokyo-night) counts the cells without a background: 96, 139 and 107 on the three screens with #21, and 2 with this change, as before #21 (those 2 are in the CPU/MEM header).

Checked on Go 1.26.10 and 1.27.3: gofmt, go vet ./..., go mod tidy -diff and go mod verify are clean, go test -short ./... and the full internal/ui tests pass, all five release platforms build, and govulncheck finds nothing. The rest of the direct dependencies and the golang.org/x modules in go.mod are at their latest releases; the charm v2 modules live under new module paths, so moving to them is a migration of its own, not part of this.

With p10node#20 and p10node#21 in, x/ansi is the only direct dependency that still
has a newer release on its module path. Dependabot's charm group left
it at v0.11.6: bubbles v1.0.0 had already pulled it up that far, so the
group update skipped it.

v0.11.9 brings its own requirements along: clipperhouse/displaywidth
v0.11.0, clipperhouse/uax29/v2 v2.7.0, mattn/go-runewidth v0.0.27 and
lucasb-eyer/go-colorful v1.4.1, and clipperhouse/stringish drops out.
go.mod keeps `go 1.26.0`. Every other direct dependency is at its
newest release on its module path, and so is every golang.org/x module
in go.mod.

Nothing here fixes a vulnerability: govulncheck and trivy are clean
before and after.

Signed-off-by: Adao Oliveira Jr <[email protected]>
Since v0.21.1, bubbles pads an empty text input's placeholder with
spaces that carry no style; up to v0.21.0 it drew them in
PlaceholderStyle, which k10s gives the theme background. p10node#21 moved k10s
from v0.21.0 to v1.0.0, so the bottom prompt row, which is always on
screen, the empty palette query and the /settings custom row have shown
the terminal's own background after the placeholder since then: about
94 cells of the prompt row at 140 columns, in any theme whose
background differs from the terminal's.

inputView paints that trailing run of spaces in PlaceholderStyle again,
at the four places that draw the input. A frame probe at 140x44 (demo
source, tokyo-night) counts the cells without a background: 96, 139
and 107 on the three screens with p10node#21, and 2 with this change, as
before p10node#21 (those 2 are in the CPU/MEM header). The /settings row ends
one cell of theme background short of v0.21.0, which is bubbles
v1.0.0's own change of the input's width.

Signed-off-by: Adao Oliveira Jr <[email protected]>
@junior
junior requested a review from pierreneter as a code owner November 8, 2026 01:26
@junior
junior merged commit 920b40f into p10node:main Nov 8, 2026
3 checks passed
@junior
junior deleted the xansi-prompt-bg branch November 8, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants