Add applenugs:// deep-link handler (show / track / video)#2
Merged
Conversation
…lay) Implements the app side of the goose-almanac deep-link contract: applenugs://show/<date>?artist=Goose[&venue=][&song=&set=&pos=][&media=audio|video] - DeepLink.swift: pure, unit-tested parser + DeepLinkMatch fuzzy matching (normalize / venue / best-track-index), plus zero-pad date normalization. - DeepLinkRouter.swift: resolves artist+date to a nugs container and navigates + starts playback; track links start at the matched track, show links play from the top, video opens the auto-playing video detail. Audio resolution pages the artist's shows (bounded) and falls back to catalog search; video pages the per-artist list (no search exists for video). - AppModel: serialized deep-link channel (receiveDeepLink/handleDeepLink) so two links — or a link racing the post-login drain — can't interleave their navigate+play steps; pending-link slot replayed after login/bootstrap. - AppleNugsApp: .onOpenURL wired non-destructively (existing .frame / UITest modifiers untouched). RootView: drains the pending link once .loggedIn. - project.yml: registers the `applenugs` scheme only (not `nugsnet`, which stays OAuth-only) and adds a standalone host-free AppleNugsTests unit-test target (DeepLink.swift compiled in directly, no app launch on test runs). Review corrections folded in: venue mismatch falls through to search instead of guessing; fetch-before-navigate; best-track-index prefers the longest contained title for segue links; date comparison is zero-pad tolerant. 19 unit tests; clean build under SWIFT_STRICT_CONCURRENCY=complete. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tsvb
pushed a commit
that referenced
this pull request
Jul 3, 2026
Reconciles PR #2 with the iOS port: single host-free AppleNugsTests target carrying both suites (DeepLink parser + downloads/webcast logic; 34 tests green), deep-link wiring follows AppleNugsApp/RootView into AppleNugs/macOS/, and the iOS target inherits the pure parser/router in shared Core for future adoption. Both targets verified green from fresh derived data. Co-Authored-By: Claude Fable 5 <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.
What
Implements the app side of the goose-almanac deep-link contract:
A deep link resolves an artist + date to a nugs container, navigates to it, and starts playback:
&song=) → jumps to the matched track&media=video) → opens the auto-playing video detailRegisters the
applenugsscheme only —nugsnetstays OAuth-only/unregistered to avoid clashing with the official nugs.net app.How
Core/DeepLink.swift— pure, unit-tested parser +DeepLinkMatchfuzzy matching (normalize / venue / best-track-index / zero-pad date). No I/O.Core/DeepLinkRouter.swift—@MainActorresolver. Audio: bounded paging ofartistShows+ catalog-search fallback. Video: bounded paging of the per-artist list (no video search exists), date-only match.AppModel— serialized deep-link channel (receiveDeepLink/handleDeepLink): a chaineddeepLinkTaskensures two links — or a link racing the post-login drain — can't interleave their navigate+play steps. ApendingDeepLinkslot (last-wins) is replayed after login/bootstrap.AppleNugsApp—.onOpenURLwired non-destructively (existing.frame/ UITest modifiers untouched).RootView— drains the pending link once.loggedIn.project.yml— registers the scheme and adds a standalone, host-freeAppleNugsTestsunit-test target (bundle.unit-test);DeepLink.swiftis compiled into the bundle directly so logic tests run without launching the app.Review & fixes
After implementation, a multi-agent adversarial review surfaced 8 genuine defects (others dismissed as false positives). All fixed:
Testing
SWIFT_STRICT_CONCURRENCY=complete, 0 warnings from new code.applenugs://URL with a logged-in session (ad-hoc-signed test build).Notes
AppleNugs.xcodeprojis generated (xcodegen generate), per existing repo convention.🤖 Generated with Claude Code