-
Notifications
You must be signed in to change notification settings - Fork 0
docs: #135 final documentation sync, AI reflection, Lighthouse/a11y log, and screenshots #142
docs: #135 final documentation sync, AI reflection, Lighthouse/a11y log, and screenshots #142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is a big cleanup and most of it checks out. Every asset size matches the files in the repo (hero WebP 39,164 / 13,394 B, all four WOFF2 files, theme-init.js 298 B), the first-load sum of 452,615 B adds up, HOST defaults to 127.0.0.1 in server/src/index.ts, and the new screenshots show the 2,000-album catalog. I only looked at what this PR changes on top of #141.
Request changes
-
Docs describe code that isn't in this stack yet. #142 is stacked on #141 → #140 → #138 →
main. #136 and #137 are not in that chain, and both are still open:docs/architecture.md§7 says the API "enforces request body size, GraphQL query depth/complexity, input length/array caps, and rate limiting … disables GraphQL introspection whenNODE_ENV=production". None of that exists on this branch (nosecurity.tsorapp.ts, and nothing readsNODE_ENV). All of it comes from #136.- The README says CI runs "Playwright E2E" and lists
crate.spec.ts. Both come from #137. On this branchci.ymlhas no Playwright job ande2e/tests/has nocrate.spec.ts.
Either merge #136 and #137 before this PR, or tag those lines with "(#129, PR #136)" and "(#134, PR #137)". Please also say the merge order in the description, so that this doesn't merge first by accident.
-
The Apache headers and CSP are described as live. The README says Apache "applies gzip compression, immutable asset caching, and baseline HTTP security headers" and that the API runs "with
NODE_ENV=production". Architecture §7 says "Production deployment enables …Content-Security-Policy". But your own pre-handin checklist says the Apache configs still need to be applied onit2810-19. The Lighthouse runs usedvite preview, so the CSP has never been loaded in a browser. Please write "is configured to (seedocs/VM-setup.md)", or check the live headers after deploying and keep the wording then. A quick check with DevTools open on Discover and an album page would confirm the CSP doesn't block anything. -
The #55 example in the AI reflection is wrong.
buildPrefixTsQuerydoesn't exist. Prefix search is thetsQuery()helper inserver/src/search/search.ts, and it builds the query in SQL (tsvector_to_array+:*), not in TypeScript.- The
to_tsquerysuggestion came from two co-students' peer reviews, not from an AI tool. The 2026-10-20 row in the same log says so.
Since this example is meant to show AI output being corrected, please fix both points or swap in another example. The #18 half is accurate (
#5560552.5:1 →#6b766b3.4:1 →#687d6ein #70). -
The #134 example cites the wrong SHA. "pinned to the commit SHAs actually mirrored on NTNU's Gitea/Actions host (
9198784)":9198784is the head commit of PR #137, not an Action SHA. Please either drop it or cite the actual pinned SHA.
Should fix
-
Route-change focus and the stale-chunk error boundary are still missing. Neither is fixed on this stack (
App.tsxhas no focus handling and no error boundary around the lazy routes). The new routing text inarchitecture.mdandui-specification.mddoesn't claim either one, which is good. But unless #138 fixes them before hand-in, please add them as known limitations, and add "focus and announcement after an in-app route change" to the manual screen-reader checklist. -
The Lighthouse comparison isn't like-for-like.
- The baseline used Lighthouse 13.5.0 and
/album/100030. The new run uses 13.6.0 and/album/13. - Album detail desktop went from 92 to 87/88 (LCP 1.8 s → 2.3–2.5 s), and the doc doesn't mention it.
- "82 → 98 from #133" leaves out everything else that merged between 11 and 25 Nov.
Please say the runs aren't directly comparable, mention the Album detail drop, and write "mainly from #133". The numbers themselves look plausible. They fit Lighthouse's scoring curves (for example, Album detail mobile LCP 4.8–5.3 s → 81–83), and the 12 rows match the description.
- The baseline used Lighthouse 13.5.0 and
-
The README
## AI usagesection. Our rule is that AI use is logged only indocs/AI-USAGE.md. I'd cut the README section down to one line that links to the log, without the tool list.
Non-blocking
- Best Practices 96 is caused by
/favicon.icoreturning 404. Adding a favicon (anrel="icon"link inindex.html) would likely make it 100. - Your crate mobile CLS is 0.087, close to the 0.1 limit. That's fine, but worth a look if there's time.
- 19 files is over WORKFLOW's "a dozen files" guideline. Having the screenshots in their own commit makes it easy to review, so I'm fine with it.
- The PR description lists "Independent review & approval by
@verifier". WORKFLOW only counts approvals from the group, and AI-USAGE says AI tools did not approve PRs. Please reword it to something like "checked by a separate verifier agent" so it doesn't read as an approval. - I didn't verify the catalog counts (
blue66, Rock 229) against a database. Run the smoke queries once on the VM after the import.
03da34a to
629879b
Compare
a1266fb to
ea155ef
Compare
|
Thanks for the super thorough review, @evenkkl! Rebased onto the updated
Verified locally with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, all of it is addressed. I checked each fix against the code:
- Unmerged work: #136 is now merged on
main, so the "(merged in PR #136)" tag is accurate. The Playwright CI andcrate.spec.tslines are tagged #137, and the merge order in the description is clear. - Apache/CSP/NODE_ENV: now "configured to", with "not live until applied" and the DevTools check on the checklist. 👍
- #77 example: matches the history.
d727a9areplaced the JSDatecursor withto_chartext plus calendar validation, and8b733e8replaced theor(...)with the row comparison. The 2-of-5 repro matches the log row. - Action SHAs:
08eba0b/b906aff/49933eaare exactly what #137'sci.ymlpins. - Focus and stale chunks:
App.tsxnow focuses<main>withpreventScrollafter route changes (and after Suspense resolves), andRouteErrorBoundaryreloads once with asessionStorageguard. The docs describe that accurately, and the SR checklist has the route-change item. - Lighthouse: the comparability note and the Album detail drop are in, and the new sizes add up (455,305 B first-load JS).
favicon.svgis 305 B and linked inindex.html. - README: the AI section is now a single link.
Nit (optional): In the #77 example, the EXPLAIN finding about the OR predicate was erikhfj's own (the 2026-11-05 row says "The row-comparison rewrite was mine"), not part of evenkkl's review. Splitting that sentence would keep it exact.
No AI attribution outside docs/AI-USAGE.md, and the new commit has no trailer. Approving.
9326b6d
into
perf/133-hero-lcp-and-apache-headers
Summary
Final pre-submission documentation sync, AI usage reflection, refreshed Lighthouse & accessibility verification log, technical doc discrepancy fixes, and recaptured UI screenshots for the 27 November delivery. Stacked on
perf/133-hero-lcp-and-apache-headers(#141).Merge order
#129API & PostgreSQL hardening) — already merged onmain#134Playwright E2E CI & test hardening) and feat: #130 support accent-insensitive album and artist search via PostgreSQL unaccent #139 (#130accent-insensitive search) — independent onmain(merge chore: #134 run Playwright E2E in CI, expand tests, and harden CI/CD deploy #137 before docs: #135 final documentation sync, AI reflection, Lighthouse/a11y log, and screenshots #142 if you wantcrate.spec.tsand the Playwright CI job onmainfirst; references are tagged(#134, PR #137)in the meantime)#131) → feat: #132 a11y/theme/UX polish, #133 hero LCP & Apache headers, and #135 final docs/screenshots #140 (#132) → perf: #133 optimize hero image/mobile LCP and configure Apache headers #141 (#133) → docs: #135 final documentation sync, AI reflection, Lighthouse/a11y log, and screenshots #142 (#135)What was done
docs/AI-USAGE.md,README.md):Antigravity (Gemini 4 Neon (High)),Claude Opus 5.5 (1M context)from commit07673c8, and honestly noting unpinned CLI/web tool defaults).#18dark-mode border contrast MmyCratemicrosecond cursor precision;#129–#135swarm audit & verification catching#132's CSP-safetheme-init.jsand#134'sgit.ntnu.no-mirrored Action SHAs08eba0b/b906aff/49933ea).Figma designtypo, added missing#74(PR feat: #74 add composite cursor indexes #89, 2026-11-15) row, and added rows for#129–#135.README.md's## AI usagesection to a single line linking todocs/AI-USAGE.md.docs/lighthouse-results.md,README.md,docs/architecture.md):vite preview) + built API + PostgreSQL 18 imported with the 2,000-album MusicBrainz catalog across Discover, Album detail (/project2/album/13, Hounds of Love), and Your crate (Desktop & Mobile, Light & Dark), with an explicit comparability note vs. the 11 November13.5.0//album/100030baseline (including the Album detail desktop shift92→87–88).pnpm buildasset sizes (JS chunks,theme-init.js, CSS,index.html,favicon.svg, hero WebP39.16 kB/13.39 kB, WOFF2 fonts; max JS chunk395,383 B <= 512,000 B) acrossREADME.mdanddocs/lighthouse-results.md, and linkeddocs/lighthouse-results.mdfrom the README top table.@axe-core/playwrightWCAG 2.1 A/AA checks (0 violations across 10 light/dark interactive states) and 200%/400% zoom (320 px viewport) reflow checks (0 px horizontal overflow across all 10 checks), plus honest remaining manual pre-handin items (including in-app route-change focus/announcement).docs/architecture.md,docs/ui-specification.md, andREADME.mdfor#131/#138History API SPA routing + route-change<main>focus +RouteErrorBoundarystale-chunk recovery,#132CSP-safe manual theme toggle,#129(merged in PR fix: #129 harden GraphQL API & PostgreSQL pool, fix review/cursor bugs, and deduplicate server helpers #136) API/DB hardening,#133Apache headers cross-reference (worded as configured, pending VM apply/DevTools check), OLED & Georgia system-serif tradeoffs, Cover Art Archive IP privacy tradeoff, and plain-HTTP course-VM transport tradeoff.docs/data-model.md,docs/scalability.md,docs/VM-setup.md,docs/ui-specification.md,README.md,docs/WORKFLOW.md, andAGENTS.md.docs/images/*.png) against the built preview + 2,000-album MusicBrainz catalog.Verification
pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build— all passedgit diff --checkand local Markdown link check — clean@axe-core/playwrightWCAG 2.1 A/AA (10 states, 0 violations) & 200%/400% zoom / 320 px reflow checks (10 checks, 0 px overflow)Remaining manual pre-handin checks (before 27 Nov)
http://it2810-19.idi.ntnu.no/project2after merging PRs#136–#142and applying Apache configs (docs/VM-setup.md, checking CSP in DevTools on Discover and an album page)Closes #135