Fix Windows desktop chrome and project recovery#44
Fix Windows desktop chrome and project recovery#44justelson wants to merge 3 commits intoEmanuele-web04:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93ce809c72
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "drag-region flex h-[52px] items-center", | ||
| usesCustomDesktopTitleBar ? "pl-5 pr-0" : "px-5", | ||
| ) |
There was a problem hiding this comment.
Exclude workspace title from draggable Electron region
The new Electron header makes the whole workspace top bar a drag-region, but the title still enters rename mode via onDoubleClick and is not marked as a no-drag element. In apps/web/src/index.css:238-247, only button/input/textarea/select/a are exempted from drag capture, so on desktop (Windows/Linux) the title no longer receives pointer events and users cannot trigger workspace rename by double-clicking.
Useful? React with 👍 / 👎.
| message: description, | ||
| workspaceRoot: firstSendTarget.creation.workspaceRoot, | ||
| loadSnapshot: () => api.orchestration.getSnapshot().catch(() => null), | ||
| repairSnapshot: () => api.orchestration.repairState().catch(() => null), | ||
| }); |
There was a problem hiding this comment.
Gate repair fallback to duplicate project-create errors
This path now always passes repairSnapshot into duplicate-recovery, but the call is made for any project.create failure in this catch block. When the error is not a duplicate-workspace invariant, we still do recovery polling and then call api.orchestration.repairState() before rethrowing, which adds avoidable delay and can mutate state on unrelated failures; this should be conditioned on isDuplicateProjectCreateError (or only provide repairSnapshot in that case).
Useful? React with 👍 / 👎.
|
Follow-up pushed in Addressed the two Codex review findings:
Re-ran the targeted tests:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c87c01675
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "drag-region flex h-[52px] items-center", | ||
| usesCustomDesktopTitleBar ? "pl-5 pr-0" : "px-5", | ||
| ) |
There was a problem hiding this comment.
Add macOS right-sidebar inset to workspace header
The new Electron header in WorkspaceView never applies the macOS left inset when the sidebar is on the right, so on macOS (hiddenInset traffic lights on the left) the workspace header’s left controls can sit under the native window buttons and become difficult to interact with. This is a regression specific to the isElectron && !supportsCustomDesktopTitleBar() && settings.sidebarSide === "right" case, and other headers in this commit already preserve that offset logic.
Useful? React with 👍 / 👎.
|
Follow-up pushed in Addressed the latest Codex review finding by applying the same macOS hidden-titlebar inset logic to This fixes the Re-ran the targeted tests:
|
Summary
This PR fixes three desktop issues:
project.createcould succeed without surfacing the created project, and retrying the same folder then failed with the duplicate workspace-root invariant.What changed
Issue #35: thread/sidebar recovery on desktop startup
Issue #43: project-add recovery after silent success
repairState()when polling still cannot surface the created project.Windows desktop chrome
Why
There were two separate recovery failures in the desktop app:
Orchestration command invariant failed (project.create): Project '<id>' already uses workspace root '<path>'Separately, the Windows title bar/header was still following the macOS chrome path, which left the branding and window controls misaligned on Windows/Linux.
Validation
Ran targeted tests:
bun run test src/windowChrome.test.tsinapps/desktopbun run test src/lib/desktopWindow.test.ts src/lib/projectCreateRecovery.test.ts src/lib/desktopProjectRecovery.test.tsinapps/webResults:
Notes
bun.lock,apps/web/src/routeTree.gen.ts, andapps/web/public/mockServiceWorker.js.