Skip to content

fix(web): preserve session preview folding#666

Merged
tiann merged 1 commit into
tiann:mainfrom
NightWatcher314:fix/session-preview-folding
May 24, 2026
Merged

fix(web): preserve session preview folding#666
tiann merged 1 commit into
tiann:mainfrom
NightWatcher314:fix/session-preview-folding

Conversation

@NightWatcher314
Copy link
Copy Markdown
Contributor

Summary

  • keep the session preview limit in effect when auto-expanding the selected session
  • do not let every active session bypass the preview limit
  • still keep selected sessions and pending-request sessions visible inside the folded preview

Why #629 was not enough

This follows up on #629, which added the configurable “Sessions Before Folding” / session preview limit. That setting was applied in the basic folded-preview path, but two later/default visibility rules could effectively bypass it:

  1. Selecting a session auto-expanded its machine/project path and also forced the per-directory session preview override to expanded, so the directory showed all sessions instead of the configured preview count.
  2. The preview helper treated every active session as required-visible. In directories with many active sessions, the preview could grow far beyond the configured limit.

This PR keeps the useful auto-expansion of the containing machine/project, but preserves session preview folding. It also narrows the required-visible exception to pending-request sessions and the selected session.

Test plan

  • bun test web/src/components/SessionList.test.ts
  • bun run typecheck:web

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 issues found.

Summary

  • Review mode: initial
  • Full diff reviewed: web/src/components/SessionList.tsx and web/src/components/SessionList.test.ts.
  • Residual risk: validation is helper-level only; no rendered session-list interaction test covers selected-session visibility while preview folding remains collapsed.

Testing

  • Not run (automation; PR content not executed during review).

HAPI Bot

@tiann tiann merged commit 0fa21a1 into tiann:main May 24, 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