Skip to content

feat: extract AuthErrorPopup, InternalErrorPopup, NetworkErrorPopup, AuthPopup, SpotifyAuthErrorPopup - #29

Merged
Andreas-Garcia merged 3 commits into
mainfrom
feat/extract-error-auth-popups
Aug 16, 2026
Merged

feat: extract AuthErrorPopup, InternalErrorPopup, NetworkErrorPopup, AuthPopup, SpotifyAuthErrorPopup#29
Andreas-Garcia merged 3 commits into
mainfrom
feat/extract-error-auth-popups

Conversation

@Andreas-Garcia

Copy link
Copy Markdown
Member

Summary

  • Extracts 5 popup components from grow/hear-the-music-tree-frontend's near-identical local copies into @behindthemusictree/app-kit/popup, following the same pattern already used for BasePopup/TrackUploadPopup.
  • InternalErrorPopup and SpotifyAuthErrorPopup take an explicit contactEmail prop instead of reading process.env.NEXT_PUBLIC_CONTACT_EMAIL directly.
  • AuthPopup takes spotifyOnlyDescription/defaultDescription props instead of hardcoded copy, since the two apps' wording differs.
  • topOffset needs no change — it's already part of BasePopupProps and flows through ...rest; consuming apps just pass it at the call site as they already do for BasePopup itself.
  • Dropped SpotifyAuthErrorPopup's errorCode prop — declared/destructured in hear-app's copy but never used in the body.

This is step 2/3 of a larger popup-extraction effort (step 1 moved BasePopup/PopupTitle/PopupButtons into app-kit for grow-frontend to consume). Next: bump grow-frontend's app-kit dependency and migrate its call sites to import these from app-kit instead of its local copies.

Test plan

  • New colocated *.test.tsx for each component, ported from grow-frontend's existing behavioral suite
  • CI: lint + build + tests

…Popup, SpotifyAuthErrorPopup

Extracted from grow/hear-the-music-tree-frontend's near-identical local copies, following the
same pattern as BasePopup/TrackUploadPopup: env-var reads and app-specific copy become explicit
props (contactEmail, spotifyOnlyDescription/defaultDescription) instead of assumptions this
package can't make about a consuming app.

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

vercel Bot commented Aug 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app-kit-playground Ready Ready Preview Aug 16, 2026 2:38pm

packages/app-kit's tsc --noEmit only type-checks files under src/, so
vitest.setup.ts's runtime `import "@testing-library/jest-dom/vitest"` never
reached the type checker, and the new popup tests were the first in this
package to use jest-dom matchers (toBeInTheDocument) and hit the gap.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Importing from the "../transport" barrel evaluates its entire module
graph (fetch-wrapper, site-urls, query-client, app-error-factory, etc.),
pulling files with near-zero test coverage into the v8 coverage report
(all: false) and dragging the global 80% threshold down to ~63%.
@Andreas-Garcia
Andreas-Garcia merged commit 896eca0 into main Aug 16, 2026
4 checks passed
@Andreas-Garcia
Andreas-Garcia deleted the feat/extract-error-auth-popups branch August 18, 2026 09:17
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