Repository navigation
Show the agent product as a table column, detail line, and search field - #70
Merged
Merged
Conversation
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.
Task 4 of the multi-provider plan: the product a session belongs to is now visible — an
Agentcolumn between PID and Name, a line in the detail panel, and a searchable field.Done test-first, and the tests are proven
Written before the column existed, and confirmed red for the right reasons:
Then green. Each new test was also re-run against the specific bug it guards, so none of them passes by construction — see below.
The hazard this column walks into
src/ui/table.rsalready carried a warning:This task inserts at position 1, which shifts all seven mappings. Getting it wrong moves the sort arrow one column over with no error.
Rather than shift the literals and hope,
sort_header_idxis extracted fromrenderinto a function, andsort_arrow_lands_on_the_column_it_namesasserts — for every entry inSORT_COLUMNS— that the mapped header's name matches the sort column's name. The map can no longer rot silently.Proven by re-introducing the realistic mistake, adding the column but leaving the map un-shifted:
no_two_sort_columns_share_a_headercovers the other direction, a duplicated slot.Search
provider.label()joins the searched fields, so/codexfilters to Codex sessions. Verified by discrimination rather than a bare assertion: every fixture session is Claude, soclaudemust match all of them andcodexnone. Removing the field from the search set fails it.Row-cell counts
The same comment notes ratatui "silently renders a short row rather than failing". Both explicit
Row::newbuilders were counted againstHEADER_NAMESafter the change — 15 and 15, matching. The group-header and parked-separator rows pad toHEADER_NAMES.len()and needed no change.A subagent row leaves
Agentblank: it runs inside its parent, so repeating the product on every child line is noise, consistent with how Origin is already handled.Verification
cargo fmt --checkandcargo clippy --all-targets -- -D warningsclean. 754 lib tests pass, including 4 new ones.perf_do_refresh_io_does_not_explode_with_repeated_callsfails on a loaded box and passes in isolation; it is a wall-clock assertion and predates this branch.Keyboard behaviour, layout priorities and sort semantics are untouched — the only width change is a fixed
Length(7)for the new column, sized to fitClaude.