Repository navigation
feat: integrate open feature PRs behind feature flags - #84
ccruzkauppila wants to merge 193 commits into
Conversation
The constrained_name domain and the registration form both rejected any whitespace in names, to stop people registering with a blank name. That also blocked real names like "Anna Maria" or "von Wright". Now only names that are empty or whitespace-only are rejected, the form trims surrounding spaces before submitting, and the name prefill from the user profile keeps every word instead of dropping the third one onwards. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126Kq6TYvUgHFmDYaQL7hp7
CI dumps data/schema.sql from committed migrations, so changes in migrations/current must not be reflected there until they are committed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126Kq6TYvUgHFmDYaQL7hp7
… a global materialized view Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xhaustion Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…second Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A production-like stack (Postgres with wal_level=replica and 10 slots for ilmo roles, server pinned to two cores) driven by k6 bots that load the event page, claim at opening and submit after filling the form. A checker reports failures, latencies, connection usage and ordering fairness. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The queue promotion trigger read positions without waiting for in-flight recomputes, so a claim committing between its read and the delete's recompute could be promoted out of the queue without an email. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Account names are a single field, so a name like "Anna Maria von Wright" can't be split into first and last name reliably. Leave both fields empty for names of three or more words instead of guessing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126Kq6TYvUgHFmDYaQL7hp7
paymentsEnabled() is the single switch for Stripe payments
(PAYMENTS_ENABLED=1 plus STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET).
Fee helpers work in integer cents: totalChargeCents, guildReceivesCents
(halves round up, computed without float drift), isValidTicketPriceCents
and formatEuro ("18,00 €" in every language). Adds a jest project for
@app/lib with unit tests, and the stripe package (v23) to @app/server
and @app/worker.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RKSTTfRBbDMSCoT7Y56nnd
PaymentsPlugin adds Query.paymentsEnabled (mirroring ssoLoginEnabled) and SharedLayout_Query fetches it so every page knows whether payment UI exists. utils/stripe.ts builds the Stripe client on first use and throws while payments are disabled. The server logs "payments disabled" at startup when the flag is off, and the setup script prompts for the three env vars next to the Keycloak ones (.env.ci gets commented placeholders). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKSTTfRBbDMSCoT7Y56nnd
…th them Keycloak's ID token carries the standard given_name and family_name claims, but only the combined name was kept, so the registration form had to guess where a multi-word first name ends. Store both on the user at every Keycloak login and prefill the form from them, falling back to the two-word split for accounts that have never logged in with Keycloak. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126Kq6TYvUgHFmDYaQL7hp7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pnpm setup only runs committed migrations, so the e2e database lacked the new users.first_name/last_name columns from migrations/current and the registration page's query failed. Unit tests already run the current migrations against their database; do the same for e2e. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126Kq6TYvUgHFmDYaQL7hp7
…oving The questions tab renders each row's type and options from a snapshot of the form values taken when the tab renders. Form.List's move and remove only re-render the list, so rows kept the type and options of the question previously at that index. Force a re-render after both, as the other structural edits in the tab already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Record unexpected websocket closes and script exceptions per bot, keep k6's exit code, surface sampler errors, and have the checker flag runs with missing bots, no connection samples or a failed k6 as untrustworthy. Use a neutral default image tag and complete the README tables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Queue positions are numbered per event, so when the queue head belongs to another quota the first queued registration of the freed quota has a position above 1 and got promoted without an email. Pick the lowest queue position of the quota instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nce view Add a two-connection test for promotion racing a concurrent claim, and a guard that compares the maintained positions table with the materialized view definition of 000002 after inserts, deletes, quota and open quota size changes and an event delete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/mcp is an OAuth-protected Streamable HTTP endpoint. MCP clients sign in with Prodeko accounts against Keycloak (client ilmo-mcp); each verified access token maps to an app_private.sessions row of kind mcp, so RLS, ownership and the existing GraphQL plugins apply exactly as on the web. Tools: list_events, get_event and register_to_event, which validates answers before claiming a spot and rolls the claim back if registration fails. A dev realm with both clients is available via `docker compose --profile keycloak up -d`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Users behind a shared IP (an MCP client, the same wifi) no longer share one limit, and a fresh SSO session cannot reset it. Anonymous requests are still limited by IP. The worker now receives the exact key to delete so the key format lives in one place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Schedule the window's timer before publishing and catch both synchronous throws and rejected promises from publish, logging them with the source topic, so a failing publish cannot leave the window open for good. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Errors without a code, such as pg-pool acquire timeouts on the websocket path, were only returned to the client. Log them with console.error; errors that carry a SQLSTATE or application code and errors of the GraphQL request itself stay unlogged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The worker's start scripts expand it in the shell before .env is loaded. Pass --max-pool-size in the worker's dev script as in its start script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds current/5-payments-schema.sql (idempotent): - Types payment_mode, payment_method, payment_status, registration_payment_status and event_payment_summary. - events.payment_mode (default NONE), send_unpaid_email_on_close (forced on in AFTER_REGISTRATION mode by a check constraint and by create_event/update_event), unpaid_close_email_sent_at, last_payment_reminder_sent_at; quotas.price_cents (0 or >= 25); registrations.price_cents (price snapshot, null = no payment). - event_input and the create/update_event_quotas types gain the new fields; create_event, update_event, create_event_quotas and update_event_quotas (built on current/2-*) write them. Null fields keep existing values, and the original statements are kept as they were so events without payment settings are handled exactly as before. - Switching an event from NONE to a paid mode backfills price_cents on finished registrations in paid quotas (app_hidden helper, since update_event runs as the visitor). - A before trigger snapshots the quota price when a registration of a paid event is finished, so create_registration itself is unchanged and the confirmation email still fires once. - app_public.payments (rows survive registration/event/quota deletion via on delete set null, one PAID row per registration via a partial unique index, select-only RLS for admins and event organization members, no write grants) and app_private.stripe_events for webhook idempotency. - registrations_payment_status and events_payment_summary computed columns, null unless the user may manage the event's payments. - admin_mark_registration_paid / admin_unmark_registration_paid, admin_send_payment_reminders, and refund jobs (payment__refund) queued by admin_delete_registration(id, refund default true) and delete_registration for paid Stripe payments. The new composite field breaks positional row() casts, so the existing update_event_quotas test passes a price, and the adminDeleteRegistration error snapshots now show the (uuid,boolean) signature. data/schema.graphql is re-exported; data/schema.sql only holds committed migrations and is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKSTTfRBbDMSCoT7Y56nnd
The description editor reuses one Slate editor for every language and only swaps editor.children on switch. The cursor, pending marks and undo history still pointed into the previous language's document, so a cursor past the end of the new document crashed the editor and lost the text, and undo replayed the other language's edits. Clear them on switch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e tokens Users imported with an explicit realmRoles list do not receive default-roles-ilmo-dev, which carries offline_access; Claude Code requests that scope and the code exchange was refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The per-event recompute compares statuses before and after and enqueues the spot-from-queue email for each finished registration that leaves IN_QUEUE. This covers open quota refills and quota or open quota size increases, which the delete trigger's lookup could not see, so that trigger is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lendar The event form renders before the page query brings the feature flags, so the templates spec could pick the scroll time picker and alias four tabs. It now waits for the preview tab (five tabs) first. The registration spec checked the event URL in the downloaded .ics text, where lines longer than 75 octets are folded; with a long event slug the URL spanned two lines. It now unfolds the text before checking. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
The payment code referred to numbered design boards that are not part of the repository. The comments now say what the code does without them. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
Migration 000008 replaces the constrained_name check, which accepted an empty string, with one that requires a non-whitespace character. On a database that stores a blank first or last name, adding the new check fails and aborts the migration. The migration now first sets blank names (empty or only whitespace) to null in app_public.registrations, the only table with constrained_name columns. Both columns are nullable and null already means that no name was given: claimRegistrationToken creates registrations without names, and registrations_full_name is null then. The update runs with the table's user triggers disabled, so it queues no confirmation emails and keeps updated_at and updated_by. A new db test builds a scratch database from migrations 000001-000007, stores registrations with blank names and applies the remaining migrations with graphile-migrate; it fails on the previous 000008. The committed migrations 000008-000017 have not been published yet, so 000008 is edited in place and the graphile-migrate hash chain of 000008-000017 (each file's Hash and the next file's Previous) is recomputed with graphile-migrate's own calculateHash. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
The reminder and payment docs and comments still named files under
migrations/current/ that are now committed migrations:
- 000016 says it builds on committed/000010-add-ribbon-text-to-events.sql
instead of current/30-event-ribbon-text.sql. 000016 and 000017 are not
published yet; their Hash and Previous headers are recomputed.
- docs/reminder-release.md becomes docs/reminder-operations.md ("Running
registration reminders in production"), names 000013 and 000014, and
describes the production setup and checks without release wording.
- The reminder docs and the Telegram reply task no longer describe
possible later versions or earlier deployments of the feature.
- docs/keycloak-sso.md: the developer role is for the people who deploy
and operate ilmo.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
update_event_questions wrote the given prefill on every update, so an API caller that does not send prefill cleared the stored marking. It now follows the update rule of update_event: an omitted (null) prefill keeps the stored value. To clear it, the caller sends the new input value NONE; a type other than TEXT also clears it, because only TEXT answers can be prefilled. NONE is never stored (create_event_questions stores it as null, and a check rejects it in event_questions.prefill), and the enum comment documents it in the GraphQL schema. The event form always sends prefill, NONE for a question without one, and does not offer NONE as a choice. Migration 000017 is not published yet, so it is edited in place and its Hash header recomputed. data/schema.sql and data/schema.graphql are regenerated; codegen output is unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
Payment comments referred to sections of a product requirements document that is not in the repository. They now state the rule itself. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
ribbon_text, typed_time_input, event_templates and form_preview had no test for either state. The event form and event card now render on the server with each flag off and on: the card shows the event's own ribbon text only with ribbon_text, and the form adds the typed time picker, the template selectors and the preview tab only with their flags. The render mocks the modules a node test cannot load (ESM-only packages, an image import, the Next router, the drag and drop backend). The typed picker renders the same input as the scroll column picker until the calendar opens, so the test replaces it with a marker. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
The event form rendered while the page query was still loading, with every feature read as off, and then swapped in the typed time picker, the template selectors and the preview tab once the flags arrived. The form now waits for the flags (a skeleton until then): the flag context tells whether they have loaded (useFeatureFlagsLoaded). The templates spec no longer waits for the fifth tab before using the tabs, since the form now appears with its final tabs. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
With registration_reminders off, the reminder settings page answered 404, so a user could neither remove a reminder nor disconnect a linked Telegram account, although both always work in the database. While the flag is off, the page now shows a notice and only the ways out: the user's reminders with their remove buttons and the Telegram connection with Disconnect. Preferences, enabling and linking are not offered. The page stays in this mode after the last item is removed, and is still not found for a user who has nothing to remove. The reminders e2e spec removes a reminder with the flag off. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
…eview mcp_server only serves MCP clients at /mcp, outside any admin's browser session, so Admins only behaves exactly like Off for it. A registry entry can now say so with `adminPreview: false` (set for mcp_server). The Features page then disables the Admins only choice for that flag, says why next to the control (en, fi, se), and the turn-on confirmation no longer suggests a preview first. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
📦 Next.js Bundle Analysis for @app/clientThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
| Page | Size (compressed) |
|---|---|
global |
271.57 KB (🟡 +5.56 KB) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
New Pages Added
The following pages were added to the bundle from the code in this PR:
| Page | Size (compressed) | First Load | % of Budget (450 KB) |
|---|---|---|---|
/admin/features |
374.64 KB |
646.2 KB | 143.60% |
/pay/[updateToken] |
248.58 KB |
520.14 KB | 115.59% |
/settings/reminders |
303.41 KB |
574.98 KB | 127.77% |
Twenty-six Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
| Page | Size (compressed) | First Load | % of Budget (450 KB) |
|---|---|---|---|
/ |
347.97 KB |
619.54 KB | 137.68% (🟡 +0.82%) |
/404 |
227.34 KB |
498.91 KB | 110.87% (🟡 +1.26%) |
/_error |
232.27 KB |
503.84 KB | 111.96% (🟡 +1.26%) |
/admin/emails |
257.4 KB |
528.96 KB | 117.55% (🟡 +1.49%) |
/admin/event-category/create |
287.28 KB |
558.84 KB | 124.19% (🟡 +1.02%) |
/admin/event-category/list |
340.16 KB |
611.73 KB | 135.94% (🟡 +1.30%) |
/admin/event-category/update/[id] |
287.45 KB |
559.02 KB | 124.23% (🟡 +1.02%) |
/admin/event/create |
546.3 KB |
817.87 KB | 181.75% (🟡 +5.58%) |
/admin/event/list |
347.29 KB |
618.85 KB | 137.52% (🟡 +1.13%) |
/admin/event/update/[id] |
546.43 KB |
818 KB | 181.78% (🟡 +5.50%) |
/admin/organization/[slug] |
314.91 KB |
586.48 KB | 130.33% (🟡 +0.93%) |
/admin/organization/create |
263.28 KB |
534.85 KB | 118.86% (🟡 +0.83%) |
/admin/users/list |
342.88 KB |
614.45 KB | 136.54% (🟡 +1.85%) |
/event/[slug] |
402.75 KB |
674.32 KB | 149.85% (🟡 +7.95%) |
/event/[slug]/register/[quotaId] |
309.3 KB |
580.87 KB | 129.08% (🟡 +4.87%) |
/forgot |
244.75 KB |
516.32 KB | 114.74% (🟡 +1.17%) |
/invitations/accept |
228.81 KB |
500.38 KB | 111.20% (🟡 +1.23%) |
/login |
258.43 KB |
530 KB | 117.78% (🟡 +1.18%) |
/reset |
250.8 KB |
522.37 KB | 116.08% (🟡 +1.15%) |
/settings/accounts |
314.31 KB |
585.88 KB | 130.19% (🟡 +1.24%) |
/settings/delete |
248.74 KB |
520.31 KB | 115.62% (🟡 +1.23%) |
/settings/emails |
292.98 KB |
564.54 KB | 125.45% (🟡 +1.37%) |
/settings/profile |
256.83 KB |
528.4 KB | 117.42% (🟡 +1.80%) |
/settings/security |
261.44 KB |
533.01 KB | 118.45% (🟡 +1.32%) |
/update-registration/[updateToken] |
270.21 KB |
541.78 KB | 120.39% (🟡 +4.81%) |
/verify |
227.75 KB |
499.31 KB | 110.96% (🟡 +1.24%) |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.
The event page now loads the event with a query instead of a subscription, so the event can arrive before the shared query. The page then read currentUser from undefined data and crashed when opened directly. It now shows the spinner until both queries have data. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
…tten The update page hands the form a new initialValues object whenever the normalized cache writes the event again, for example when another query on the page loads the same event. The form then reset its fields and dropped edits made right after it opened, such as a payment mode choice. It now resets only when the initial values actually change. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
The event page now loads the event over HTTP, so a tampered csrfToken fails on opening the page rather than on the registration page. The spec checks the error there, then refreshes and continues to the registration form as before. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
📦 Next.js Bundle Analysis for @app/clientThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
| Page | Size (compressed) |
|---|---|
global |
271.57 KB (🟡 +5.56 KB) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
New Pages Added
The following pages were added to the bundle from the code in this PR:
| Page | Size (compressed) | First Load | % of Budget (450 KB) |
|---|---|---|---|
/admin/features |
374.64 KB |
646.2 KB | 143.60% |
/pay/[updateToken] |
248.58 KB |
520.14 KB | 115.59% |
/settings/reminders |
303.41 KB |
574.98 KB | 127.77% |
Twenty-six Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
| Page | Size (compressed) | First Load | % of Budget (450 KB) |
|---|---|---|---|
/ |
347.97 KB |
619.54 KB | 137.68% (🟡 +0.82%) |
/404 |
227.34 KB |
498.91 KB | 110.87% (🟡 +1.26%) |
/_error |
232.27 KB |
503.84 KB | 111.96% (🟡 +1.26%) |
/admin/emails |
257.4 KB |
528.96 KB | 117.55% (🟡 +1.49%) |
/admin/event-category/create |
287.28 KB |
558.84 KB | 124.19% (🟡 +1.02%) |
/admin/event-category/list |
340.16 KB |
611.73 KB | 135.94% (🟡 +1.30%) |
/admin/event-category/update/[id] |
287.45 KB |
559.02 KB | 124.23% (🟡 +1.02%) |
/admin/event/create |
546.33 KB |
817.89 KB | 181.75% (🟡 +5.59%) |
/admin/event/list |
347.29 KB |
618.85 KB | 137.52% (🟡 +1.13%) |
/admin/event/update/[id] |
546.45 KB |
818.02 KB | 181.78% (🟡 +5.51%) |
/admin/organization/[slug] |
314.91 KB |
586.48 KB | 130.33% (🟡 +0.93%) |
/admin/organization/create |
263.28 KB |
534.85 KB | 118.86% (🟡 +0.83%) |
/admin/users/list |
342.88 KB |
614.45 KB | 136.54% (🟡 +1.85%) |
/event/[slug] |
402.79 KB |
674.35 KB | 149.86% (🟡 +7.95%) |
/event/[slug]/register/[quotaId] |
309.3 KB |
580.87 KB | 129.08% (🟡 +4.87%) |
/forgot |
244.75 KB |
516.32 KB | 114.74% (🟡 +1.17%) |
/invitations/accept |
228.81 KB |
500.38 KB | 111.20% (🟡 +1.23%) |
/login |
258.43 KB |
530 KB | 117.78% (🟡 +1.18%) |
/reset |
250.8 KB |
522.37 KB | 116.08% (🟡 +1.15%) |
/settings/accounts |
314.31 KB |
585.88 KB | 130.19% (🟡 +1.24%) |
/settings/delete |
248.74 KB |
520.31 KB | 115.62% (🟡 +1.23%) |
/settings/emails |
292.98 KB |
564.54 KB | 125.45% (🟡 +1.37%) |
/settings/profile |
256.83 KB |
528.4 KB | 117.42% (🟡 +1.80%) |
/settings/security |
261.44 KB |
533.01 KB | 118.45% (🟡 +1.32%) |
/update-registration/[updateToken] |
270.21 KB |
541.78 KB | 120.39% (🟡 +4.81%) |
/verify |
227.75 KB |
499.31 KB | 110.96% (🟡 +1.24%) |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.
Rewrite the payments migration around two rules: a registrant pays only after registration has closed, and nothing is ever refunded. - An event is paid when one of its quotas has a price; drop the payment mode, the close email setting and the per-registration price snapshot. - A PAID payment keeps a registration paid whatever its quota costs now. - Drop the refund trigger, refund settings and early refund table, and restore the original delete functions. - Clear unpaid_close_email_sent_at when registration_end_time moves later, so that the close email goes out again at the new close. - Count card payments not linked to a registration in the payment summary, for manual refunds in Stripe. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
…funds - Pay (Checkout) is blocked with PAYMENT_NOT_OPEN while registration is open, for every paid event and again when registration is reopened. - Checkout charges the quota price at checkout time. - The webhook handles checkout.session.completed and .expired only. A payment that can't be applied to its registration (deleted, second payment, amount mismatch) is kept as a detached PAID row and logged; nothing is refunded. - Remove the refund fields, PAYMENT_REFUNDED and paymentMode from the GraphQL API and the refund variables from the email previews. - Add a closeEventRegistration Cypress server command. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
- Remove the payment__refund and payment__send_refund_email tasks, the refund email and the worker's Stripe client; the worker no longer depends on stripe. - The GDPR registration cleanup is back to a plain delete. - Payment emails use the quota's current price, include the payment link only once registration has closed, and the confirmation no longer has a paid variant. - The close-of-registration email goes out for every paid event, again after a reopened registration closes. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
Update the client documents to the simplified payments schema: the payment summary reads the count of card payments not linked to a registration, and the queue status query of the registration form is gone. Regenerate the persisted operations. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
quotaRequiresPayment depends on the flag and the quota price only, the registration form has a single payment notice instead of variants, the pay page has no refunded state and cancelRefund is gone. The CSV price column shows the quota price. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
Remove the per-event payment settings from the event form; an event is paid when one of its quotas has a price. The registration form shows a single notice that the payment link is emailed when registration closes, and no longer redirects to Checkout or waits for the claimed spot's status. Deleting a paid registration, by the participant or by an admin, warns that nothing is refunded automatically. The admin payment summary shows how many card payments are not linked to a registration, with a hint to refund them by hand in Stripe. The quota price warning now says that paid registrations stay paid and unpaid ones pay the new price. Drop the refund breakdown, the refunded payment states and their translations. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
Register into a paid quota without going to Checkout, then pay on /pay once registration has closed. A new closeEventRegistration server command ends an event's registration for the tests. Deleting a paid registration, as a participant or as an admin, shows the no-refund warning, and the admin summary then counts the unlinked card payment. The event form no longer has a payment mode. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
Payment opens when registration closes, and an event is paid when a quota has a price. Ilmo handles two Stripe events, the restricted key needs no refund permission and only the server needs the Stripe variables. Refunds are made by hand in the Stripe dashboard; describe when payments end up unlinked from a registration and how admins see them. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
Admins only set quota prices, registrants pay after registration closes and nothing is refunded, so the flag's description no longer mentions choosing when to pay or refunds. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
📦 Next.js Bundle Analysis for @app/clientThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
| Page | Size (compressed) |
|---|---|
global |
271.31 KB (🟡 +5.3 KB) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
New Pages Added
The following pages were added to the bundle from the code in this PR:
| Page | Size (compressed) | First Load | % of Budget (450 KB) |
|---|---|---|---|
/admin/features |
374.49 KB |
645.8 KB | 143.51% |
/pay/[updateToken] |
248.05 KB |
519.35 KB | 115.41% |
/settings/reminders |
303.27 KB |
574.58 KB | 127.68% |
Twenty-six Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
| Page | Size (compressed) | First Load | % of Budget (450 KB) |
|---|---|---|---|
/ |
347.8 KB |
619.11 KB | 137.58% (🟡 +0.79%) |
/404 |
227.2 KB |
498.51 KB | 110.78% (🟡 +1.23%) |
/_error |
232.13 KB |
503.44 KB | 111.88% (🟡 +1.22%) |
/admin/emails |
257.25 KB |
528.56 KB | 117.46% (🟡 +1.46%) |
/admin/event-category/create |
287.13 KB |
558.43 KB | 124.10% (🟡 +0.99%) |
/admin/event-category/list |
340 KB |
611.3 KB | 135.84% (🟡 +1.27%) |
/admin/event-category/update/[id] |
287.31 KB |
558.61 KB | 124.14% (🟡 +0.99%) |
/admin/event/create |
544.05 KB |
815.36 KB | 181.19% (🟡 +5.08%) |
/admin/event/list |
347.12 KB |
618.42 KB | 137.43% (🟡 +1.09%) |
/admin/event/update/[id] |
544.18 KB |
815.48 KB | 181.22% (🟡 +5.00%) |
/admin/organization/[slug] |
314.77 KB |
586.07 KB | 130.24% (🟡 +0.90%) |
/admin/organization/create |
263.13 KB |
534.44 KB | 118.76% (🟡 +0.80%) |
/admin/users/list |
342.71 KB |
614.02 KB | 136.45% (🟡 +1.80%) |
/event/[slug] |
402.42 KB |
673.72 KB | 149.72% (🟡 +7.87%) |
/event/[slug]/register/[quotaId] |
298.23 KB |
569.53 KB | 126.56% (🟡 +2.41%) |
/forgot |
244.61 KB |
515.91 KB | 114.65% (🟡 +1.14%) |
/invitations/accept |
228.67 KB |
499.98 KB | 111.11% (🟡 +1.20%) |
/login |
258.29 KB |
529.59 KB | 117.69% (🟡 +1.15%) |
/reset |
250.66 KB |
521.96 KB | 115.99% (🟡 +1.12%) |
/settings/accounts |
314.17 KB |
585.47 KB | 130.10% (🟡 +1.21%) |
/settings/delete |
248.61 KB |
519.91 KB | 115.54% (🟡 +1.20%) |
/settings/emails |
292.84 KB |
564.15 KB | 125.37% (🟡 +1.33%) |
/settings/profile |
256.69 KB |
528 KB | 117.33% (🟡 +1.77%) |
/settings/security |
261.31 KB |
532.62 KB | 118.36% (🟡 +1.29%) |
/update-registration/[updateToken] |
259.21 KB |
530.51 KB | 117.89% (🟡 +2.36%) |
/verify |
227.6 KB |
498.91 KB | 110.87% (🟡 +1.20%) |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.
admin_delete_registration takes only the registration id again, so the PL/pgSQL context in the error snapshots no longer names a boolean argument and the not-found RAISE moves to line 12. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
📦 Next.js Bundle Analysis for @app/clientThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
| Page | Size (compressed) |
|---|---|
global |
271.31 KB (🟡 +5.3 KB) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
New Pages Added
The following pages were added to the bundle from the code in this PR:
| Page | Size (compressed) | First Load | % of Budget (450 KB) |
|---|---|---|---|
/admin/features |
374.49 KB |
645.8 KB | 143.51% |
/pay/[updateToken] |
248.05 KB |
519.35 KB | 115.41% |
/settings/reminders |
303.27 KB |
574.58 KB | 127.68% |
Twenty-six Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
| Page | Size (compressed) | First Load | % of Budget (450 KB) |
|---|---|---|---|
/ |
347.8 KB |
619.11 KB | 137.58% (🟡 +0.79%) |
/404 |
227.2 KB |
498.51 KB | 110.78% (🟡 +1.23%) |
/_error |
232.13 KB |
503.44 KB | 111.88% (🟡 +1.22%) |
/admin/emails |
257.25 KB |
528.56 KB | 117.46% (🟡 +1.46%) |
/admin/event-category/create |
287.13 KB |
558.43 KB | 124.10% (🟡 +0.99%) |
/admin/event-category/list |
340 KB |
611.3 KB | 135.84% (🟡 +1.27%) |
/admin/event-category/update/[id] |
287.31 KB |
558.61 KB | 124.14% (🟡 +0.99%) |
/admin/event/create |
544.05 KB |
815.36 KB | 181.19% (🟡 +5.08%) |
/admin/event/list |
347.12 KB |
618.42 KB | 137.43% (🟡 +1.09%) |
/admin/event/update/[id] |
544.18 KB |
815.48 KB | 181.22% (🟡 +5.00%) |
/admin/organization/[slug] |
314.77 KB |
586.07 KB | 130.24% (🟡 +0.90%) |
/admin/organization/create |
263.13 KB |
534.44 KB | 118.76% (🟡 +0.80%) |
/admin/users/list |
342.71 KB |
614.02 KB | 136.45% (🟡 +1.80%) |
/event/[slug] |
402.42 KB |
673.72 KB | 149.72% (🟡 +7.87%) |
/event/[slug]/register/[quotaId] |
298.23 KB |
569.53 KB | 126.56% (🟡 +2.41%) |
/forgot |
244.61 KB |
515.91 KB | 114.65% (🟡 +1.14%) |
/invitations/accept |
228.67 KB |
499.98 KB | 111.11% (🟡 +1.20%) |
/login |
258.29 KB |
529.59 KB | 117.69% (🟡 +1.15%) |
/reset |
250.66 KB |
521.96 KB | 115.99% (🟡 +1.12%) |
/settings/accounts |
314.17 KB |
585.47 KB | 130.10% (🟡 +1.21%) |
/settings/delete |
248.61 KB |
519.91 KB | 115.54% (🟡 +1.20%) |
/settings/emails |
292.84 KB |
564.15 KB | 125.37% (🟡 +1.33%) |
/settings/profile |
256.69 KB |
528 KB | 117.33% (🟡 +1.77%) |
/settings/security |
261.31 KB |
532.62 KB | 118.36% (🟡 +1.29%) |
/update-registration/[updateToken] |
259.21 KB |
530.51 KB | 117.89% (🟡 +2.36%) |
/verify |
227.6 KB |
498.91 KB | 110.87% (🟡 +1.20%) |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.
The fake event starts a random time up to seven days after registration closes, so moving the close a fixed day later sometimes passed the start and hit the registration end check constraint. Move it halfway to the start instead. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156kYgzTdmw7ZBY2vrLwQmA
📦 Next.js Bundle Analysis for @app/clientThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
| Page | Size (compressed) |
|---|---|
global |
271.31 KB (🟡 +5.3 KB) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
New Pages Added
The following pages were added to the bundle from the code in this PR:
| Page | Size (compressed) | First Load | % of Budget (450 KB) |
|---|---|---|---|
/admin/features |
374.49 KB |
645.8 KB | 143.51% |
/pay/[updateToken] |
248.05 KB |
519.35 KB | 115.41% |
/settings/reminders |
303.27 KB |
574.58 KB | 127.68% |
Twenty-six Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
| Page | Size (compressed) | First Load | % of Budget (450 KB) |
|---|---|---|---|
/ |
347.8 KB |
619.11 KB | 137.58% (🟡 +0.79%) |
/404 |
227.2 KB |
498.51 KB | 110.78% (🟡 +1.23%) |
/_error |
232.13 KB |
503.44 KB | 111.88% (🟡 +1.22%) |
/admin/emails |
257.25 KB |
528.56 KB | 117.46% (🟡 +1.46%) |
/admin/event-category/create |
287.13 KB |
558.43 KB | 124.10% (🟡 +0.99%) |
/admin/event-category/list |
340 KB |
611.3 KB | 135.84% (🟡 +1.27%) |
/admin/event-category/update/[id] |
287.31 KB |
558.61 KB | 124.14% (🟡 +0.99%) |
/admin/event/create |
544.05 KB |
815.36 KB | 181.19% (🟡 +5.08%) |
/admin/event/list |
347.12 KB |
618.42 KB | 137.43% (🟡 +1.09%) |
/admin/event/update/[id] |
544.18 KB |
815.48 KB | 181.22% (🟡 +5.00%) |
/admin/organization/[slug] |
314.77 KB |
586.07 KB | 130.24% (🟡 +0.90%) |
/admin/organization/create |
263.13 KB |
534.44 KB | 118.76% (🟡 +0.80%) |
/admin/users/list |
342.71 KB |
614.02 KB | 136.45% (🟡 +1.80%) |
/event/[slug] |
402.42 KB |
673.72 KB | 149.72% (🟡 +7.87%) |
/event/[slug]/register/[quotaId] |
298.23 KB |
569.53 KB | 126.56% (🟡 +2.41%) |
/forgot |
244.61 KB |
515.91 KB | 114.65% (🟡 +1.14%) |
/invitations/accept |
228.67 KB |
499.98 KB | 111.11% (🟡 +1.20%) |
/login |
258.29 KB |
529.59 KB | 117.69% (🟡 +1.15%) |
/reset |
250.66 KB |
521.96 KB | 115.99% (🟡 +1.12%) |
/settings/accounts |
314.17 KB |
585.47 KB | 130.10% (🟡 +1.21%) |
/settings/delete |
248.61 KB |
519.91 KB | 115.54% (🟡 +1.20%) |
/settings/emails |
292.84 KB |
564.15 KB | 125.37% (🟡 +1.33%) |
/settings/profile |
256.69 KB |
528 KB | 117.33% (🟡 +1.77%) |
/settings/security |
261.31 KB |
532.62 KB | 118.36% (🟡 +1.29%) |
/update-registration/[updateToken] |
259.21 KB |
530.51 KB | 117.89% (🟡 +2.36%) |
/verify |
227.6 KB |
498.91 KB | 110.87% (🟡 +1.20%) |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis
The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.
Summary
Integrates the open feature pull requests (#73, #74, #75, #76, #77, #78, #80, #81, #82, #83) and the
feat/event-templatesbranch into one branch, and puts each new feature behind a feature flag that can be switched from the admin UI. With every flag off the app behaves asmainplus the unflagged fixes listed below.Feature flag system
app_public.feature_flagswith statesoff,admins_only,on, anavailablemarker for features that need configuration, and an audit log.app_public.feature_enabled(key)for SQL gates, a registry in@app/lib/src/featureFlags.ts,isFeatureEnabledon the server,withFeaturefor worker tasks,useFeature/<Feature>on the client./admin/featurespage and theset_feature_flagmutation are restricted to users with the new Keycloak realm roleilmo-developer(users.is_developer). Regular admins cannot see the page or read the flag table.feature_enabled('...')literals in SQL.Flags
ribbon_textconfettityped_time_inputevent_templatesform_previewkeycloak_namescalendar_invitesprefill_answersregistration_reminderstelegram_remindersmcp_serverpaymentsUnflagged: #82 (staged-file linting, docs-only e2e skip), #76, the fixes in #73, #74 (per-event registration positions, bounded pools), the event form fixes and sticky footer from #80, per-user registration rate limiting from #75.
Structural changes
EventForm/values.ts; registration form initial values inbuildRegistrationInitialValues.PAYMENTS_ENABLEDandQuery.paymentsEnabledare removed in favour of thepaymentsflag.event_inputand the quota and question input types.Migrations
000005to000017.000005commits the two migration files that were pending onmain. CI now fails on duplicate prefixes inmigrations/current/and on changes to committed migrations.CONTRIBUTING.mddescribes the workflow.000008sets blank registration names to null before adding a stricter name check. Worth checking against production data before deploying.Test plan
pnpm test --ci --runInBand: 115 suites, 1025 tests pass (flags off by default; feature tests switch their own flags on)pnpm lint,pnpm depcheckdata/schema.sqlreproduces from scratch with all 17 migrationsadmin_features,create_event,update_event,event_form_templates,create_event_registration,payments_register,remindersilmo-developerrole), Stripe test keys and a Telegram botNotes
migration-commitlabel used by the committed-migrations check has to be created in the repository.Generated by Claude Code