Repository navigation
docs(contracts): bring the host-facing contract up to the 5-6 Nov registration work - #377
Conversation
"Add to calendar" offers Apple Calendar as an .ics the widget builds in the browser and hands to an anchor with a `download` attribute. A sandbox without `allow-downloads` refuses that, and the menu item does nothing a visitor can see — the same silent class as the `allow-popups` omission beside it. The guide listed `allow-popups` and `allow-same-origin` and stopped there, in both the "spelled out" summary and the iframe section, so a host following it onto a platform that insists on a sandbox ships a dead menu item. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW3DwBN3M1yYVD4M8T
Four host-observable changes merged after the last entry and never reached this file: #365's registration-failure wording, and three of #366's four parts. #366 added its own captcha entry and stopped there. #365 is the one a host would most want recorded — atlas registrations were failing outright while the form blamed the visitor's security check — and the file already carries entries at that bar, #187's dead report intake among them. #373 is deliberately left out: a leftover gap under a captcha slot that is already collapsed is polish on a change this file records, not a change of its own. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjW3DwBN3M1yYVD4M8T
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
This PR is the size of the drift it fixes: two files, two separable commits, no code. Every claim in both files holds against the source, and the entries were clearly written from the code rather than from the PR descriptions. The allow-downloads claim is sound — downloadEventIcs clicks a download anchor, which a sandbox refuses without the flag. One gap: this guide names a sandbox flag in three places, not two. The third is the Troubleshooting table, and it is the one a host reaches from the symptom this PR describes.
Findings
should-fix—docs/embedding.md:544: the Troubleshooting row at 1300 gains no.icsentry, and still creditsallow-popupsto the compact card alone.consider—CHANGELOG.md:51: #373's exclusion rests on a bar this file does not keep.
What was checked
- All four changelog claims against the source:
AddToCalendar.tsx:41-57,97(blob anchor, fourtarget="_blank"rows),use-web-share.ts(theAbortError/NotAllowedErrorsplit),RegistrationForm.tsx:115-126and:426(unansweredKey,secondaryvsdanger),boot-origins.smoke.test.ts:177-198(the preflight case). - Cited causes against the merge log: #365, #366, #373 and SahajCloud#1085 each land what the entry says.
- Both reference links resolve —
[Embedding in an iframe]and[Permissions Policy]are defined at 979-980. - Both consumer sides, sparse-cloned and grepped: neither
WeMeditateWeb/lib/atlas-embed.tsnorSahajAtlasWordpress/includes/embed.phpnamesiframeorsandbox, so the new flag binds neither. - Repo-wide grep for
target="_blank"anddownload: two call sites, both named above. No preview to open — Markdown only, and this repo configures none.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The guide named a sandbox flag in three places and this branch had updated two. The third is the Troubleshooting table, which is the one a host reaches from the symptom rather than from the snippet, so the `.ics` download had nowhere to be found: a sandboxed frame refuses it and the Apple Calendar row does nothing a visitor can see. The `allow-popups` row beside it credited the flag to the compact card's button alone. `AddToCalendar.tsx:97` renders four `target="_blank"` provider rows that need it too, and `CompactEmbedView.tsx:82` is the other of the repo's two live call sites. The row now names both places. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYDVNUh4RFz7MsjyV8
The entry tells a host that most visitors now see no security check at all, and stopped at the box closing. The form kept a row's worth of space where the box would have been, which a visitor sees as a gap above the submit button, so the entry overstated itself until that was fixed. Credited to #371, which added `collapseSlot` and takes the slot out of its column while the frame is collapsed. #373 carries the gap in its title but not in its diff: it touched no form, and removed only the dead `interactive` flag the hook had stopped needing once #371 wrote the slot itself. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYDVNUh4RFz7MsjyV8
|
Both threads built and resolved. Pushed 5b2f78a. Adopted — the Troubleshooting table (913f491). It gains Add to calendar → Apple Calendar does nothing, in an iframe for Adopted, credit corrected — #373's exclusion (5b2f78a). The captcha entry now says the collapsed slot leaves no gap of its own in the form, crediting #371. #373 touched no form file and removed only the dead Lean gate green: lint, typecheck, 1965 tests in 165 files, 65s. Body refreshed — its outline said the gap was deliberately left out. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
CHANGELOG.mdgains the four host-observable changes from fix(registration): blame the connection, not the captcha, when nothing answered #365 and feat(registration): tidy the confirmation screen, one calendar menu, hidden captcha #366 that never reached it, and a clause for the collapsed captcha slot leaving no gap in the form (fix(search): embed, search and navigation fixes from the 6 Nov bug sweep #371).docs/embedding.mdaddsallow-downloadsto the sandbox flags a framed embed needs, which the calendar.icsdownload has required since feat(registration): tidy the confirmation screen, one calendar menu, hidden captcha #366.docs/embedding.md's Troubleshooting table gains a row per sandbox flag — the one place a host reaches from the symptom instead of from the snippet.Found by the
audit-contractssweep (2026-11-09), checking the guide and the changelog against the code rather than against themselves. The third bullet and the #371 clause came out of review.Change outline
The changelog was four entries behind
The last entry landed with #370/#371/#369 on 8 Nov. Three commits followed, and two of them carried visitor-visible behaviour:
#365 sits at the bar the file already keeps: #187's entry records the report form's dead intake in the same terms.
#373 carries the gap in its title and none of it in its diff. It touched no form file, and removed the
interactiveflag the hook had stopped needing — no form had read it since #371. What a visitor saw is #371'scollapseSlot, which takes the slot out of its column while the frame is collapsed (position: absolute), and the captcha entry now says so with #371's number on it. An earlier draft of this PR left the clause out as polish on #373; review asked for it, and tracingcollapseSlotmoved the credit.The sandbox list was incomplete
downloadEventIcs(src/components/molecules/AddToCalendar/AddToCalendar.tsx) builds the.icsin the browser and clicks an anchor carrying adownloadattribute. A sandboxed frame withoutallow-downloadsrefuses that, and the Apple Calendar row does nothing a visitor can see — the same silent failure as theallow-popupsomission already documented beside it.All three places that name a sandbox flag are updated: the "Both snippets, spelled out" bullet, the iframe section's five load-bearing points, and the Troubleshooting table. That last one had no
.icsrow at all, and creditedallow-popupsto the compact card's button alone —AddToCalendar.tsx:97renders fourtarget="_blank"provider rows that need it too, andCompactEmbedView.tsx:82is the repo's only other live call site.Preview
Markdown only — no route, component or bundle changes, so neither Cloudflare preview shows anything this PR did. Read the two diffs instead.
Contract impact
This is the host-facing embed contract. No consumer code changes: the two in-tree consumers were checked this run and both still match.
WeMeditateWeb/lib/atlas-embed.ts— sendskey,routing=path,atlas; script embed, never framed.SahajAtlasWordpress/includes/embed.php— sendskey,map=false,atlas,gestures=cooperative,routing=path; enqueues a script module, never an iframe.Neither sandboxes a frame, so neither is affected by the
allow-downloadsline. No copied contract is touched.Test results
.claude/skills/pr-prep/check.sh— lint, typecheck, 1965 unit tests in 165 files, 65s. Re-run on the review commits.Security review skipped: no changed path matches
securityReview.triggerPattern. No code comment added.Manual verification
sandbox="allow-scripts allow-popups allow-same-origin"and press Add to calendar → Apple Calendar. Nothing downloads. Addallow-downloadsand it does. This is the claim both guide changes rest on and it has not been watched in a browser this run.Notes for reviewer
prettier --checkonmain, so--writewould reformat them whole and bury a 43-line change. The new prose is hand-wrapped to the files' own ~98-column width, and the new table rows are padded to the column widths the table already keeps.pnpm lintdoes not cover Markdown and this repo has noformat:check.use-web-share.tsfor theAbortError/NotAllowedErrorsplit, the feat(registration): tidy the confirmation screen, one calendar menu, hidden captcha #366 diff ofRegistrationForm.tsxfor the confirmation notice, fix(registration): blame the connection, not the captcha, when nothing answered #365's own commit body for the preflight failure, andgit log -S collapseSlotfor the slot.Detail
What else this sweep checked in this repo, and found clean. The six script-URL parameters in the guide's table match
src/loader/config.tsexactly (key,locale,map,routing,atlas,gestures), including thefalse/0spelling rule. The Permissions Policy table's three capabilities are still the complete set, enumerated from the rendered controls rather than a grep:GeolocateControlis the only Mapbox control that needs one besidesAttributionControl, noFullscreenControlis rendered, andnavigator.clipboardandnavigator.shareare the other two call sites. The captcha frame'sallowstring in the guide is byte-identical touse-turnstile.ts:103..icsdownload needs no Permissions Policy feature — it is a sandbox flag, which is why it belongs in the iframe section and not in that table.Why
allow-downloadsis a doc fix and not a code fix. An.icsfile is the lossless export for a recurring class, argued at length insrc/lib/ics.ts. The widget should keep offering it; what was missing is the host-side flag it needs. Nothing here asks the widget to change.Generated by Claude Code