Conversation
Author
|
Screenshot from a local build of this branch: Three rows, two providers — the top two are Codex sessions, the selected one is a different Two things the shot is meant to show:
Row height is visibly unchanged; the rows are still the same |
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
Show the provider icon on each session row in the sidebar, so the sidebar carries the same
provider signal the task switcher cards already do.
Today the sidebar row exposes title / branch / time only, while the task switcher card header
already draws
icon(provider_icon(provider), 14.0, ...). The two surfaces disagree aboutwhether the provider is worth showing — this makes them agree.
How
The session row goes from a vertical two-line stack to
provider icon column + the existing two-line stack, laid out horizontally.14pxwith a7pxgap, matching the task switcher card header exactly.provider_icon/provider_colorhelpers and the existingassets/icons/provider-*.svg. No new assets.SIDEBAR_SESSION_PROVIDER_ICON_BAND_HEIGHT == SIDEBAR_SESSION_TITLE_LINE_HEIGHT), not centered against the whole two-line stack, so rowsstay aligned whatever the detail line does.
provider_color(&theme, provider), damped to0.8alpha when the row is neitherselected nor hovered, restored to full on row hover via the
group_hoverpattern alreadyused by the sidebar group headers in this file. No per-row hover state is added to the
entity — that would put per-row state on the render path for a decorative tint.
Row height is unchanged, and now provable
SIDEBAR_SESSION_CARD_HEIGHT = 51.0is the virtualized list's measurement constant and is nottouched. The literals that used to be scattered through the render path (
py(7.0), stack gap4.0, title line18.0, detail line15.0) are now named constants, and four tests pin theinvariants:
session_row_height_is_the_sum_of_its_parts—18 + 4 + 15 + 2*7 == 51, so the card heightis a verifiable result rather than a magic number
provider_mark_cannot_grow_the_session_row— the icon is never taller than the text stack,so it can never be the element that decides row height
provider_mark_sits_on_the_title_line_whatever_the_detail_row_doesprovider_column_clears_the_group_guide_line—SIDEBAR_GROUP_CHILD_PADDING > SIDEBAR_GROUP_GUIDE_X + SIDEBAR_GROUP_GUIDE_WIDTH(the guide's 1px width is now a constant too), so the icon column always stays right of the
group guide line
The guide line's x is unchanged.
Scope
One file,
src/app/sidebar.rs.cargo buildandcargo testpass on this branch.