fix: preserve native interactions while annotating - #127
Conversation
83f389e to
72751da
Compare
|
Speaking as Kun's firstmate: Reviewed the full thread, the diff, current VISION: Native selection/copy while annotating is closer to "nothing interrupts the human," but swapping left-click annotate for a custom right-click menu (and Per-rule
Holding. No Firstmate flag. |
|
Speaking as Kun's firstmate: Helping this existing PR from overlapping issue #94 (do not open a competing PR). #94 is still unfixed on latest main This PR is held as a default chrome UX change (left-click annotate → custom right-click menu, plus Please don't open a second annotation-rewrite PR against #94. |
|
For context on preserving native browsing while annotating: we found that adding right-click (
We implemented and tested this alongside the opt-in start-off mode requested in #311. |
|
Speaking as Kun's firstmate: Re-triaged for newer-activity after stamp What changed since stamp
Diff vs current main (inspected)
VISION per-rule
contract-class: new-default Related
Stale / merge / flag
Holding. No Firstmate flag. |
Intent
Fix Lavish annotation interaction so native selection, left-click, mouseup, keyboard copy, and copy-first behavior remain available while right-click explicitly offers annotation. Preserve data-lavish-action and details/summary behavior; dismiss the custom menu on outside click, Escape, and nested or viewport scroll. Per captain decision J-716, reject broad iframe clipboard permission and unrestricted artifact-to-chrome clipboard bridges: use the narrowest user-initiated least-privilege copy path, with focused sandbox, clipboard, exact-selection, and dismissal tests. Keep the change dependency-free, preserve the sealed artifacts and installed package, publish a review-ready fork PR, and never merge.
What Changed
data-lavish-actionbehavior.Risk Assessment
✅ Low: The change is well-bounded to annotation interaction handling and documentation, with focused tests covering the new right-click menu, dismissal paths, and clipboard constraints.
Testing
After the initial pnpm command exposed a missing local pnpm executable, I installed project dependencies with npx pnpm, ran the focused and full relevant Node test files, then verified the change end-to-end in a rendered Lavish session: selected text retained its selection, right-click showed Copy selection before Annotate selection, annotation produced a text-range prompt, and the native details summary remained clickable.
/var/folders/2p/q31vqlw97qn9d7f0yp4y89g80000gn/T/no-mistakes-evidence/01KWF6C9TRJM770M9FHR3PWXYW/rightclick-copy-first-menu.png)/var/folders/2p/q31vqlw97qn9d7f0yp4y89g80000gn/T/no-mistakes-evidence/01KWF6C9TRJM770M9FHR3PWXYW/queued-selection-and-native-details.png)Evidence: Chrome DevTools interaction transcript
Evidence: Lavish poll output showing delivered text-range annotation prompt
Evidence: Lavish open session output
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
pnpm test -- --test-name-pattern "annotation|context menu|selection|native|copy|summary|scroll|sandbox|clipboard" test/artifact-sdk-interaction.test.js test/server.test.js(environment check; pnpm was unavailable)npx --yes pnpm@11.1.1 install --frozen-lockfilenode --test --test-name-pattern "annotation|context menu|selection|native|copy|summary|scroll|sandbox|clipboard" test/artifact-sdk-interaction.test.js test/server.test.jsnode --test test/artifact-sdk-interaction.test.js test/server.test.jsCreated/var/folders/2p/q31vqlw97qn9d7f0yp4y89g80000gn/T/no-mistakes-evidence/01KWF6C9TRJM770M9FHR3PWXYW/rightclick-annotation-demo.html, opened it throughnode bin/lavish-axi.js ... --no-open --no-gate, and drove a headless Chrome DevTools session with/var/folders/2p/q31vqlw97qn9d7f0yp4y89g80000gn/T/no-mistakes-evidence/01KWF6C9TRJM770M9FHR3PWXYW/cdp-rightclick-evidence.mjsLAVISH_AXI_STATE_DIR=/var/folders/2p/q31vqlw97qn9d7f0yp4y89g80000gn/T/no-mistakes-evidence/01KWF6C9TRJM770M9FHR3PWXYW/state LAVISH_AXI_PORT=48587 node bin/lavish-axi.js poll /var/folders/2p/q31vqlw97qn9d7f0yp4y89g80000gn/T/no-mistakes-evidence/01KWF6C9TRJM770M9FHR3PWXYW/rightclick-annotation-demo.html --timeout-ms 1000✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.