Skip to content

feat(sidebar): show the provider icon on session rows - #195

Open
sunfuze wants to merge 1 commit into
egoist:mainfrom
sunfuze:pr/sidebar-provider-icon
Open

sunfuze wants to merge 1 commit into
egoist:mainfrom
sunfuze:pr/sidebar-provider-icon

Conversation

@sunfuze

@sunfuze sunfuze commented Aug 28, 2026

Copy link
Copy Markdown

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 about
whether 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.

  • Icon is 14px with a 7px gap, matching the task switcher card header exactly.
  • Reuses the existing provider_icon / provider_color helpers and the existing
    assets/icons/provider-*.svg. No new assets.
  • The icon sits on the title line (SIDEBAR_SESSION_PROVIDER_ICON_BAND_HEIGHT == SIDEBAR_SESSION_TITLE_LINE_HEIGHT), not centered against the whole two-line stack, so rows
    stay aligned whatever the detail line does.
  • Color is provider_color(&theme, provider), damped to 0.8 alpha when the row is neither
    selected nor hovered, restored to full on row hover via the group_hover pattern already
    used 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.0 is the virtualized list's measurement constant and is not
touched. The literals that used to be scattered through the render path (py(7.0), stack gap
4.0, title line 18.0, detail line 15.0) are now named constants, and four tests pin the
invariants:

  • session_row_height_is_the_sum_of_its_parts18 + 4 + 15 + 2*7 == 51, so the card height
    is 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_does
  • provider_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 build and cargo test pass on this branch.

@sunfuze

sunfuze commented Aug 28, 2026

Copy link
Copy Markdown
Author

Screenshot from a local build of this branch:

Sidebar session rows showing the provider icon on the title line

Three rows, two providers — the top two are Codex sessions, the selected one is a different
provider, so the icon is doing real work in distinguishing them at a glance.

Two things the shot is meant to show:

  • The icon sits on the title line, not centered against the whole two-line stack. The first
    row has a branch/time detail line and the third does not, and the icons still line up with each
    other. That is what provider_mark_sits_on_the_title_line_whatever_the_detail_row_does pins.
  • The icon column clears the group guide line — the vertical rule under waku / No project
    passes to the left of every icon, never through one. That is
    provider_column_clears_the_group_guide_line.

Row height is visibly unchanged; the rows are still the same 51px cards.

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