Repository navigation
Conversation
A standalone page at /review/ (site/static/review/, copied into the build as-is; the map, pipeline and SvelteKit app are unchanged). Volunteers see one picture of a State PDF page at a time with the value a computer read, and answer Matches / Doesn't match / Can't tell, with optional "what the page shows" and a note. Answers are saved per batch in localStorage and downloaded as a JSON file in the shape of BetaNYC's data-issue intake request; sending stays off until ENDPOINT is set. CSP allows only this site's files plus https://www.beta.nyc for sending; no analytics or third-party scripts; DOM built with textContent only; ?batch= checked against batches.json. 253 items, 25 batches, 4.1 MB of WebP crops with e-mail addresses and phone numbers blacked out. Tests: tests/communityReview.test.js, e2e/review.spec.js (axe, keyboard, download, no foreign requests). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- After a 201 the batch is marked sent in localStorage. Send disappears, a plain "Thanks — your answers for this batch were sent" shows with a link to another batch, and "Send again" appears only after an answer changes (compared by a fingerprint of the normalized answers). - On 429 the wait comes from Retry-After (seconds or HTTP date). Without it the page says about an hour, the endpoint's limit window. The endpoint must expose Retry-After to cross-origin pages. - A meta CSP cannot set frame-ancestors, so review.js hides every control and shows a message when window.top !== window.self. The limitation is noted in the README. - Tests: unit tests for canSend/answersFingerprint/retryAfterMessage; e2e with the endpoint mocked (send once, reload, Send again, 429 with and without Retry-After, framed page). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page makes a client_id once per browser with crypto.randomUUID() (fallback: 16 random bytes from crypto.getRandomValues as 32 hex chars), keeps it in localStorage and sends it in every request body and the downloaded file. It is never shown. Triage keeps only a browser's latest answers per batch. A stored value that fails the pattern is replaced. Tests: getClientId unit tests (reuse, fallback, tampered value, storage off); key order in the body; e2e exact shape, same id across sends and a reload, and the id absent from the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
noneck
added a commit
that referenced
this pull request
Nov 13, 2026
…131) * What's changed: WHATS-CHANGED.md since 2018, a /whats-changed/ page, CI check Adopts the BetaNYC What's changed standard (betanyc-ai-workspace#1646, epic #1637). - WHATS-CHANGED.md: 24 entries from the record (v1 change log in main's README, commits, gh-pages deploys, issues and PRs; v2 PRs dated by when their deploy finished, New York time). History begins 2018-07-11. One correction (2020-08-10: licenses drawn in the wrong place for about 12 minutes; dates missing for about half an hour). - scripts/whats_changed.py v1.2.1, copied unchanged from the workspace. - site: /whats-changed/ route renders the generated fragment with {@html} under its own h1; prerender = true, csr = false. The built page carries exactly one <script>, the fragment's filter script, and it runs (Playwright). The address search needs the SvelteKit client, so the layout leaves it out on this page instead of showing a dead control. Footer link on every page, with data-sveltekit-reload. - `npm run whats-changed` (also prebuild) writes site/src/lib/whats-changed.html. - e2e: the page joins pages.js (axe and phone width at all three sizes); new whats-changed.spec.js (h1, landmarks, <time>, no-client script, keyboard filter and live region, JS off, 44px targets, 320px, footer link on every page, Back). - CI (v2-site-a11y.yml): full-history checkout, `check --base-ref`, `render --check`. - README: points to the file and the page. Merges cleanly with open drafts #123 and #128 (git merge-tree). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * What's changed QA round 1: module 1.2.3, 500-foot correction, data-driven tests - scripts/whats_changed.py v1.2.3 copied unchanged; fragment re-rendered (filter now shows only Site, Data and Corrections only). - New correction 2026-11-05: 500-foot counts on 499 address pages were off, mostly by 1 to 3 (PR #98); removed from the LAMP feature entry. - 2020-08-10 correction advice reworded (4:12 to 4:44 pm, from commit timestamps). - e2e/whats-changed.spec.js: counts from `whats_changed.py json`; a dated <time> per dated entry, not one per entry; checkbox count from the tags in use; filter checks skip when the module omits the filter; the csr check always runs; skip link in the 44px check. - app.css: skip link at least 44px tall. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: shared What's changed module 1.2.4 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Header nav wraps at 320px (Linux CI overflow on PR #131) On GitHub's Linux runner the What's changed page measured 325px wide at 320px. The overflow was the site header's nav ("Districts About Glossary Rules"), not the page fragment: it is a non-wrapping flex row, and wider Linux fonts push "Rules" past the edge. The nav now wraps (flex-wrap, min-width: 0). Every page shares the header. The 320px test now also measures with a wide font (Verdana / DejaVu Sans), so it fails on macOS without this fix (323 > 320) and passes with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
What
A standalone page at
/review/where volunteers check what a computer read from New York State's Cannabis Control Board PDFs. They see one small picture of the page at a time, with the row outlined in red, plus the value we read. They answer Matches, Doesn't match or Can't tell, and can optionally type what the page shows and add a note. The work is tracked in BetaNYC's workspace.site/static/review/(plain HTML, CSS and JS, copied into the build as-is). The map, the pipeline and the SvelteKit app are unchanged. I built with and without the folder: every page is identical except SvelteKit's per-build version stamp. Nothing links to the page yet.localStorage. Contact fields are optional and never stored. Answers are suggestions; staff decide.ENDPOINT = ""inreview-core.js. The page offers "Download my answers", a JSON file in the intake request shape (schema: betanyc-data-issue/1,tool: slam,kind: review-answer). Once the endpoint exists, settingENDPOINTmakes it POST with no credentials.Security
default-src 'self'; img-src 'self' data:; connect-src 'self' https://www.beta.nyc; script-src 'self'; style-src 'self'; object-src 'none'; base-uri 'none'; form-action 'none'.data:is only there for the empty favicon.textContentand attributes. A unit test fails oninnerHTML,outerHTML,insertAdjacentHTML,document.write, inline scripts, handlers or styles.?batch=is checked againstbatches.json. Image paths must matchimg/<id>.webp, PDF links must be https, and those links userel="noopener noreferrer". A hidden honeypot field is included. The page isnoindexwithno-referrer.Security review fixes (second commit)
localStorage. Send disappears and the page shows "Thanks — your answers for this batch were sent" with a link to start another batch. "Send again" appears only after an answer actually changes.Retry-After(seconds or an HTTP date). Without that header the page says "about an hour", the endpoint's limit window, and never "a few minutes". The endpoint must sendAccess-Control-Expose-Headers: Retry-After, or a cross-origin page cannot read the header and always falls back to an hour.frame-ancestors, and GitHub Pages cannot send the header. Soreview.jshides every control and shows a message whenwindow.top !== window.self. This is best effort; the README says so.Contract amendment 2026-11-08 (third commit)
client_id: made once per browser withcrypto.randomUUID()(fallback: 32 hex characters fromcrypto.getRandomValues), kept inlocalStorage(slam-review:client-id), and sent in every request body and the downloaded file, right aftercredit_ok. It is never shown. It identifies a browser, not a person.page_urlis alwayshttps://slam.beta.nyc/review/?batch=<id>, which meets the amended rule (allowed origin followed by/).Tests run (locally, Node 26.13)
npm test: 187 pass, 0 fail (13 intests/communityReview.test.js)npm run check: 0 errors, 0 warningsnpm run build: OKnpm run test:a11y: 62 passed, 16 skipped (desktop-only keyboard tests on phone sizes). With the endpoint mocked through Playwright routes: send once, reload, Send again after a change, 429 with and withoutRetry-After, and a framed page. Newe2e/review.spec.jsruns axe on the intro, item, larger-image and finish screens at all three sizes, a keyboard-only pass, a check of the downloaded file's exact shape, reload persistence, and a bad?batch=.Needs before it goes live: a place to send answers (the endpoint), and a decision on linking to the page.
🤖 Generated with Claude Code