Repository navigation
feat(canvas): Let an aux canvas pane detach into its own window - #1
Closed
Cinnnnnnndy wants to merge 3 commits into
Closed
Cinnnnnnndy wants to merge 3 commits into
Cinnnnnnndy wants to merge 3 commits into
Conversation
Add a detached canvas window where one agent canvas scope is owned by exactly one window at a time: detaching hands the scope over and recalling hands it back, so neither side has to merge live edits. Define the detachability rules, the cross-window protocol over a shared channel and the window lifecycle helpers, host the detached canvas, and rewire the aux pane and canvas store to move ownership across the boundary. Boot the window from `?openbitfunWindow=detached-canvas` without the product shell, allow the `detached-canvas-*` window label in the desktop capability, and add the locale strings. Cover the rules, protocol, channel and window lifecycle with tests. Co-authored-by: OpenBitFun <[email protected]>
Carry the whole session on the branch: the mobile component set, the Lab's surfaces and typography, the hero centring, the top air and the showcase band with its revert all arrive from main, which stays untouched. The branch's own work is still the detached canvas window alone, so the pull request's diff against main does not change. Co-authored-by: OpenBitFun <[email protected]>
Keep the branch carrying the whole session: the homepage wash arrives from main. The branch's own work is unchanged, so the pull request's diff against main does not move. Co-authored-by: OpenBitFun <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Let an aux canvas pane detach into its own OS window. A canvas scope is owned by exactly one window at a time: detaching hands the scope over (the docked pane keeps a placeholder) and recalling hands it back, so neither side merges live edits from the other.
transfer/detachability.ts— which panes may detach, and when.transfer/detachedCanvasProtocol.ts— the wire contract between the docked pane and the detached window (handshake, snapshot, recall).infrastructure/runtime/canvasTransferChannel.ts— the transport, shared by Tauri events andBroadcastChannel.infrastructure/runtime/detachedWindow.ts+useDetachedAuxPane.ts— window lifecycle and the React binding for moving ownership across the boundary.DetachedCanvasWindow/— the host that boots from?openbitfunWindow=detached-canvaswithout the product shell, plus the desktop capability labeldetached-canvas-*and the en-US / zh-CN / zh-TW strings.Type and Areas
Type: Feature.
Areas: desktop/Tauri, web UI.
Motivation / Impact
A canvas pane is currently confined to the session's docked layout. Detaching lets a user pull one canvas onto a second monitor and keep it there while the session window does something else. Ownership moves instead of being mirrored, so there is no dual-writer merge problem; the docked pane keeps a placeholder so the layout stays stable.
Verification
corepack pnpm --dir src/web-ui exec vitest run src/app/components/panels/content-canvas/transfer src/infrastructure/runtime/canvasTransferChannel.test.ts src/infrastructure/runtime/detachedWindow.test.ts— passed (4 files, 25 tests).corepack pnpm --dir src/web-ui run type-check— blocked, honestly: 3TS2307: Cannot find module '@/generated/api'errors inwebsocket-adapter.tsandConfigAPI.ts, both untouched by this branch.src/web-ui/src/generated/is absent in this checkout; that barrel is produced bypnpm run gen:types(cargoexport). No error is reported in any file this branch changes.Reviewer Notes
AI-assisted change; testing level: lightly tested (unit tests pass, no Tauri end-to-end run).
detached-canvas-*. Worth a look at the permission surface.sourceId+token), so a late message from a previous detach is ignored. Recall closes the detached window; if it crashes, the scope stays owned by a dead window until recall.Checklist
Generated with OpenBitFun