Repository navigation
feat: add Ink conversation picker and shared conversation defaults - #285
Merged
Merged
Conversation
Reuse existing Agent sessions by default, persist per-Space accepted conversation recency, and keep lassoed Agent nodes out of Ink source targeting. Preserve cancelled Lasso drafts and guard conversation storage across Space renames and Workspace activation. Extend the OCR deadline to three seconds and add production regression coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: LiangweiOIO <64085199+LiangweiOIO@users.noreply.github.com>
Copilot started reviewing on behalf of
Liangwei Wang (LiangweiOIO)
October 8, 2026 10:02
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The endpoint has a Workspace race, recovery does not converge, and picker focus behavior needs correction.
4 open findings
What changed in this PR
Adds an Ink conversation destination picker and server-owned recent-conversation defaults shared across clients.
Changes:
- Adds explicit New/Continue destination selection with resilient Lasso state.
- Persists accepted conversation recency with Workspace-aware storage.
- Extends tests, documentation, responsive UI, and OCR timeout.
| File | Description |
|---|---|
packages/shared/src/types/api/canvas.ts |
Defines recent-conversation API schemas. |
docs/proposals/ink-lasso-question-flow.md |
Documents picker and continuity design. |
docs/architecture/web-architecture.md |
Records picker UI conventions. |
docs/architecture/sketch-node.md |
Documents Ink destination behavior. |
docs/architecture/canvas-storage.md |
Describes recency persistence. |
docs/architecture/canvas-input-interactions.md |
Documents selection-independent targeting. |
docs/architecture/api-design.md |
Specifies the new endpoint. |
docs/architecture/agent-context.md |
Documents context exclusion and OCR. |
apps/web/src/store/gesturePreviewStore.ts |
Adds committed-Lasso identity. |
apps/web/src/i18n/resources/zh-CN/common.json |
Adds Chinese picker strings. |
apps/web/src/i18n/resources/en/common.json |
Adds English picker strings. |
apps/web/src/hooks/useCanvasLasso.gesture.test.tsx |
Tests Lasso identity lifecycle. |
apps/web/src/hooks/areaSelectionSession.ts |
Commits and restores Lasso identity. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/useInkConversationDestination.ts |
Resolves destination defaults. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/StrokeSelectionToolbar.tsx |
Integrates picker and submission routing. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/StrokeSelectionToolbar.test.tsx |
Tests destination and retry behavior. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/NodeToolbar.css |
Adds responsive picker layout. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/inkQuestionSubmission.ts |
Separates sources from destinations. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/inkQuestionSubmission.test.ts |
Tests explicit target derivation. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/InkAgentDestinationPicker.tsx |
Implements the destination menu. |
apps/web/src/components/Panels/Canvas/FloatingToolbars/InkAgentDestinationPicker.test.tsx |
Tests menu interaction and localization. |
apps/web/src/api/canvas.ts |
Adds recent-conversation fetch helper. |
apps/web/src/api/_routes.ts |
Adds endpoint route generation. |
apps/web/e2e/ink-toolbar.spec.ts |
Covers picker browser workflows. |
apps/web/e2e/fixtures/ink-toolbar.tsx |
Provides the browser-test fixture. |
apps/server/src/modules/workspace/paths.ts |
Rebinds conversation namespaces safely. |
apps/server/src/modules/canvas/canvas.route.ts |
Exposes the recency endpoint. |
apps/server/src/modules/agent/substrate-store.ts |
Adds strict document reads. |
apps/server/src/modules/agent/recent-conversation.ts |
Implements recency persistence and recovery. |
apps/server/src/modules/agent/recent-conversation.test.ts |
Tests storage and Workspace isolation. |
apps/server/src/modules/agent/conversation/ink-ocr.ts |
Raises OCR deadline to three seconds. |
apps/server/src/modules/agent/conversation/ink-ocr.test.ts |
Updates deadline coverage. |
apps/server/src/modules/agent/agenetes/conversation-stores.ts |
Adds leases, rebinding, and recency hooks. |
apps/server/src/modules/agent/agenetes/conversation-stores.test.ts |
Updates namespace test setup. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Keep recent-conversation validation and reads within one Workspace lease, persist pending recovery, restore focus for pointer-opened menus, and align pending-state documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Scope
Review fixes
Addressed all three findings from the pre-PR code review:
Validation
pnpm typecheck,pnpm format,pnpm check:i18n, andgit diff --check.pnpm lint:fix --ignore-pattern tmp/dev-ipad.mjs: zero errors; existing warnings remain. The unmodified command encounters fiveno-undeferrors only in that git-ignored local helper, which is not part of this PR.PostgreSQL integration was not exercised. The persistence coordination retains the existing single-process lease/mutex guarantees rather than introducing cross-process transactions.