Repository navigation
feat(table): CellBar gauge in a cell; ProgressBar.FillColor - #602
Merged
Merged
Conversation
Table.CellBar(row, col) (fraction, fill, ok) paints a progress bar under a body cell's text, so a row can carry a gauge next to its number (a context window, a quota). ProgressBar gets FillColor(), a reactive per-instance fill colour; alpha 0 keeps Accent. Both default to the previous picture byte-for-byte; coverage stays 100 %. Co-Authored-By: Claude Sonnet 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.
What
Table.CellBar func(row, col int) (fraction float64, fill RGBA, ok bool): draws a progress bar (track, fill, border) in a body cell, under its text, which is inkedOnSurfaceso it reads on both the track and the fill. nil keeps the old picture byte-for-byte.ProgressBar.FillColor() *mvvm.Observable[RGBA]: per-instance fill colour (alpha 0 keepsAccent).Why
agentscope shows each session's context-window pressure as a gauge in its Sessions table, coloured by pressure band. Neither a table cell gauge nor a per-instance bar colour existed, and house rules forbid hand-drawing it in the app.
Tests
Track and fill pixels, clamping (negative, NaN, over 1), Accent default, declining is identity, selected row, frozen/scrolled columns, all four ProgressBar draw paths. Coverage 100 %.
🤖 Generated with Claude Code