Skip to content

feat(chat): polish session context card navigation and density - #2656

Merged
Tioit-Wang merged 1 commit into
mainfrom
fix/context-card-polish
Nov 29, 2026
Merged

Tioit-Wang merged 1 commit into
mainfrom
fix/context-card-polish

Conversation

@Tioit-Wang

Copy link
Copy Markdown
Collaborator

What

Polish the session context card and the collaboration sidebar after the
native context and plugin-group work landed.

Why

The card was reachable but not dependable, and the sidebar could not hold a
realistic session count.

Card lifetime. Only the card's close button or the navigation toggle
hides it now. An outside click, a focus change, Escape, opening a subagent or
opening a side panel no longer dismisses it, so inspecting what a worker did
does not cost the user their place.

Default-open preference. sessionContextDefaultOpen is persisted in Host
settings and applied when a conversation becomes eligible. It is an entry
preference, not a command: changing it does not dismiss an open card, a
manual open or close overrides it for the current owner, and automatic
opening never takes keyboard focus.

Real destinations. The changes group opens the right-side Review tab
directly, with no intermediate overview dialog, and a file row opens that
file's review. The subagents group shows a meaningful total with per-outcome
counts for deduplicated Task delegations plus per-row task, workspace and
model, reusing the shared badge tones. Plugin groups show declared data
before any plugin action runs.

Geometry. The card is 25% wider, shows a short commit hash, and keeps the
first paragraph of the description on one line. Opening it does not resize or
recenter the transcript or composer. This default is independent of the
compaction-summary disclosure, which stays collapsed.

File Manager startup. The bundled view is warmed at startup only for an
enabled, authorized, in-scope plugin. It never pre-opens a file, a directory
or a webpage, never re-enables a plugin, and a development build is not
warmed.

Sidebar pagination. One creator plus its workers share one slot, so nine
other sessions, one creator and any number of workers still occupy the ten
visible slots. Pinned, archived, orphaned, remote, cross-project and
out-of-scope rows keep their standalone behaviour.

Validation

Rebased onto feat/2646-session-context @ 809344e36.

  • pnpm build:js pass
  • pnpm --filter @pi-desktop/desktop typecheck pass
  • pnpm lint pass (biome 152 files, style tokens OK)
  • node scripts/check-architecture.mjs pass (3 oversized-file growth warnings only)
  • Focused tests 16/16:
    • session-context-default.test.mjs — including Host restart persistence
      of the saved default
    • session-context-user-path.test.mjs — outside click / Escape / delegate /
      dock do not close; Review tab opens with no dialog; file row opens its
      snapshots; subagent totals and status badges
    • commit-file-tab.test.mjs — primary workspace, isolated worktree,
      File Manager-unavailable fallback, rejection paths
    • sidebar-collaboration.test.mjs — tenth-root boundary with 9 peers,
      1 creator and 6 workers
    • sidebar-collaboration-user-path.test.mjs, plugin-standby-user-path.test.mjs
  • Isolated Electron dev window (own profile, own Host, synthetic fixture)
    accepted 8 density cases, long subject/body, 16 files, renamed and deleted
    file routing.
  • git diff --check clean

Spec

docs/spec/04-ux/06-settings-ia.md, 04-ux/08-component-spec.md,
04-ux/09-interaction-patterns.md,
06-delivery/04-e2e-test-plan.md, 06-delivery/e2e/ui-shell.md,
docs/project/session-context-release-note.md.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Deploying pi-desktop with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4a7865f
Status: ✅  Deploy successful!
Preview URL: https://752951dc.pi-desktop.pages.dev
Branch Preview URL: https://fix-context-card-polish.pi-desktop.pages.dev

View logs

@Tioit-Wang
Tioit-Wang force-pushed the fix/context-card-polish branch from 40982d3 to c117072 Compare November 29, 2026 16:59
@Tioit-Wang
Tioit-Wang changed the base branch from feat/2646-session-context to main November 29, 2026 18:02
@Tioit-Wang
Tioit-Wang force-pushed the fix/context-card-polish branch from 985a5bb to 29a5f42 Compare November 29, 2026 18:09
The session context card was the first surface users reach for when they
wanted to know where a conversation was checked out, but the evidence
around it was thin: the card could be dismissed by an outside click, its
"All" affordances either did nothing useful or fell back to a modal that
repeated what the card already showed, and its own geometry moved with
its contents.

Make the card a stable surface. It now owns its lifetime: only its close
button or the navigation toggle hides it, so inspecting a subagent,
focusing the composer, pressing Escape or opening a side panel no longer
loses it. The default-open preference is persisted in Host settings and
applies when a conversation becomes eligible, not as a command on every
open, and automatic opening never takes keyboard focus.

Make every "All" destination a real destination. The changes group opens
the right-side Review tab directly instead of an overview dialog, and a
file row opens that file's review changes. The subagents group reports a
meaningful total with per-outcome counts and per-row task, workspace and
model, reusing the shared badge tones. Plugin groups show the data a
plugin declared before any plugin action runs.

Hold the card's width at 25% wider than before with a short commit hash
and a single-line first-paragraph description, and keep the transcript
and composer untouched while it opens.

Warm the bundled File Manager view at startup instead of at first open,
but only for an enabled, permissioned, in-scope plugin, and never
pre-open a file or a directory.

Sidebar pagination now budgets one slot per creator, counting the creator
plus its workers as a single root, so nine other sessions, one creator
and any number of workers still fit in ten slots.
@Tioit-Wang
Tioit-Wang force-pushed the fix/context-card-polish branch from 29a5f42 to 4a7865f Compare November 29, 2026 18:19
@Tioit-Wang
Tioit-Wang merged commit 67de1f3 into main Nov 29, 2026
7 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