fix(p0): repair build, achievements, conductor, and CI gates - #4
Merged
Conversation
- MovieDetailModal: drop unsupported `conductor` prop on ListMenu and
coerce nullable posterPath to '' for img src to satisfy TS.
- Achievements: add explicit `threshold` field on Achievement and check
against `items.length` instead of parsing the id string (which
produced NaN for non-numeric ids like `first-blood`).
- MovieConductor:
* guard re-entrant LOAD_MOVIES so rapid dispatches share one in-flight
promise (fixes Loop-of-Death test, adapter called once).
* ADD_MOVIE now consults adapter.exists() and rejects duplicates with
a clear error; updates statistics + achievements on success.
* SELECT_MOVIE now goes through getMovieDetails first (with fallback
to getById / cached items), which is what the providers test asserts.
- CI: replace soft `lint || true` with real gates: `tsc --noEmit` and
`vitest run`, plus a stub VITE_TMDB_API_KEY so the SupabaseMovieService
fetch-mock tests can reach the mocked fetch path.
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.
Summary
P0-Fixes: Build, Achievements-Logik, Provider-/Conductor-Tests und CI-Gates.
MovieDetailModal.tsxTypeScript-Fehler behoben — unbekannteconductor-Prop aufListMenuentfernt undposterPath(nullable) auf''gemappt fürimg src.threshold-Feld aufAchievementeingeführt und Vergleich gegenitems.lengthstatt fragilemparseInt(id.split('-')[1])(das fürfirst-bloodNaN ergab und alle Achievements unlocked-bleiben ließ).LOAD_MOVIES: parallele Dispatches teilen jetzt eine in-flight Promise → kein "Loop of Death" mehr.ADD_MOVIEruftadapter.exists()auf und verhindert Duplikate; bei Erfolg werden Statistics + Achievements neu berechnet.SELECT_MOVIEnutzt zuerstgetMovieDetails(was der Providers-Test prüft) und fällt sonst aufgetById/ lokalen Cache zurück.npm run lint || truedurch echte Gates ersetzt:npx tsc --noEmitundnpx vitest run, plus ein Test-StubVITE_TMDB_API_KEY=test-key, damit dieSupabaseMovieService-Fetch-Mock-Tests den API-Key-Guard passieren können.Test plan
npx tsc --noEmit→ keine FehlerVITE_TMDB_API_KEY=test-key npx vitest run→ 17/17 grün (vorher 8 rot)VITE_TMDB_API_KEY=test-key npm run build→ erfolgreich (Vite + PWA)🤖 Generated with Claude Code