Skip to content

Expand structured Comments to Note previews - #352

Merged
Yuqing (mydmdm) merged 2 commits into
alphafrom
fix/issue-351
Oct 29, 2026
Merged

Yuqing (mydmdm) merged 2 commits into
alphafrom
fix/issue-351

Conversation

@mydmdm

Copy link
Copy Markdown
Contributor

Summary

Progresses #351 with the approved Comment-only first release. Chat keeps its current conversation and has no picker. Expanded Note rich text gains Copy, Add as note and structured Comment staging into an existing current-Space conversation. The Comment branch never creates or starts an Agent. Ink/Lasso behavior, including its current acceptance-time destination reveal, is unchanged.

  • Reuse the fragment Comment editor/actions and Milkdown selection factory; compose Note actions into the existing formatting toolbar, with selection-only chrome for read-only rich text.
  • Freeze quote, bounded neighboring context and Note source evidence (canvasId, nodeId, snapshotRevision) together. The revision fingerprints the rendered document at capture, not a server-acknowledged save. Use source-specific Chat/Note prompt wording and escape metadata as untrusted reference content.
  • Preserve optional Note metadata through the existing shared request/envelope, draft consumption/restoration, dispatch/retry, durable history and browser hydration. Do not insert it into editable comment text, title/search text or quote cards.
  • Resolve existing destinations through the recent-conversation API and canonical owner projection. Retain unavailable remembered owners, require explicit ambiguous choices, expose lookup retry, allow busy/streaming text targets and block pending forks or rebound owners. Staging never changes accepted recency.
  • Keep hidden destinations hidden until the user chooses the persistent View input notification. Coalesce notices per Space/thread, retire stale notices, guard identity on activation and pin pending quote drafts against cache eviction.
  • Update Note, Preview Workspace, Agent context, API and web architecture documentation.

Validation

  • pnpm typecheck passed.
  • Repository pnpm format and pnpm lint:fix completed; lint has zero errors and 334 existing warnings. Focused lint on the new implementation/tests is clean.
  • pnpm check:i18n, license-header check and git diff --check passed.
  • Integrated web regression run: 15 files / 357 tests passed, including Chat/Milkdown selection, drafts, history, controllers and unchanged Ink picker/submission/toolbar acceptance behavior. Additional final Note/destination run passed 17 tests, including the subsequently added selection-expiry case; final toolbar/Note run passed 55 tests.
  • Shared Agent wire schema: 31 tests passed. Server envelope/prompt/transcript-history: 83 tests passed.
  • Isolated Chromium Playwright: 2 new production Note Preview tests passed for editable mouse mode and touch-mode read-only rich text; 15 existing Chat Comment / Ink toolbar browser tests passed. New Note cases were rerun successfully after the final toolbar refinement.

Boundaries and limitations

Only Chat and expanded Note rich text are included. Raw CodeMirror, Canvas Note-card selection, PDF/Web excerpts, ordinary Canvas node-selection Send and Ink redesign remain out of scope. Unsent drafts remain runtime-only and do not survive reload. Chromium touch emulation is covered; real iPad/native selection menus and physical pen hardware have not been verified. CI/review remain required. This PR does not close #351 and grants no merge or release authorization.

Yuqing (mydmdm) and others added 2 commits October 28, 2026 08:51
Reuse the Chat Comment flow for Note rich text with existing conversation destinations, frozen source evidence and explicit hidden-draft discovery. Preserve Ink behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Retain both Note Comment documentation and the current-pointer editing contract. Update the browser regression to exercise readonly selection with touch input rather than switching back to mouse.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mydmdm
Yuqing (mydmdm) merged commit 345e881 into alpha Oct 29, 2026
4 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