Skip to content

feat(native): complete SB-HOVER thread hover card parity - #354

Merged
rynfar merged 1 commit into
nativefrom
nw/242-sb-hover-done
Nov 13, 2026
Merged

rynfar merged 1 commit into
nativefrom
nw/242-sb-hover-done

Conversation

@rynfar

@rynfar rynfar commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Ref #242, #315 (Wave 4A: SB-HOVER whole-row done).

Problem

The native sidebar hover card showed only title, project, branch, raw model slug and error. Web's SidebarThreadTooltip (apps/web/src/components/sidebar/SidebarThreadRow.tsx) also shows the environment label and machine, a checkout branch-mismatch warning, the provider-instance-aware model name, prior handoffs, the running-terminal count, and a capability-gated pull request mini-list. Native also built the card eagerly on every row render, in GPUI's default shadow_lg and without a text colour on the PR footer.

Changes

  • crates/core/src/sidebar/hover.rs (new, pure, unit-tested): model_instance_id, model_text (trigger model name + · instance when shows_instance_badge), handed_off_from, checkout_to_compare + branch_mismatch (resolveLocalCheckoutBranchMismatch), terminal_process_label, and pull_request_list_lines (pullRequestListLines over resolve_thread_pull_request_chains, newest chain first, stack · N / chain · N on a chain's first line).
  • crates/app/src/sidebar/hover.rs: rows now capture only a HoverTarget (state, ThreadKey, id, project, favicon), and the card is built when the tooltip opens:
    • Thread, config and provider entries are read from the owning environment: fleet rows use fleet.environment(key.environment_id).
    • Environment label + Icon::machine; model line with a grayscale ProviderIcon and an accent dot when the badge shows; Handed off from ….
    • Running-terminal count, from the current environment only.
    • PR mini-list, shown only when the owning environment's config is loaded (useSupportsMultiplePullRequests), with depth indent capped at 3.
    • Usage-limit / error lines, same copy and tone as web.
    • One lazy vcs.refreshStatus (localOnly) read for local-mode threads that record a branch. It goes to the owning environment's client (connections.destination(owner, orchestration:read) for fleet rows), runs once per open card, and is aborted when the card closes (AbortOnDrop).
    • No per-frame subscriptions or timers. Every line is truncated within the 320px max width. Glass toast shadow per design system §6.5. Semantic tokens throughout, including muted_foreground on the PR footer.
    • Hiding the card during drag, sweep or an open context menu is unchanged.
  • crates/app/src/sidebar/row.rs: uses HoverTarget + hover::tooltip; PR glyph/tone mapping is shared through hover::{pr_icon, pr_tone}.
  • crates/app/src/snapshot.rs: new checkoutBranches sidebar fixture field (CheckoutFixture global). Frozen snapshot fixtures answer the checkout comparison locally and never ask a server.
  • apps/native/parity/LEDGER.md: SB-HOVER → done, Native column updated.

Tests (RED → GREEN)

Written before the card existed. On base 0f29528a2c they fail to compile: t3_core::sidebar::hover, HoverTarget and ThreadHoverCard::new are all missing.

  • t3-core sidebar::hover::tests (5): model trigger name + instance naming (twin driver, accent), runtime instance precedence + handoff names (unknown ids kept raw), local-only checkout warning, terminal labels, PR list ordering / dismissed links / chain labels.
  • t3-native sidebar::hover::tests (3):
    • local_card_shows_every_web_line_and_compares_the_checkout_once: every line renders inside 320px; exactly one vcs.refreshStatus {cwd, localOnly}; mismatch shows after the reply.
    • closing_the_card_drops_its_checkout_read: dropping the card closes the in-flight request.
    • fleet_card_reads_the_owning_environment_and_keeps_terminals_to_the_current_one: same raw thread.id on two environments. Only the owning environment is asked, labels and machine icons are per environment, and terminals show only for the current one.

Offscreen evidence

Draft release native-parity-evidence-hover (GPUI --snapshot --sidebar-fixture, --hover):

Dark Light
hover-dark hover-light

Verification (4b5bd4c1fa42080714e70a04fdc9911b07ef06b8)

Cargo receipts are from 2ea2488af4. It differs from HEAD only in the LEDGER.md formatting.

  • cargo clean -p t3-core -p t3-client -p t3-native + cargo clippy --workspace --all-targets -- -D warnings: pass

  • cargo test -p t3-core -p t3-client: 105 + 1296 + 8 passed, 0 failed

  • cargo test -p t3-client --features test-support: 113 passed, 0 failed

  • cargo test -p t3-native --features snapshot --bin t3-native <sel> -- --test-threads=1 (fresh T3_NATIVE_HOME each):

    Selector Passed Failed
    sidebar:: 36 0
    context_menu::thread_menu_tests:: 11 0
    composer:: 6 0
    omitted_rows::tests:: 6 0
    scoped_route_tests:: 3 0
  • cargo build -p t3-native & cargo build -p t3-native --features snapshot: pass

  • These pass on 4b5bd4c1fa: node apps/native/scripts/gen-theme.ts --check, node --test apps/native/parity/sync.test.ts (42/42), node apps/native/conformance/generate.ts --check, vp fmt --check apps/native/parity/LEDGER.md, vp run check:changed fork/native (format, typecheck 40/40, test).

Work by Claude Opus 5.5 (Antigravity swarm u367-author).

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