Skip to content

[codex] Keep Read controls visible and restore sentence selection - #88

Merged
Talljack merged 1 commit into
mainfrom
fix/read-layout-selection
Jul 15, 2026
Merged

Talljack merged 1 commit into
mainfrom
fix/read-layout-selection

Conversation

@Talljack

Copy link
Copy Markdown
Owner

What changed

  • keep the Read practice workspace within the remaining viewport
  • make long reference text scroll inside its card while controls remain visible below it
  • render read-aloud words as selectable text while preserving click and keyboard pronunciation
  • handle pointer and native selection completion reliably
  • extract sentence context across rendered text nodes
  • deduplicate selection events so one selection sends one translation request

Root cause

The long article card had no height boundary, so it pushed the controls below the entire document. Read-aloud mode also rendered every word as a separate native button, which prevented reliable sentence selection. The selection provider then handled selectionchange and pointerup twice for the same range.

Validation

  • full pnpm test suite
  • pnpm typecheck
  • pnpm lint
  • pnpm build
  • browser-tested desktop and 390x844 mobile layouts
  • verified long content scrolls internally with page scroll at zero
  • verified a complete 30-word sentence selection and Chinese translation
  • verified one translation request per selection

@vercel

vercel Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
echo-type Ready Ready Preview, Comment Jul 15, 2026 2:20pm

@Talljack
Talljack marked this pull request as ready for review July 15, 2026 14:22
@Talljack
Talljack merged commit 4d6e540 into main Jul 15, 2026
5 checks passed
@Talljack
Talljack deleted the fix/read-layout-selection branch July 15, 2026 14:22

This branch was successfully deployed

1 active deployment
Preview — 0ed8f32b Deployed Jul 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant