Skip to content

[DO NOT MERGE] dev: main + #441 for local testing - #480

Closed
abate wants to merge 21 commits into
devsuitup:mainfrom
abate:dev/lazy-restore-clear-rekey
Closed

abate wants to merge 21 commits into
devsuitup:mainfrom
abate:dev/lazy-restore-clear-rekey

Conversation

@abate

@abate abate commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Dev branch for local testing only — do not merge.

Current main (1168203) plus:

PR Head
#441 Restore on click 9ede0f2

Dev head: 09369d0 (git merge --no-ff of #441 onto main). Merge resolution: no conflicts; released sections as on main.

@abate
abate force-pushed the dev/lazy-restore-clear-rekey branch from 86d05f8 to 620070a Compare October 5, 2026 10:59
@abate abate changed the title [DO NOT MERGE] dev: #441 + #477 + #478 + #479 for local testing [DO NOT MERGE] dev: #441 + #477 + #478 + #479 + #483 for local testing Oct 5, 2026
@abate
abate force-pushed the dev/lazy-restore-clear-rekey branch 2 times, most recently from bf902c9 to ff3caa4 Compare October 8, 2026 09:59
@abate
abate force-pushed the dev/lazy-restore-clear-rekey branch from ff3caa4 to 9a3f977 Compare October 9, 2026 14:54
@abate
abate force-pushed the dev/lazy-restore-clear-rekey branch 3 times, most recently from 8c5f798 to adc2564 Compare October 11, 2026 14:50
@abate abate changed the title [DO NOT MERGE] dev: #441 + #477 + #478 + #479 + #483 for local testing [DO NOT MERGE] dev: main + #441 + #479 follow-up + #478 for local testing Oct 11, 2026
@abate
abate force-pushed the dev/lazy-restore-clear-rekey branch 3 times, most recently from 4352c6e to 78d16d8 Compare October 13, 2026 08:59
@abate abate changed the title [DO NOT MERGE] dev: main + #441 + #479 follow-up + #478 for local testing [DO NOT MERGE] dev: main + #441 + #478 for local testing Oct 13, 2026
@abate abate changed the title [DO NOT MERGE] dev: main + #441 + #478 for local testing [DO NOT MERGE] dev: main + #441 for local testing Oct 14, 2026
@abate
abate force-pushed the dev/lazy-restore-clear-rekey branch from 78d16d8 to dfc280a Compare October 14, 2026 10:56
abate added 12 commits October 15, 2026 08:48
Restoring the working set resumes a claude process per session at
startup, which costs a lot of memory. The new lazy mode marks last
run's sessions in the sidebar (outlined dot, always visible) and resumes
each one only when it is opened. Unopened sessions stay in the saved
working set across restarts; "Don't restore" drops one without starting
it. A reload reattaches only to a PTY that still runs and never spawns.
…while reattaching

A held previous/next key resumed one dormant session after another: an
auto-repeat now cycles the open sessions only. The lazy branch keeps its
candidates in restoreInFlight while it awaits the reattaches, so a
persist in that window keeps them, and a failed open from the keyboard
is logged instead of left as an unhandled rejection. The changelog
entry moves under Unreleased and names the keys.
…rking, held keys

A dormant session whose conversation continues under another id must not stay
marked under the old id; a session opened while the marking awaits a reattach
must not be marked; a click during a reattach-only open of the same id must
resume it; the session keys must pass e.repeat; a reattach-only open must not
follow a continuation.
…ions opened during the marking

A click resolving a dormant session to another id moved the saved index and
the skipped entry but not the dormant one, so the old id came back marked on
every start. The marking now skips a candidate the user opened while it
awaited a reattach, and reattach-only opens no longer follow a continuation.
…now on main

A fresh entry (a session cleared by /clear, no transcript) has no row to
click, so the marking drops it. Test harnesses declare the state the merged
exit flush and /clear restore read.
…, and skip a candidate opened under its continuation

The remap moved the dormant entry onto the continuation id, and the
already-open branch returned before deleting it, so a closed continuation
came back at every start. The remap also leaves restoreInFlight, so the
marking no longer marks a session the user opened under a continuation.
… and a save during the marking writes each session once
…t until that open settles

A click that resolves a candidate the marking has not reached to a
continuation used to drop it from restoreInFlight at once, so a refused or
failed continuation left it neither dormant nor saved. In Restore on click
mode the entry now moves to the continuation id and, when the open settles,
becomes dormant there unless the continuation opened. The marking also takes
a candidate out of restoreInFlight once it is dormant, so a save during a
later reattach writes it once. Other modes keep main's handling.
… the held entries and the continuation settle

A saved member of a merged row has no sessionMap entry of its own: the
marking, the row click, the session keys, "Don't restore", Delete and the
slug-group fold must all find it through its row.
…ession row

The marking, the reattach and the session keys resolve a member id through
its row (indexedSessionById). A row click resumes the row's dormant member,
and opening or showing any member clears every dormant id of the row, since
the row is then open. Row marks go through sessionItemEl and follow every id
of the row. "Don't restore", Delete and the slug-group fold use rowSessionIds.
The changelog entry moves to Unreleased.
… member, whatever the saved order

After a reload, a later saved member of a row whose other member was
reattached is still marked, and the session keys then resume it beside
the running one. The result also depends on the saved order.
abate added 9 commits October 15, 2026 08:48
…ked, and the session keys show that member

The marking now clears a candidate whose row already has an open member,
so the result no longer depends on the saved order, and navigateSession
opens the whole row for such a member instead of resuming it beside the
running one. indexedRowOf maps a member to its row through
localMergedMemberRows instead of scanning sessionMap.
…s in flight, and a later member clears the members marked earlier
… still in flight

A member opened during the marking counted as open before its openTerminal
settled, so a failed open lost the other saved members of its row.
…d open of its row, keeps the saved sessions when it fails
… or by a second open of its row

The marking now marks a candidate whose open is still in flight, so a failed
open leaves it saved; the open's own clearDormantRow drops it on success.
openSessionNow waits for an in-flight open of the row's member before clearing
the row, and resumes that member when the open it waited for was an automatic
reattach that found no PTY.
…open is kept when it fails, and a session opened during the marking stays active

Production rows carry headSessionId, so a member's reattach looks at the head's open; setupMerged can now set it.
…, and count only a session left open

A reattach that returned early after another member's open failed was taken as done, dropping a running member from the saved set; and restoring the active session afterwards hid a session the user opened during the marking.
@abate
abate force-pushed the dev/lazy-restore-clear-rekey branch from dfc280a to 09369d0 Compare October 15, 2026 09:06
@devsuitup

Copy link
Copy Markdown
Owner

#441 was merged as 76edc5c, so this local-testing aggregate has no remaining purpose — feel free to close it.

@abate

abate commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

Closing: #441, #478 and #479 are merged into main, so this dev composition is no longer needed.

@abate abate closed this Oct 15, 2026
@abate
abate deleted the dev/lazy-restore-clear-rekey branch October 15, 2026 21:55
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