Skip to content

Preserve draft threads and speed up terminal startup#378

Merged
BunsDev merged 1 commit into
mainfrom
okcode/project-thread-switch-bug
Apr 9, 2026
Merged

Preserve draft threads and speed up terminal startup#378
BunsDev merged 1 commit into
mainfrom
okcode/project-thread-switch-bug

Conversation

@BunsDev

@BunsDev BunsDev commented Apr 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Preserve local draft threads when switching projects so unsaved work is not lost and draft state remains tied to the correct thread.
  • Add a dedicated terminal runtime env resolver so terminal.open and terminal.restart can resolve env without forcing a full orchestration snapshot query.
  • Reduce terminal startup latency with history/missing-history caching, safer terminal mount behavior, and logging around snapshot and startup timings.
  • Update sidebar, chat, and terminal drawer behavior so draft threads, terminal launch state, and thread switching stay consistent.

Testing

  • bun fmt
  • bun lint
  • bun typecheck
  • Added and updated unit coverage for terminal env resolution, terminal history caching, sidebar draft-thread merging, and terminal session controller behavior.
  • Added WebSocket server coverage for the terminal open/restart fast path.

- Keep composer drafts when remapping or clearing project draft threads
- Merge draft-only threads into the sidebar and route views
- Fix new-thread flow so switching projects creates a fresh draft thread
@vercel

vercel Bot commented Apr 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
okcode-marketing Building Building Preview Apr 9, 2026 7:48pm
v0-compute-the-platform-to-build Ready Ready Preview, Open in v0 Apr 9, 2026 7:48pm

@github-actions github-actions Bot added size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Apr 9, 2026
@BunsDev BunsDev merged commit e330caf into main Apr 9, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant