Skip to content

[codex] Create workspace sessions per font window#110

Merged
kostyafarber merged 4 commits into
mainfrom
multi-workspace
Jun 26, 2026
Merged

[codex] Create workspace sessions per font window#110
kostyafarber merged 4 commits into
mainfrom
multi-workspace

Conversation

@kostyafarber

Copy link
Copy Markdown
Collaborator

Summary

Creates explicit main-process workspace sessions for font windows. Launcher windows now stay unbound, while each workspace window is attached to a WorkspaceSession that owns its own utility process, document client, document workflow, and attached renderer windows.

Motivation

This removes the previous renderer-carried workspace binding shape and the singleton workspace process. Main now resolves workspace and document connections from the sender window, which makes the invariant clearer: workspace windows are born attached to a workspace, and launcher windows do not connect to workspace data.

Changes

  • Adds WindowManager, WorkspaceManager, and main-side WorkspaceSession.
  • Moves WorkspaceProcess, DocumentClient, and DocumentSession ownership into each workspace session.
  • Removes workspace.initialBinding and renderer-passed workspace ids.
  • Makes workspace.connect() and document.connect() sender-scoped no-arg calls.
  • Splits launcher and workspace routes: main loads /launcher for launcher windows and /home for workspace windows.
  • Updates Create/Open to create a workspace session, open a bound workspace window, and close the launcher only when the opener is unbound.
  • Keeps save/close lifecycle scoped to the relevant workspace session.

Validation

  • pnpm --dir apps/desktop typecheck
  • pnpm --dir apps/desktop exec oxlint --deny-warnings src/main src/renderer/renderer.ts src/renderer/src/app/Screens.tsx src/renderer/src/store/appStore.ts src/renderer/src/views/Landing.tsx src/renderer/src/lib/workspace src/shared src/utility/workspace/WorkspaceHost.ts src/utility/workspace/WorkspaceHost.test.ts
  • pnpm --dir apps/desktop test
  • Commit hooks: oxfmt, oxlint, tsgo typecheck, deadcode, vitest

Comment thread apps/desktop/src/main/app/App.ts Outdated
Comment thread apps/desktop/src/main/app/App.ts Outdated
Comment thread apps/desktop/src/renderer/src/store/appStore.ts Outdated
Comment thread apps/desktop/src/renderer/src/views/Landing.tsx Outdated
@kostyafarber kostyafarber marked this pull request as ready for review June 26, 2026 17:38
@kostyafarber kostyafarber merged commit c19fc19 into main Jun 26, 2026
11 of 12 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