mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-12-06 01:47:39 +09:00
36b331f3d7411ecf97c05bf15146e83161ab94de
27
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e0e5959edc |
fix(review): surface relevance-filter rejection when pasting lyrics + Add Anyway force option (#937)
## Summary
Pasting reference lyrics in the review UI could silently do nothing: if
the relevance filter (30% anchor-match threshold) rejected the pasted
source during the correction rerun, the `add-lyrics` endpoint still
returned a generic success, so the paste tab cleared the box, closed the
modal, and no reference lyrics appeared — with zero feedback.
Observed in prod on job `0eebb248` ("Jonny Hill & Linda Feller –
Darling"): two "successful" add-lyrics calls, both sources rejected at
1.3% relevance (3/230 words), `reference_lyrics` left empty.
## Changes
- **Backend (`/api/review/{job_id}/add-lyrics`)**: when the source is
dropped by the relevance filter, return `{status: "rejected", rejection:
{relevance, matched_words, total_words}}` and skip persisting the no-op
rerun to GCS. Same change in the local `ReviewServer` (wheel/CLI review
mode), including `force` support it previously lacked.
- **Frontend**: `addLyrics` API client sends the `force` flag (as a
string — the endpoint body is `Dict[str, str]`, which also makes it
deploy-skew-safe). `PasteLyricsTab` keeps the pasted text on rejection,
shows a warning with the match %, and offers an **Add Anyway** button
that retries with `force=true`. Covers both the Add Lyrics modal and the
inline empty-state, which share the tab.
- **i18n**: new `pasteLyrics.rejectedWarning` / `addAnyway` strings
translated to all 33 locales.
- **Docs**: `docs/API.md` add-lyrics section documents the rejected
response.
- **Tests**: backend endpoint tests (success/rejected/force passthrough,
no-upload-on-reject), API client tests (force string, rejected
envelope), and `PasteLyricsTab` component tests (rejection UI, Add
Anyway flow, warning cleared on edit, legacy void result).
## Testing
- `make test`: full backend + frontend suite green (92 suites / 1158
frontend tests; backend 56 review-route tests incl. 3 new).
- Local CodeRabbit review completed; single finding was a pre-existing
translation nitpick (skipped).
@coderabbitai ignore
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
|
||
|
|
1755fa138c |
fix(review): correct vocal waveform time drift on 44.1kHz audio devices (#938)
## Summary Fixes the vocal waveform in the lyrics-review timeline editor appearing shifted ~0.4–0.5s late relative to the audio in some situations (reported on job 0eebb248, segment 25 at ~171s). **Root cause:** the client-side peak envelope in `frontend/lib/audio-data.ts` floored samples-per-bucket to an integer. At a 44.1kHz `AudioContext` (device-dependent — common on Macs and audio interfaces) the exact stride is 110.25 samples but was floored to 110, making the envelope's clock run ~0.23% fast. The waveform drifted late by ~2.3ms per second of song — ~0.4s by the 3-minute mark. 48kHz devices divide evenly (120) and were unaffected, which is why the bug only appeared "in some situations". ## Changes - Bucket boundaries are now computed from the fractional stride (`Math.floor(bucket * samplesPerBucket)`), keeping every bucket within one bucket (2.5ms, non-accumulating, sub-pixel) of its nominal 1/400s position at any sample rate. - Peak computation extracted into an exported pure `computePeaks()` so it's unit-testable without a browser `AudioContext`. - 7 new unit tests in `frontend/lib/__tests__/audio-data.test.ts`, including a 44.1kHz drift regression test that fails against the old floored-stride code (impulse landed 27 buckets / 67ms late at 29.5s). - Version bump 0.198.4. ## Testing - `make test`: all backend tests + 92 frontend suites (1158 tests) pass. - New regression tests verified to fail against the pre-fix implementation. - Local 8-angle code review + CodeRabbit CLI review: no findings. @coderabbitai ignore 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
c65a920a59 |
feat: graceful backend-outage handling + soften uptime alert noise (#921)
## Why A "Karaoke Backend - Service Unavailable" uptime alert fired at 06:06 UTC on 2026-08-22 and auto-recovered ~1m41s later. Investigation showed it was a **routine Cloud Run instance recycle** on `--min-instances 1`: the single warm instance (up ~9.6h) was reaped at 06:01:53, leaving a ~80s gap with no origin, so Cloudflare failed the health check from all 6 checker regions at once. No crash/OOM — a self-healing platform recycle. (Full write-up: `docs/archive/2026-08-22-health-check-alert-noise-and-graceful-degradation.md`.) We're deliberately keeping `--min-instances 1` for cost, so this addresses the two things we *can* control: alert noise, and how the UI behaves during such a blip. ## What **1. Soften the uptime alert** (`infrastructure/modules/monitoring.py`) - Condition `duration` 60s → **300s**: a sub-5-min self-healing recycle no longer pages; a sustained hard-down still fires (~5–6 min). Incident documented in-code. **2. Graceful frontend degradation** - `lib/api.ts` — new **`apiFetch`** wrapping every backend call: non-aborting 2.5s "reconnecting" hint, hard-timeout backstop, **safe retries (GET only — never replays a mutation)**, transient-status detection (502/503/504 + Cloudflare 52x), GCS/third-party passthrough. Throws a typed `BackendUnavailableError`. - `lib/backend-status.ts` — framework-agnostic connectivity store (`online | reconnecting | unavailable`); escalates to `unavailable` on a 10s clock, clears to `online` on any success. - `components/backend-status-banner.tsx` — one reassuring app-wide banner (mounted under `[locale]`, covers landing + logged-in dashboard + review screens), **i18n across all 33 locales**. `/admin/*` intentionally excluded. Copy reassures that in-flight renders are unaffected. During a real recycle the dashboard's own polling drives the banner and it self-heals when the backend returns — no refresh needed. ## Testing - New unit tests: `__tests__/backend-status.test.ts`, `__tests__/api-fetch.test.ts` (GET retry→10s escalation, transient 503, transparent recovery, non-GET never retried, `Request`-input method/signal, GCS passthrough, caller-abort passthrough). Updated `completeJobUpload` assertion. - Full suite green: **1130 passing**. - Banner verified visually locally (reconnecting + unavailable, en + es). - Local CodeRabbit review: 5 findings (1 major, 4 minor) all addressed; cycle 2 clean. ## Deploy notes - Infra change: `pulumi up` run locally before merge to avoid IaC drift (Pulumi CI re-runs as no-op). @coderabbitai ignore --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
3e666c28bb |
fix(e2e,submit): tolerate Stripe layout A/B + retry tenant upload-complete (#919)
## Problem Two independent daily-E2E failures fired alerts: - **E2E Daily #138/#139 (Credit Purchase)** — timed out 30s at `stripe-checkout.ts` waiting for a top-frame `Pay` button. - **Tenant E2E #80 (`vocalstar`; `singa` passed)** — timed out 120s waiting for "Track Submitted". ## Root causes (both investigated to ground truth) **1. Stripe Checkout layout flipped again (test-only).** Stripe has now oscillated its hosted Checkout layout **three times**, strongly implying A/B testing / staged rollout: - Apr (#715): multi-method accordion of **radios**, card fields in iframes, Pay in top frame - Aug 17 (#916): **single-method**, direct textbox inputs, no chooser - Now: multi-method **Payment Element** where the chooser is **buttons** and the whole element — chooser, card fields **and the Pay button** — is inside a **nested iframe** `page.getByRole(...)` only searches the top frame, so the Pay button (now nested) was invisible → 30s timeout. The real checkout rendered correctly throughout (right product, referral 70% off, $3.00 total). **2. Tenant submit: network blip on the final completion call (real, transient).** For `vocalstar` the submit **created the job + deducted a credit**, both files reached GCS (verified in the bucket), but the final `completeJobUpload()` `fetch` failed at the network layer — it never reached the server (zero backend logs) — and threw a non-`ApiError`, surfacing the generic "Something went wrong" while stranding the paid-for job at "Setting up". `singa` passed the identical flow seconds earlier. ## Changes (v0.196.2) - **`frontend/e2e/helpers/stripe-checkout.ts`** — rewritten to be **layout-agnostic**: searches **every frame** (top + nested iframes) for the Pay button, the Card chooser (radio **or** button), card fields (direct **or** iframe), ZIP and save-info toggle. Prominent doc-comment cataloguing the three observed variants with a "do not narrow to one layout" warning. - **`frontend/lib/api.ts`** — `completeJobUpload` now retries **network-level** failures (3 attempts, backoff). HTTP errors are never retried (deterministic). Self-heals the exact failure observed. - **`frontend/components/job/TenantJobFlow.tsx`** — logs the real error; shows a network-specific message (`submitNetworkError`, translated to all 33 locales). - Tests: 3 new `completeJobUpload` retry tests; tenant error-mapping tests updated. All pass; tsc/eslint clean on changed files. ## Verification - Dispatched `e2e-daily.yml` on this branch (test code from branch, driving **production**): - **Stage 1: Credit Purchase — ✅ success** (real ~$3 charge through the new nested-iframe Stripe layout — directly exercises the helper fix) - Stage 2: Happy Path — validating (orthogonal to these changes) - Run: https://github.com/nomadkaraoke/karaoke-gen/actions/runs/32394417473 - Local CodeRabbit review completed; one legit finding fixed (Hebrew register), one false positive skipped (`ApiError` is exported at `api.ts:3982`; the new `toBeInstanceOf(ApiError)` test passes). @coderabbitai ignore 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
1b6833b182 |
fix(jobs): show job/log timestamps in the viewer's local timezone (#907)
## Problem Job dates on the dashboard displayed the raw UTC wall-clock instead of the viewer's local time. e.g. a job submitted at ~4:10 PM local (viewer at UTC-2) showed as `8/14/2026, 6:10:25 PM`. ## Root cause `created_at` (and timeline/log timestamps) were built from naive `datetime.utcnow()` and serialized via `model_dump(mode='json')` / `.isoformat()`, producing ISO strings with **no timezone offset** (`"2026-08-14T18:10:25.123456"`). Firestore stored them as plain strings and returned them verbatim. The frontend's `new Date(str)` parses an offset-less ISO date-time as **local** time, so the UTC value was shown unconverted — off by the viewer's UTC offset. ## Fix **Frontend (fixes all existing + new data, no migration):** - New `parseServerDate()` util in `frontend/lib/utils.ts` — treats offset-less ISO date-times as UTC (appends `Z`); passes through strings that already carry `Z`/`±HH:MM`, plus `Date`/epoch inputs. - Applied at every customer-facing server-timestamp display: `JobCard` created-at, `JobLogs` timestamps, referral payout dates, and referral-discount expiry (`BuyCreditsDialog` + dashboard). - 8 unit tests covering naive/`Z`/`+00:00`/non-UTC-offset/date-only/epoch/`Date` cases. **Backend (makes stored timestamps unambiguous going forward):** - `create_job` and timeline events now use `datetime.now(timezone.utc)`, so serialized ISO strings carry a `+00:00` offset. Arithmetic consumers (`job_health_service`) already guard for both naive and aware datetimes. ## Testing - Backend: 210 targeted tests pass (job_manager / firestore / timeline / job_health / countdown). - Frontend: full suite 1108 tests pass (85 suites), including the new util tests. ## Notes - `/admin/*` pages (English-only, internal) still use `new Date()` directly; they benefit from the backend change for new jobs but were left otherwise untouched as out of scope. - CodeRabbit local review was rate-limited (free OSS quota), so this PR intentionally omits `@coderabbitai ignore` to let the bot review. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
1578984f5b |
fix: filter benign ResizeObserver-loop noise from client error monitor (#878)
## Summary
The error monitor fired a 🔴 New Error Pattern alert for \`ResizeObserver
loop completed with undelivered notifications\` (on \`singa.\`, build
|
||
|
|
fea6ebec1a |
fix(tenant): make white-label B2B portals attribute jobs to the tenant (Vocal Star + Singa) (#824)
@coderabbitai ignore ## Problem The white-label tenant portals (`vocalstar.nomadkaraoke.com`, `singa.nomadkaraoke.com`) looked "done" but **had never worked end-to-end**: 0 of the last 484 production jobs carried a `tenant_id`. No tenant job had ever run. **Root cause:** the frontend API client never sent the `X-Tenant-ID` header. Tenant portals call the shared `api.nomadkaraoke.com`, whose Host isn't the tenant subdomain, and the `?tenant=` query param is disabled in prod — so the backend could never detect the tenant. Every tenant sign-in and job submission silently fell back to consumer behavior (default theme, no tenant Dropbox, etc.). The `getTenantHeaders()` helper existed and was unit-tested, but was never wired into requests. ## Changes **Frontend** (`lib/api.ts`, `lib/tenant.ts`) - Attach `X-Tenant-ID` on all authenticated requests **and** the magic-link request, sourced from `window.__TENANT_CONFIG__` (edge-injected by the Cloudflare function; mirrored from the tenant store for dev/preview). Consumer build resolves no tenant → no header → **behavior unchanged**. **Backend** (`_apply_tenant_overrides` in `file_upload.py`) - Make tenant config **authoritative** over global distribution defaults. Prod sets `DEFAULT_DROPBOX_PATH` / `DEFAULT_GDRIVE_FOLDER_ID` / `DEFAULT_BRAND_PREFIX` globally; these seed `dist`, and the old "fill only when unset" overlay let them leak — so every tenant job would have landed in the **shared consumer Dropbox folder** and uploaded to the **global Google Drive**. Now Dropbox/GDrive routing is gated by the tenant feature flags and cleared when disabled. **Tenant configs** (GCS + setup scripts, Vocal Star + Singa) - Disable Google Drive (`gdrive_upload=false`, `gdrive_folder_id=null`), keep YouTube off, enable Dropbox to each tenant's own folder. B2B = locked theme, no YouTube/GDrive, Dropbox + portal download only. ## Why it's consumer-safe - Frontend: header only attached when a tenant is resolved (never on `gen.nomadkaraoke.com`). - Backend: `_apply_tenant_overrides` early-returns when `tenant_config is None` (all consumer jobs). ## Testing - New: frontend header-attachment tests (tenant build vs consumer); backend authoritative-override + feature-flag-gating regression guards (incl. the global-default-leak case). - Full suites green: **3466 backend**, **1013 frontend**. - Verified live tenant configs via API after update. Manual prod E2E (real track through each portal) + a daily per-tenant E2E workflow follow in a second PR, once this deploys and is verified in prod. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
7268dfd830 |
feat(duet): multi-singer karaoke support + local CLI review fixes (#730)
## Summary
- **New feature:** Multi-singer / duet support. Review UI gains a "Duet
Mode" toggle and a per-segment chip to assign Singer 1 / Singer 2 /
Both. Rendered MP4 shows each singer in their signature color (blue /
pink / yellow), sweeping to a near-white tint of the same hue as each
word is sung.
- **Unplanned but necessary:** ~15 local CLI regression fixes that
landed alongside. The i18n work on `main` (LocaleRedirect, static-export
locale prefixes) silently broke the local `karaoke-gen` CLI review flow;
shipped-with-package `ReviewServer` was also missing several
`/api/review/{jobId}/*` endpoint aliases that the unified frontend
expects. This branch closes all of that so the local flow works
end-to-end again.
Full design spec:
[`docs/archive/2026-04-21-multi-singer-duets-design.md`](./docs/archive/2026-04-21-multi-singer-duets-design.md).
Implementation plan:
[`docs/archive/2026-04-21-multi-singer-duets-plan.md`](./docs/archive/2026-04-21-multi-singer-duets-plan.md).
## Changes — Duet Feature
**Backend**
- `Word.singer` / `LyricsSegment.singer` optional fields (`SingerId =
Literal[0,1,2]`, 0=Both)
- `DEFAULT_KARAOKE_STYLE` gains a `singers` block with per-singer colors
(unhighlighted = signature color, highlighted = near-white hue tint)
- `CDG_DUET_SINGERS` palette constant (+ `build_cdg_lyrics` helper —
wired into the render flow but not yet fed into `CDGGenerator`'s TOML
builder; follow-up tracked in `docs/LESSONS-LEARNED.md`)
- `ass/style.py` gains `build_karaoke_styles` factory that emits one ASS
style per singer in use
- `LyricsLine` / `LyricsScreen` / `SubtitlesGenerator` /
`SegmentResizer` all forward segment + word singer fields through the
render chain (several bugs where rebuilds silently dropped the field
were fixed)
- `is_duet` flag persisted in review-session `state_data` (cloud) and
captured by the local `ReviewServer` with a latch-up-only semantic on
`complete_review` so InstrumentalSelector can't accidentally downgrade
it
- `CorrectionOperations.generate_preview_video` threads `is_duet` into
the inner `preview_config`
- `render_video_worker` reads `is_duet` from state_data and propagates
through `OutputGenerator` → `SubtitlesGenerator` (both local + GCE
paths)
**Frontend (`frontend/`, sources only — bundle at
`karaoke_gen/nextjs_frontend/out/` also rebuilt)**
- `SingerId` type + optional `singer` on `Word` / `LyricsSegment` /
`CorrectionData.is_duet`
- `duet.ts` helpers: `cycleSinger`, `resolveSegmentSinger`,
`collectSingersInUse`, `hasMultipleSingers`, `hasWordOverrides`
- `SingerChip` component (click to cycle 1 → 2 → Both, shows `*` when
words have overrides)
- `Header` "Duet Mode" toggle (opt-in, hides chip column when off)
- `TranscriptionView` renders chip + subtle row-tint gradient when duet
is on
- `LyricsAnalyzer` manages `isDuet` state, includes it in save payloads
- `segmentOperations.ts` extends split/merge/addBefore/delete with
singer-inheritance rules (including the tricky implicit-vs-explicit
singer case)
- Keyboard shortcuts `1` / `2` / `B` on a focused segment
- `InstrumentalSelector` falls back to `hasMultipleSingers(segments)`
when `correctionData.is_duet` is missing
- Auto-enable duet on session-restore when restored data shows
multi-singer evidence
- `lyricsReview.duet.*` namespace added to `frontend/messages/en.json`
and auto-translated to all 32 other locales
**i18n**
- Every new user-visible string goes through `next-intl`; the
translation pipeline ran for each en.json change
- Backend new error strings added to
`backend/translations/{en,es,de}.json` and tracked via
`.en-snapshot.json`
## Changes — Local CLI Review Regression Fixes
These were uncovered while trying to manually validate the duet feature
end-to-end. They land in this PR because blocking validation would have
blocked the feature.
- `ReviewServer` now serves the `/{locale}/app/jobs/local/review` (and
broader `/{locale}/app/...`) paths that `LocaleRedirect` unconditionally
bounces to — discovers valid locales from the frontend build
- Added missing `/api/review/{jobId}/...` aliases: `search-lyrics` (new
handler using `CorrectionOperations.search_lyrics_sources`),
`add-lyrics`, `handlers` (POST, matching cloud), `audio/{stem-or-hash}`
(dispatches stems vs audio-by-hash), `instrumental-analysis`,
`waveform-data`, `v1/annotations`, `sessions` stubs
- Review-session history persistence added (external session)
- `job-router-routes.ts` now parses locale-prefixed pathnames so
`/en/app/jobs/local/instrumental` renders the InstrumentalSelector
instead of the lyrics review fallback
- Test-mock signatures updated for the `run_combined_review` 3-tuple
return
## Testing
- [x] Unit tests pass: **1606 package tests + 3002 backend tests + 848
frontend tests**, all green. Coverage: 69.29% (≥69% gate)
- [x] Integration tests pass (including new end-to-end multi-singer
fixture tests)
- [x] Playwright production E2E spec compiles
(`frontend/e2e/production/duet-review.spec.ts`)
- [x] Manual validation done end-to-end on Lady Gaga × Bradley Cooper —
"Shallow (145s duet clip)" — full pipeline produces a proper
duet-rendered MP4 with three per-singer ASS styles tagged correctly
against dialogue lines (6 Singer 1, 16 Singer 2, 4 Both across this
clip). Checked-in fixture at `tests/data/Shallow-Duet-145.ogg`.
- [ ] Manual validation against a second track with dense
call-and-response (spec listed Eminem × Rihanna "Love the Way You Lie")
— not done this PR; can follow up after merge if anything surprising
surfaces
- [ ] End-to-end CDG duet output — still deferred (see Known Follow-Ups)
## Review
- [x] Local code-review done via `feature-dev:code-reviewer` agent
(CodeRabbit CLI fell over on the 3605-file bundle rebuild commit)
- [x] Two findings addressed in commit `da3004ea`: handlers HTTP method,
mergeSegment implicit-singer case
@coderabbitai ignore
## Known Follow-Ups
- `build_cdg_lyrics` helper is implemented and unit-tested but
`CDGGenerator` still constructs its TOML config directly rather than via
`SettingsLyric`. CDG output from duet jobs renders in solo colors today.
Documented in `docs/LESSONS-LEARNED.md`; not required for the MP4/ASS
path which is the feature's primary surface.
- Cloud `complete_review` overwrites `is_duet` in state_data
unconditionally (local server has latch-only semantics). In practice the
frontend's `hasMultipleSingers` fallback in `InstrumentalSelector` keeps
this consistent, but the cloud could gain the same latch for parity.
## Version
Bumped `pyproject.toml` from `0.171.0` → `0.171.1`.
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
6068ef7a93 |
fix: only clear auth token on explicit 401, not network errors (#706)
## Summary - `fetchUser()` was clearing the access token on ANY error (network failures, timeouts, aborted requests during page redirects) - This caused users to get logged out when returning from external flows like Stripe Connect onboarding — the redirect chain triggers transient fetch errors that wiped the token - Now only clears the token when the server explicitly returns 401 (session expired/invalid) This is the root cause of the "logged out after Stripe Connect" issue reported alongside #702. ## Test plan - [ ] Manual: complete Stripe Connect flow, verify user stays logged in on return - [x] Existing auth tests still pass (no behavior change for actual 401s) @coderabbitai ignore 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
fb4bcc7737 |
fix(i18n): locale-prefix review links and protect auth from redirect aborts (#668)
## Summary - Hash-based review/instrumental/audio-edit links in JobCard were missing the locale prefix (`/en/`), causing a double-redirect through `LocaleRedirect` that aborted the module-level `fetchUser()` call and wiped the user's auth session - Added `useLocale()` to JobCard so links include the locale prefix, avoiding the redirect entirely - Made `fetchUser()` resilient to `AbortError` so navigation-triggered fetch aborts don't clear auth ## Test plan - [x] Unit tests: 710 passing (3 new auth abort resilience tests) - [x] JobCard test expectations updated for locale-prefixed URLs - [x] CodeRabbit review: no findings - [ ] Manual: verify clicking "Review Lyrics" on dashboard navigates directly to review page without logout <!-- @coderabbitai ignore --> 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|
|
d2d5de1dee |
Fix contrast ratio for tenant portal themed elements (#483)
@coderabbitai ignore ## Summary - Tenant portals (Vocalstar yellow `#ffff00`, Singa green `#17E87A`) had unreadable text on primary-colored buttons and UI elements because `--primary-foreground` was hardcoded to white - Added WCAG luminance-based contrast computation to dynamically choose black or white foreground text - Applied fix in client-side branding, Cloudflare edge function, and all tenant-specific components - Fixed light mode to respect tenant colors instead of falling back to brand pink ## Test plan - [x] 6 new unit tests for `getContrastColor()` covering yellow, green, black, blue, pink, white inputs - [x] 2 existing branding tests updated to verify `--primary-foreground` is set correctly - [x] All 555 frontend tests pass - [ ] Visual verification on vocalstar.nomadkaraoke.com and singa.nomadkaraoke.com after deploy 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
90ce8951f5 |
feat: separate B2B tenant portal with edge config injection (#458)
## Summary - Separate whitelabel B2B tenant portals into their own Cloudflare Pages project (`karaoke-gen-tenant`) with edge-injected tenant config, fixing the magic link auth bug and eliminating flash of consumer content - Fix magic link emails to use tenant-specific URLs and branding (emails now link to `vocalstar.nomadkaraoke.com` instead of always `gen.nomadkaraoke.com`) - Add Cloudflare Pages Function that injects `window.__TENANT_CONFIG__` and CSS variables at the edge for instant branding - Add `NEXT_PUBLIC_TENANT_PORTAL=true` build flag for tree-shaking consumer content from tenant builds - Add admin tenant preview via `?preview_tenant=X` query parameter - Add tenant-scoped access tokens (tokens with `tenant_id` override hostname-based detection) - Dual build+deploy in CI (consumer → `karaoke-gen`, tenant → `karaoke-gen-tenant`) ## Test plan - [x] 17 backend tests pass (magic link params, tenant URLs, verify response, tenant-scoped tokens, require_auth override) - [x] 35 frontend tests pass (tenant store, edge-injected config, admin preview, feature flags) - [x] 181/182 E2E tests pass (1 pre-existing screenshot failure unrelated to changes) - [x] Both consumer and tenant portal builds succeed (`npm run build` with and without `NEXT_PUBLIC_TENANT_PORTAL=true`) - [ ] Manual: verify vocalstar.nomadkaraoke.com loads with tenant branding (already deployed) - [ ] Manual: verify magic link from tenant portal links to correct domain @coderabbitai ignore 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
2615261672 |
feat: add Singa whitelabel tenant and fix tenant infrastructure (#453)
## Summary - Add Singa as second whitelabel tenant (green/black branding, file-upload-only, locked theme) - Fix critical Zustand getter bug where computed properties became stale after set() calls - Fix React hydration error #300 (conditional return between hooks) - Add TenantLandingPage component for minimal tenant portal - Add Cloudflare Pages cache control headers - Add gs:// URL conversion fallback in tenant-logo ## Test plan - 27 tenant unit tests pass (5 new regression tests for Zustand bug) - 181 E2E tests pass - Verified singa/vocalstar/gen domains all working correctly <!-- @coderabbitai ignore --> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
a60c967cfd |
fix: Buy Credits link opens checkout dialog instead of broken /#pricing link (#450)
## Summary
- **Fix**: "Buy Credits" links in zero-credit warning banners and 402
error messages now open the `BuyCreditsDialog` (Stripe checkout) instead
of navigating to `/#pricing` (which doesn't work for logged-in users)
- **Fix**: `isLocalMode()` now checks pathname before port, fixing E2E
tests running on worktree-hashed ports (3100-3199)
- **Fix**: Updated all E2E regression tests for GuidedJobFlow UI
(replacing old tab-based JobSubmission selectors) and fixed pre-existing
test failures
## Changes
- Replaced 6 `<Link href="/#pricing">Buy Credits</Link>` with `<button>`
+ `BuyCreditsDialog` in `GuidedJobFlow.tsx`, `JobSubmission.tsx`, and
`AudioSourceStep.tsx`
- Reordered checks in `isLocalMode()` so pathname `/local/` is checked
before port allowlist
- Updated `credit-enforcement.spec.ts` for GuidedJobFlow selectors and
search-standalone API
- Updated `karaoke-generation.spec.ts` to use `search-standalone` API
(not old two-step search+poll)
- Updated `mobile.spec.ts` to use `guided-artist-input` (not old
tab-based selectors)
- Fixed `lyrics-review.spec.ts` to open Stats panel before checking
metrics
- Fixed 3 pre-existing failures: admin-token-auth,
instrumental-review-ux, job-management
## Test plan
- [x] All 182 Playwright E2E tests pass (0 failures)
- [x] Credit enforcement tests verify zero-credit warning, 402 error,
and normal credit behavior
- [x] Buy Credits button opens dialog (verified via test assertions
checking `getByRole('button', { name: 'Buy Credits' })`)
<!-- @coderabbitai ignore -->
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
|
||
|
|
324b7a3240 |
fix: guided flow private mode + delayed GDrive validation (#443)
## Summary Two fixes for the NOMAD-1276 incident where the GDrive validator reported "no issues" while NOMAD-1276 was actually missing: - **Fix 1: Private mode in guided flow** — The `is_private` checkbox in Step 3 (Customize) had no effect because the job was created in Step 2 with `is_private=false`. Now the select endpoint accepts optional overrides (`is_private`, `display_artist`, `display_title`) and applies them before the pipeline starts. - **Fix 2: Delayed GDrive validation** — Post-job validator fired immediately after upload, before E2E test cleanup could delete test files, causing false "all clear" reports. Now uses Cloud Tasks with a 5-minute delay, with fallback to immediate trigger if scheduling fails. Also includes cross-folder gap detection improvements in the Cloud Function (uses global max across all folders instead of per-folder max). ## Changes ### Backend - `AudioSelectRequest` model accepts optional `is_private`, `display_artist`, `display_title` overrides - New `/internal/trigger-gdrive-validation` endpoint for delayed Cloud Tasks invocation - `WorkerService.schedule_gdrive_validation()` method with 5-minute delay - Orchestrator uses delayed scheduling with immediate fallback ### Frontend - `selectAudioResult()` passes overrides from Step 3 state - E2E test verifies overrides reach the backend ### Infrastructure - New `gdrive-validation-queue` Cloud Tasks queue (Pulumi) - Cloud Function cross-folder gap detection fix + 28 unit tests ## Test plan - [x] 19 new backend tests (6 select overrides + 13 delayed validation) - [x] 2 new frontend API tests for override behavior - [x] 28 new Cloud Function unit tests - [x] Updated E2E test to verify overrides reach backend - [x] Full backend suite: 2139 passed - [x] Full frontend suite: 485 passed - [x] CodeRabbit: no findings <!-- @coderabbitai ignore --> 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
7e3e247858 |
feat: improve audio upload UX + signed URL flow for large files (#442)
@coderabbitai ignore ## Summary - **Better no-results UX**: Replace bare "No audio sources found" text with a contextual `NoResultsSection` card explaining why results might be missing (unreleased tracks, independent music, unusual characters) and what to try - **Softer timeout styling**: Timeout errors now show amber (`text-amber-400 bg-amber-500/10`) instead of red — it's a delay, not a failure. Credit/API errors remain red - **Larger fallback buttons** when no results: `h-12` height and `w-4 h-4` icons (vs `h-9`/`w-3.5 h-3.5`) since upload/URL are the primary actions - **Fix file input text overlap**: Replace `opacity-0` absolute `<Input>` with `<label>` + `<input className="sr-only">` — eliminates browser "Browse..." bleed-through, adds "Click to browse or drag a file" helper text - **Signed URL upload flow** for large files (≥25MB): Bypasses Cloud Run's 32MB body limit; files <25MB still use the existing direct upload - **Upload progress bar**: Phase labels (Preparing / Uploading X/Y MB / Finalizing) + animated progress bar during signed URL uploads - **Large file warning** (>100MB): Amber amber notice about expected upload time - **GCS CORS config**: Add Pulumi CORS rule for `PUT` from `gen.nomadkaraoke.com` and `localhost:3000` — required for browser-to-GCS signed URL uploads to work ⚠️ **Deploy order matters**: The GCS CORS config (infrastructure change) must be deployed before the signed URL upload path will work in production. Both changes are in this PR so they deploy together on merge. ## Test plan - [x] 492 Jest tests passing (9 new tests for `createJobWithUploadUrls`, `uploadToSignedUrl`, `completeJobUpload`, `uploadJobSmart`) - [x] `npx next build` succeeds - [x] CodeRabbit CLI: no findings - [ ] **Manual**: Search for a nonexistent track → verify `NoResultsSection` appears with guidance text and larger buttons - [ ] **Manual**: Trigger a timeout (slow network) → verify amber banner (not red) - [ ] **Manual**: Open upload form → verify no "Browse..." text bleed-through, see "Click to browse or drag a file" - [ ] **Manual** (post-deploy): Upload a file ≥25MB → verify progress bar appears and upload completes 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
221f26b0d8 |
UX overhaul: guidance & simplification across all 4 review stages (#421)
## Summary Complete UX overhaul of the karaoke video generation review flow, spanning 4 phases: - **Phase 1 - Job Creation**: Guided audio source selection with 3-tier confidence system, responsive stepper, renamed "Find Audio" to "Choose Audio" - **Phase 2 - Audio Selection**: Production E2E tests for guided job creation flow - **Phase 3 - Lyrics Review**: Guidance panel with workflow steps, gap navigation scoped to visible lines, simplified review UI with edit tracking and low-friction feedback - **Phase 4 - Instrumental Review**: Responsive layout (waveform no longer disappears on short viewports), canvas-rendered time ruler, hover-to-highlight waveform regions, dedicated Alternate Instrumental upload section with duration explanation, dismissable guidance panel ### Key changes - Root layout switches from viewport-locked (`h-screen overflow-hidden`) to scrollable (`min-h-screen`) — fixes waveform disappearing on short viewports - Bottom section stacks vertically on mobile/tablet, side-by-side on desktop - Time ruler rendered directly on canvas with auto-scaling tick intervals - Hovering mute region or segment buttons highlights the corresponding waveform range - Upload button moved from toolbar to dedicated section with context and duration requirement - 21 unit tests added for instrumental review components - Guidance panels with dismissable tips across lyrics and instrumental review ## Test plan - [x] `npx next build` — no errors - [x] `npx jest --testPathPattern="instrumental-review/__tests__"` — 21/21 pass - [x] Visual testing at 4 viewports: desktop (1280x800), tablet (768x1024), mobile (375x667), short (1280x400) - [x] Hover highlight verified with Playwright MCP - [x] Time ruler scales correctly at 1x and 2x zoom @coderabbitai ignore 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
3ea48e487f |
feat: server-side jobs filtering with field projection (#397)
## Summary - Add `fields=summary` query param to `GET /api/jobs` — uses Firestore `select()` to return only ~12 dashboard-required fields instead of 50+ full Job fields, reducing payload from ~16MB to <500KB - Add `hide_completed=true` query param for server-side filtering of terminal statuses (complete, prep_complete, failed, cancelled) - Safety-net prune helpers strip extra keys from `state_data` and `file_urls` nested dicts - Backward compatible: without `fields=summary`, endpoint returns full `List[Job]` as before (admin pages unaffected) ## Test plan - [x] 8 backend unit tests covering prune helpers, hide_completed, exclude_test with dicts, backward compatibility - [x] 5 frontend Jest tests covering query param serialization and partial summary response handling - [x] All 2412 existing tests pass (`make test`) - [ ] Deploy to staging, verify network tab shows reduced payload size - [ ] Verify JobCard renders correctly with summary data (title, status, progress, download links, error) - [ ] Toggle hide-completed — verify server re-fetch with `hide_completed=true` - [ ] Verify admin jobs page (`/admin/jobs`) still works (doesn't send `fields=summary`) @coderabbitai ignore 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|
|
82412be9ca |
fix: instrumental review UX improvements + audio loading fix (#362)
## Summary Fixes three UX issues in the instrumental review flow and one backend bug preventing backing vocals audio from loading in cloud mode: - **Loading spinner visibility**: Audio tabs now show spinner on active tab when switching stems - **Waveform layout**: Removed large gap under waveform caused by wrapper div - **Success screen**: Cloud mode now shows success confirmation with countdown before redirect - **Backing vocals fix**: Backend field name corrected from `backing` to `backing_vocals` ## Bug Fix **Backend**: Changed `audio_urls['backing']` to `audio_urls['backing_vocals']` to match frontend expectations. Previously backing vocals audio wouldn't load in cloud mode. ## UX Improvements ### 1. Loading Spinner on Audio Tabs - Active tab shows `Loader2` spinner icon when loading - All tabs disabled during loading to prevent race conditions - Inactive tabs show reduced opacity during loading ### 2. Fixed Waveform Layout Gap - Removed wrapper div that was breaking flexbox layout - WaveformViewer now correctly fills available space as flex child - Eliminated excess vertical gap under waveform ### 3. Success Screen in Cloud Mode - Extended success screen to show in both local and cloud modes - Cloud mode: "Redirecting in 3s..." then navigates to `/app` - Local mode: "Closing in 2s..." then closes window - Shows which instrumental option was selected ### 4. Local Mode Detection for Testing - Enhanced `isLocalMode()` to check routing pattern (hash vs path) - Hash-based routing (`#/jobId/review`) → cloud mode - Path-based routing (`/local/review`) → local CLI mode - Allows E2E tests to run in cloud mode on localhost ## Testing ### Unit Tests (29 new tests) - ✅ `local-mode.test.ts` - 17 tests for mode detection logic - ✅ `StemComparison.test.tsx` - 11 tests for loading state behavior - ✅ `test_routes_review.py` - 2 tests for API contract - ✅ All 288 tests pass (276 unit + 12 E2E) ### E2E Tests (12 new tests) - ✅ `instrumental-review-ux.spec.ts` - Loading spinners, success screens, layout verification - ✅ Visual regression screenshots captured ## Documentation - Updated `docs/LESSONS-LEARNED.md` with local mode detection pattern - Updated `docs/README.md` with recent changes entry - Created `docs/archive/2026-01-26-instrumental-review-ux-fixes.md` with detailed analysis ## Review - [x] CodeRabbit CLI review completed locally - [x] All issues addressed (error handling, test documentation) @coderabbitai ignore --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
4b5fca6009 |
fix: extract data field from add-lyrics API response (#349)
## Summary
- Fixes client-side crash when using the "Add Lyrics" flow in lyrics
review UI
- The error was: `can't access property "enabled_handlers", metadata is
undefined`
## Root Cause
The backend `/api/review/{job_id}/add-lyrics` endpoint returns:
```json
{ "status": "success", "data": { ...CorrectionData } }
```
But the frontend API client was returning the entire response as
`CorrectionData`, causing `metadata` to be `undefined` when the
component tried to access `data.metadata.enabled_handlers`.
## Fix
Extract the `data` field from the response before returning:
```typescript
// Before:
return handleResponse<CorrectionData>(response)
// After:
const result = await handleResponse<{ status: string; data: CorrectionData }>(response)
return result.data
```
## Test plan
- [x] Unit test updated to match real API response format
- [x] All 193 frontend tests passing
- [x] TypeScript type checking passes
- [ ] Manual verification: Add lyrics in review UI without crash
@coderabbitai ignore
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
|
||
|
|
b0bc0e1ccc |
fix: correct API endpoints for add-lyrics and update-handlers (#347)
## Summary
- Fixed 404 error when adding reference lyrics during lyrics review
- Frontend was calling wrong API endpoints (`/api/jobs/{id}/lyrics`
instead of `/api/review/{id}/add-lyrics`)
- Also fixed `updateHandlers` endpoint and HTTP method mismatch
## Changes
- **frontend/lib/api.ts**: Corrected `addLyrics` and `updateHandlers`
endpoint URLs and methods
- **frontend/lib/__tests__/api.test.ts**: Added unit tests verifying
exact endpoint URLs
- **frontend/e2e/regression/lyrics-review.spec.ts**: Updated mocks to
match real backend routes
- **frontend/e2e/production/lyrics-review-only.spec.ts**: Added
integration test for API contract validation
- **docs/LESSONS-LEARNED.md**: Added lesson about mocks hiding API
contract mismatches
## Test plan
- [x] Unit tests verify correct endpoint URLs are called
- [x] E2E mocks updated to correct paths
- [x] Integration test validates real backend API contract
- [x] All 193 frontend tests pass
@coderabbitai ignore
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
|
||
|
|
9df7919ade |
fix: lyrics review UI corrections submission and Enter key save (#323)
## Summary - Fix HTTP 422 error when submitting lyrics corrections by wrapping `CorrectionData` in the structure expected by `CorrectionsSubmission` (requires `lines` and `metadata` fields) - Add Enter key support to EditModal - pressing Enter now saves the segment (same as clicking Save button) ## Changes - `frontend/lib/api.ts`: Wrap correction data payload with `lines` alias for backend validation - `frontend/components/lyrics-review/modals/EditModal.tsx`: Add Enter key handler with guards for manual sync mode and input fields - `frontend/lib/__tests__/api.test.ts`: Add unit test for payload structure ## Test plan - [x] Unit tests pass (26 API tests including new payload structure test) - [x] Backend request model tests pass (26 tests) - [x] ESLint passes (only pre-existing warnings) - [ ] Manual verification: Submit corrections in lyrics review UI without 422 error - [ ] Manual verification: Press Enter in edit modal to save @coderabbitai ignore 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
42c304dcdf |
feat(multitenancy): Implement white-label B2B portal infrastructure (#241)
## Summary
Adds multi-tenant white-label portal infrastructure for B2B customers.
Vocal Star is the first tenant at `vocalstar.nomadkaraoke.com`.
## Changes
### Backend
- **Tenant Models** (`backend/models/tenant.py`): Pydantic models for
TenantConfig with branding, features, defaults, and auth settings
- **Tenant Service** (`backend/services/tenant_service.py`): GCS-backed
config loading with 5-min cache, signed URL generation for logos
- **Tenant API** (`backend/api/routes/tenant.py`): `GET
/api/tenant/config` and `GET /api/tenant/config/{tenant_id}` endpoints
- **Tenant Middleware** (`backend/middleware/tenant.py`): Extracts
tenant from X-Tenant-ID header, query param (dev only), or Host
subdomain
- **Auth Updates**: Email domain validation for tenant-restricted auth,
sender email override
- **Feature Enforcement**: Audio search endpoint checks
`features.audio_search`, returns 403 if disabled
- **Job Scoping**: Added `tenant_id` field to JobCreate
### Frontend
- **Tenant Store** (`frontend/lib/tenant.ts`): Zustand store with tenant
state, `useTenant()` hook, CSS variable application
- **TenantProvider** (`frontend/components/tenant-provider.tsx`):
Hydration-safe initialization via useEffect
- **TenantLogo** (`frontend/components/tenant-logo.tsx`): Dynamic logo
with fallback to Nomad Karaoke
- **Feature-Flagged UI**: Tabs conditionally rendered based on tenant
features, active tab sync
- **Locked Themes**: `defaults.locked_theme` hides theme selector and
enforces specific theme
- **Output Links**: Filtered based on distribution features
### Security
- Query param tenant detection disabled in production (prevents
spoofing)
- Strict subdomain patterns: only `{tenant}.nomadkaraoke.com` or
`{tenant}.gen.nomadkaraoke.com`
- PII masking in logs (`an***@vo***.com`)
- `is_active` check prevents inactive tenants from being used
### Documentation
- ARCHITECTURE.md: New Multitenancy section
- API.md: Tenant Config endpoints
- LESSONS-LEARNED.md: 3 new lessons on multitenancy patterns
- Archive: Comprehensive implementation document
### Setup
- `scripts/setup-vocalstar-tenant.py`: Uploads theme assets, creates
tenant/theme configs in GCS
## Vocal Star Configuration
- **Subdomain**: `vocalstar.nomadkaraoke.com`
- **Features**: File upload only (no audio search, no YouTube URL)
- **Distribution**: Download only (no YouTube/Dropbox/GDrive)
- **Theme**: Locked to "vocalstar" (yellow/blue)
- **Auth**: Restricted to `@vocal-star.com` and `@vocalstarmusic.com`
emails
## Testing
- [x] Frontend TypeScript build passes
- [x] CodeRabbit CLI review completed (3 cycles, all issues fixed)
- [x] Manual testing with `?tenant=vocalstar` query param
## Next Steps (post-merge)
1. Configure DNS: CNAME for `vocalstar.nomadkaraoke.com`
2. Update Cloudflare Pages for subdomain
3. Run setup script to upload Vocal Star assets to GCS
4. Test at `https://vocalstar.nomadkaraoke.com`
@coderabbitai ignore
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
|
||
|
|
fd92040dc7 |
feat: Make non-interactive mode job-specific instead of global toggle (#162)
## Summary - Changes non-interactive/auto mode from a global toggle to a per-job option selected during job creation - Adds clear warning to users that skipping lyrics review will likely result in mistakes - Uses existing backing vocals analyzer for smart instrumental selection in non-interactive mode ## Changes ### Backend - Added `non_interactive: bool = False` field to Job and JobCreate models - Accept `non_interactive` in all job creation endpoints (upload, URL, audio search) ### Frontend - Added checkbox with warning in JobSubmission form for all 3 tabs (Search, Upload, URL) - Updated AutoProcessor to check `job.non_interactive` instead of global flag - AutoProcessor now uses backing vocals analyzer recommendation for instrumental selection - Added "Auto" badge on JobCard for non-interactive jobs - Removed global auto mode toggle button and banner from header - Deleted unused `auto-mode.ts` store and its tests - Updated JobCard tests for new per-job behavior ## Testing - [x] Backend tests pass (57 passed) - [x] Frontend unit tests pass (128 passed) - [x] Version bumped to 0.86.7 ## Review - [ ] CodeRabbit CLI review was rate limited - skipping for this PR @coderabbitai ignore --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
93bdacdbf2 |
Add comprehensive frontend testing with unified test command
- Fix JobCard tests for non-collapsible UI (20 tests) - Add AuthStatus and AuthDialog component tests (14 tests) - Add extractErrorMessage utility tests (12 tests) - Export extractErrorMessage for testability - Update jest.config.js to exclude e2e/ folder from Jest - Fix E2E test selectors for strict mode compliance - Add test:all command to run unit + E2E tests - Update CLAUDE.md with frontend testing requirements Test commands: - npm run test:unit - Unit tests only - npm run test:e2e - E2E tests only - npm run test:all - Both (for CI) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
3874e12ca0 |
Add non-interactive (auto) mode to frontend (equivalent to -y flag)
- Add auto-mode state management with Zustand (lib/auto-mode.ts) - Create AutoProcessor component to auto-process interactive states - Update main page with auto-mode toggle and URL parameter support (?auto=true) - Update JobCard to show auto-processing indicators instead of manual buttons - Auto-mode automatically accepts lyrics review, selects clean instrumental, and selects first audio search result (matching -y CLI behavior) - Add comprehensive tests for auto-mode functionality - Bump version to 0.75.58 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
0a03a93948 |
fix: Add frontend/lib directory to git (was ignored)
- Update .gitignore to exclude Python lib/ but include frontend/lib/ - Add all frontend lib files: api.ts, types.ts, utils.ts, auth.ts, jobs.ts - Add API client tests - Verified build succeeds locally before commit |