Skip to content

feat(table): CellBar gauge in a cell; ProgressBar.FillColor - #602

Merged
tannevaled merged 1 commit into
mainfrom
feat/table-cellbar
Nov 20, 2026
Merged

tannevaled merged 1 commit into
mainfrom
feat/table-cellbar

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

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 inked OnSurface so 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 keeps Accent).

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

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>
@tannevaled
tannevaled merged commit 15d1cc9 into main Nov 20, 2026
1 check passed
@tannevaled
tannevaled deleted the feat/table-cellbar branch November 20, 2026 10:21
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.

1 participant