Repository navigation
feat(sessions): control recursive activity expansion from General settings - #1268
Conversation
…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.
Gatekeeper review — round 1Result: no P0–P2 findings; no concrete P3 defects identified at Verified
Browser regressions and full CI are tracked separately on the PR. Large touched sources under |
Full CI follow-upThe full workflow is not green. The three session-expansion browser scenarios Compared the failed logs from this run
An additional |
|
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. |
Summary
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.
into view or enabling the setting alone does not trigger expansion.
and automatic expansion in saved state. All open branches restore normally.
Implementation
SessionListobserves the underlying descendant activity kind independently ofexpansion and preferences, checks actual scroll-viewport visibility (including
Virtua's buffered offscreen rows), then asks
revealSubsessionto open the pathsbelow 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
recursive expansion, search/selection, Electron/Tauri project restoration,
deletion, native Preferences and fixture wiring across six browser files.
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 tenlib/i18n/messages/*/settings.tsfiles (~764–778 each). This change keeps them in place and removes the extra
expansion bookkeeping.