Skip to content

fix(session): preserve workspace history during local reconnects#1135

Draft
benjaminshafii wants to merge 3 commits intodevfrom
fix/history-session-scope
Draft

fix(session): preserve workspace history during local reconnects#1135
benjaminshafii wants to merge 3 commits intodevfrom
fix/history-session-scope

Conversation

@benjaminshafii
Copy link
Member

Summary

  • scope local session reloads to the active workspace root so create/switch/restart flows do not reuse a stale engine directory
  • ignore stale session loads before syncing sidebar state or redirecting missing /session/:id routes
  • add a focused session-scope regression script and wire it into the app/root test commands

Testing

  • pnpm install --frozen-lockfile
  • pnpm --filter @openwork/app test:session-scope
  • pnpm --filter @openwork/app test:session-switch
  • pnpm --filter @openwork/app test:e2e
  • repeated pnpm --filter @openwork/app test:session-scope 25 times
  • repeated pnpm --filter @openwork/app test:session-switch 10 times

Notes

  • I could not run the full Tauri desktop workspace-create/restart flow in this environment, so the end-to-end desktop verification for Starter sessions disappear after creating a new workspace #1118 still needs a local app pass.
  • pnpm --filter @openwork/app typecheck is currently blocked by pre-existing syntax errors in apps/app/src/i18n/locales/index.ts and apps/app/src/i18n/index.ts.

Use the active workspace root instead of stale engine directories when reloading local sessions so workspace creation, switching, and restart flows do not hide another workspace's history. Add a regression check for stale session loads overwriting sidebar and route state.
@vercel
Copy link

vercel bot commented Mar 24, 2026

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

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview, Comment Mar 24, 2026 1:55pm
openwork-den Ready Ready Preview, Comment Mar 24, 2026 1:55pm
openwork-den-worker-proxy Ready Ready Preview, Comment Mar 24, 2026 1:55pm
openwork-landing Ready Ready Preview, Comment, Open in v0 Mar 24, 2026 1:55pm
openwork-share Ready Ready Preview, Comment Mar 24, 2026 1:55pm

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Expand and canonicalize persisted local workspace paths before deriving workspace IDs or reconnecting. This repairs older Starter entries saved with tilde or non-canonical paths, which could cause restart-time session reloads and new-session creates to scope against the wrong directory.
Use one slash-normalized directory format for local session create, delete, and sidebar client scope so Windows worker switches query the same session directory they were created under. Add a focused regression check for Windows-style transport parity.
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