Problem: Users need quick access to multiple actions on a verse — adding notes, copying text, opening commentaries — without cluttering the reading interface with buttons on every verse.
Solution: A context menu that appears when you click any verse. It shows all available actions for that verse, with some actions gated behind Pro/Premium tiers.
Not included: Multi-verse selection or batch operations. This is always one verse at a time.
Clicking a verse in the reader opens a floating menu next to the click position with several action options. The menu closes when you click elsewhere or press Escape.
User flow:
Menu items:
Edge cases:
Appearance:
Menu items: Each item is a row with:
Close behavior:
Responsive: Same appearance on mobile and desktop — positioned near the tap/click point.
Trigger: handleVerseClick(verse, event) in +page.svelte:
Math.abs(e.clientX - startX) + Math.abs(e.clientY - startY) > 5 — if true, it's text selection, not a clickopenContextMenu(verse, { x: clientX + 8, y: clientY + 8 })readModal state to { type: 'context-menu', verse, position }Positioning: A $effect in VerseContextMenu.svelte clamps position to viewport:
Math.min(x, window.innerWidth - menuWidth - 8)Math.min(y, window.innerHeight - menuHeight - 8)Tier gating: hasFeature(user.currentTier, 'interlinear') etc. for Pro+ items
Components:
VerseContextMenu.svelte — the menu UIreadModal.svelte.ts — shared Svelte 5 $state for menu visibilityFiles:
apps/web/src/lib/components/bible/VerseContextMenu.svelte — menu componentapps/web/src/lib/stores/readModal.svelte.ts — state managementapps/web/src/routes/(app)/read/[[book]]/[[chapter]]/+page.svelte — click handler + action handlersCurrent: DONE Milestone: v1 Priority: Core — primary way users interact with individual verses
History:
Dependencies: