fix(mobile): Library scroll + stale shelves; reader long-press word gate#389
Merged
Conversation
Library: whole body scrolls (shelves -> FlatList header + safe-area padding); deleted/changed books no longer linger in shelves — 60s cache now invalidates via pub/sub so the live carousel refetches immediately (not only on refocus), covers remove/delete/complete/cancel + pull-to-refresh. Reader: word action (translate/Explain + TTS) now fires only on a deliberate ~450ms long-press with <8px drift; quick tap on a word is swallowed (no LLM spend), quick tap on empty space toggles bars. touchcancel clears the timer; drag releases native multi-word selection; haptic on engage. Coachmark copy -> "press and hold". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two mobile fixes (PM → architect → engineer → adversarial QA → fix cycle).
Library tab
ListHeaderComponent; empty states use a ScrollView; safe-area bottom padding so the last row clears the tab bar + floating "+").clearLibraryShelvesCache()bumps a version + notifies subscribers (useSyncExternalStore-style), so the live carousel refetches immediately — not only on refocus. Covers remove-from-library, delete-upload, mark-complete/uncomplete, cancel-upload, and pull-to-refresh.Reader — long-press word gate
The word action (translation/Explain sheet + auto-TTS) used to fire on a light ≤350ms tap, causing accidental translations and wasted LLM tokens. Now:
touchcancelclears the timer (no ghost WordCard after an interrupted gesture); a drag past 16px after engage releases the selection-suppression window so native multi-word selection still works.readerHtml.ts); no web/reader-overlaychange.Verification
apps/mobiletsc --noEmitclean;packages/sharedvitest 149 green.🤖 Generated with Claude Code