Skip to content

Add catalog search with split song/album results and a music-tuned custom keyboard - #108

Merged
sanylax0 merged 1 commit into
mainfrom
claude/repo-review-improvements-yvk3t7-search
Jul 20, 2026
Merged

sanylax0 merged 1 commit into
mainfrom
claude/repo-review-improvements-yvk3t7-search

Conversation

@sanylax2

Copy link
Copy Markdown
Collaborator

What

A full-screen search page (magnifying-glass button on the Library page) that searches Apple's iTunes catalog — the most exhaustive freely queryable commercial music database (100M+ songs, no API key, artwork included) — for songs and albums only.

Layout (per spec)

  • Top: a compact pill search bar that starts small and expands as text fills it, with a blinking caret and clear/Done controls.
  • Middle: results split into two always-equal halves — Songs on top, Albums below — each independently scrollable.
  • Bottom: a custom in-app QWERTY keyboard (the system keyboard never appears — there is no text field). Letters/numbers layers, repeating backspace, space, and a search key.

Catalog-tuned autocorrect

CatalogAutocorrect (new in ContinuityCore, pure Swift, unit-tested on the Linux CI) learns its vocabulary from the catalog results as you search plus the user's own library titles/artists, so:

  • the suggestion bar completes/repairs toward real music words ("wee" → "weeknd"),
  • space-bar autocorrect fixes one-edit misspellings of known catalog words, and never "corrects" a word the catalog actually contains.

Adding results

  • Tapping + on a song adds it to a shared "From Search" playlist.
  • Tapping + on an album looks up its full tracklist and imports it as a new playlist.

Both reuse the existing searchQuery → YouTube ingest pipeline (same path as Spotify imports), so results become real, playable, stem-separable tracks.

Files

  • ContinuityCore/CatalogAutocorrect.swift + tests (runs in core-tests-linux)
  • Ingest/MusicCatalog.swift — iTunes Search API client (song/album search + album tracklist lookup)
  • Ingest/PreparationQueue+Catalog.swift — add-song / import-album
  • App/Views/SearchView.swift — page, model, keyboard
  • App/Views/LibrarySheetView.swift — search toolbar button + full-screen cover

Device checks

  • Library → magnifying glass → type with the custom keyboard; verify live results, equal halves, suggestion chips, space autocorrect.
  • Add a song and an album; verify they appear in the library and prepare/play.
  • Run xcodegen generate after checkout (new source files).

🤖 Generated with Claude Code

https://claude.ai/code/session_013TJoWkqg8bzkGdzxWhWjWP


Generated by Claude Code

…om keyboard

Searches the iTunes catalog (Apple's full commercial music database, no API
key) for songs and albums. The search page has an expanding pill query bar,
results split into two always-equal halves (songs on top, albums below), and
an in-app QWERTY keyboard whose suggestion bar and space-bar autocorrect run
against a vocabulary learned from the catalog results and the user's library
(CatalogAutocorrect in ContinuityCore, unit-tested on Linux CI).

Tapping a song adds it to a shared "From Search" playlist; tapping an album
imports its full tracklist as a new playlist. Both reuse the existing
search-query -> YouTube ingest pipeline, so results become playable tracks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013TJoWkqg8bzkGdzxWhWjWP

@sanylax0 sanylax0 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.

ts is fire

@sanylax0
sanylax0 merged commit d58f830 into main Jul 20, 2026
1 of 2 checks 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.

3 participants