Skip to content

feat: pinpoint mode for point-and-click annotations#232

Merged
backnotprop merged 11 commits intomainfrom
feat/point-and-click-annotations
Mar 6, 2026
Merged

feat: pinpoint mode for point-and-click annotations#232
backnotprop merged 11 commits intomainfrom
feat/point-and-click-annotations

Conversation

@backnotprop
Copy link
Owner

Summary

  • Adds a Pinpoint input method as an alternative to drag-to-select text
  • Hover over any block or inline element to see a dashed outline + label tooltip
  • Click to auto-select the element's text, then the existing annotation flow takes over (toolbar/comment/redline)
  • Input method (Drag/Pinpoint) is orthogonal to annotation action mode (Selection/Comment/Redline)
  • Persisted via cookie like other settings

New files

  • blockTargeting.ts — target resolution (inlines, table cells, list items, code blocks, full blocks)
  • usePinpoint.ts — hover/click state machine, bridges to web-highlighter via fromRange()
  • PinpointOverlay.tsx — dashed outline + label badge overlay
  • InputMethodToggle.tsx — Drag/Pinpoint segmented toggle
  • inputMethod.ts — cookie-based persistence

Test plan

  • Toggle to Pinpoint mode → cursor becomes crosshair
  • Hover headings, paragraphs, bold text, inline code, links → outline + label appears
  • Click text element → annotation toolbar appears (selection mode)
  • Click in comment mode → comment popover opens directly
  • Click in redline mode → auto-deletion annotation created
  • Click code block → comment popover (same as existing hover toolbar)
  • Click existing annotation highlight → selects it in panel
  • Switch back to Drag → normal text selection works
  • Toggle persists across page reloads

🤖 Generated with Claude Code

backnotprop and others added 8 commits March 5, 2026 20:36
Adds a new input method toggle (Drag / Pinpoint) orthogonal to the
existing annotation action modes (Selection / Comment / Redline).

In pinpoint mode, hovering over blocks and inline elements shows a
dashed outline with a label tooltip. Clicking auto-selects the
element's text via highlighter.fromRange(), firing the same CREATE
event as drag-selection — all downstream annotation flow is unchanged.

New files:
- blockTargeting.ts: resolves hover targets (inlines, cells, list items, blocks)
- usePinpoint.ts: hover/click state machine with text-range bridge
- PinpointOverlay.tsx: dashed outline + label badge
- InputMethodToggle.tsx: Drag/Pinpoint segmented toggle
- inputMethod.ts: cookie-based persistence

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merge InputMethodToggle + ModeSwitcher into a single compact toolbar
with two pill groups: input method (Select/Pinpoint) and action mode
(Markup/Comment/Redline). Buttons expand to show labels on hover/active
with explicit pixel-width transitions. Suppress transitions on mount
to prevent initial flash.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Shortcuts tab to settings with OS-aware key cap styling and
organized shortcut groups. Move Obsidian and Bear integrations
to dedicated tabs under an Integrations sidebar group, leaving
compact navigation links on the Saving tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Hold Alt to temporarily switch input method (reverts on release).
Double-tap Alt to permanently toggle. Added to keyboard shortcuts
panel in settings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move text-bracket icon to Select, pencil to Markup. Active buttons
use full opacity backgrounds with contrasting foreground. Help link
lowercase with updated styling. Revert md:py-8 padding. Add gap
between buttons in pill groups.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use text-xs (12px) and px-2.5 padding to match main branch button
rendering. Active state uses bg-background with no color tint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…groups

Table edge-zone detection: top/bottom edges target whole table, left/right
edges target the specific row, interior targets individual cells. List group
wrappers create hover zones in gaps between consecutive list items. Demo
plan now includes sample tables for testing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@backnotprop
Copy link
Owner Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

backnotprop and others added 3 commits March 6, 2026 00:10
Superseded by AnnotationToolstrip which unified input method + mode switching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Never used — paste service runs on Cloudflare KV and local FS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replaced by AnnotationToolstrip which unified mode switching + input method toggle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@backnotprop backnotprop merged commit 2739660 into main Mar 6, 2026
3 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