Repository navigation
fix(canvas): refine lasso toolbar, session picker, and selection stability - #288
Conversation
…ility Preview cached destinations without enabling Send until server confirmation, preserve explicit targets against late responses, and wrap toolbar groups by available width. Keep Lasso stacking and grounding stable and prevent Note text raster shifts on selection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Toolbar wrapping uses viewport width rather than the narrower canvas boundary, allowing overlap with adjacent panels.
1 open finding
What changed in this PR
Refines retained-Lasso controls, destination selection, stacking stability, and Note rendering.
Changes:
- Splits editing and Agent controls with responsive wrapping and improved menus.
- Adds safe destination prefetch/confirmation and viewport-tolerant grounding.
- Stabilizes Lasso z-order and Note text compositing with regression coverage.
| File | Description |
|---|---|
docs/proposals/ink-lasso-question-flow.md |
Updates proposal lifecycle status. |
docs/architecture/web-architecture.md |
Documents Lasso stacking behavior. |
docs/architecture/sketch-node.md |
Documents toolbar and destination behavior. |
docs/architecture/note-node.md |
Documents compositing stability. |
docs/architecture/canvas-input-interactions.md |
Documents shared menu styling. |
apps/web/src/i18n/resources/zh-CN/common.json |
Adds Chinese toolbar labels. |
apps/web/src/i18n/resources/en/common.json |
Adds English toolbar labels. |
apps/web/src/components/Panels/ChatPanel/agentMenu.tsx |
Supports subordinate Agent headings. |
apps/web/src/components/Panels/ChatPanel/agentMenu.test.tsx |
Tests default heading presentation. |
apps/web/src/components/Panels/Canvas/selectionZOrder.ts |
Makes selection elevation optional. |
apps/web/src/components/Panels/Canvas/selectionZOrder.test.ts |
Tests retained forest order. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/useInkConversationDestination.ts |
Adds preview and confirmation states. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/StrokeSelectionToolbar.tsx |
Splits toolbar capsules and overflow actions. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/StrokeSelectionToolbar.test.tsx |
Expands destination and toolbar tests. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/NodeToolbar.css |
Styles responsive Lasso capsules. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/inkQuestionSubmission.ts |
Adds viewport stability tolerance. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/inkQuestionSubmission.test.ts |
Tests viewport correction thresholds. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/InkAgentDestinationPicker.tsx |
Reorders sections and fixes toggling. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/InkAgentDestinationPicker.test.tsx |
Tests picker hierarchy and interaction. |
apps/web/src/components/Panels/Canvas/CanvasToolbar.tsx |
Reuses shared menu styles. |
apps/web/src/components/Panels/Canvas/CanvasToolbar.test.tsx |
Verifies resource-menu styling. |
apps/web/src/components/Panels/Canvas/Canvas.tsx |
Disables elevation during Lasso. |
apps/web/src/components/Nodes/note/noteScrollbar.css |
Stabilizes Note compositing. |
apps/web/e2e/production-selection-resize.spec.ts |
Tests selection pixel stability. |
apps/web/e2e/ink-toolbar.spec.ts |
Tests picker and responsive layouts. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| justify-content: center; | ||
| gap: 8px; | ||
| width: max-content; | ||
| max-width: calc(100vw - 16px); |
There was a problem hiding this comment.
Fixed in dbcde3f. CanvasFloatingPopover now exposes --canvas-popover-available-width using Floating UI size middleware with the same canvas boundary/padding as flip and shift. The Lasso container caps its width to that value, and the destination trigger reserves room for capsule chrome and Send. Added English/Chinese browser regressions with an unchanged 1100px viewport and an offset canvas resized 800 → 320 → 280 → 800px; the test failed before the fix and now passes. All 12 toolbar browser tests and 71 focused unit tests pass; repository typecheck and formatting pass. Repository lint remains blocked only by the previously noted ignored local tmp/dev-ipad.mjs; excluding that file passes. No ChatPanel layout or behavior changes.
Expose Floating UI available width to wrapping controls and reserve space for Send. Cover an offset canvas resizing independently from the browser viewport in both locales. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Summary
Refine the retained-Lasso workflow introduced in #285 and stabilize selection rendering.
Review fixes
Validation
pnpm typecheck,pnpm format,pnpm check:i18n, andgit diff --checkpassed.pnpm lint:fixencountered 5 pre-existingno-undeferrors in the Git-ignored local filetmp/dev-ipad.mjs, which is not included in this PR. Re-running withpnpm lint:fix --ignore-pattern tmp/dev-ipad.mjspassed, with existing repository warnings. The files changed by the review fixes also passed zero-warning targeted ESLint.Scope
Existing local Tailnet development-proxy changes are deliberately excluded. No new API contract, dependency, or storage migration is introduced. Browser validation uses Chromium; real iPad Safari and large-Note GPU memory behavior were not revalidated in this pass.