Skip to content

feat(sessions): control recursive activity expansion from General settings - #1268

Merged
pascalandr merged 1 commit into
devfrom
fix/session-expansion-simplify
Nov 2, 2026
Merged

pascalandr merged 1 commit into
devfrom
fix/session-expansion-simplify

Conversation

@pascalandr

@pascalandr pascalandr commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add General → Automatically expand subsessions, enabled by default.
  • A visible collapsed row opens paths to active descendants on a new working,
    compacting or permission/form-input chevron state, if it is selected or is a
    descendant of the selected conversation. The rule applies recursively at any
    depth. Other families keep their activity indicators without opening.
  • Pointer position is irrelevant. Collapsing a busy branch, scrolling a busy row
    into view or enabling the setting alone does not trigger expansion.
  • Delete the manual-collapse suppression map and the distinction between manual
    and automatic expansion in saved state. All open branches restore normally.

Implementation

SessionList observes the underlying descendant activity kind independently of
expansion and preferences, checks actual scroll-viewport visibility (including
Virtua's buffered offscreen rows), then asks revealSubsession to open the paths
below the selected conversation. Status setters and metadata reads no longer
open branches directly. Local reveal authority protects expansion against late
snapshot hydration, using the same state as manual expansion.

Validation

  • UI typecheck: passes.
  • Store/recovery/client-state/i18n checks: 179/179 pass.
  • Updated recursive browser tests: 5/5 pass (session-child-activity and session-search).
  • Final local browser run on the rebased PR revision: 62/62 pass, covering
    recursive expansion, search/selection, Electron/Tauri project restoration,
    deletion, native Preferences and fixture wiring across six browser files.
  • Help checks: 31/31 pass; messages and help updated in all ten locales.
  • Separate Electron dev instance tried by the user; General preference toggling
    verified against the real backend.

Large touched source files

Under packages/ui/src: components/session-list.tsx (~1,070 lines),
stores/preferences.tsx (~1,619), stores/session-state.ts (~1,336),
stores/session-events.ts (~720), and the ten lib/i18n/messages/*/settings.ts
files (~764–778 each). This change keeps them in place and removes the extra
expansion bookkeeping.

…tings

Automatic reveals could repeatedly reshape the session tree, while collapsing a
branch recorded running descendant IDs that suppressed future reveals. Rows
opened by activity were also excluded from saved expansion state.

General now offers Automatically expand subsessions, enabled by default. A
visible collapsed row opens paths to its active descendants when its chevron
changes to working, compacting or awaiting permission/form input, provided the
row is selected or has the selected conversation as an ancestor. Visible
subsessions follow the same rule at every depth; other families stay collapsed.
Pointer position is irrelevant. Collapsing an already active row, enabling the
setting or scrolling a busy row into view alone does not trigger a reveal.

SessionList owns the transition check because it knows which rows are visible;
status setters and metadata reconciliation only publish runtime state. Buffered
offscreen rows are excluded by the scroll-viewport geometry. The per-descendant
suppression map and automatic-expansion persistence exclusions are deleted.
Automatic and manual expansion share the existing restoration authority and are
both saved, including when a live reveal races snapshot hydration.

Validation: UI typecheck, 179 store/recovery/client-state/i18n checks, and 31 help
checks pass. Browser regressions cover default/disabled settings, recursive
activity and form/permission requests, newly created recursive agents, manual
collapse followed by new work, offscreen buffered rows, and expansion
restoration. The user tried the separate Electron dev instance. Help and UI
messages are updated in all ten locales.
@pascalandr

Copy link
Copy Markdown
Contributor Author

Gatekeeper review — round 1

Result: no P0–P2 findings; no concrete P3 defects identified at 6ab189b7b.

Verified

  • Deferred activity observation avoids mount, selection, preference and collapse
    retriggers. Visible leaves remain subscribed when their first child appears.
  • Production list props and revealSubsession share the same per-tab selection.
  • Persistence retains manual-close authority and deletion fences while saving
    automatic and manual expansions alike.
  • General preference wiring, messages and help cover all ten locales.
  • Focused store tests: 5/5 pass. UI typecheck: passes.

Browser regressions and full CI are tracked separately on the PR.

Large touched sources under packages/ui/src/: components/session-list.tsx
(~1,070 lines), stores/preferences.tsx (~1,619), stores/session-state.ts
(~1,336), stores/session-events.ts (~720), and the ten
lib/i18n/messages/*/settings.ts files (~764–778 each).

@pascalandr
pascalandr merged commit 903b286 into dev Nov 2, 2026
18 of 38 checks passed
@pascalandr
pascalandr deleted the fix/session-expansion-simplify branch November 2, 2026 01:30
@pascalandr

Copy link
Copy Markdown
Contributor Author

Full CI follow-up

The full workflow is not green. The three session-expansion browser scenarios
all passed in CI (collapsed-chevron activity, recursive visible branches/settings/
restoration, and buffered offscreen rows). Local final browser validation was 62/62.

Compared the failed logs from this run
(41372632395)
with the preceding #1264 run
(41368136045).
Both runs contain the same failures:

  • permissions/receipts.test.ts: expected 204, received 503.
  • workspaces/git-requirement.test.ts: expected 200, received 503 with
    Mission schedule carrier ownership could not be verified; also fails on
    Windows, macOS and Ubuntu compatibility jobs.
  • mission-scheduling.test.ts: startup path.join receives undefined.
  • automation-forms.test.ts: creation/request-count assertions (including 5 vs 1).
  • mission-lifecycle-revision.test.ts: the Pause/form-work assertion, 0 vs 1.

An additional mission-control.test.ts timeout waiting for the Resume control
at line 1088 did not appear in that preceding run. Browser shard 2 alone has
been rerun to check it. No unrelated source changes or blanket retries were made.

@pascalandr

Copy link
Copy Markdown
Contributor Author

Follow-up: browser shard 2 passed on rerun. The additional mission-control Resume-control timeout did not recur. The session-expansion scenarios passed in the original CI run; the remaining failures are those also observed in the preceding #1264 run, documented above. Full CI remains red because of those outstanding failures.

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