Skip to content

docs(contracts): bring the host-facing contract up to the 5-6 Nov registration work - #377

Merged
sydevs-bot merged 4 commits into
mainfrom
claude/docs-contract-host-embed
Nov 9, 2026
Merged

sydevs-bot merged 4 commits into
mainfrom
claude/docs-contract-host-embed

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Found by the audit-contracts sweep (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:

Merged What a host can observe Recorded before
#365 Atlas registrations were failing outright while the form asked the visitor to redo a security check that had already passed. The generic failure now names the connection or the server, in the error colour rather than the blue a refusal uses. no
#366 The confirmation screen leads with one notice about the email, and the join link for an online class. no
#366 "Add to calendar" is one button opening a menu of calendars, instead of a row of provider buttons. no
#366 Cancelling the phone's own share sheet no longer swaps the Share button for the copy-and-links list. no
#366 The captcha stays collapsed until Cloudflare asks for a click. yes — #366 added this one and stopped
#371 The collapsed captcha slot leaves no gap of its own in the form. no — added in review, as a clause on the entry above
#373 Nothing. n/a

#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 interactive flag the hook had stopped needing — no form had read it since #371. What a visitor saw is #371's collapseSlot, 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 tracing collapseSlot moved the credit.

The sandbox list was incomplete

downloadEventIcs (src/components/molecules/AddToCalendar/AddToCalendar.tsx) builds the .ics in the browser and clicks an anchor carrying a download attribute. A sandboxed frame without allow-downloads refuses that, and the Apple Calendar row does nothing a visitor can see — the same silent failure as the allow-popups omission 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 .ics row at all, and credited allow-popups 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 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 — sends key, routing=path, atlas; script embed, never framed.
  • SahajAtlasWordpress/includes/embed.php — sends key, 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-downloads line. No copied contract is touched.

Test results

  • Lean gate: ✓ .claude/skills/pr-prep/check.sh — lint, typecheck, 1965 unit tests in 165 files, 65s. Re-run on the review commits.
  • Targeted specs: N/A — no source file changed
  • Build: N/A

Security review skipped: no changed path matches securityReview.triggerPattern. No code comment added.

Manual verification

  1. On a platform that insists on sandboxing the iframe, embed with sandbox="allow-scripts allow-popups allow-same-origin" and press Add to calendar → Apple Calendar. Nothing downloads. Add allow-downloads and it does. This is the claim both guide changes rest on and it has not been watched in a browser this run.
  2. Read the fix(registration): blame the connection, not the captcha, when nothing answered #365 entry against SahajCloud#1085 — the outage was SahajCloud's refusal of the token header in the CORS preflight, and this file should not read as though the fix was here.

Notes for reviewer

  • Prettier is not run over either file. Both already fail prettier --check on main, so --write would 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 lint does not cover Markdown and this repo has no format:check.
  • Each of the four commits is separable, and they are four distinct drifts: a changelog behind its merge log, a guide whose sandbox list was never completed, a Troubleshooting table that named neither flag's real reach, and a captcha entry that stopped before the gap. Any one reverts alone.
  • The entries' wording was taken from the code and the merge commits, not from the PR descriptions: use-web-share.ts for the AbortError/NotAllowedError split, the feat(registration): tidy the confirmation screen, one calendar menu, hidden captcha #366 diff of RegistrationForm.tsx for the confirmation notice, fix(registration): blame the connection, not the captcha, when nothing answered #365's own commit body for the preflight failure, and git log -S collapseSlot for 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.ts exactly (key, locale, map, routing, atlas, gestures), including the false/0 spelling rule. The Permissions Policy table's three capabilities are still the complete set, enumerated from the rendered controls rather than a grep: GeolocateControl is the only Mapbox control that needs one besides AttributionControl, no FullscreenControl is rendered, and navigator.clipboard and navigator.share are the other two call sites. The captcha frame's allow string in the guide is byte-identical to use-turnstile.ts:103. .ics download 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-downloads is a doc fix and not a code fix. An .ics file is the lossless export for a recurring class, argued at length in src/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

"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
@sydevs-bot

sydevs-bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running
pending since 16:50Z

recent dispatches
  • 08:26Z address-review · attempt 1 · session · done
  • 08:26Z address-review · attempt 1 · session
  • 08:19Z review-pr · attempt 1 · session · done
  • 08:19Z review-pr · attempt 1 · session

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 9, 2026
@sydevs-bot sydevs-bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 9, 2026

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 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 .ics entry, and still credits allow-popups to 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, four target="_blank" rows), use-web-share.ts (the AbortError/NotAllowedError split), RegistrationForm.tsx:115-126 and :426 (unansweredKey, secondary vs danger), 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.ts nor SahajAtlasWordpress/includes/embed.php names iframe or sandbox, so the new flag binds neither.
  • Repo-wide grep for target="_blank" and download: 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

Comment thread docs/embedding.md Resolved
Comment thread CHANGELOG.md Resolved
@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 9, 2026
@sydevs-bot sydevs-bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 9, 2026
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 9, 2026
@sydevs-bot sydevs-bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 9, 2026
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
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

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 allow-downloads, and the allow-popups row beside it now names the four provider rows (AddToCalendar.tsx:97) as well as the compact card's button (CompactEmbedView.tsx:82) — the repo's only two live target="_blank" call sites.

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 interactive flag; collapseSlot arrived in #371.

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

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 9, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review November 9, 2026 08:35
@sydevs-bot
sydevs-bot requested a review from Ardnived November 9, 2026 08:35
@sydevs-bot
sydevs-bot enabled auto-merge November 9, 2026 08:35
@sydevs-bot sydevs-bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 9, 2026
@sydevs-bot sydevs-bot moved this from Awaiting to Pending in SYDevelopers Technical Roadmap Nov 9, 2026
@sydevs-bot
sydevs-bot added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit a82885d Nov 9, 2026
50 of 52 checks passed
@sydevs-bot
sydevs-bot deleted the claude/docs-contract-host-embed branch November 9, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants