Repository navigation
feat(ui): save notes from the Reader (YPE-6783) - #508
Conversation
chore: sync react localization Co-authored-by: camrun91 <16566029+camrun91@users.noreply.github.com>
* fix(core): sanitize planted footnote content in Bible HTML Co-Authored-By: Cameron Pak <cameronandrewpak@gmail.com> * fix(core): address review on footnote sanitization Sanitize footnote content in an inert template, drop non-HTML-namespace elements, sanitize generated footnote content for idempotency, document the sanitization contract, and consolidate tests. Co-Authored-By: Cameron Pak <cameronandrewpak@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* refactor(ui): organize Bible reader modules (YPE-6808) * refactor(ui): extract reader settings lifecycle and toolbar (#495) * refactor(ui): extract reader settings lifecycle and toolbar (YPE-6815) * fix(ui): address reader settings review feedback
* feat(ui): re-export passage and versions hooks Amp-Thread-ID: https://ampcode.com/threads/T-01a20e73-4446-71f0-950a-3054df5492c7 * chore(ci): remove packed UI consumer check * docs(ui): clarify shared provider import guidance Amp-Thread-ID: https://ampcode.com/threads/T-01a20e73-4446-71f0-950a-3054df5492c7 * docs: address hook re-export review nits Amp-Thread-ID: https://ampcode.com/threads/T-01a20e73-4446-71f0-950a-3054df5492c7 --------- Co-authored-by: Amp <amp@ampcode.com>
* fix(ui): preserve focus at high zoom * fix(ui): harden zoom focus coverage * refactor(ui): simplify zoom focus handling * test(ui): cover zoom focus behavior * test(ui): focus reader close before asserting * fix(ui): address zoom review findings * test(ui): compare pointer focus styles * test(ui): respect focus-visible heuristics * test(ui): use native focus traversal * fix(ui): scope focus preservation * fix(ui): preserve sign-in focus contrast * test(ui): await close focus transition * refactor(ui): centralize picker scroll geometry * fix(ui): keep picker focus visible in constrained panels * fix(ui): preserve the expanded book trigger in compact panels * test(ui): reach reader settings close with native keys * fix(ui): honor reduced motion in chapter reveal * fix(ui): address focus and scroll review feedback * fix(ui): reveal focused chapters in Firefox Keep focused book triggers fully visible within the built-in accordion on Linux Firefox. Wait for the settings dialog opening animation before asserting visibility in WebKit. * test(ui): query the current settings dialog while opening
* feat(core): add content library video APIs * refactor(core): simplify video schema ownership * fix(core): harden content library contracts * fix(core): validate video response boundaries * fix(core): distinguish no-content responses * fix(core): scope no-content status handling * fix(core): distinguish empty response bodies * test(core): isolate Content Library smoke coverage * feat(core): keep content library APIs compatible with v3 * fix(core): align content library rollout contracts (YPE-6573) * fix(core): accept empty video filters and trim search bundles (YPE-6573) * fix(core): address content library review feedback (YPE-6573) * docs(core): clarify video APIs and live validation (YPE-6573) * fix(core): use stable Content Library routes (YPE-6573)
* feat(core): add Notes API client Amp-Thread-ID: https://ampcode.com/threads/T-01a2095d-25a9-72c5-a0fb-baa79c35e05a * fix(core): address Notes API review feedback Amp-Thread-ID: https://ampcode.com/threads/T-01a2095d-25a9-72c5-a0fb-baa79c35e05a * fix(core): normalize Notes write colors * fix(core): address Notes API contract review * fix(core): enforce Notes version filters and tolerate malformed passages * fix(core): isolate malformed Notes list records Amp-Thread-ID: https://ampcode.com/threads/T-01a2095d-25a9-72c5-a0fb-baa79c35e05a * chore: refresh combined core bundle budget Amp-Thread-ID: https://ampcode.com/threads/T-01a2095d-25a9-72c5-a0fb-baa79c35e05a --------- Co-authored-by: Amp <amp@ampcode.com>
* fix(ui): label reader sign-in menu trigger (YPE-6810) * test(ui): capture Linux WebKit dialog visibility failures * test(ui): stress WebKit visibility diagnostics * test(ui): check settings visibility after keyboard focus Assert dialog opening state after Enter and visibility on the Close button after native Tab, alongside the focus-ring checks. Remove temporary WebKit diagnostics and repeated CI groups.
* fix(ui): handle reader clipboard failures (YPE-6809) * fix(ui): report clipboard failures and retry failed shares * fix(ui): keep clipboard warnings visible while scrolling * fix(ui): ignore stale clipboard action results
* fix(ui): retain iframe verse selection and anchors (YPE-6410) * test(ui): cover iframe highlight painting and reset * fix(ui): complete iframe reader text and focus handling
chore(ui): align declaration build with strict checks Refs: YPE-6464
* chore(ui): align declaration build with strict checks Refs: YPE-6464 * chore: enable additional TypeScript safety checks Refs: YPE-6832
* feat(ui): customize verse actions and indicators Refs: YPE-6782 Signed-off-by: Austin <abharms@gmail.com> * test(ui): wait for verse layout in browser journeys Refs: YPE-6782 Signed-off-by: Austin <abharms@gmail.com> * fix(ui): keep configured verse actions reachable Make exiting actions inert and keep the visible verse indicator inside its pointer target. Refs: YPE-6782 Signed-off-by: Austin <abharms@gmail.com> * fix(ui): keep verse callbacks scoped to the displayed passage Refs: YPE-6782 Signed-off-by: Austin <abharms@gmail.com> * fix(ui): preserve verse action focus and warning visibility Signed-off-by: Austin <abharms@gmail.com> * fix(ui): restore focus after rejected verse action dismissal Refs: YPE-6782 Signed-off-by: Austin <abharms@gmail.com> --------- Signed-off-by: Austin <abharms@gmail.com>
🦋 Changeset detectedLatest commit: fe2b3fe The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Ref: YPE-6783
Preserve the draft on browser Back and clean up a partially persisted automatic token refresh. Keep the composer within narrow viewports and simplify the shared action and highlight paths. Ref: YPE-6783
Keep note handoffs bound to their initiating Reader and authorization attempt. Preserve focus, existing verse actions, and a recoverable draft across OAuth failures and navigation. Ref: YPE-6783
Keep OAuth recovery bound to the initiating draft and restore focus around the Notes composer. Refresh highlights for the passage on screen and preserve existing host sign-in behavior. Ref: YPE-6783
18244d4 to
24e6dd4
Compare
Keep host-controlled toolbar scopes, restore legacy startup token rotation, and retain the captured draft through a verified failed callback. Verify the workflow with isolated browser fixtures and native Safari. Ref: YPE-6783
Keep verified legacy auth tokens available, discard drafts for ended sessions, restore selection during host takeover, and gate highlight writes to the rendered passage. Ref: YPE-6783
Retain clean-canceled drafts across navigation, allow matching-chapter highlight intents, and keep verified auth state bound to its active account and handoff. Ref: YPE-6783
|
@greptileai review |
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f0a017475
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Resume Notes on the verified configured callback, supersede an older pending highlight action, and keep account-bound requests and drafts tied to the right session. Preserve standalone swatch outlines under host styling. Ref: YPE-6783
Retry the original create payload, then reconcile the current draft against the recovered note ID using the verified writer token. Keep that ID and draft after a failed update. Ref: YPE-6783
bmanquen
left a comment
There was a problem hiding this comment.
1 blocking issue inline.
Reconcile current draft fields against the original submitted fields rather than the API response. Trust validated successful updates while retaining the resource-ID check. Existing Notes journeys cover trimmed update content and normalized create line endings.
Keep the published built-in action union and explicit custom action lists unchanged. Save remains in the default actions, so Notes can ship as a minor addition. Preserve both sample demonstrations with a default/custom action toggle.
bmanquen
left a comment
There was a problem hiding this comment.
2 blocking issues inline.
Bring in Reader Notes (#508) and the localization sync (#512). The Bible screen keeps the redesigned layout and adds main's Notes, custom actions, and verse markers. The Notes smoke now signs in and out through the Profile screen, which replaced the old header navbar. Signed-off-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a23228-868c-7460-985b-7a4c2fc0984b
Reader Save Notes — YPE-6783
Add Save to the Reader’s default verse actions. The Notes composer captures the exact selected passage, including gaps, with optional note text, Private/Public visibility, and highlight color. Each selected range displays its full reference, such as “John 1:2, John 1:4.” Successful saves clear the selection and refresh highlights for the displayed chapter.
Custom
verseActionItemslists keep their existing actions and order. SetincludeSaveonBibleReader.Rootto append Save when Notes are available. The publishedBuiltInVerseAction,VerseActionPopoverItem, andBibleReaderVerseActionItemtypes remain unchanged. The demo includes Save alongside its custom marker action.Readers with built-in auth request Notes authorization when needed. Signed-in users missing
write_notesgo directly to OAuth; signed-out users first see the sign-in introduction. Host-controlled and disabled auth retain their existing ownership boundaries.Drafts survive cancellation, declined authorization, recoverable failures, and OAuth redirects. Sign-out or account replacement invalidates owned drafts, and stale callbacks cannot resume another account’s action. Retries reuse the draft UUID; when a create response is lost, the Reader recovers the original note before reconciling later edits through an update. Successful API responses may normalize note content.
The composer uses the SDK’s centered dialog with a bookmark/passage header, privacy toggle, and filled note field. The privacy toggle supports pointer, Enter, and Space activation and is disabled while saving. Discard confirmation uses the existing dialog and button primitives. Visual reference: Figma Notes section; a dedicated discard design has not been verified.
This is an additive minor release scoped to note creation. Saved-note indicators, lists, editing, deletion, and tags remain deferred.
Validation
Validated at
fe2b3fe:fe2b3fe.Live API limitation
Passage-only saves send empty
content. The last verified live request returned HTTP 400 (content: String should have at least 1 character); the API-owned fix still needs deployment and live retesting. No placeholder workaround was added. Mocked tests do not establish live passage-only support.Earlier live text-filled saves passed composer close, exact passage/color persistence, and highlight refresh. BrowserStack run TR-17 records three passed cases linked to YPE-6783. These results came from local Chromium execution and exclude the blocked passage-only case.
Confidence Score: 5/5

The latest change appears safe to merge and keeps the existing custom-action check intact.Summary
Adds Reader note creation with captured verse selections, account-bound authorization, retained drafts, and retry recovery.
Reviews (38) · Last reviewed commit: "test(ui): wait for custom action popover..." · Reviewed by Greptile