Skip to content

fix: restore the lavender cursor bar in resource tables - #1052

Merged
nklmilojevic merged 2 commits into
mainfrom
revert/cursor-row-status-colors
Nov 10, 2026
Merged

nklmilojevic merged 2 commits into
mainfrom
revert/cursor-row-status-colors

Conversation

@nklmilojevic

Copy link
Copy Markdown
Owner

Reverts #1046.

The bold surface0 cursor 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/surface2 colors. They were only changed so row colors would stay readable on the surface0 bar.

The tests #1046 added for the surface0 bar are removed, and the existing tests go back to expecting the lavender bar.

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.
@kritikal-github

kritikal-github Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Re-runViewConfidence Score: 5/5

[Medium risk] No findings.

Findings

Earlier findings (1 resolved)

Summary

Restores lavender cursor bars in resource tables

  • Resource table cursor rows display base-colored text on lavender in ScrollingTable::render.
  • The built-in gruvbox-light palette restores its earlier surface colors in theme::builtin.
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"]
Loading

What's good

  • The cursor-row test checks the marker and selected cells’ foreground, background, and bold style in both background modes.
Review context · 2 agents · 0/5 commands
  • Risk: The risk remains limited to reversible terminal rendering and palette changes; the review checked that selected-row styling repaints cell colors without changing resource data or access.
  • Agents: default security
  • Commands run: none

Reviews (2) · Last reviewed commit: "test: check the cursor row text and mark..." · gpt-6-sol

Comment thread src/app/tests.rs
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()))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.
@nklmilojevic
nklmilojevic merged commit 5b4e89a into main Nov 10, 2026
6 checks passed
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