Skip to content

Pin staging to the widget's first-paint fix - #354

Merged
neuromechanist merged 2 commits into
stagingfrom
chore/pin-osa-first-paint
Sep 24, 2026
Merged

neuromechanist merged 2 commits into
stagingfrom
chore/pin-osa-first-paint

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

Moves staging's OSA widget pin from 98ebf1d to 1a79aa8 (OpenScience-Collective/osa#475, osa PR #476), and records the update in ADR 0018.

The widget drew its built-in look on every page load, a 56px bubble in OSA's default blue for about half a second, then shrank to NEMAR's capsule and faded to NEMAR's colors when the community config arrived. It now remembers the community's public widget block in localStorage and draws it on the first frame of the next load; a first visit keeps the launcher hidden until the config arrives, for at most 1.5 seconds.

Nothing on this site changes beyond the pin: the fix is inside the widget, and localStorage is not governed by the Content Security Policy (CSP).

Changes

  • .github/workflows/deploy-test.yml and wrangler.test.toml: PUBLIC_OSA_WIDGET_SRC at 1a79aa83ff9663b2de968e506968b1a15049cedb, with its SRI hash.
  • ADR 0018: an update section with its receipts.

Testing

  • SRI hash computed from the commit's frontend/osa-chat-widget.js and matched against the bytes jsDelivr serves.
  • bun run test: 2409 pass, 4 skipped. bun run lint: clean.
  • osa's first-paint-check.mjs in Chrome: no frame in the default look on a first visit or a reload, NEMAR light and dark (42/42).
  • After merge: the flash timeline on test.nemar.org.

Production is unchanged.

Moves test.nemar.org's widget to osa 1a79aa8 (osa PR #476), which draws
NEMAR's look on the first frame instead of the default blue bubble, and
records the update in ADR 0018.

Tested: SRI hash computed from the commit's file and matched against
jsDelivr's bytes; bun run test (2409 pass), bun run lint.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Deploying nemar-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: f7d52f9
Status: ✅  Deploy successful!
Preview URL: https://7655d03d.nemar-website.pages.dev
Branch Preview URL: https://chore-pin-osa-first-paint.nemar-website.pages.dev

View logs

Review of #354: semantic line breaks, one sentence per line, and the
stored API endpoint named beside the widget block.

Tested: text only; bun run lint unaffected (src only).
@neuromechanist

Copy link
Copy Markdown
Contributor Author

Review response

One Sonnet review. It recomputed the SRI hash from jsDelivr's bytes (matches), confirmed both files carry the same URL and hash and that nothing else still names the old pin, and checked the ADR's claims against the widget at 1a79aa8 (the storage key, what is stored, the 1.5 second cap, and that the diff from 98ebf1d adds no new fetch, frame or script origin, so the CSP needs nothing). No privacy page in this repository lists the widget's storage keys; privacy.astro redirects to docs.nemar.org.

  • Semantic line breaks in the new ADR section: rewrapped, one sentence per line, with two sentences that shared a line split.
  • The stored API endpoint was left unsaid: the ADR now says the widget keeps the endpoint beside the widget block, so a different endpoint never reuses it.

@neuromechanist
neuromechanist merged commit 5f49c79 into staging Sep 24, 2026
5 checks passed
@neuromechanist
neuromechanist deleted the chore/pin-osa-first-paint branch September 24, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant