Skip to content

feat(search): add beta Images hits to unified search - #454

Merged
camrun91 merged 22 commits into
mainfrom
feat/search-unified-images-beta
Oct 23, 2026
Merged

camrun91 merged 22 commits into
mainfrom
feat/search-unified-images-beta

Conversation

@cameronapak

@cameronapak cameronapak commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Preserve the Images follow-up separately from the live verse/topic unified-search release in #446. Adds image hit types and mapping, core/hook contract fixtures, and the example smoke page. This is unified-search Images support, not a full Images API client.

Stacked on #446: one restoration commit, 14 files. The source tree matches the preserved pre-split implementation. Mocked Images success cases do not establish deployed API support; earlier production probes returned HTTP 400 for fields[]=images.

Blockers before ready

Draft for preservation and review only. Do not merge or publish without Cam's authorization.

RetriggerView in GreptileConfidence Score: 5/5

No new code defect blocks merging, but the author's draft status and authorization requirement still apply.

Summary

Adds Images field selection, maps image hits to { id, passageId }, and adds core/hook fixtures plus a demo page.

  • Unified search can return image hits as image and passage IDs.
  • The example app lets visitors try image searches alongside verses.

Reviews (2) · Last reviewed commit: "fix(examples): share the configured API ..." · Reviewed by Greptile

cursoragent and others added 15 commits October 14, 2026 21:22
Callers can request verses, topics, and images together. Image hits are id and passageId. Verse and topic hits stay the existing types.
Keep the UI barrel aligned with new core runtime exports so
check-public-exports passes.
Measured brotlied barrel is 21.55 kB. Set the limit to measured size
plus ~10% headroom per CONTRIBUTING.
Default omitted verses/topics/images wire keys to empty arrays, drop
invalid image hits per item (structural USFM on passage_id), and replace
the runtime field-coverage object with a type-only check.
Use the repo @ts-expect-error pattern for an invalid fields[] value
instead of a typed assertion plus SAFETY comment.
Use false instead of never in the false branch so Record<..., true>
rejects non-array field mappings.
Wire a vite-react page that calls SearchClient.searchUnified for images
alone or with verses, and renders thin hits plus empty/error states.
Results was reading the live Fields control, so flipping mode after an
images-only search showed a false empty verses section.

Co-authored-by: cameron.b.llewellyn <cameron.b.llewellyn@gmail.com>
Build on PR446 core search with an additive React hook, image-aware coverage, and documented backend availability. Validate request intents and required response fields without requiring images on the wire.

Amp-Thread-ID: https://ampcode.com/threads/T-01a15a0f-f2cd-72cf-a270-2102b3d073b2
Set the hooks full-barrel budget to measured 27.044 kB plus approximately 10% headroom, following CONTRIBUTING. Leave all narrow-import budgets unchanged.

Amp-Thread-ID: https://ampcode.com/threads/T-01a15a0f-f2cd-72cf-a270-2102b3d073b2
Preserve verse/topic unified search, useUnifiedSearch, and contract validation while deferring Images types, mapping, tests, and smoke page.

Amp-Thread-ID: https://ampcode.com/threads/T-01a15a0f-f2cd-72cf-a270-2102b3d073b2
Restore the complete pre-split Images work atop the unified-only release boundary without changing PR446.

Amp-Thread-ID: https://ampcode.com/threads/T-01a15a0f-f2cd-72cf-a270-2102b3d073b2
@changeset-bot

changeset-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 84868b0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@youversion/platform-core Minor
@youversion/platform-react-hooks Minor
@youversion/platform-react-ui Minor
vite-react Patch

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

camrun91 and others added 5 commits October 21, 2026 07:57
Treat optional wire keys and bad hits per ADR 0006 instead of rejecting
the whole response, enable the hook only when input is valid, document
the public API, and add a UI changeset for the unified search re-export.
Spread options.fields into subtopics so stub results use string[] and
typecheck passes after readonly search field types in c2a6465.
@cameronapak
cameronapak marked this pull request as ready for review October 22, 2026 19:37
Comment thread examples/vite-react/src/pages/SearchUnifiedPage.tsx
Base automatically changed from caml/ype-6188-search-unified-1037 to main October 22, 2026 19:57
@camrun91

Copy link
Copy Markdown
Collaborator

@cameronapak can you address the merge conflicts please?

camrun91 and others added 2 commits October 23, 2026 11:58
Resolve conflicts with the squash-merged #446: keep the Images additions on top of main's unified-search, restore main's changesets, and add a dedicated Images changeset.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ch page

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@camrun91 camrun91 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

@camrun91

Copy link
Copy Markdown
Collaborator

just confirmed that this does not make images show up in the UI this is good to mrege.

@camrun91
camrun91 merged commit 24cd0f2 into main Oct 23, 2026
20 checks passed
@camrun91
camrun91 deleted the feat/search-unified-images-beta branch October 23, 2026 19:41
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.

4 participants