Skip to content

feat(point-ask): Comment tool with enriched region captures, spatial pins and helper HUD - #1300

Open
AxiomeCG wants to merge 13 commits into
pascalorg:mainfrom
AxiomeCG:cut/zone-comments-enriched-20261120
Open

AxiomeCG wants to merge 13 commits into
pascalorg:mainfrom
AxiomeCG:cut/zone-comments-enriched-20261120

Conversation

@AxiomeCG

@AxiomeCG AxiomeCG commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Point and ask becomes the Comment tool (key C), and it can capture an enriched region. This is the editor side of the zone comments work in pascalorg/private-editor (branch cut/zone-comments-enriched-20261120). This PR needs to land before the private pin bump (D-006).

  • Viewer: on-demand visible-pixel ID capture (id-buffer.ts, id-pass.ts). A pass that reads which node owns each visible pixel of a region, with the opening glass and frame told apart.
  • Enriched region captures (opt-in) (lib/enriched-capture/*). A dragged area carries its colour map, its visible-pixel shares, world points and rooms, alongside the ordinary crop.
  • Spatial pins. Pins stay on the surfaces they were captured on, stand upright, and show their area footprint while open. Two comments at the same point both stay clickable. There is free-click placement (anywhere: an object, a wall, the middle of a room) and a comment pin cursor.
  • Hover no longer says "Pascal is working on this" for an idle or answered comment.
  • Renamed to Comment in the dock button, its tooltip and the i18n catalogs.
  • Comment helper HUD in the right column, the same kind of widget the other tools have, with the 3D /icons/comment.webp icon:
    • Pointing: Click pin a comment, Drag smart capture (with the colour map when enriched), Alt target a deeper surface, Esc exit.
    • Composing: Enter save comment, Cmd/Ctrl + Enter ask Architect, Shift + Click add or remove an element, Esc dismiss.
    • Hidden while a comment thread card is open. A new pinned flag on ContextualShortcutHint keeps the primary gestures visible when shortcuts are collapsed, without highlighting their keys.

How to test

  1. bun test packages/editor/src/components/ui/helpers/helper-manager.test.tsx and the *point-ask* / *enriched* / viewer id-buffer / id-pass tests.
  2. tsgo --noEmit in packages/core, packages/viewer and packages/editor.
  3. By hand, in a host that answers point asks: press C, check the Comment HUD on the right, click a surface, drag an area, open a pin.

Results on 2c44754fe:

  • Editor tests (helper-manager plus every *enriched* / *point-ask* test file): 276 pass / 0 fail.
  • tsgo --noEmit: core and viewer pass. Editor reports only the two known ceiling-bracket-batch.test.ts errors, and that file is identical on main.
  • bun run check: warnings only.

Warning

The branch is based on abd6eee9f and main has moved 7 commits since. A merge with main conflicts in the compiled catalogs packages/editor/src/i18n/locales/{en,en-XA}/messages.ts (regenerate them with bun run i18n:extract) and in packages/viewer/src/components/viewer/plugin-dispatch.test.tsx.

Screenshots / screen recording

Not attached yet.

Checklist

  • I've tested this locally with bun dev (through the private host on :3640)
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

Note

Medium Risk
Touches agent-facing PointContext contracts, async capture timing on send, and substantial point-ask interaction/rendering paths; regressions could affect AI context quality or comment placement UX.

Overview
Rebrands Point and ask to Comment (C) and wires host-facing props: EditorProps.pointAsk (enrichedRegions, freeClick, noteComposer), custom pointAskIcon, and new host helpers (sendPointAskBubble, closePointAskBubble, lookAtPointAsk).

Agent payload (PointContext / PointImage) grows optional region enrichment—pixel visible shares, world corners, rooms, segmented colour map, and legend—while legacy inRegion ids remain; ordinary clicks/regions without enrichment keep the old key shape.

Enriched capture hooks the snapshot pipeline with an ID-buffer pass (takeIdPass / captureEnrichedRegion) so dragged areas can ship authoritative pixel evidence plus a colour-map crop. The ask bubble shows a map badge when that data is present.

Persistent comment pins get footprint overlays, collision-spread markers with anchor connectors, toggled cards (no auto-retire/hover-compare like ephemeral pins), and updated pin chrome. Session options flow through PointAskLayer and startPointAskSession.

UX: Comment helper HUD (commentToolHints, COMMENT_HUD_TITLE, pinned hints), i18n/tooltip updates, and mode pill copy for free-click/drag commenting.

Reviewed by Cursor Bugbot for commit 590724c. Bugbot is set up for automated code reviews on this repo. Configure here.

AxiomeCG and others added 11 commits November 17, 2026 17:32
Co-Authored-By: Codex (gpt-6.1-sol) via omp <noreply@openai.com>
Co-Authored-By: Codex (gpt-6.1-sol) via omp <noreply@openai.com>
- Add a host icon slot and persistent click-only pins with surface footprints and separated markers.

Co-Authored-By: Codex (gpt-6.1-sol) via omp <noreply@openai.com>
…-20261120

Compiled en and en-XA catalogs merged key by key (3,979 ids, equal to the merged PO files). plugin-dispatch.test.tsx keeps this branch's descriptor-based document fixture and main's new stripped-plugin geometry test.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

The i18n literal guard rejects new untranslated copy and the literal baseline may only shrink. Both strings now go through i18n._ with fr/es/ja/zh-CN drafts (fuzzy, Review: required).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@Aymericr Aymericr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @AxiomeCG. The Comment tool with enriched captures and spatial pins is a nice step, and CI is green at 8316266. I went through Bugbot's three findings on this head:

  1. "Session ignores Comment tool flags" (High): I think this one is a false positive. startPointAskSession copies options.enrichedRegions / options.freeClick into the module flags (session.ts ~L1520), and the layer restarts the session when they change. One edge worth a look: the if (stopSession) return stopSession early return happens before the flags are assigned, so a second caller with different options would silently keep the first caller's flags. If only one layer ever mounts, a short comment saying so would settle it.
  2. "Send drops in-flight ordinary crops" (Medium): this looks real. sendBubble only retains the downCrops promise for enriched regions and free-click, and closeBubble deletes the entry, so an ordinary click sent while its crop is still pending goes out without image. Retaining the pending crop for every send, not just enriched ones, would fix it.
  3. "HUD shortcuts do not match compose" (Medium): the HUD advertises Enter = save and Cmd/Ctrl+Enter = ask Architect, but the bubble has a single onSubmit. Either wire the two paths or adjust the HUD copy so it doesn't promise something the bubble doesn't do.

Also, since this is a big visible change (new tool name, pins, HUD) and the checklist says no editor session was run, please add a short screen recording: pinning a comment, a drag capture, the HUD in both states, and two pins at the same point. Happy to re-review once those are in.

@AxiomeCG

Copy link
Copy Markdown
Contributor Author

Pushed 590724cd9 addressing all Bugbot findings and Aymeric's startPointAskSession note:

  • session.ts: copy enrichedRegions / freeClick before the stopSession early return and retain in-flight ordinary crops on sendBubble.
  • helper-manager.tsx & editor/index.tsx: gate composing dual-submit hints on pointAsk.noteComposer.
  • Verified locally (helper-manager.test.tsx + src/lib/point-ask/: 273 tests passing, core & viewer tsgo clean). Local capture recordings will follow after testing.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 590724c. Configure here.

.pa-pa{stroke-width:2;stroke-linecap:round}
.pa-pk{fill:none;stroke:var(--pa-ok);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:14;stroke-dashoffset:14;transition:stroke-dashoffset 240ms var(--pa-ease) 80ms}
.pa-sg{fill:none;stroke:var(--pa-accent);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity 160ms ease}
.pa-sg,.pa-ic{fill:none;stroke:var(--pa-accent);stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity 160ms ease}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment pin glyphs stay hidden

Medium Severity

New pin artwork adds comment lines and ask/change/error glyphs, but those groups stay at opacity 0. No pin state rule reveals .pa-cm or .pa-ic, so idle comment pins and error/ask/change states never show the icons this redesign introduced.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 590724c. Configure here.

This branch has not been deployed

No deployments
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.

2 participants