Repository navigation
feat(widget): add a report-issue modal with turnstile captcha - #81
Merged
Merged
Conversation
Extend EventFilters with `region: string | null` (a region slug), wired through DEFAULT_FILTERS, the ?region= URL codec, activeFilterCount, and filtersKey. Region-aware matchesFilters via an optional `matchesRegion` resolver (built by buildRegionMatcher over the ['regions'] tree) so an event matches the selected region OR any descendant — resolved through a new subtreeIds hierarchy helper. Only invoked when a region is set, so the map's hot path is unchanged. Part of #76. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Expose api.getRegions + a useRegionMatcher hook (over the cache-once ['regions'] tree) and thread the resolver into the three matchesFilters sites — getEvents, the Mapbox source filter, and the FilterView live count — so the region filter narrows the map, list, and count together. The matcher is undefined unless a region is selected, so the map's hot path is unchanged. Part of #76. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
A type-to-filter single picker built on the shared usePopover floating-ui shell (no new dependency): a field-styled trigger opens a filter input over a scrollable option list, with same-named options disambiguated by a hint line. Fills the gap between the Radix Select (no typeahead) and the Dropdown-of-checkboxes language filter — used next for the Region filter. Part of #76. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
A searchable single-select over the regions present in the feed (any level with events under it), disambiguated by a breadcrumb hint. Wired through setRegion, a removable region pill (slug resolved to its name via the region tree), and the active-filter badge. i18n label/placeholder/ search/empty added across all 10 locales. Part of #76. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
FilterView.commit hardcoded navigate('/search'), so applying filters from
the calendar (or any results view) jumped to Search. Derive the origin
from the filters path's parent and return to /calendar or /search
(preserving its query); other origins still fall back to /search to show
the filtered events.
Part of #76.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@schedule-x/{react,calendar,theme-default}@2.36.0 (MIT). Pinned to the v2
line deliberately: v3/v4 moved to Temporal and pull the ~550 KB
temporal-polyfill peer, while v2 uses plain 'YYYY-MM-DD HH:mm' strings
(matching our occurrence expansion) with only preact + @preact/signals as
peers — the lighter fit for a public embeddable bundle.
Part of #76.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
eventsToCalendarEntries expands each event's schedule.upcomingDates into one entry per occurrence in the visible window, read in the event's display zone (eventTimeZone: event zone for physical, viewer for online, UTC when firstDate_tz is null) as a Schedule-X wall-clock string. Add the getCalendarEvents fetcher — the whole filtered set (region cut applied via the shared matchesFilters, online included, no distance cap) — for the view to expand. Part of #76. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Add a `wide` Drawer variant that fills the container (minus the floating margins) instead of the ~22rem left panel, for the one full-width view. Route /calendar as a top-level view (reserved slug, StackEntry, resolveStack, TopView) with a calendarPath helper; DrawerStack drives the wide panel, opens it at the near-full snap on mobile, and hides the cog on the focused calendar. Part of #76. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The full-width month/week/schedule surface (Schedule-X), themed to our tokens via the `.sx-calendar` var overrides so it follows light/dark + accent. It suspends on the filtered source, expands to per-occurrence entries, and opens the matching EventView on click; the header mirrors SearchView (Filter + Close). Add a RegionView calendar button that opens /calendar?region=<slug>, and the calendar.title i18n across all locales. Part of #76. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- regionsQuery() factory (config/api) — folds the ['regions'] read inlined across useRegionMatcher, SearchFilters, and ActiveFilterPills, matching the clientQuery/eventQuery pattern. - filteredFeed() — shared by getEvents + getCalendarEvents so both stay on the one matchesFilters predicate instead of duplicating the prologue. - subtreeIds descends the tree (O(regions)) instead of re-walking every node's ancestry; dedup the region-options ancestry walk to distinct region ids; drop a redundant region-pill fallback. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
matchesFilters is an event-level predicate ("keep events with SOME
matching occurrence"), so a recurring event that survives it was showing
ALL its occurrences on the calendar — a "Mondays only" filter still
rendered its Tue–Sun occurrences. Extract the per-occurrence half of
matchesFilters (occurrenceMatchesFilters + dateFloor) and apply it in
eventsToCalendarEntries, so each occurrence is trimmed to the day/time/
date cut — the calendar's entries now agree with what the filter promises.
Also fall back to a default span for a zero-length (endTime == start)
occurrence so it stays visible in the week/day views.
Per /code-review.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Drop the ^ range on the three @schedule-x packages so a future patch can't auto-flow into the public bundle on install (per /security-review). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- CLAUDE.md file layout: SearchableSelect atom + Calendar view. - components.md / DESIGN_SYSTEM.md: SearchableSelect in the atoms list + table. - data-layer.md: getCalendarEvents + getRegions (regionsQuery factory). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Reconcile with #74 (UI bug sweep), which landed on main after this branch forked. Key reconciliation: #74 replaced the time-of-day filter's [number,number] hour range with named TimePeriod[] — threaded through the extracted occurrenceMatchesFilters (so the calendar shares the same period cut). Also merged both header buttons (Calendar + Search) and #74's NearbySuggestion→GeolocationSuggestion rename, both atoms (RadioGroup + SearchableSelect), and both sets of i18n keys. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Reconcile with #77 (filters → list toolbar + sort selector), which landed on main after the previous merge. Source files (shared.tsx FilterButton toolbar refactor, the new sort module) auto-merged cleanly; only the 10 locale files conflicted (both append a top-level object — my `calendar` vs #77's `sort`), resolved to keep both. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Schedule-X validates its `locale` config against a fixed BCP-47 set and throws InvalidLocaleError on our short codes (`en`, `de`, …), crashing the calendar on first render (the CalendarView story too). Map our 10 locales to the closest supported code (Hungarian → en-US, which SX 2.36 lacks); our own header title stays localized via i18n. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
computeDayBoundaries sets Schedule-X's visible hours: to the selected time-of-day period(s) when a time filter is active (a night span wraps midnight, start > end), otherwise to 1h either side of the earliest/latest occurrence in the filtered set. Undefined leaves the default whole-day grid. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Per feedback: the region filter is now a Select dropdown that only lets you choose from the CMS regions present in the feed — no free-text input (which read like an address search) — and sits last in the filter form. Removes the now-unused SearchableSelect atom + its dead region.search/ region.empty i18n keys and doc entries. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Opening filters from the full-width calendar (map mode) now slides a separate modal drawer OVER the still-mounted calendar — from the right at ≥md, a bottom sheet on mobile — instead of replacing it with the narrow filter panel + a calendar peek. DrawerStack peels the trailing `filters` entry off the base stack when it sits over the calendar, keeps the calendar as the base view (stable AnimatePresence key on the base path), and renders FilterView in its own right/bottom modal drawer with a dedicated control that dismisses to /calendar. Because the calendar now stays mounted across open/apply, CalendarView splits its grid into a CalendarGrid keyed by the applied filters (+ a local Suspense for the header): opening the overlay leaves the grid untouched; applying remounts it with fresh events + dayBoundaries. Map-less keeps the plain replace-stack behaviour. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ters - Calendar opens on the month view by default (defaultView). - Revert the calendar's Filter button to the labelled "Filter" (not icon-only). - Format + Frequency toggles drop the "Any" option — a single-select toggle is left unselected for "any", and the group's "Clear" resets it. - Hide the "Any time" hint under the time-of-day filter when nothing is selected. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…chable Select Give the form atoms a `highlight` prop that primary-tints an active/used field: Select/Input/Textarea via the shared `fieldChrome` recipe, and Slider/Checkbox/ToggleGroup/RadioGroup via a tinted ring wrapper. New Input and Textarea atoms wrap the native controls on `fieldChrome` (replacing the hand-rolled date `<input>` in the filters). Select gains `searchable` — a type-to-filter box over its items. RadioGroup's selected card now fills like a selected ToggleGroup item so the choice is unmistakable. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…emos Move the form-control stories (Checkbox, Select, Slider, ToggleGroup, RadioGroup) under an "Atoms / Inputs" section, add stories for the new Input and Textarea atoms, and give each a `highlight` (and Select a searchable) demo so the new affordances are visible in Ladle. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Wire each FilterView control's `highlight` to whether it's set (format, frequency, days, time, dates, language, region), so an active filter reads as a primary-tinted field. Migrate the date bounds to the Input atom and make the region picker a searchable Select (new `filters.region.search`/`.empty` strings across all locales). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Applying a filter (the grid is keyed by the filters, so it remounts) or opening an event and coming back reset Schedule-X to the month grid on today. Persist the current view + focused date in a non-reactive `useCalendarPosition` store — date via the `onSelectedDateUpdate` callback, view via a subscription to SX's internal view signal (no public callback in 2.36) — and seed `defaultView`/`selectedDate` from it at mount, so the calendar returns to where the user left it. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Rework the `highlight` prop on RadioGroup, ToggleGroup, Slider and Checkbox to primary-colour the component's own unselected/indeterminate elements — the unchecked radio cards, the unselected toggle items, the slider's unfilled track + thumb, the unchecked switch track / checkbox box — instead of wrapping the control in a tinted, padded box. It's a colour change only, so an active field stands out without ever shifting the layout. The selected elements keep their solid primary fill. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Event titles are often long and repetitive on a calendar. Label each entry with the event's parent region name instead — or, when the calendar is already scoped to a region (so every entry shares it), the locality from the address. Falls through region → locality → title so an entry is never blank. The label sources (`regionName`, `locality`) are carried on the calendar source event. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The CalendarGrid remounts on a filter change (to refresh events + dayBoundaries), which replayed Schedule-X's per-event "grow in" animation on every entry — a distracting reanimation on each apply. Suppress `sx-grow-event` on the event elements across the views; the month-page/week slide transitions stay intact. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Online programs now render in the secondary colour ramp (a new `online` Schedule-X calendar; entries carry `calendarId: 'online'`) so they stand out from in-person events on the grid, and their label prepends the translated "Online" term to the place (e.g. "Online · London", or just "Online" when the program carries no place). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The calendar fills the widget at full width for the month/week grids, but its list (agenda) view is a single narrow column that reads better at the regular ~22rem panel width. Mirror the live Schedule-X view into useCalendarPosition and read it reactively in DrawerStack, so switching month↔list resizes the drawer (date changes stay render-free via getState). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- DrawerStack: route the filter overlay's dismiss through the shared `dismissAction` helper instead of an inline depth branch - calendar `placeOf`: drop the unreachable fallback term - Select: memoize the flattened option list so typing doesn't re-flatten it - atoms: drop the redundant empty `false` slots on the `highlight` variants Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…ilter box Default the filter input's `aria-label` to the Select's own `aria-label` when `searchPlaceholder` is omitted, so a `searchable` Select can never ship an unlabelled combobox input (per /code-review). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- CLAUDE.md: add the Schedule-X calendar row + the calendar-position store - i18n-and-state rule: Three → Four stores (document useCalendarPosition) - components rule + DESIGN_SYSTEM: add the Input/Textarea atoms, the searchable Select, and the `highlight` (unselected-state tint) convention Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
A viewer can now tell us something is wrong — a stale venue address, a class that no longer runs, or a crash sitting behind ErrorFallback. - Modal atom over @radix-ui/react-dialog, portaling through overlayContainer() so an embedded modal keeps the brand theme. Deliberately outside the URL-driven drawer stack: opening/closing never touches the URL or history. - ReportIssueForm (react-hook-form + zodResolver over the new ReportSchema), with the auto-attached context — widget path, host page, locale, client, user agent, and the thrown message — built by the pure buildReportContext(). - useTurnstile: lazily injects Cloudflare's explicit-render script, renders the challenge with the active theme + language, and removes it on close. When the script is blocked (a host page's CSP may omit challenges.cloudflare.com), the form swaps the dead submit for a mailto route instead. - Three entry points: a settings-menu row, and a CTA on both ErrorFallback and DrawerErrorFallback. The host is mounted OUTSIDE App's ErrorBoundary, so the error CTAs still open it while the boundary is rendering. - Submit stops at the network boundary — it alerts the payload behind a TODO(#80) — so the follow-up only has to swap in the mutation. - common.report.* added across all 10 locales, not en-only. Refs #79 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…tore - Ladle stories: the Modal atom (with and without a description) and the report form's four states — live, validation errors, captcha blocked, thank-you — plus a section opening the real modal, so the portal chrome is previewable too. - Unit specs (node lane) for the form's SSR markup: the required/optional field split, submit disabled with no message or token, the captcha-blocked mailto degradation, and the thank-you state replacing the form. - Sync the docs the change makes stale: the Modal atom in DESIGN_SYSTEM + the components rule, `useReportModal` as the fifth store in the i18n-and-state rule, and VITE_TURNSTILE_SITE_KEY in environment.md + CLAUDE.md. Refs #79 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Extract the duplicated label + control + error shell into a shared FormField molecule, used by both the registration and report forms. `fieldErrorId` now defines the aria-describedby id convention once, instead of RegistrationForm's helper and three hardcoded strings in ReportIssueForm. - Add `errorMessage()` beside buildReportContext and route both error fallbacks through it. They narrowed the thrown value differently, so the same non-Error throw showed real text in one and a generic line in the other — and reports carried whichever the local copy happened to produce. - Build the report context only while the modal is open. The host is mounted for the app's whole life and reads useLocation(), so it re-renders on every navigation/filter/sort change; JSX children are evaluated arguments, so the context was being built and discarded on each. - Lazy-load ReportIssueModal (its own chunk + Suspense fence), matching the PreviewController pattern in the same file, and drop it from the organisms barrel per the barrel's existing code-split note. The eager import had pulled react-hook-form into the main chunk: App is 31 kB smaller gzipped (256 → 225). Refs #79 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Capture the host page as origin + path, not `location.href`. We embed on sites we don't control and a report is emailed onward (#80), so a host's own `?reset_token=` or `#access_token=` would have landed in admin mailboxes and logs. Nothing diagnostic is lost — the in-widget route travels as `path`. - `errorMessage()` can no longer throw. `String(x)` is not total: a null-prototype object, or one with a throwing `toString`, raises a TypeError — and both callers render inside an error boundary's own fallback, where that is unrecoverable. - Give the lazy ReportIssueModal its own ErrorBoundary. It sits outside the app's by design, and Suspense catches suspension but not errors, so a chunk that 404s (a host holding a cached entry chunk across a redeploy) would have unmounted the whole widget — the reporting affordance taking down the app it reports on. - Turnstile: treat a loaded-but-absent API (a content blocker answering 200 with a stub) and a `render()` that returns no widget id (an unregistered domain) as blocked. Both previously stranded `status` on 'loading', leaving a permanently disabled submit and no mailto escape — a dead form exactly where it's needed. - Cap `context.error` at 500 chars (a zod parse failure serializes to KBs) and set `referrerPolicy` on the injected script. - Document the two CSP directives embedding hosts need, in README + demo.html. Refs #79 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Revert the lazy-loading of ReportIssueModal. My earlier claim that it saved 31 kB was wrong — that compared one chunk across a re-chunking, not the eager graph. Measured properly (entry + every modulepreload, gzipped), splitting it costs 468.1 kB vs 467.5 kB static and four extra requests: it renders at mount so the chunk is fetched immediately anyway, and react-hook-form/zod are already eager via the registration form. Its own ErrorBoundary stays — that guards render throws, which was the real substance of the finding. - Turnstile `error-callback` no longer latches `blocked` forever. Cloudflare's `retry` defaults to `auto`, so a transient failure is followed by a retry that solves — leaving the user holding a valid token while the UI still showed only the mailto escape. - A too-long message said "write at least 10 characters", the opposite of the problem. The textarea now hard-stops at the schema ceiling and the error branches on `too_big` (new `report.errors.message_max` key, all 10 locales). - FormField's help text is now addressable (`fieldHelpId`) and wired through `fieldDescribedBy`, so the "optional — we can only reply if you fill this in" caveat is announced rather than only seen; the message field gets `aria-required`. - Focus returns to the control that opened the modal. The settings menu unmounts its item before the dialog mounts, so Radix's own target was <body> — closing dropped a keyboard user at the top of the host page. - ErrorFallback reads i18n with `useSuspense: false`: it can render before any locale JSON has loaded, and suspending there showed nothing at all. - errorMessage: guard a throwing `message` getter too, and stop surfacing "[object Object]" as if it were a message. - Remove a dead <script> tag on load failure instead of accumulating one per reopen on a CSP-blocking host; trim `email` before validating. - Translate `error.generic` / `error.retry`, which were en-only and sit right beside the new report CTA. Refs #79 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
# Conflicts: # .claude/rules/components.md # .claude/rules/i18n-and-state.md # CLAUDE.md # DESIGN_SYSTEM.md # package.json # pnpm-lock.yaml # public/locales/cs/common.json # public/locales/de/common.json # public/locales/en/common.json # public/locales/es/common.json # public/locales/fr/common.json # public/locales/hu/common.json # public/locales/nl/common.json # public/locales/pt-BR/common.json # public/locales/ru/common.json # public/locales/uk/common.json # src/components/atoms/Checkbox/Checkbox.stories.tsx # src/components/atoms/Checkbox/Checkbox.tsx # src/components/atoms/Input/Input.stories.tsx # src/components/atoms/Input/Input.tsx # src/components/atoms/RadioGroup/RadioGroup.stories.tsx # src/components/atoms/RadioGroup/RadioGroup.tsx # src/components/atoms/Select/Select.stories.tsx # src/components/atoms/Select/Select.tsx # src/components/atoms/Slider/Slider.stories.tsx # src/components/atoms/Slider/Slider.tsx # src/components/atoms/Textarea/Textarea.stories.tsx # src/components/atoms/Textarea/Textarea.tsx # src/components/atoms/ToggleGroup/ToggleGroup.stories.tsx # src/components/atoms/ToggleGroup/ToggleGroup.tsx # src/components/molecules/SearchFilters/SearchFilters.tsx # src/config/store.ts # src/lib/shape/calendar.test.ts # src/lib/shape/calendar.ts # src/styles/globals.css # src/views/CalendarView/CalendarView.stories.tsx # src/views/CalendarView/CalendarView.tsx # src/views/DrawerStack/DrawerStack.tsx # src/views/FilterView/FilterView.tsx
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.
Summary
ErrorFallback— from a Report an issue modal reachable from the settings cog and from both error states, protected by a Cloudflare Turnstile captcha.window.alert()behind aTODO(#80); SahajCloud's sharedPOST /api/contact-adminlands in feat(api): add a captcha-gated contact-admin endpoint SahajCloud#602 and is wired up in feat(widget): submit issue reports to the SahajCloud endpoint #80, so the follow-up only has to swap in the mutation.Note
Stacked on #78 (
feat/calendar-view), which owns theInput/Textareaatoms and the sharedfieldChromerecipe this form is built on. Base isfeat/calendar-view; GitHub will retarget this tomainonce #78 merges. Review only the commits on this branch.Changes
src/components/atoms/Modal/— new atom over@radix-ui/react-dialog, portalling throughoverlayContainer()so an embedded modal keeps the brand theme. Deliberately not part of the URL-driven drawer stack: it never appears in the URL and opening/closing neither pushes nor pops history.src/hooks/use-turnstile.ts— lazily injects Cloudflare's explicit-render script (one shared in-flight promise), renders the challenge with the active theme + language, and removes the widget on close. On failure it reportsblockedand the form swaps the dead submit for amailto:route.src/components/organisms/ReportIssueForm/— the form (react-hook-form+zodResolverover the newReportSchema) plus theReportIssueModalhost. The host resolves the context and the form stays presentational, so it renders in a story and in the node test lane without a Router or query client.src/components/molecules/FormField/— the label + control + help/error shell, extracted fromRegistrationFormnow that it has a second caller.fieldErrorIddefines thearia-describedbyid convention once instead of one helper plus three hardcoded strings.src/App.tsx— the host is mounted outside<ErrorBoundary>, so the error CTAs still open it while the boundary is rendering. That placement means nothing above would catch a throw from it, so it carries its own boundary that degrades to nothing.public/locales/*/common.json—common.report.*(13 keys) added across all 10 locales, not en-only.Verification
pnpm lint)pnpm typecheck)pnpm test:run) — 431 testspnpm build) +pnpm ladle:buildNew specs cover
ReportSchema's boundary cases,buildReportContext(),errorMessage(), and the form's SSR markup (required/optional split, submit disabled without a message or token, the captcha-blockedmailto:degradation, the thank-you state).Manual / visual verification
Driven in the running widget (Playwright), against the acceptance criteria the node-only unit lane can't reach:
?map=0; also checked under a forceddir="rtl"(still centred, in-viewport, footer at the logical end).location.hrefandhistory.lengthare identical before opening, while open, and after Esc; the drawer stack behind it stays open. Esc / backdrop / Cancel all close it, and the Turnstile widget is torn down with the content (0 widgets left after close).aria-describedby/aria-invalid.DrawerErrorFallback(a 404'd event id) and the app-levelErrorFallback(forced with a bad?key=); the thrown message arrives in the report context aserror, and the modal still opens while the boundary is rendering.challenges.cloudflare.comaborted at the network layer (simulating a host CSP that omits it), the form drops the submit button and shows the notice + themailto:[email protected]link.Notes for reviewer
VITE_TURNSTILE_SITE_KEYbelongs in.env. The committed value is Cloudflare's always-passes test key1x00000000000000000000AA; production overrides it in the Cloudflare Pages environment. With the key unset the form degrades to themailto:fallback.@marsidev/react-turnstile— it's a script tag and one render call, and this bundle ships on host pages we don't control.react-hook-form/zodare already in the eager graph via the registration form. Splitting it measured 468.1 kB gz across the first paint vs 467.5 kB static, for four extra requests — so it's a plain import.errorMessage()now backs both fallbacks. They previously narrowed the thrown value differently, so the same non-Errorthrow showed real text in one and a generic line in the other — and a report carried whichever copy produced it.initialValueson the form exists so the Ladle "validation errors" story can show that state statically (the ticket asks for it); it's flagged in the props as such, alongside the existinginitialSubmittedprecedent fromRegistrationForm.error.generic/error.retrywere en-only and sit right beside the new report CTA, so they're translated here too.Two things to settle before #80
mailto:route. That doesn't block this ticket — the degradation is deliberate and tested — but it may change the captcha approach before the endpoint is wired.alert()and tell viewers their report was delivered. Landing feat(widget): submit issue reports to the SahajCloud endpoint #80 first avoids that.Closes #79
🤖 Generated with Claude Code