Skip to content

feat(example): restore the example app to a plain SDK showcase (YPE-3713) - #121

Merged
Dustin-Kelley merged 2 commits into
highlightsfrom
dk/clean-up-example-app
Aug 7, 2026
Merged

feat(example): restore the example app to a plain SDK showcase (YPE-3713)#121
Dustin-Kelley merged 2 commits into
highlightsfrom
dk/clean-up-example-app

Conversation

@Dustin-Kelley

@Dustin-Kelley Dustin-Kelley commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Part of YPE-3713. The example app picked up demo scaffolding while the highlights epic was in flight. This strips it back so a partner evaluating the SDK sees the components as they would actually use them.

What changed

The Bible tab is <BibleReader defaultVersionId={3034} /> again. The custom copy/share toggle and the "Tap a verse to open the action sheet" status bar were driven by one block of demo state — onVerseSelect, clearSelectionSignal, onCopy, onShare, and the useCustomActions switch — so removing either meant removing both. The file is now byte-identical to its pre-epic state.

This does not change what the app demonstrates. The reader owns the verse action sheet, so tapping a verse still gives you the reference, the highlight swatches, Copy, and Share — now through the SDK's own expo-clipboard and RN Share fallbacks rather than the example's overrides.

The highlight-flow tab is deleted, along with its NativeTabs.Trigger. It was the temporary harness from YPE-3709 subtask 3, built to reach the permission flow before the reader could subscribe it. The reader drives the whole flow now, so the harness only exercised in isolation what bible-reader-highlights-prompts.test.tsx already covers. Its own header comment scheduled it for deletion here.

AGENTS.md loses the bullet describing the harness and deferring its removal to this ticket — it would otherwise point at a file that no longer exists.

What was deliberately left alone

expo-clipboard stays in apps/example/package.json. It is a peer dependency of the UI package for the action sheet's built-in Copy button, so dropping it with the override would break Copy rather than clean anything up.

The provider still requests permissions: ['highlights']. That is AC 1 of YPE-3713 and it is what gives the showcase real highlight data to paint.

Note for review

Nothing in the example exercises the onCopy / onShare overrides or clearSelectionSignal anymore. They stay covered by unit tests in packages/ui, and the README snippet is now the only place a partner sees that Copy and Share are overridable. Flagging in case you would rather that live in the app.

Verification

pnpm lint, pnpm typecheck (including the example's own tsc --noEmit, which confirms no stale generated route types), and pnpm test (306 passed, 1 skipped) all pass. Device verification for the epic's remaining ACs is separate from this cleanup.

🤖 Generated with Claude Code

Greptile Summary

Restores the example application to a focused, partner-facing SDK showcase.

  • Simplifies the Bible tab to render the SDK-owned BibleReader experience directly.
  • Removes the temporary highlight-permission-flow route and tab trigger.
  • Preserves the Bible card’s version picker while cleaning up obsolete commentary.
  • Refactors profile rendering and provider configuration without changing their behavior.
  • Updates contributor documentation to remove the deleted harness reference.

Confidence Score: 5/5

The PR appears safe to merge, with the removed example scaffolding fully covered by SDK-owned behavior and no stale route references.

The BibleReader independently manages verse selection, action-sheet dismissal, Copy/Share fallbacks, and highlight prompts; the deleted harness has no remaining callers, and the profile and provider edits preserve existing behavior.

Important Files Changed

Filename Overview
apps/example/app/(tabs)/index.tsx Removes example-owned selection and sharing controls while retaining the BibleReader’s internally managed action sheet, Copy/Share fallbacks, and highlight flow.
apps/example/app/(tabs)/highlight-flow.tsx Deletes an isolated temporary permission-flow harness whose route trigger and remaining references were also removed.
apps/example/app/(tabs)/_layout.tsx Removes the deleted harness’s tab trigger and leaves the four canonical example tabs intact.
apps/example/app/(tabs)/profile.tsx Rewrites equivalent loading, authenticated, and signed-out branches using early returns and a typed theme map.
apps/example/app/_layout.tsx Inlines the unchanged redirect URI constant into provider configuration while preserving highlight permission requests.
apps/example/app/(tabs)/bible-card.tsx Removes an explanatory comment without changing the version-picker-enabled BibleCard configuration.
AGENTS.md Removes documentation for the now-deleted temporary highlight-flow harness.

Reviews (1): Last reviewed commit: "refactor(example): clean up layout and p..." | Re-trigger Greptile

Context used:

…3713)

The example app had accumulated demo scaffolding around the highlights
epic. Strip it back so a partner evaluating the SDK sees the components
as they would use them, not a development harness.

- The Bible tab is `<BibleReader />` again. The custom copy/share toggle
  and the selection status bar were wired to the same block of state
  (`onVerseSelect`, `clearSelectionSignal`, `onCopy`, `onShare`), so they
  come out together. The reader still owns the verse action sheet, which
  falls back to `expo-clipboard` and RN `Share` on its own.
- Delete the `highlight-flow` tab and its harness. It existed to reach
  the permission flow before the reader could (YPE-3709 subtask 3); the
  reader now drives the whole flow, so it only duplicated coverage that
  lives in unit tests.

`expo-clipboard` stays in the example's dependencies — it is a UI peer
for the action sheet's Copy button, not just the removed override.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Dustin-Kelley Dustin-Kelley changed the title chore(example): restore the example app to a plain SDK showcase (YPE-3713) feat(example): restore the example app to a plain SDK showcase (YPE-3713) Aug 6, 2026
@Dustin-Kelley
Dustin-Kelley marked this pull request as ready for review August 6, 2026 20:20

@cameronapak cameronapak left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! No issues

@Dustin-Kelley
Dustin-Kelley merged commit 4f6271b into highlights Aug 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants