Repository navigation
Release 0.2.28: embeddable viewer, edge counts - #424
Merged
Merged
Conversation
The page read a nested status object the backend list route never sends, so rendering the first row threw and no request showed, including nm000290. Reads the real row shape, adds Pending, Published, Denied and Blocked tabs with counts (one row per dataset, latest request), parses SQLite UTC times, and withholds the web Approve button until approval can run to completion.
The page no longer drives approval, which needs the caller to loop over S3 Object Lock batches. Approve asks the backend to start it (POST /admin/publish/:id/approve-dispatch), which hands the run to a GitHub Action; rows show Approve, Queued or Running with the current step, and Resume or Retry when a run stalls, from the backend's approval_in_flight. A backend without it falls back to the CLI hint. Retry of a never-started request keeps the typed PUBLISH confirmation; anonymous releases get their own wording; the auto-refresh survives Cancel and can be paused. ADR 0022.
The Published tab rendered all 780 cards on one page (about 3.5 MB of HTML). Each tab now shows 50 rows per page with Previous and Next, a Showing 51 to 100 of 780 summary above and below the list, and a ?page= parameter. A bad or out-of-range page falls back to the first or last page; tab counts stay totals.
* feat: add private site authorize page * test: drift test for private site contract * chore: set private site base for staging * fix: keep a page-set no-referrer in middleware * docs: ADR 0021 on page-set no-referrer * fix: refuse redirects on the private grant call * fix: refuse redirects on the docs grant call * test: deadline cases for the private grant * fix: send only the code to the private site * fix: normalize the private site base * fix: answer only GET on private authorize * docs: note the production private base default * feat: link back to the private site * docs: log the private site handoff page
Moves the footer's analytics preference control to the end of the copyright line as "Your Privacy Choices" with the standard toggle icon; same button, same preference (ADR 0019). Adds the shared PrivacyChoicesIcon component for the embed page. Forced-colors focus outline, changelog entry, source-level wiring tests. Lint, typecheck, test (2869 passed), build green; Chromium checks in both themes and forced colors. Refs #413, part of #410.
Adds /dataset/<id>/embed, a chrome-free page partner sites can iframe, with the same ?view= contract as the dataset page plus ?v= and ?theme=. Only that route sends frame-ancestors * and drops X-Frame-Options; every other route stays 'self'/SAMEORIGIN (ADR 0023). A semi-transparent NEMAR mark sits on the signal plot in the embed only. The dialog's orchestration moved into one shared viewer-session module that both the dataset page and the embed drive; viewer CSS moved to a shared stylesheet unchanged. Embed snippet control in the viewer dialog. Lint, typecheck, test (2931 passed), build green; Chromium and WebKit gates passed, dialog characterization identical before and after; Firefox pending (Playwright Firefox does not launch on this macOS). Refs #411, part of #410.
One Analytics Engine data point per 200 on /dataset/<id>/embed, written by the middleware on every serve path: the percent-decoded dataset id, the embedding site's hostname from Referer (253-char cap), and the request kind from Sec-Fetch-Dest (iframe, document, other, none). No IP, user agent, country, cookie, query, view or theme. HEAD, prefetch, redirects and non-200s are not counted. Production binds nemar_website_embeds; previews and staging bind nemar_website_embeds_dev (config test pins it). A missing production binding or a failing write warns once per isolate and never changes the response (ADR 0024). Lint, typecheck, test (2989 passed), build green; live preview checks in Chromium and WebKit; reading the rows back is verified through the observability dashboard (nemar-observability#97) before production. Refs #412, part of #410.
The embed's privacy icon now opens the privacy policy's Embedded viewer section (/privacy#embedded-viewer, nemarOrg/docs#61); /privacy still 301s to the docs site and the fragment survives the redirect. Lint, typecheck, test, build green. Part of #410.
* Embed: two-row toolbar in narrow frames At 560 px wide or less, the embed hides the time readout (the plot's time axis already shows the window; screen readers still get the text) and tightens the spacing between toolbar groups. A 360 x 480 frame's toolbar goes from three rows (108 px) to two (67 px), and the plot grows from 182 to 223 px in Chromium and from 189 to 230 px in WebKit. Measured from 320 to 800 px wide: two rows or fewer at every width, and the document never scrolls. The dataset page is unchanged. Tested: lint, typecheck, 2989 unit tests; width sweep in Chromium and WebKit against bun run dev. * Embed: keep narrow-frame rules off the gear popover Review of #420: the group-spacing rule also matched the gear popover's groups and indented three of them by 8 px; it now selects only the toolbar's direct groups. The same leak, from phase 1, hid the popover's captions ("Filter (Hz)", "Next moves through", ...) in narrow frames; those are back, paid for with tighter popover spacing so the open popover still fits a 360 x 480 frame. Comments and the CHANGELOG line now say what each rule buys, and that the two-row claim is for a recording with one channel group. Tested: lint, typecheck, unit tests; popover group padding 0 at 320 to 800 px, toolbar unchanged (67 px at 360), no document scroll at 360 x 480 with the popover open, Chromium and WebKit.
…mes (#422) * Embed: hide the time readout in every frame The readout's width follows the data ("0.0–10.0 s" is 10 characters, "2330.0–2338.0 s" 15, clock mode 17), so above 560 px a long one could wrap the toolbar onto another row mid-session and shrink the fitted plot by about 44 px. The time axis already labels the window, so the embed now hides the readout at every width (still read by screen readers). Fixes the invariant that no line of a fit viewer's chrome changes height between renders. Tested: Chromium and WebKit, 360 to 1200 px: toolbar height identical with the real, a 15-character and a clock-mode readout; the toolbar is one row from 640 px (two before). * Embed: hide the overview strip in small frames At 560 px wide or less the recording-wide event map under the scrubber is hidden; its ticks blur together at that width and the scrubber still moves through the recording. It needs !important because viewer.ts sets its display inline once the overview loads. Each render redraws it, so a frame widened past 560 px gets it back at full width. Tested: Chromium and WebKit; 360 x 480 plot 223 -> 273 px (WebKit 230 -> 280), no document scroll at 360 to 800 px, and resizing 360 -> 800 shows the strip again with a 784 px bitmap. * Viewer: write the channel readout once per render The Hide bad count (" · N hidden") was cleared when each render began and appended after the window read landed. In a fitHeight viewer that flip could wrap and unwrap the toolbar every render, and each wrap moved the fit and started another render: at 360 x 480 the review of #422 measured up to 20 renders per page step in Chromium, and 195 height flips with a 34 px scrollbar on 130 of 1105 frames in WebKit. The count now comes from the montage rows in view and is written once, before the read, with the same all-bad guard as reject mode. Tested: the review's reproduction (5 bad channels, Hide bad, six page steps at 360 x 480): one render per step, no height flips, no document scroll, in Chromium and WebKit; the readout reads "all 64 · 5 hidden". * Embed: overview rule without !important; review wording From the review of #422: - viewer.ts sets the overview strip's inline display to "" rather than "block" once it loads, handing display back to the stylesheet, so the embed hides it in small frames with an ordinary rule. - The degraded-pyramid note and status suffix name the zoom levels ("Some zoom levels failed to load"), not an overview that small frames no longer show. - Comments: the readout grows with the window's start, not only past 1000 s; the channel readout stays and why; the small-frame lead now lists the overview strip; the strip's annotation ticks and preload bar go with it. CHANGELOG lines match. Tested: lint, typecheck, 2989 unit tests; overview hidden at 560 px or less and back at its new width on resize, in Chromium and WebKit; the dataset page's overview still shows (display block, 1110 px). * Embed: comment and CHANGELOG nits from re-review The channel readout changes on any reader action on the channels, not only zoom and Hide bad; the pre-fix scrollbar showed in both engines.
Deploying nemar-website with
|
| Latest commit: |
07c9e68
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://875a9879.nemar-website.pages.dev |
| Branch Preview URL: | https://staging.nemar-website.pages.dev |
1 task done
* Quote ?view= in notices only when it is a name Release review of #424: the embed's and the dataset page's "no recording matches" notices quoted the raw ?view= value, so anyone writing a link (or framing the embed) could put their own sentence on a nemar.org page. displayableViewParam quotes values shaped like entity strings, filenames or BIDS paths and says "a recording" otherwise, the same guard displayableDatasetId gives the path id. Tested: recording-nav tests (90 passed), including real view values and free-text refusals. * Count embed calls with the point built in the try Release review of #424: embedCallPoint ran outside countEmbedCall's try. No input found makes it throw, but a counter must never break the response it counts, so building the point now sits inside the same catch as the write, and the log names the dataset when there is one. Tested: middleware tests (83 passed). * docs: changelog corrections from the release review - the private handoff's 501 keys on the API base, not production; - the page's own responses carry no-store/no-referrer/noindex, a cross-host redirect only no-store; - add the shared viewer session (#415) and the ?theme= cache key; - add the ?view= quoting fix. * Quote ?v= only when it is a version; review nits Re-review of #426: the embed's unknown-version note (and its log) quoted the raw ?v= value, the same echo #426 closed for ?view=. displayableVersion admits version tokens such as v1.0.1, and anything else reads "That version". displayableViewParam now trims, as parseViewSpec does, and says what it can and cannot rule out. The changelog says where #415's code moved from, and ADR 0024 and the flag comment describe the widened catch. Tested: lint, typecheck, unit tests. * test: format the displayableVersion cases
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.
Release 0.2.28. The full list is in
CHANGELOG.mdunder[0.2.28] - 2026-10-05(#423)./dataset/<id>/embedis the one route other sites may frame:frame-ancestors *and noX-Frame-Optionsthere, unchanged everywhere else (ADR 0023)./privacy#embedded-viewer, and an Embed control in the viewer dialog (Embeddable signal viewer route (phase 1 of #410) #415, Embed: link the privacy icon to its policy section #419).nemar_website_embeds. Nothing runs on the partner's page.private.nemar.org(feat: sign-in handoff page for private.nemar.org #396).main, and Add approve-publication workflow nemarDatasets/.github#124 is merged.Before merging
Testing
Prepare releasestripped the version to 0.2.28 on staging (cfe2f96).nemar_website_embeds_dev, and the HEAD and prefetch requests sent to test that they are skipped wrote none (Embed phase 2: count embed calls at the edge with Analytics Engine #412).version.jsonreports0.2.28.frame-ancestors *and noX-Frame-Options; the dataset page still sendsSAMEORIGIN.Sec-Fetch-Dest: iframeandReferer: https://smoke.invalid/, thennemar_website_embedshas asmoke.invalidrow.Rollback
Cloudflare Pages "roll back to this deployment" on the previous production deployment. The permanent fix is a revert on
stagingand a new promotion.Release review
One Sonnet reviewer read the whole
origin/main...origin/stagingdiff and probed test.nemar.org.No code blocker.
%65mbed,//,..,%2F, case variants and query or fragment tricks all fail closed toSAMEORIGIN. Cache HITs, 404s, redirects and 405s carry the right headers.The one process blocker is cleared. docs#61 is merged and live.
Fixed in #426, re-reviewed clean:
?view=and?v=values are no longer quoted back as free text on a nemar.org page. Both the dataset page notice and the embed's version note were affected.try.Noted, not changed:
private.nemar.orgdoes not resolve yet. Nothing links to the handoff page, so do not add a link until the host is live.Also today: Cloudflare Web Analytics automatic setup is off. Its beacon, always blocked by the CSP, is gone from every nemar.org host (#418).
Staging at
07c9e685, 0.2.28:frame-ancestors *; the dataset page sends'self'andX-Frame-Options.?v=reads "That version".