3.16.0
Released
Fixes
Missed days of a recurring Quest no longer read as Active. On cards, rows and the quest page a cycle closed unfinished shows Missed (one you marked failed still shows Failed), and a cycle that has not started yet shows Upcoming. The dashboard's Active quests tile and completion rate now count only cycles you can still work on, the
/questsFailed chip counts missed cycles so All adds up, and/tasksopened with no quest prefers any other active quest to a cycle whose day is over (#1039).
Technical changes· 15 entries for database, tooling, CI, tests and docs
Database
Recurring Quest cycles now end. A cycle nobody finished is closed as
failedwith the newquests.lapsed_atonce its day is over: at the later of local midnight in its timezone and the end of its window, for every cadence, the way Today already treats it.close_lapsed_recurrence_cycles()runs every 15 minutes from pg_cron,ensure_quest_recurrence_cycles()runs it for the caller before the dashboard,/questsand/tasksread, and the migration ran it once for the cycles that had already lapsed. The close moves neitherupdated_atnorlast_activity_at, sends no notification, awards nothing and keeps the template's stall, and a missed cycle the owner reopens is never closed again.get_dashboard_stats()counts a recurring cycle only once it has started, andget_quest_with_tasks()returnslapsed_at. Only the database writeslapsed_at; the sweep and its helper are not client RPCs (#1039).
Tooling & Configuration
The pure domain logic both apps need moved into
@questify/core, the last slice of #1007:tasks/due-status,tasks/task-deep-link,tasks/list-filters,tasks/types,quests/density,quests/index-params,quests/state,quests/stall-idle,notifications/timezones,location/haversine,location/coordinates,location/types,ai/plan-tiersandai/investigationsmoved whole with their tests. Three modules were split, the shared part moving and what reads the database or the browser staying in the web app:ai/credits(the action lists,aiCreditActionCost()and the low-balance rule moved; the charge, refund and free-tier RPC calls stayed),ai/personas(theModelPersonatype andmapModelPersona()moved; the catalogue queries stayed) andanalytics(theANALYTICS_EVENTScatalogue moved asanalytics/events; the browser sinks stayed). The task list's remembered "N completed" group now takes any key-value store (ReadableStorage/WritableStorage), and thelocalStoragelookup it is given stayed in the web app aslib/tasks/browser-storage.ts. The web app's 136 imports of these modules use the package, each named import routed to whichever side now holds it; nothing changed in behaviour.packages/core/README.mdlists every module,docs/analytics.md,docs/pricing.mdanddocs/ai-investigations.mdname the new paths, and the mobile app now exercises the shared distance and plan-tier rules (#1007).A new workspace package,
@questify/core(packages/core), holds the product rules the web and mobile apps share, the second slice of #1007. This slice moved, unchanged and with their tests, the validators the issue names —auth/validators,notifications/validators,quests/validators,quest-recurrences/validatorsandyear-themes/validators— and the two pure modules they need,quests/scheduleandtasks/deadlines. Each module is its own entry point (@questify/core/quests/validators); the web app's 64 imports of them,vi.mockpaths included, now use the package,next.config.mjstranspiles it and the webDockerfileinstalls it. The only code change, which changes no behaviour:parseNotificationPreferencesForm()takes{ get(name): unknown }instead of the DOMFormDatatype, which aFormDatastill satisfies. The package's ESLint config fails on browser and Node globals and on imports of Next.js,react-dom,server-only,@supabase/ssr,node:*, an app, or React outsidesrc/react/;tsconfig.jsonhas no DOM lib. Its README lists what has moved and what is still to come.AGENTS.md,README.mdandCODEOWNERSname it (#1007).The generated Supabase types moved out of
apps/webinto a new workspace package,@questify/supabase-types(packages/supabase-types), the first slice of #1007:src/supabase.tsis the generator output (formerlyapps/web/src/types/supabase.ts) andsrc/index.tsthe hand-written aliases that re-export it (formerlyapps/web/src/types/database.ts).pnpm supabase:typegenandsupabase:typegen:localwrite there; the web app's 146 imports of@/types/supabaseand@/types/databasenow import@questify/supabase-types, with no copy left behind;next.config.mjstranspiles the package and the webDockerfileinstalls it. The mobile app's Supabase client is now typed against the sameDatabase. Nothing changed for the worker, which keeps its own hand-written row types.AGENTS.md, theadd-migrationandprecommit-gateskills,README.md,docs/schema.md,docs/ops/deployments.md,docs/feedback-github-issues.mdandCODEOWNERSname the new path (#1007).apps/mobileis a new workspace: the Expo / React Native app for iOS and Android, on Expo SDK 58 (React Native 0.88.1, React 19.3) with Expo Router, laid out like Phantom's.app.jsonholds its identity — name Questify, slug and URL schemequestify, bundle identifier and Android packageco.questify.app, portrait — withexpo-routeras the only plugin, so each feature issue adds its own permission copy;app.config.tstakes the version from the rootpackage.json, so the app moves with every release. It opens to a placeholder screen showing the version and the Supabase host it read, or naming the variables it is missing.src/env.tsvalidatesEXPO_PUBLIC_SUPABASE_URL,EXPO_PUBLIC_SUPABASE_ANON_KEY,EXPO_PUBLIC_SITE_URLandEXPO_PUBLIC_SENTRY_DSNwith Zod (documented in a new mobile section of.env.example);EXPO_PUBLIC_FEATURE_*mirrorsNEXT_PUBLIC_FEATURE_*and no flag is honoured yet.src/supabase/client.tsbuilds thesupabase-jsclient with the anon key, PKCE and an in-memory session store until #1010.@sentry/react-nativestarts only when the DSN is set, with the web app's privacy rules plus no screenshots or view hierarchy, through a third byte-identical copy of the scrubber. The app uses@supabase/supabase-js^2.118.0: 2.106, which web and the worker still resolve, ships animport(variable)that Hermes cannot compile, so a release build of the app would fail.pnpm dev:mobilestarts Expo;pnpm devnow leaves the app out (turbo run dev --filter=!mobile), andpnpm --filter mobile exportbundles both platforms without a simulator. Lint, typecheck and test run in CI through the existing turbo steps, soci.ymlis unchanged (#1006).@questify/eslint-config/react-nativeis the mobile ESLint preset: the React rules ofreact.jswithout browser globals, refusingwindow,document,localStorage,sessionStorageandnavigator, and imports of Next.js,react-dom,@supabase/ssr,server-onlyandapps/web(#1006).The root
package.jsondeclares@types/reactand@types/react-dom18. The web app andpackages/uiresolve React's types partly through pnpm's hoisting (Next.js andlucide-reactdo not declare them), and once the mobile app brought React 19's the hoisted copy was no longer guaranteed to be 18; the pin keeps the web typecheck as it was (#1006).pnpm dev:tui -- flagsnow writes eachNEXT_PUBLIC_FEATURE_*flag with itsEXPO_PUBLIC_FEATURE_*mirror on the next line, and the newmobile-envaction (menu: "Mobile app env") writesapps/mobile/.env.localfrom the running stack: the Supabase URL rewritten to this machine's LAN address (orQUESTIFY_MOBILE_HOST), the anon key, the web URL and every flag's mirror, refusing any key that is not a publicEXPO_PUBLIC_*value and keeping lines added by hand. Re-saving a.envwhose keys were all present no longer adds a blank line to the end of the file each time (#1006).
Tests
supabase/tests/lapsed_recurring_cycles.sqlcovers the lapse point across both Toronto DST changes, the sweep for one owner and for everyone, what it must never close, its silence (no notification, achievement, activity stamp or stall resolution), the reopen path, the mint entry point and the dashboard counts, andrls.sqlpins who may readlapsed_at(owner, other users and visitors on a public cycle, nobody on a private one) and that no client, the owner included, can insert or change it. Vitest coversquestStatusDisplay(), the Missed and Upcoming badges, the/questsbadges inside?template=,/tasksclosing lapsed cycles before it reads, andpickInitialQuestId()passing over a past cycle (#1039).The moved modules' suites now run in
packages/core(24 files, 355 tests, up from 119), including the credit-cost mirror's checks against the migrations andmapModelPersona(); the web app keeps the tests for what stayed (the charge and free-tier calls, the persona queries, the analytics sinks). New:analytics/events.test.ts(every event named once, in snake_case) andapps/web/src/lib/tasks/browser-storage.test.ts(#1007).The moved validators' Vitest suites (119 tests) now run in
packages/core, part of the rootpnpm test.apps/mobile/src/core.test.tsruns the shared quest schema, timezone check and schedule conversion from the mobile app's own toolchain (#1007).The generated-types guard moved with the files to
packages/supabase-types/src/index.test.ts, which the rootpnpm testnow runs as its own workspace, and gained a case that fails if either typegen script stops writingpackages/supabase-types/src/supabase.ts.apps/mobile/src/supabase/client.types.test.tsasserts at type level that the app's client isSupabaseClient<Database>(#1007).apps/mobilehas Vitest suites for its env parsing, home-screen status, in-memory session store and Sentry options.env.test.tsalso fails if the app reads anyprocess.envvariable that is notEXPO_PUBLIC_*, if a secret-shapedEXPO_PUBLIC_*name appears in the schema, the source or.env.example, if the schema reads an undocumented variable, or if the app mirrors a flag the web app does not document.scripts/dev-tui/mobile-env.test.mjscovers the host choice, the flag mirrors, public-only writes, a symlinked or secret-holding.env.local, and the action end to end throughmain();env-flags.test.mjspins the mirror placement andenv-file.test.mjsthe blank-line fix.scripts/monitoring-scrub-twins.test.mjsnow requires all three scrubber copies to match (#1006).
Documentation
AGENTS.mddescribesapps/mobile, its commands and the rules for working in it (never a secret in Expo public configuration, literalEXPO_PUBLIC_*reads, flag mirrors, thin screens over testedsrc/modules, permission copy added by the feature that needs it), and why the root pins React 18's types.README.md,docs/local-docker.md(a new "Running the mobile app" section),docs/ops/error-monitoring.md,docs/agent-skills.mdand theprecommit-gate,open-prandadd-env-flagskills cover the mobile workspace;precommit-gategains theexpo exportcheck for dependency and app-config changes (#1006).docs/mobile/architecture.mdrecords the architecture of the native app: Expo / React Native in this monorepo, with the alternatives considered; reads and ordinary writes straight to Supabase under RLS, including the column-level grants that rule outselect('*')ontasks,quests,weekly_reviewsandyear_theme_alignment_checks; route handlers that accept a Supabase Bearer token for operations that need a server secret; and worker completions delivered through Realtime. It inventories all 99 Server Actions in 27 modules and every/apiroute handler, with each effect beyond the write assigned to the database, a worker outbox, a Bearer handler, the client or nothing, and turns that into the backlog for #1007–#1009. It notes that thesupabase_realtimepublication has no tables today and names the five that must join it (task_investigations,notifications,quest_narrations,task_evidence,quest_stall_notifications), each with RLS confirmed; it also lists what the app will not do, starting with admin and buying Pro.AGENTS.mdgains a Mobile Client section with the two rules every PR now follows: a write's effects live in the database or the worker, never only in a Server Action, and a route handler the app calls accepts a Bearer token (#1005).