Skip to content

feat: spotlight share links for albums and tracks - #203

Merged
flamboh merged 3 commits into
mainfrom
feat/share-link-spotlight
Sep 25, 2026
Merged

flamboh merged 3 commits into
mainfrom
feat/share-link-spotlight

Conversation

@flamboh

@flamboh flamboh commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Note

🤖 Claude Opus 5.5 on behalf of Oliver

ELI5

When you import something that can be shared, tagium now points at its menu with a small note that says share links exist. When you open the menu, the share option is highlighted. This works for albums and tracks, and the same mechanism can point out other features later.

Why

Share links are hard to find. The only way in is a … menu, and on tracks that button stays invisible until you hover over the row.

Implementation

  • Spotlight UI primitive (src/components/ui/spotlight.tsx): a shadcn-style set of components built on the Radix popover. The anchor gets a pulsing brand-colored outline, and spotlightItemClassName highlights a matching menu item.
  • Feature discovery (src/features/discovery/featureDiscovery.ts): one "seen" flag per feature, stored together in localStorage under tagium:feature-discovery (for example {"share-links":true}). To add another feature, extend the DiscoverableFeature union and call useFeatureDiscovery("<feature>").
  • SpotlitActionMenu: the … menu for both album cards and track rows. Pass it an ActionSpotlight (actionId, title, description, onDismiss) and it shows the note, handles "got it" / "show me", and highlights that action in the menu.
  • useShareLinkSpotlight: picks where to point. It prefers the first album that can create a share link, and otherwise the first track that can. Albums and tracks share the single share-links flag.

Review guide

Setup: run with VITE_PUBLIC_SHARE_LINKS_ENABLED=true, and remove tagium:feature-discovery from localStorage to see the note again.

Flows to check

  1. Import a soundcloud set or youtube playlist. The note appears next to the album's … button ("anyone with the link gets this album with your tags and artwork.").
  2. Import a single track into an empty library. The note appears next to that track's … button.
  3. Click show me (or the … button). The note goes away, the menu opens, and the share item is tinted. Picking it opens the normal share dialog.
  4. got it, Escape, or clicking anywhere else dismisses it. After it's dismissed once, it never shows again for albums or tracks, even after a reload.

Edge cases

  • Local uploads, content added from someone else's share link, and anything already shared never get the note.
  • On mobile it only appears once you open the library drawer.
  • prefers-reduced-motion turns off the pulse.

Decisions for the reviewer

  • Album hint during downloads: the album note can appear while later tracks in the set are still downloading, because the existing share rules already enable "share album" at that point (see the first screenshot).
  • Albums first: they win over loose tracks, since sharing a whole playlist is the more useful action.
  • Escape clears the selection: closing a … menu with Escape also clears the editor selection. That already happens on main and isn't changed here.

Verified

  • vp check passes, and all 671 unit tests pass, including new tests for the discovery flags (merging, bad storage, persistence) and share targeting (album first, track fallback, visibility, one shared flag, copy for each kind).
  • A Playwright script against the dev server (with mocked soundcloud/cobalt) ran the album and track flows. It checked the copy, the note hiding when the menu opens, the highlighted share item with no "new" tag, the share dialog opening, and the stored flag.
  • Not verified: the mobile drawer on a real device, and real (unmocked) imports.

UI Changes

Before: sharing only lives in the … menus, and nothing points to it.
before: no hint after import

After (album): the note next to the album menu, then the highlighted share item and the share dialog.
after: album share hint, light
after: album share hint, dark
after: album menu with share album highlighted
after: album share dialog

After (track):
after: track share hint
after: track menu with share track highlighted

Album flow:

https://gh-file-drop-api-prod-galwoqjslzlnws6s.oliver-boorstein.workers.dev/f/081bc13409215f9a/album-flow.webm


Made by Claude Opus 5.5 in Claude Code (T3 Code).

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tagium 96b438f Commit Preview URL

Branch Preview URL
Sep 25 2026, 09:17 AM

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

React Doctor found 3 new issues in 3 files · 3 warnings · score 93 / 100 (Great) · 3 fixed · vs main

3 warnings

src/features/library/AlbumSidebarDnd.tsx

  • ⚠️ L69 React function has high control-flow complexity no-high-complexity-react-function

src/features/library/TagSidebarPanel.tsx

  • ⚠️ L82 React function has high control-flow complexity no-high-complexity-react-function

src/features/workspace/audioTagger.tsx

  • ⚠️ L45 React function has high control-flow complexity no-high-complexity-react-function

Reviewed by React Doctor for commit 96b438f. See inline comments for fixes.

@flamboh flamboh changed the title feat: spotlight share links after importing a shareable track feat: spotlight share links for albums and tracks Sep 24, 2026
Comment thread src/components/ui/spotlight.tsx Outdated
Comment thread src/components/ui/spotlight.tsx Outdated
@flamboh
flamboh merged commit 8fb95a6 into main Sep 25, 2026
4 of 6 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.

1 participant