Skip to content

Slice 2: Region Capture → Reading Window with Dummy Data #3

Description

@emcifuentesc

Parent

What to build

Add the first complete user-facing path: menu bar "Capture Region" triggers macOS screencapture -i, the selected region is saved to a temp file, and the path is sent to the Python sidecar (still returning hardcoded Reading JSON). The Reading Engine renders the response fully: horizontal layout, furigana (ruby text) above Kanji, Romaji below each line, alternating background colors per line, copy buttons, and always-on-top centered window behavior. Temp files are cleaned up after processing.

This slice builds the entire UI shell and input plumbing using fake data, so the product is demoable even before real OCR is wired in.

Acceptance criteria

  • Menu bar icon offers "Capture Region" action
  • screencapture -i integration captures region and saves to temp file
  • Capture Service passes temp path to Sidecar Manager
  • Sidecar returns hardcoded Reading JSON (horizontal, 2+ lines, mixed Kanji/Kana)
  • Reading window opens centered, always-on-top, closeable
  • Reading Engine renders horizontal layout with ruby furigana above Kanji
  • Romaji row appears directly below each Japanese line
  • Consecutive lines have alternating background colors
  • Two copy buttons: "Copy Japanese" (surface forms) and "Copy Romaji"
  • Temp image file deleted immediately after processing
  • New capture replaces the current Reading in the same window
  • Closing the window returns app to menu-bar-only state
  • Reading Engine component tests verify DOM structure and copy-button behavior with mock Reading data

Blocked by

Testing notes

Write Reading Engine component tests using mock Reading data. Verify horizontal layout DOM structure, furigana placement, alternating colors, and that copy buttons extract expected plain text.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentReady for an AFK agent to implement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions