Repository navigation
Conversation
A new page, /s/[slug]/embed, shows the same sheet as /s/[slug] for every state, without the site footer, the organizer strip or the note on an organizer's own draft, and without writing a page-view row. It is the only address another site may frame: every other path keeps X-Frame-Options DENY and frame-ancestors 'none', from a header rule that leaves the embed out, and the embed sends frame-ancestors * instead. Every link that leaves the embed opens a new tab, described to screen readers as "Opens in a new tab", so no other page loads inside the frame; See alternatives goes back to the embed. EMBEDS_ENABLED=false makes the address not found, read per request. The privacy and cookies pages say what changes inside another website. Fixes #1062. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9SWQEpV21Hn61XHhitV
The test-only host server built its page from the request's query string. It now serves only the pages the tests registered, so nothing from a request reaches the response. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9SWQEpV21Hn61XHhitV
The spec made its signups through the API as the seeded organizer, whose 60-an-hour create limit the full e2e run already nearly uses up, so in CI two other specs got rate_limited. It now uses createOrganizerIn, which puts an organizer and their signups straight into the database, and the spec makes no signup through the API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9SWQEpV21Hn61XHhitV
Tophat: passedSee it: https://claude.ai/artifact/BkGNgkgYtyUPH9EQ6DbFvy
Worth a look:
Not checked:
Ran 5e5fc93 against 7649fbc locally, Chromium at 1280×900 and 390×844, made-up data, with a small local host page on a second origin. https://claude.ai/code/session_016YZ9SVxBfqBzmszYHNZK5G Generated by Claude Code |
richshaw
left a comment
There was a problem hiding this comment.
Review: passed (round 1)
Adds /s/[slug]/embed, the one address another site may frame, as the same sheet as /s/[slug]. Every state shows its message, organizer extras and view counting are left out, and links out open a new tab. I ran Next's own header matcher on the two rules: /, /app, /login, /s/x, /s/x/c/…, /s/x/embed/ and /_next/… all still get DENY and frame-ancestors 'none'. Only /s/<slug>/embed is framable.
Blocking (0)
Optional (3):
next.config.mjs:136: withEMBEDS_ENABLED=falsethe 404 is still sent withframe-ancestors *. It's harmless, but the README could say only the page goes away.layout.tsx: with no footer, the embed has no privacy or AGPL source link. The issue chose this; worth a second look for AGPL §13.- The translate skill's screenshot review was skipped for the one hidden "Opens in a new tab" line.
Earlier threads: all resolved (CodeQL, test-only host page)
Checks: CI green on 5e5fc93. Tophat passed on 5e5fc93. I ran the header matching locally.
Waits for the owner because it's UX: a new public page, plus legal page changes. Card: https://claude.ai/artifact/BkGNgkgYtyUPH9EQ6DbFvy. Code risk: every response's frame headers now come from a negative-lookahead rule, so a future route named embed under /s/<slug> would also be framable.
https://claude.ai/code/session_016YZ9SVxbxv6CupZpeRavSt
Generated by Claude Code
Fixes #1062.
Session: https://claude.ai/code/session_016YZ9SWQEpV21Hn61XHhitV
The problem
Every response carries
X-Frame-Options: DENYandframe-ancestors 'none', so an<iframe>of a signup on an organizer's own website shows an empty box. Organizers can only link to the sheet.The fix
/s/[slug]/embed. The body of/s/[slug]/page.tsxmoved tosignup-page.tsx(renderSignupPage,signupPageMetadata, with{ embed }), and both pages call it, so the embed shows the same sheet from the same data, with the same messages for draft, closed, archived and not found. In the embed:recordPublicView(the privacy page anddocs/telemetry.mdsay so)redirectPunctuatedSlugsends/s/slug./embedto/s/slug/embedrobots: noindexas the pagenext.config.mjs).X-Frame-Options: DENYand the CSP withframe-ancestors 'none'moved to a rule whose source leaves the embed out (/:path((?!s/[^/]+/embed$).*)). The embed getsobject-src 'none'; base-uri 'self'; frame-ancestors *and noX-Frame-Options. Both keepnosniff,Referrer-Policy,Permissions-Policyand HSTS. I checked the real headers on a production build for every path the issue lists. One edge: Next matches header sources case-insensitively, so/S/x/EMBEDalso getsframe-ancestors *. The app's routes are case-sensitive, so that address is only the global "not found" page.NEW_TABinnew-tab.ts:target="_blank" rel="noopener", plusaria-describedbypointing at one hidden "Opens in a new tab" note). This covers the success view's edit link, the returning participant's Edit and "Edit or cancel" links, and the site's name above the sheet. See alternatives stays in the frame and goes to/s/${slug}/embed.state-message.tsxalone. Its only action is the own-draft note, which the embed never shows./sroot layout skipsSiteFooterwhen the path header ends in/embed(isEmbedPathinsrc/lib/signup-path.ts).src/middleware.tsis unchanged, since it already sets that header on every/spath.EMBEDS_ENABLED(booleanFlag(), unset means on). Withfalse, the embed page and its metadata callnotFound(). It's read per request throughembedsEnabled(). The README,.env.exampleand the CHANGELOG document it.participant.signupView.opensInNewTab, with Swedish ("Öppnas i en ny flik") and German ("Öffnet sich in einem neuen Tab"), both marked withmark-translated.mjs.to-translate.mjsreports 0 missing and 0 stale for both languages and both audiences. I did not run the translate skill's screenshot review for this one hidden screen-reader line.os_commitisn't kept inside another site's frame, and the saved name and email are kept separately for each website/s/[slug]/embedgets its ownfirstLoadJsKbentry, 129.6, which is what it measures (/s/[slug]measures the same).GET /s/[slug]/embedis 5 statements, the same asGET /s/[slug].src/messages/en.json, so whichever of this and Write every English apostrophe straight #1113 lands second has to marksv/deagain.Tests
embed/page.test.tsx: open, closed, draft (even for its own organizer), archived, unknown,EMBEDS_ENABLED=false, the punctuated-slug redirect, no strip, no session read, no view tracking, robotslayout.test.tsx: no footer on the embedsignup-view.test.tsx: Edit links gettarget,reland the description in an embed, and not on the pagecommit-dialog.test.tsx: the edit link and See alternatives in an embedenv.test.ts,signup-path.test.ts{ embed: false }fails 5 of its tests.GET /s/[slug]/embedfor a returning participant (5).tests/e2e/embed.spec.ts:X-Frame-Optionson the embed and on/s/[slug],/s/[slug]/c/[id],/s/[slug]/unsubscribe,/appand/login/c/; Done leaves the sheet in the framepage.route: Chromium treats a routed page as public and blocks it from framing a local address.a11y.spec.tschecks the embed with axe.pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test(3,902 passed, 1 expected fail),pnpm test:db(906),pnpm build && pnpm budgetswith CI'sNEXT_PUBLIC_*values.organizer.spec.ts, and my local reruns used up the seeded organizer's create limit. I renamed the titles and cut the spec to 2 signup creates. After clearing the limit,embed,organizer,responsesandtime-formatpassed (45).Generated by Claude Code