Skip to content

fix(desktop): restore last channel and open thread on cold start - #4

Merged
naturalethic merged 2 commits into
mainfrom
pip/restore-session-state
Aug 5, 2026
Merged

fix(desktop): restore last channel and open thread on cold start#4
naturalethic merged 2 commits into
mainfrom
pip/restore-session-state

Conversation

@naturalethic

Copy link
Copy Markdown

Summary

  • Remember the active community's last channel + open thread continuously (not only on community switch).
  • On cold start, if the app boots at Home, navigate back to that channel and reopen the thread panel via ?thread=.
  • Community-switch restore also carries the thread head id.
  • Deep links / non-home routes still win over restore.

Why

Upstream only remembers channel destinations for community switches (PR block#2629). Cold boot always landed on Inbox/Home; thread panel state lived only in the URL hash, which resets on restart.

Test plan

  • node --import ./test-loader.mjs --experimental-strip-types --test for communityNavigationStorage + communityViewTransition (16 pass)
  • tsc --noEmit
  • Manual: open a channel + thread, quit Buzz completely, relaunch → same channel and thread panel
  • Manual: leave on Inbox, quit, relaunch → still Inbox
  • Manual: deep-link / non-home route at launch is not overridden

Extend per-community destination memory with optional thread head id,
save it continuously while navigating, and restore on cold boot when the
hash router lands on Home. Community-switch restore also reopens threads.

Co-authored-by: Joshua Kifer <joshua@moonlight.pm>
Signed-off-by: Joshua Kifer <joshua@moonlight.pm>
Probe thread heads before reopening, fall back when channels are gone or
archived, remember settings/agents/workflows/etc., re-arm restore per
community switch, and cancel in-flight restore when the community changes.

Co-authored-by: Joshua Kifer <joshua@moonlight.pm>
Signed-off-by: Joshua Kifer <joshua@moonlight.pm>
@naturalethic
naturalethic merged commit 6d337c4 into main Aug 5, 2026
17 of 23 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.

1 participant