Repository navigation
Conversation
This branch has not been deployed
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.
What changed and why
Markup mode ships in the plan editor and is one of the features the landing page leads with, but the docs never mentioned it — searching for "markup" returned nothing. This adds a new Collaboration page,
plans/collaboration/markup.mdx, covering how to enter the mode, the three input gestures (draw / type / speak), the tool set and hotkeys, how to adjust annotations, what Send markup actually produces, and what happens to unsent annotations. It is listed indocs.jsonafterreviews, with one cross-linking sentence added toplans/getting-started/rich-content.mdxandplans/collaboration/reviews.mdx.Verified
Everything on the page was confirmed by reading the product repo (
ref-tools/ref):plan-app/client/src/components/EditorRightActionControls.tsx,MarkupModeButton.tsx);toggleMarkupModehas default hotkeyCmd+Shift+M, contextglobal(plan-app/client/src/lib/hotkeys/actions.ts).formatHotkey(lib/hotkeys/types.ts) rendersCmdasCtrlon Windows/Linux, which is why the page states the mapping once rather than per shortcut.handleToggleMarkupModereturns early whenisMobile(routes/EditorPage.tsx), and the mobile branch ofEditorRightActionControls.tsxnever renders the marker button.lib/editor/markupReadOnly.tsappliesEditorView.editable(false)+EditorState.readOnlyonly, deliberately nochangeFilter, so remote Yjs transactions still apply while user input is blocked.MarkupOverlay.tsxflips it on for the lifetime of the mode.lib/markup/markupGestures.ts: left button drag draws, click without drag drops a focused note,button === 2starts voice capture;components/MarkupIntroPopover.tsxis the wording the page mirrors ("Left-click + drag to draw", "Strokes, arrows & shapes in red ink", "Hold right-click to speak", "Becomes a note when you release", "Click anywhere to type a note").components/MarkupToolbar.tsx(Draw D, Arrow A, Rectangle R, Line L; undo/redo; Cancel; Send markup withCmd+Enter), plus the key handler inMarkupOverlay.tsx(D/A/R/L, Delete/Backspace on the selection,Cmd+Z/Cmd+Shift+Z/Ctrl+Y, Escape deselects then exits viaconsumeMarkupEscapeinlib/markup/markupTypes.ts).markupGestures.ts; endpoint/corner reshaping viashapeAnchors/reshapeShapeEndpoint/reshapeRectCornerinMarkupOverlay.tsx; note double-click-to-edit, side-handle resize, and empty-note discard on blur incomponents/MarkupLabel.tsx.anchorLineand are re-resolved on scroll/resize (MarkupOverlay.tsxredraw effect,resolveAnchoredPointinmarkupTypes.ts).lib/markup/markupSend.tscaptures each cluster (lib/markup/markupCapture.tsrasterizes the editor content DOM with the ink and notes composited on top, including self-rasterized HTML widget iframes), uploads the PNGs as attachments, and callssendMessagewiththreadId: null, i.e. a new thread. The agent instructions the page paraphrases arebuildMarkupPromptinlib/markup/markupClusters.ts(read the plan, interpret the strokes/notes, apply the edits with Edit leaving unrelated content untouched, note ambiguity in chat). Clustering of nearby annotations into one image isclusterAnnotationsin the same file. On successMarkupOverlay.handleSendcallsonThreadLaunched+onExit, andEditorPage.handleMarkupThreadLaunchedselects the thread and opens the chat panel.lib/markup/transcription/index.ts: support requiresnavigator.mediaDevices.getUserMedia, the mic anchor acquires permission, andisSpeechCaptureSupported()gates the speak row in the intro popover, so the page says the option is not offered where speech capture is unavailable.MarkupStore(lib/markup/markupStore.ts) is in-memory and created per overlay mount;EditorPage.tsxresetsisMarkupModeondocumentIdchange with the comment "Ephemeral per plan — leaving the plan (or toggling off) discards any unsent annotations".compositeWidgetIframesinmarkupCapture.ts), which is what backs "diagrams and widgets are captured as they render".Unverified / omitted
MARKUP_MODEinplan-app/client/src/hooks/useFeatureFlag.ts, comment still says "during the spike"). Gate state lives in Statsig, not the repo, so I could not confirm from code that the mode is on for everyone. The page therefore makes no availability claim beyond "desktop". Unblocked by a look at the gate's rollout in Statsig — if it is not at 100%, this page should say so or wait.buildMarkupCommentsPromptexists inlib/markup/markupClusters.ts(leave the feedback as comments, optionally attached to an open review) but has no non-test caller, so there is no UI path to it. Not documented.Shift+Cmd+Entercapture download. Explicitly a debug affordance inmarkupSend.ts; left out on purpose.sendMessageis called without an explicit model, so the resolution happens server-side; not documented.Conflicts
This PR edits
docs.json(one line added to the Collaboration group). Sibling PRs in this batch touch the same file; conflicts there are expected and small.Generated by Claude Code