diff --git a/AGENTS.md b/AGENTS.md index 738dc86..057115b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,7 +10,7 @@ personal wantlist ("crate"). IT2810 (NTNU) Project 2. Group T19: `erikhfj`, `robertky`, `evenkkl`, `rachelks`. -**Status: M4 delivered – final polish.** See the README's +**Status: Final submission ready (hand-in 27 November).** See the README's [feature overview](README.md#what-you-can-do-in-crate) for implemented features and the project status section for planned work. diff --git a/README.md b/README.md index fac2443..8d1cf66 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,13 @@ IT2810 (NTNU) Project 2. Group T19: `erikhfj`, `robertky`, `evenkkl`, `rachelks` | | | | ------------------- | ---------------------------------------------------------- | -| Current milestone | **M4 delivered – final polish**, final hand-in 27 November | +| Current milestone | **Final submission ready**, hand-in 27 November | | Live prototype | http://it2810-19.idi.ntnu.no/project2 | | Architecture / ADRs | [`docs/architecture.md`](docs/architecture.md) | | Data model | [`docs/data-model.md`](docs/data-model.md) | | UI specification | [`docs/ui-specification.md`](docs/ui-specification.md) | | Scalability | [`docs/scalability.md`](docs/scalability.md) | +| Lighthouse & a11y | [`docs/lighthouse-results.md`](docs/lighthouse-results.md) | | Workflow | [`docs/WORKFLOW.md`](docs/WORKFLOW.md) | | AI usage log | [`docs/AI-USAGE.md`](docs/AI-USAGE.md) | | Running on the VM | [`docs/VM-setup.md`](docs/VM-setup.md) | @@ -168,7 +169,7 @@ only create noise in the stale-file check. ### End-to-end tests -`e2e/` holds Playwright tests that run in a real browser against a running stack. They cover one full journey (search, filter, sort, open an album, write a review, reload and find it again), case-insensitive search, a keyboard-only path from the skip link to a result, and axe-core scans of the main views. They expect the sample catalog from `db:seed`, so do not point them at the deployed MusicBrainz catalog. +`e2e/` holds Playwright tests that run in a real browser against a running stack. They cover a full search-to-review journey (`search.spec.ts`, including case-insensitive search, back-scroll/page restoration, search history, pagination, and review editing/validation), filter side-drawer keyboard focus and URL state (`filters.spec.ts`), crate persistence (`crate.spec.ts`, #134 / PR #137), a keyboard-only path from the skip link to a result, and real-browser axe-core WCAG 2.1 A/AA scans (`a11y.spec.ts`). They expect the sample catalog from `db:seed`, so do not point them at the deployed MusicBrainz catalog. ```bash pnpm --filter @t19/e2e exec playwright install chromium # once @@ -178,7 +179,7 @@ pnpm dev # client on :5173 pnpm test:e2e ``` -`E2E_BASE_URL` sets the client address (default `http://localhost:5173/project2/`). Run the tests against a separate database, since `db:seed` replaces the catalog. The journey writes its review as one fixed test user (`Listener 00000000`) and deletes the review at the end, so repeated runs leave a single `app_user` row and no reviews behind. +`E2E_BASE_URL` sets the client address (default `http://localhost:5173/project2/`). Run the tests against a separate database, since `db:seed` replaces the catalog. The journey writes its review using one fixed test user UUID (displayed under a deterministic SHA-256 music pseudonym rather than exposing the raw ID, `#100`) and cleans up its review and search history at the end, leaving a single `app_user` row and no stray reviews behind. ## Database seed data @@ -242,10 +243,16 @@ MusicBrainz release-group IDs, rather than bundled into the application. Cover availability is optional; albums without an ID or available artwork use the existing vinyl placeholder. The artwork attribution on the album detail page links to the corresponding MusicBrainz release-group page. Artwork rights remain -with their respective rights holders. +with their respective rights holders. Loading artwork directly in the browser +avoids hosting third-party images on the VM, with the privacy tradeoff that the +visitor's IP address is sent to Cover Art Archive / Internet Archive (Crate sets +`Referrer-Policy: no-referrer` so internal search URLs are not leaked; see +[architecture decisions](docs/architecture.md#7-security-privacy-and-deployment-tradeoffs)). -See [Lighthouse results](docs/lighthouse-results.md) for local production-preview -scores, artwork audit findings and the JavaScript bundle budget verified for #23. +See [Lighthouse and accessibility results](docs/lighthouse-results.md) for the +25 November local production-preview Lighthouse 13.6 scores across Discover, +Album detail, and Your crate (desktop & mobile, light & dark), production asset +sizes, and the zoom/reflow verification log. ### Catalog quality (#64) @@ -272,8 +279,10 @@ Remaining limitations: - Search is not accent-insensitive: "beyonce" does not find "Beyoncé", and names in other scripts (for example Mulatu Astatke as ሙላቱ አስታጥቄ) only match as written. -- Artists are matched by name, so two different artists with the same name - would share a row. None were found in the snapshot. +- Artists are matched by `musicBrainzArtistId` first and only fall back to + matching by name for existing rows that have no `musicBrainzArtistId` (such as + hand-seeded rows), preventing collisions between distinct MusicBrainz artists + that share a name. - Classical albums credit the composer as an artist, and compilations use "Various Artists", as MusicBrainz does. - Same title and artist is not always a duplicate: Color Humano released three @@ -320,80 +329,99 @@ for details. ## Accessibility -The interface supports keyboard navigation, visible focus indicators, labelled form controls and a skip link to the main content. Search results, loading states and errors provide feedback to assistive technologies. The layout adapts to smaller screens and respects reduced-motion preferences. +The interface supports keyboard navigation, visible focus indicators, labelled form controls, a modal filter side drawer with focus trapping, a manual Dark/Light theme toggle, and a skip link to the main content. Search results, loading states and errors provide feedback to assistive technologies. The layout adapts to smaller screens and respects reduced-motion preferences. -Automated accessibility tests use axe-core to check key search states, including initial, results, no-results and error views. Component tests also cover keyboard interactions and focus behavior. Since these tests run in jsdom, they cannot verify color contrast or layout. The Playwright tests therefore also run axe-core (WCAG 2.1 A and AA) in a real browser, where contrast is checked, and test a keyboard-only path with visible focus. Zoom and screen reader behavior are still tested manually. +Automated accessibility tests use axe-core in jsdom (covering search states, detail/review error states, and Your crate) and in a real Chromium browser via Playwright (`e2e/tests/a11y.spec.ts`, checking WCAG 2.1 A and AA including color contrast and keyboard focus). Real-browser axe-core checks (0 violations across 10 light/dark interactive states) and 200%/400% zoom (320 px viewport) reflow verification (0 px horizontal overflow) are logged in [Lighthouse and accessibility results](docs/lighthouse-results.md#accessibility-and-zoomreflow-verification), alongside the remaining manual screen-reader checklist. ## Sustainability measures -We consider sustainability through design choices that reduce unnecessary data transfer, processing and resource use, while acknowledging performance tradeoffs. - -| Measure | Resource consideration | Effect | -| ---------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| Plain CSS, no UI framework | No component-library runtime to download or parse | 0 UI dependencies in the bundle | -| `prefers-color-scheme` | OLED screens draw less power on a dark pixel | Dark theme when the OS asks for it | -| `prefers-reduced-motion` | Animations cost frames and battery | Collapsed to near-zero when the OS asks for it | -| Explicit search submission | Typing would otherwise cost one request per change | Typing sends no search requests; Search or Enter commits the query | -| `cache-first` fetch policy | A repeated search is already in the cache | No request when the complete requested result is cached | -| Cursor pagination and cached pages | Load only the next batch and reuse pages already fetched | 20 albums per page; 0 requests to reveal cached pages | -| Code-split album route | The detail page is not needed to browse search results | Separate detail chunks; see dated measurements below | -| Bundle budget in CI | CI fails before a dependency quietly doubles the payload | 512 000 bytes per JS chunk | -| Indexed prefix search | Uses the existing GIN index, but broad prefixes require more database processing | Better search flexibility, but potentially higher query costs for broad prefixes | - -**Bundle size**, production build measured 24 November 2026: - -| File | Raw | Gzip | -| ----------------------- | --------: | --------: | -| `index-*.js` | 390.80 kB | 119.87 kB | -| `index-*.css` | 15.33 kB | 4.15 kB | -| `AlbumCover-*.js` | 55.01 kB | 13.56 kB | -| `AlbumCover-*.css` | 4.17 kB | 1.29 kB | -| `AlbumDetailPage-*.js` | 11.25 kB | 3.71 kB | -| `AlbumDetailPage-*.css` | 5.81 kB | 1.53 kB | -| `CratePage-*.js` | 2.32 kB | 0.99 kB | -| `CratePage-*.css` | 0.23 kB | 0.16 kB | -| `rolldown-runtime-*.js` | 0.58 kB | 0.36 kB | -| `index.html` | 0.78 kB | 0.38 kB | - -`AlbumDetailPage` and `CratePage` are code-split into separate lazy-loaded route chunks, so neither is loaded until the user opens an album or visits Your crate. `AlbumCover` is shared across views that render covers and is loaded eagerly on the initial Discover page (`App` → `ResultsLayout` → `AlbumCard`), so the first-page JavaScript payload is `index` + `AlbumCover` + `rolldown-runtime` (446.39 kB raw / 133.79 kB gzip) rather than `index` alone. Opening an album or crate page uses normal page navigation, while previously downloaded assets may be reused by the browser. Artwork is fetched separately from Cover Art Archive and is not included in these bundle sizes. Browser-native responsive images (`srcSet`/`sizes`) let the browser select an appropriate image size; card images load lazily, while detail artwork loads eagerly. - -**Requests for a typical search:** An uncached search initially fetches up to 20 albums in one `searchAlbums` request. Infinite scroll loads up to two additional pages automatically, while further pages are loaded using the Load more button. Previously fetched pages are reused from Apollo's cache without new GraphQL requests. No search requests are sent while the user types. Album artwork adds separate external image requests as cards approach the viewport. +We consider sustainability through design choices that reduce unnecessary data transfer, processing and resource use, while acknowledging performance and visual tradeoffs. + +| Measure | Resource consideration | Effect | +| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Plain CSS, no UI framework | No component-library runtime to download or parse | 0 UI dependencies in the bundle | +| Dark theme (`prefers-color-scheme` + manual toggle) | Dark surfaces (`#0a100d` / `#111914`) draw modestly less power on OLED than light mode (less than pure `#000`, minimal difference on LCD) | Follows OS preference by default; CSP-safe header toggle (`theme-init.js`, 298 B) persists manual override | +| `prefers-reduced-motion` | Animations cost frames and battery | Collapsed to near-zero when the OS asks for it | +| Zero-dependency SPA routing (#131) | Full-page reloads throw away cached GraphQL responses and re-parse the app | History API router preserves Apollo `InMemoryCache` across Discover, Album detail, and Your crate | +| Explicit search submission | Typing would otherwise cost one request per change | Typing sends no search requests; Search or Enter commits the query | +| `cache-first` fetch policy | A repeated search is already in the cache | No request when the complete requested result is cached | +| Cursor pagination and cached pages | Load only the next batch and reuse pages already fetched | 20 albums per page; 0 requests to reveal cached pages; Load more skips count/facet queries (#96) | +| Responsive hero WebP assets (#133) | Full-resolution desktop banners waste mobile bandwidth and slow LCP | `39.16 kB` desktop / `13.39 kB` mobile WebP (down from `449.87 kB`), lifting mobile Discover Lighthouse from 82 to 98 (mainly from `#133`) | +| Self-hosted WOFF2 + system Georgia | Third-party font CDNs add DNS/TLS round-trips and extra requests; shipping a third serif font costs bandwidth | Variable `DM Sans` and `Manrope` WOFF2 (`unicode-range` subsetted) stay same-origin; hero italic uses system `Georgia, serif` (0 B extra payload, trading minor cross-OS serif variation for zero bytes) | +| Code-split detail and crate routes | Detail and crate pages are not needed to browse search results | Separate lazy-loaded chunks; see dated measurements below | +| Bundle budget in CI | CI fails before a dependency quietly doubles the payload | 512 000 bytes per JS chunk | +| Indexed prefix search | Uses the existing GIN index, but broad prefixes require more database processing | Better search flexibility, with higher query cost on broad prefixes | +| Apache compression & caching (#133) | Uncompressed JSON and uncached assets waste bandwidth on repeat visits | Configured to apply `mod_deflate` on `/graphql`, 1-year `immutable` caching on `/project2/assets/`, and `no-cache` on `index.html` and `theme-init.js` (see [`docs/VM-setup.md`](docs/VM-setup.md)) | + +**Production build sizes**, measured 26 November 2026 (`pnpm build`, Vite 8.3.8; decimal kB where `1 kB = 1,000 B`): + +| File | Raw | Gzip | +| --------------------------- | --------: | --------: | +| `index-*.js` | 395.38 kB | 121.47 kB | +| `CrateButton-*.js` | 59.02 kB | 14.52 kB | +| `AlbumDetailPage-*.js` | 13.85 kB | 4.43 kB | +| `CratePage-*.js` | 3.20 kB | 1.31 kB | +| `rolldown-runtime-*.js` | 0.59 kB | 0.36 kB | +| `theme-init.js` | 0.30 kB | 0.21 kB | +| `index-*.css` | 17.43 kB | 4.43 kB | +| `CrateButton-*.css` | 4.66 kB | 1.39 kB | +| `AlbumDetailPage-*.css` | 7.25 kB | 1.70 kB | +| `CratePage-*.css` | 0.23 kB | 0.16 kB | +| `index.html` | 0.97 kB | 0.44 kB | +| `favicon.svg` | 0.31 kB | 0.17 kB | +| `vinyl-hero-*.webp` | 39.16 kB | — | +| `vinyl-hero-mobile-*.webp` | 13.39 kB | — | +| `dm-sans-latin-*.woff2` | 36.93 kB | — | +| `dm-sans-latin-ext-*.woff2` | 18.22 kB | — | +| `manrope-latin-*.woff2` | 24.53 kB | — | +| `manrope-latin-ext-*.woff2` | 15.16 kB | — | + +`AlbumDetailPage` and `CratePage` are code-split into separate lazy-loaded route chunks, so neither is loaded until the user opens an album or visits Your crate. `CrateButton-*.js` holds the shared `CrateButton` and `AlbumCover` code loaded eagerly on the initial Discover page (`App` → `ResultsLayout` → `AlbumCard`), so the first-page JavaScript payload is `index` + `CrateButton` + `rolldown-runtime` + `theme-init.js` (**455.31 kB raw** / **136.56 kB gzip**). Navigating between Discover, Album detail, and Your crate uses client-side History API routing (`#131`), keeping previously loaded chunks and Apollo's `InMemoryCache` warm without full-page reloads. Artwork is fetched separately from Cover Art Archive and is not included in these bundle sizes. Browser-native responsive images (`srcSet`/`sizes` and ``) let the browser select an appropriate size; card images load lazily, while the hero backdrop and detail artwork load eagerly. + +**Requests for a typical search:** An uncached search initially fetches up to 20 albums in one `searchAlbums` request. Infinite scroll loads up to two additional pages automatically, while further pages are loaded using the Load more button (which omits count and facet queries, `#96`). Previously fetched pages are reused from Apollo's cache without new GraphQL requests. No search requests are sent while the user types. Album artwork adds separate external image requests as cards approach the viewport. + +## AI usage + +All AI tool usage, model versions, prompt-to-revision examples, and team reflections are logged in [`docs/AI-USAGE.md`](docs/AI-USAGE.md). ## Project status -| Milestone | Due | Delivers | -| --------- | ------ | ---------------------------------------------------------------------- | -| M1 | 2 Oct | Schema, data model, architecture, UI specification and workflow | -| M2 | 16 Oct | PostgreSQL and GraphQL backend on the VM, initial frontend interaction | -| M3 | 30 Oct | Search UI improvements, accessibility and sustainability | -| M4 | 13 Nov | Finished prototype and full test suite | +| Milestone | Due | Delivers | +| --------- | ------ | -------------------------------------------------------------------------------- | +| M1 | 2 Oct | Schema, data model, architecture, UI specification and workflow | +| M2 | 16 Oct | PostgreSQL and GraphQL backend on the VM, initial frontend interaction | +| M3 | 30 Oct | Search UI improvements, accessibility and sustainability | +| M4 | 13 Nov | Finished prototype and full test suite | +| Final | 27 Nov | Final submission: polished prototype, docs, live VM, Blackboard & FeedbackFruits | ### Where the code is -| Path | What it is | -| ---------------- | ----------------------------------------------------------- | -| `client/` | React, Vite and Apollo Client frontend | -| `server/` | GraphQL Yoga API and PostgreSQL database access | -| `schema.graphql` | GraphQL schema | -| `docs/` | Architecture, data model, UI, workflow, AI log and VM guide | +| Path | What it is | +| ---------------- | ----------------------------------------------------------------------------- | +| `client/` | React, Vite and Apollo Client frontend | +| `server/` | GraphQL Yoga API and PostgreSQL database access | +| `e2e/` | Playwright end-to-end and real-browser axe-core accessibility tests | +| `schema.graphql` | GraphQL schema | +| `docs/` | Architecture, data model, UI, scalability, Lighthouse/a11y, workflow, AI & VM | ## Try the application -Open http://it2810-19.idi.ntnu.no/project2/ or the local frontend and try these searches. Expected counts assume the 16-album sample catalog; other data may produce different results. +Open http://it2810-19.idi.ntnu.no/project2/ (or a local instance imported with `pnpm db:import:musicbrainz`) and try these searches against the 2,000-album MusicBrainz catalog: -| Search | Expected matches | Albums | -| ----------- | ---------------- | ------------------------------------------ | -| `blue` | 4 | Kind of Blue, Blue Train, Blue, Blue Lines | -| `coltrane` | 2 | A Love Supreme, Blue Train | -| `radiohead` | 2 | OK Computer, Kid A | +| Search | What to expect (2,000-album MusicBrainz catalog) | +| ------------ | --------------------------------------------------------------------------------- | +| `blue` | 66 matches including _Kind of Blue_ (Miles Davis) and _Thirteen Blue Magic Lane_ | +| `coltrane` | _A Love Supreme_ (John Coltrane, 1965) — prefix `coltr` matches the same | +| `pink floyd` | 2 matches: _The Dark Side of the Moon_ (1973) and _A Tree Full of Secrets_ (1999) | +| `kate bush` | _Hounds of Love_ (1985), with Cover Art Archive artwork and a 12-track tracklist | -Search is case-insensitive: `BLUE` should return the same matches as `blue`. +Search is case-insensitive (`BLUE` returns the same matches as `blue`). If you run locally against the 16-album `db:seed` sample catalog instead, expected counts and titles differ (for example, `blue` returns 4 sample albums). ## Infrastructure -PostgreSQL and the GraphQL API run directly on the group VM. Apache serves the frontend at http://it2810-19.idi.ntnu.no/project2/, falls back to `index.html` for client-side routes such as album pages, and proxies `/graphql` to the API on port 3001. The API runs as the `crate-api.service` systemd service. +PostgreSQL and the GraphQL API run directly on the group VM (`127.0.0.1:3001` by default). Apache serves the frontend at http://it2810-19.idi.ntnu.no/project2/, falls back to `index.html` for client-side routes such as `/project2/album/:id` and `/project2/crate`, proxies `/graphql` to the API, and is configured to apply gzip compression, immutable asset caching, and baseline HTTP security headers (see [VM setup](docs/VM-setup.md)). The API runs as the `crate-api.service` systemd service and is configured to run with `NODE_ENV=production` (see [VM setup](docs/VM-setup.md)). Note that the NTNU course VM serves traffic over plain HTTP rather than HTTPS; see [architecture decisions](docs/architecture.md#7-security-privacy-and-deployment-tradeoffs) for the transport tradeoff. -CI uses a self-hosted runner on the VM. Pushes to `main` run the project checks and deploy the frontend and backend. See [VM setup](docs/VM-setup.md) for deployment and verification steps. +CI uses a self-hosted runner on the VM. Pushes to `main` run the project checks (including PostgreSQL integration tests and Playwright E2E (#134, PR #137)) and deploy the frontend and backend. See [VM setup](docs/VM-setup.md) for deployment and verification steps. ## Contributing diff --git a/docs/AI-USAGE.md b/docs/AI-USAGE.md index ea3b11b..bff44ed 100644 --- a/docs/AI-USAGE.md +++ b/docs/AI-USAGE.md @@ -12,7 +12,7 @@ The dated table below records individual sessions. These sections explain how AI - **Bounded, issue-linked tasks:** After the group overruled an early plan to split a generated prototype into PRs (24 September), all work was divided into milestone-scoped GitHub issues owned by individual contributors. Prompts and delegated work stayed tied to one issue's scope and acceptance criteria (`feat/-…`, `fix/-…`, `docs/-…`) rather than open-ended generation. - **Different workflows across contributors:** Team members did not use a single uniform AI workflow. Some used chat and design tools (`ChatGPT`, `Figma Make`) mainly for sparring on UI sketches, dataset evaluation, schema/migration ideas, troubleshooting, and review preparation while editing or adapting code directly. Others delegated bounded implementation, test, or debugging tasks to repository-aware agents (`opencode`, `Codex (ChatGPT)`, `Claude`, `Antigravity`). - **Scope, context, and resulting work:** When delegating a task, the contributor supplied the issue's acceptance criteria alongside the repository's contracts (`schema.graphql`, `docs/architecture.md`, `docs/ui-specification.md`, `AGENTS.md`). Grounding the task in those constraints kept generated changes small enough to audit and aligned with non-negotiable rules (SQL sorting/filtering, keyset pagination, per-request DataLoaders, simulated `X-User-Id` context, plain CSS, accessibility, URL state). -- **Checking, revising, and rejecting suggestions:** Tool output was treated as a draft rather than an authoritative change. Contributors checked proposals against the live codebase and ran automated gates (`pnpm format:check`, `pnpm lint`, `pnpm typecheck`, `pnpm test`, `pnpm build`, plus PostgreSQL integration suites, Playwright E2E/axe checks, Lighthouse, or VM smoke tests when applicable). Unsuitable or wrong suggestions were revised or rejected—for example, rejecting the prototype-splitting plan (24 Sep), correcting an overstated security claim on `displayName` (#40), raising dark-mode border contrast after hand-checking WCAG ratios (#18), catching a missing `DateTime` scalar and test-fixture leakage during codegen (#30), fixing microsecond cursor precision in `myCrate` (#77), and replacing a brittle `to_tsquery` prefix suggestion with a TypeScript builder (#55). +- **Checking, revising, and rejecting suggestions:** Tool output was treated as a draft rather than an authoritative change. Contributors checked proposals against the live codebase and ran automated gates (`pnpm format:check`, `pnpm lint`, `pnpm typecheck`, `pnpm test`, `pnpm build`, plus PostgreSQL integration suites, Playwright E2E/axe checks, Lighthouse, or VM smoke tests when applicable). Unsuitable or wrong suggestions were revised or rejected—for example, rejecting the prototype-splitting plan (24 Sep), correcting an overstated security claim on `displayName` (#40), raising dark-mode border contrast after hand-checking WCAG ratios (#18), catching a missing `DateTime` scalar and test-fixture leakage during codegen (#30), fixing `assert-postgres-tests.mjs` counting Jest's `pending` field instead of Vitest's `skipped` (#72), and fixing microsecond cursor precision in `myCrate` (#77). - **Human responsibility and peer review:** AI tools did not merge code or approve PRs. Every change went through `main` branch protection and was reviewed by a different teammate (`docs/WORKFLOW.md`), with the PR author responsible for understanding the final diff, verifying tests, and resolving review feedback. ## Shared context and prompting @@ -23,123 +23,163 @@ To keep AI-assisted changes consistent across four contributors and multiple too - **`schema.graphql` and `docs/`** (`architecture.md`, `data-model.md`, `ui-specification.md`, `WORKFLOW.md`) define the API contract and UI boundaries before code is written. - **How tasks were scoped and prompted:** Instead of asking for open-ended features, prompts started from an individual GitHub issue and its acceptance criteria, pointed to the relevant files and `schema.graphql` contract, and required running `pnpm format:check && pnpm lint && pnpm typecheck && pnpm test` (plus PostgreSQL/Playwright/Lighthouse checks when relevant) to verify behavior rather than accepting the first output. +## Tools and model versions + +Different contributors used different tools across the semester. Where a specific model version was pinned or recorded in git history, it is noted below; earlier CLI and web sessions used each tool's default model at the time without pinning a snapshot ID: + +- **Antigravity (`Gemini 4 Neon (High)`):** Used by `erikhfj` for the 24–25 November final-polish audit, parallel implementation swarm (`#129`–`#135`), and independent verification; mid-November Antigravity sessions (`#91`–`#117`, `#127`) used the IDE's default model available on those dates. +- **Claude (`Claude Opus 5.5 (1M context)` and CLI/chat defaults):** Used by `evenkkl` for architecture sparring, backend resolvers, filters, sorting, catalog verification, Playwright E2E setup, and lazy aggregate queries (`#3`, `#6`, `#12`, `#13`, `#20`, `#64`, `#82`, `#96`). Git trailer `Co-Authored-By: Claude Opus 5.5 (1M context)` is recorded in commit `07673c8` (16 Oct); other sessions used the unpinned Claude tool default at the time. +- **opencode:** Used by `erikhfj` during September–November (`#1`, `#4`, `#8`, `#10`, `#17`–`#19`, `#21`–`#22`, `#27`, `#30`, `#44`, `#72`–`#79`, `#85`) with the CLI's unpinned default model at the time. +- **Codex (ChatGPT) & ChatGPT:** Used by `rachelks` and `robertky` for specification sparring, schema/migration work, MusicBrainz ingestion, cursor indexes, UI redesign, search history, reviews, and PR reviews (`#2`, `#5`, `#7`, `#9`, `#11`, `#14`–`#16`, `#23`–`#26`, `#29`, `#55`, `#63`, `#70`, `#74`, `#94`, `#104`–`#105`, `#121`–`#122`, `#125`), using the platform's unpinned default model at each session date. +- **Figma Make:** Used by `rachelks` on 7 November for the visual redesign sketch (`#70`), reviewed and adjusted by the group before implementation. + +## Concrete prompt-to-revision examples + +To show how AI output was constrained and corrected rather than accepted verbatim, two concrete examples from this repository: + +1. **Dark-mode contrast & `myCrate` cursor precision (`#18`, `#77`):** + - _Context & prompt:_ For `#18`, the prompt referenced `AGENTS.md` (plain CSS, WCAG AA contrast, preserve light-mode tokens) and asked to lift hard-coded colors into CSS custom properties and add a dark palette. For `#77`, the prompt asked `opencode` to implement keyset cursor pagination for `myCrate` ordered by `(added_at DESC, id DESC)`. + - _Tool output vs. human verification:_ For `#18`, the generated `--border-strong` value (`#556055`) looked plausible visually, but hand-computing the WCAG contrast ratio against the dark surface gave `2.5:1`—below the `3:1` minimum for form-control boundaries. For `#77`, the generated cursor encoded `added_at` via JavaScript `Date` (millisecond precision) and used an `OR` predicate; during human peer review, `evenkkl` caught that PostgreSQL `timestamptz` stores microseconds, so items saved within the same millisecond could be skipped across pages, and `EXPLAIN` showed the `OR` predicate acted only as a filter. Reproducing the bug locally confirmed that four saves inside one millisecond returned only 2 of 5 items. + - _Human revision shipped:_ `--border-strong` was raised to `#6b766b` (`3.4:1`, later refined further to `#687d6e` in `#70`), and `#77` was rewritten to preserve microsecond timestamp strings via PostgreSQL `to_char` with calendar-date validation and a row-value comparison `(added_at, id) < (...)`, verified with a real PostgreSQL integration test. +2. **Pre-submission audit & verification swarm (`#129`–`#135`, 24–25 November):** + - _Context & prompt:_ Each issue (`#129`–`#135`) was scoped to an isolated git worktree with explicit acceptance criteria, `schema.graphql`, and `AGENTS.md` rules, paired with a separate `@verifier` agent that ran all checks independently before any PR was opened. + - _What verification caught & revised:_ During `#132`, adding an inline `