Skip to content

fix(web): respect manual session path collapse#656

Merged
tiann merged 1 commit into
tiann:mainfrom
oodavy41:fix/session-list-collapse-sticky
May 21, 2026
Merged

fix(web): respect manual session path collapse#656
tiann merged 1 commit into
tiann:mainfrom
oodavy41:fix/session-list-collapse-sticky

Conversation

@oodavy41
Copy link
Copy Markdown
Contributor

Summary

Fix session list collapse behavior so a manually collapsed selected/running session path stays collapsed across live session-list refreshes.

Previously, when a selected active session kept receiving tool-call/message updates, the session list auto-expand effect would re-run on each refresh and immediately reopen the path the user had just collapsed. This made it difficult to collapse the current path and switch elsewhere to create or select another session.

Changes

  • Gate selected-session auto-expand with a stable (selectedSessionId, group.key) ref.
  • Auto-expand still runs when the selected session or its group changes.
  • Preserve manual collapse state across live updates for the same selected session/group.
  • Add regression coverage for:
    • keeping a selected running path collapsed across refreshes;
    • re-expanding when the selected session changes.

Notes

This intentionally keeps “reveal selected session” behavior when selection changes. If the user selects a different session in the same group, the group can auto-expand again by design.

Validation

  • git diff --check origin/main..HEAD
  • bun typecheck
  • bun --cwd web test src/components/SessionList.directory-action.test.tsx src/components/SessionList.test.ts
  • env -u HAPI_CLI_EXECUTABLE bun run test

Full suite passed.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • No high-confidence issues found in the added/modified lines.

Summary

  • Review mode: initial
  • Reviewed the latest diff for web/src/components/SessionList.tsx and web/src/components/SessionList.directory-action.test.tsx. Residual risk: browser-only collapse behavior was not exercised locally because the test runner is unavailable in this environment.

Testing

  • Not run (automation; bun not found in this runner).

HAPI Bot

@tiann tiann merged commit 5b90a48 into tiann:main May 21, 2026
2 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.

2 participants