Repository navigation
fix: restore the lavender cursor bar in resource tables - #1052
Conversation
Reverts #1046. The bold surface0 bar it gave the resource table cursor row made the selection look different from pickers and lists and harder to spot. The cursor row is back to the solid lavender bar with base text, and gruvbox-light gets its previous surface colors, which were only changed to keep row colors readable on the surface0 bar.
[Medium risk] No findings. FindingsEarlier findings (1 resolved)SummaryRestores lavender cursor bars in resource tables
Flow%%{init: {'theme': 'neutral'}}%%
flowchart LR
A["Resource rows and cursor selection"] --> B{"Cursor row selected?"}
B -- yes --> C["Style row lavender with base text"]
B -- no --> D["Keep regular row style"]
C --> E["Paint cells and cursor marker"]
D --> E
E --> F["Display resource table"]
What's good
Review context · 2 agents · 0/5 commands
Reviews (2) · Last reviewed commit: "test: check the cursor row text and mark..." · gpt-6-sol |
| let buf = term.backend().buffer(); | ||
| let count = |color| buf.content().iter().filter(|c| c.bg == color).count(); | ||
| (count(crate::theme::surface0()), count(crate::theme::mark())) | ||
| (count(crate::theme::lavender()), count(crate::theme::mark())) |
There was a problem hiding this comment.
Assert the restored cursor text and marker, not just its background · tests
When a resource table cursor is rendered, this test counts lavender background cells but does not check their foreground or the gutter marker. If the bar is lavender while the row text retains a status tint or the marker disappears, the test still passes, despite restoring base text and a visible cursor marker being part of this change. Extend the buffer assertion to locate the selected row and check its text foreground is theme::base() and its marker is ▌, in addition to checking the bar background.
Suggested fix
In the cursor-row rendering test, locate the selected row using the table hit geometry, then assert the ▌ marker and that nonempty text cells on the selected unmarked row have theme::base() foreground and theme::lavender() background.
Prompt for a coding agent
In src/app/tests.rs near the cursor_bgs test, extend coverage for the restored unmarked table selection: use table_hit and the test backend buffer to locate the selected row, assert the gutter marker is ▌ and representative nonempty table text is base foreground on a lavender background; retain the existing marked-row checks.
The restored mark-color test only counted lavender background cells, so it would pass if the cursor row kept a status tint on its text or lost the gutter marker. The new test puts the cursor on a CrashLoopBackOff pod and checks the marker and that every cell on the row is base text on lavender, with and without the skin background.
Reverts #1046.
The bold
surface0cursor bar from #1046 made the resource table selection look different from pickers and lists and harder to spot. This restores the solid lavender bar with base text on the resource table cursor row.gruvbox-light also goes back to its previous
surface0/surface1/surface2colors. They were only changed so row colors would stay readable on thesurface0bar.The tests #1046 added for the
surface0bar are removed, and the existing tests go back to expecting the lavender bar.