4.4.0
Released
Features
The phone now keeps up with other people on more screens. The Quests tab and the Tasks tab's quest list update when a quest is made on the web, closed by a party's owner or has a task ticked by someone else; a quest's page updates when the quest itself is closed, reopened or renamed, and its Discussion shows another member's comment as it is posted; Today hears a quest made or closed elsewhere and the weekly review as it arrives; and a Year Theme check that finishes shows on the Themes screen when its notification arrives, in place of a 15-second poll. Guilds, Challenges, Quest Jams, the profile and Billing now also read again when the app returns to the front. Nothing is re-read while the phone is offline: a change that arrives then is read once when the connection returns.
docs/mobile/architecture.md(Decision 5, Screen coverage) lists every screen with when it reads again, and the bindings for a "my work" screen are@questify/core/realtime/my-work, shared with the web dashboard (#1124)Actions now respond the moment you click. Dismissing or snoozing a stalled-quest nudge and pinning an AI answer take effect at once, and are put back with the reason if the server refuses. Every form button that waits on the server now shows a spinner instead of only going grey, and buttons such as applying a nudge's suggestion or leaving a guild stay marked as working until the server has answered (#1123).
A quarterly Year Theme check that can't finish now tells you: a notification in the bell and the phone's Inbox says it couldn't finish and that you can ask for it again. Before, the card went back to offering a check with no word of what happened. Behind
NEXT_PUBLIC_FEATURE_LIVE_UPDATES(still off), the open card also learns a check's result from that notification instead of re-reading the page every 15 seconds (#1122).Comments on a Party Quest now arrive on their own, behind
NEXT_PUBLIC_FEATURE_LIVE_UPDATES(still off): a comment someone else posts or edits shows in open threads and in the comment counts without a reload, and a reply you are writing is left alone (#1122).More of a quest's page keeps up on its own, behind
NEXT_PUBLIC_FEATURE_LIVE_UPDATES(still off): a photo's description appears when it is written instead of on a 5-second poll, another member's attendance check-in shows without a reload, and a quest its owner closes or reopens updates on a party member's open page. The Quests list is read again when you come back to its tab after more than half a minute away, with the flag on or off (#1122).A quest's task list now keeps up with other people, behind
NEXT_PUBLIC_FEATURE_LIVE_UPDATES(still off). On a quest's page and on Tasks, a party member's tick, new task, reorder or reassignment appears within a few seconds, an AI answer shows when it is ready instead of on a 3-second poll, and the page follows when someone else finishes or reopens the quest. Nothing you are typing, dragging or have selected is disturbed. With the flag off the list behaves as before (#1121).The notification bell now keeps up on its own, behind
NEXT_PUBLIC_FEATURE_LIVE_UPDATES(still off). A notification that arrives while a page is open (a party invitation, a seat handed over, a weekly review, an answered question) raises the badge without a navigation, a notification read on the phone or in another tab lowers it, and an open popover and/notificationsshow the new row. A row that arrives this way stays unread until the bell or the page is opened again, so nothing is marked read without the person opening it. Only the signed-in person's own notifications are heard. With the flag off the bell behaves exactly as before (#1119).The web dashboard can now keep itself up to date, behind
NEXT_PUBLIC_FEATURE_LIVE_UPDATES(still off). A task ticked or finished on the phone, by a party member or by the worker, a quest created, closed or put on hold elsewhere, and a new stall nudge reach an open dashboard within a few seconds without a reload, while the tab is visible. Whatever the flag says, the dashboard now also reads itself again when its tab comes back after 30 s away, when a recurring cycle it shows ends, at midnight in that cycle's timezone and at the viewer's own midnight, so Today and Due this week never show yesterday (#1118).Ticking a task in the dashboard's Today and Due this week lists now answers the click at once: the row is struck through, Today's "n of m done" line moves and "Done for today" appears before the server replies, and a refused or failed write puts the row back beside the error. Only the task being saved waits on its write, so another task can be ticked straight after, and the page is refreshed once a run of ticks has landed rather than after each one, without the dashboard's sections falling back to their loading placeholders. The streak and the statistics still update from that refresh (#1117).
Fixes
A page you had already visited no longer shows up as it was before your own change. After ticking, adding or deleting a task on a quest's page, or answering a stall notice, going back to the dashboard or the Quests list within about 30 seconds by a link, or at any time with the Back button, showed the old counts, progress and due list until a reload. The next page you open after such a change is now read again, without a loading skeleton (#1120).
Technical changes· 23 entries for database, tooling, CI, tests and docs
Database
20270113120000_theme_alignment_failed_notification.sqladds thetheme_alignment_failednotification and a trigger onyear_theme_alignment_checksthat writes it when a check changes intofailed, whichever function fails it (#1122). It sends no push, and clients still cannot write notifications.20270112120000_realtime_quest_comments.sqladdspublic.quest_commentsto the Realtime publication (#1122). Events pass the table's read policy, so only a quest's owner and party hear its comments; signed-out callers hold no privilege on the table.supabase/tests/realtime_publication.sqlpins the publication to its eight tables.20270111120000_cheap_recurrence_mint.sqlgives the recurring-cycle mint a cheap nothing-to-do path (#1118).ensure_quest_recurrence_cycles()runs on every render of the dashboard. Its mint proposed each template's next two cycles withINSERT … ON CONFLICT DO NOTHING, and Postgres runs all tenBEFORE INSERTtriggers onquestsfor a proposed row before it finds the conflict, so a render with nothing to mint spent about 75 ms per recurring template there.mint_quest_recurrence_cycles()now skips a cycle that already exists before proposing it, which took the mint for two templates from ~150 ms to ~1–3 ms on a local stack. What is minted is unchanged, including a soft-deleted cycle still holding its place, and theON CONFLICTstays for two mints racing past the check.supabase/tests/recurrence_mint_fast_path.sqlchecks that a mint with nothing to do sends no row to those triggers (#1118).20270111130000_realtime_quests.sqladdspublic.queststo the Realtime publication for the live dashboard (#1118). Events pass each subscriber's read policies and leave out the two columns withheld from clients (due_atand the Chronicle share secret), whichrealtime_publication.sqlnow pins along with the table (#1118).
Tooling & Configuration
A live-update channel that stays down is now visible in Sentry, and still invisible to the person. A web page whose Realtime channel failed and had not rejoined 30 seconds later, in a visible tab on a browser that says it is online, sends one warning tagged
live_updates:channel_downwith the channel's name and Realtime's status, and nothing else; each failure and recovery is also a breadcrumb.subscribeRealtimeHints()gainedonHealthChangefor it. In development the browser console warns when one channel causes more than 20 refreshes in a minute (#1125)The phone's quest scoping for Realtime (
ownOrJoinedQuestFilter(), the watched-quest statuses and limit) and its timezone day arithmetic (localDayKey(),msUntilNextLocalMidnight()) moved to@questify/core/realtime/scopeand@questify/core/dates/zoned-day, so the web dashboard listens to and counts days by the same rules (#1118).The web app can now hear changes made elsewhere through Supabase Realtime, behind a new
NEXT_PUBLIC_FEATURE_LIVE_UPDATESflag (off), registered in.env.example,env.ts, the Dockerfile,docker-compose.yml,turbo.json, the Playwright web server anddocs/ops/feature-flags.md.useLiveRefresh(), and<LiveRefresh>for a Server Component page, open one channel per page and refresh the route in a transition once per burst of changes and once after a dropped channel rejoins. Nothing is read while the tab is hidden: a change heard then is kept for the return, and the channel closes after 30 s hidden; with the flag off a page still reads once when its tab comes back after that. The session is handed to Realtime before the channel joins, since joining first heard nothing of the person's own rows. The phone's hint coalescing and quest scoping moved to@questify/core/realtime/hintandrealtime/scope, and the subscription itself torealtime/subscribe, which the phone'suseRealtimeHintand the web's hook both wrap, so the rules are written once. No page uses it yet; that comes with #1118, #1119, #1121 and #1122 (#1116).
CI/CD
CI now runs the live-update Playwright specs. A new
📡 Live updates (Playwright)job inci.ymlstarts a local Supabase stack with Realtime (the pinned CLI, with the services no spec touches left out), turnsNEXT_PUBLIC_FEATURE_LIVE_UPDATESon for the app under test and runspnpm --filter web test:e2e:live—e2e/live-*.spec.tsandnavigation-freshness.spec.ts. Until now these ran only on a developer's machine: the main E2E job has no stack, so every spec that signs in skips there.✅ CI passwaits on the new job and accepts it skipped on the terms it accepts e2e skipped (forks, Dependabot);scripts/ci-jobs.test.mjspins the job, its flag and its CLI version (#1125)mobile-build.ymlbuilds Android alone until the repository variableMOBILE_IOS_BUILDSistrue. The 4.3.0 release run failed because EAS holds no iOS distribution credentials and cannot create them in a non-interactive build, and that failed request also stopped the OTA update and the source-map upload after it. A release merge, a labelled PR and a dispatch forallnow ask for Android only, with a notice; a dispatch with platformiosstill asks for an iOS build, so the credentials can be tested before the variable is set.docs/mobile/release.mdanddocs/cicd.mddescribe the variable (#1189).
Tests
Added the live-update test helper and the specs that use it (#1125).
apps/web/e2e/helpers/live.tsopens a second signed-in browser, asserts that a change made in one appears in the other without its document being replaced, hides and shows a tab, and refuses every Realtime socket.live-two-sessions.spec.tsticks a task on one device and watches the other's dashboard, and reads notifications on one and watches the other's bell clear;live-channel-failure.spec.tsrefuses Realtime and checks the dashboard still renders, takes a tick, shows no error and reads again on the return to the tab.live-task-list.spec.tsnow uses the helper. Unit tests cover a channel's failure being reported once per failure and its recovery (@questify/core/realtime/subscribe), the Sentry report and breadcrumbs, the 30-second wait before a report, and the development refresh metere2e/navigation-feedback.spec.tsmeasures the time from clicking a navigation link to the destination's loading state on a production build with every response held back by a second. It runs only withE2E_PRODUCTION_BUILD=true(#1123).supabase/tests/theme_alignment_failed_notification.sqlchecks that a check changing intofailedwrites one notification for its owner and no push, that nothing else writes one, and that only the owner reads it (#1122).e2e/live-comments.spec.tsopens a Party Quest as its owner and as a member and checks that a comment one posts reaches the other's open page, with a half-written reply left alone (#1122).e2e/live-quest-page.spec.tschecks that a quest archived by its owner shows as archived, with its tasks frozen, on a party member's open page without a reload (#1122).e2e/live-task-list.spec.tsopens a Party Quest as its owner and as a member in two browsers and checks that a tick, a new task, a reassignment and a reorder reach the other's list without a reload, with half-typed text left alone (#1121).e2e/navigation-freshness.spec.tsvisits the dashboard, the Quests list and the Tasks page, ticks a task on the quest's own page, and checks each shows the tick on return by link and by the Back button. Against a production build without the fix, the dashboard and Quests cases fail (#1120).e2e/live-notifications.spec.tschecks against a real stack that a notification written for the signed-in person raises the bell's badge without a navigation, one written for someone else does not, a row read elsewhere lowers it, and an open popover and/notificationsshow a new row without marking it read (#1119).e2e/live-dashboard.spec.tschecks against a real stack that an open dashboard follows a task finished and a quest created elsewhere without a reload (#1118).e2e/live-refresh.spec.tschecksuseLiveRefresh()against a real stack through a Playwright-only route: a change to the signed-in account's own task reaches the page, and a change to another account's private task does not. It runs where live E2E is set up andNEXT_PUBLIC_FEATURE_LIVE_UPDATESis on in the web server's build (#1116).The dashboard's Due this week Playwright spec holds the task's PATCH until the row has changed on its own, checks that no loading placeholder appears during the refresh after the write, and selects the new-quest form's "Save as" choice as the radio buttons it became in #764 (#1117).
scripts/workflow-triggers.test.mjspins thatmobile-build.ymldrops iOS from a both-platform run unlessvars.MOBILE_IOS_BUILDSistrue(#1189).
Documentation
Added
docs/ops/live-updates.md, the runbook for live updates in production (#1125): production's Realtime quotas on its current Supabase plan with the estimate and headroom at today's size and when to look again, what a page does when its channel will not join, how a channel that stays down shows in Sentry (live_updates:channel_down), the tests and how to run them, and the rollout and rollback steps forNEXT_PUBLIC_FEATURE_LIVE_UPDATES.docs/ops/feature-flags.md,docs/ops/error-monitoring.md,docs/cicd.mdanddocs/live-updates.mdpoint to itdocs/live-updates.mddecides how the web app will keep up with changes it did not make (#1115). It measures what one dashboard refresh costs today, on a production build against a local stack: about 300 ms, a 48.5 KB payload and 26 Supabase round trips. One of those round trips is a write, the recurring-cycle mint, which runs on every refresh and is its slowest step (median 176 ms). It decides that a Realtime hint on the web refreshes the route inside a transition rather than keeping a client-side copy, on condition that such a refresh writes nothing. It sets a budget and the production numbers that would reopen the decision, records which issue may add which table to the Realtime publication, and lists which of the web's interval polls each hint replaces.docs/mobile/architecture.mdDecision 5 now applies to both clients and points there, andAGENTS.mdstates the live-update rule (#1115).