This document tracks code that is intentionally temporary and is expected to be removed once a specific dependency, platform constraint, or migration window goes away.
Each section should name:
- what is temporary
- where it currently lives
- what removes the need for it
- what should stay after the cleanup
The task scheduling layer uses @js-temporal/polyfill today, not because the
app wants an abstraction over Temporal, but because the repo still needs a
portable implementation that works across the current browser and runtime set.
The goal is to keep Temporal-based code and remove only the polyfill once the app can rely on native Temporal everywhere it cares about.
- package dependency:
@js-temporal/polyfill - current import site:
src/lib/task-schedule.ts
If more files start importing the polyfill directly, add them to this list so the eventual cleanup stays explicit.
-
Remove
@js-temporal/polyfillfrompackage.json. -
Update the lockfile by running the normal package-manager uninstall flow.
-
Replace imports shaped like:
import { Temporal } from '@js-temporal/polyfill';
with code that reads Temporal from the native global instead.
-
Remove any compatibility comments that exist only to explain the polyfill.
-
Re-run the full verification loop, including any browsers the project still supports in Playwright.
- The
Temporal-based scheduling model itself. - The owner-local wall-clock storage model.
- The task timezone ownership rules.
- Any tests that pin recurrence behavior, DST handling, or timezone-relative scheduling outcomes.
The cleanup is specifically polyfill removal, not a rewrite away from Temporal.
The kink list's into it as a fantasy and into actually doing it were 0–4 sliders during development, and are now levels on the answer's own scale (docs/kink-list.md). Lists saved in between still hold the numbers.
OLD_INTEREST_STEPSand thez.preprocessindetailSchema, insrc/lib/kink-list/answers.ts, which read a number as the nearest level.
The kink list has never been deployed, so only development databases and devices hold a number. Once every list there has been saved again (any answer change rewrites it in the new shape), or before the first deploy at the latest, nothing holds one.
The preprocess and OLD_INTEREST_STEPS; fantasy and doing go back to
z.enum(LEVELS).optional(), and the test that reads old numbers goes.
The schema refusing anything that is not a level.
Kink lists once held kinks of the person's own, from an import's unmatched
rows: answers under custom:<random> keys and a custom record. They were
removed (docs/kink-list.md), and lists saved in development may still hold
some.
withoutOwnKinksand thez.preprocessonanswersandskippedinlistPayloadSchema, insrc/lib/kink-list/answers.ts, which drop those keys as a list is read.customitself needs nothing: the schema does not name it, so Zod drops it.
The kink list has never been deployed, so only development databases and devices hold one. Once every list there has been saved again, or before the first deploy at the latest, nothing does.
withoutOwnKinks and both preprocesses, and the test that reads a list
with own kinks in it.
The schema refusing a key that is not a catalogue id.
The server's secrets, email and model providers moved from environment
variables into the database (docs/server-settings.md). So that existing
deployments carry over — production's BETTER_AUTH_SECRET above all, since a
new one signs everyone out and stops every recovery escrow working — each
setting that has no row yet is copied once from its old variable, and
the variable is ignored from then on.
src/lib/server/settings/legacy-env.ts— the import itself (legacyEnvSettings) andlegacyEnvStillSet, which the admin page uses to say which old variables are still set.src/lib/server/settings/index.ts—fillsForcallslegacyEnvSettingsbefore generating anything.src/routes/(auth-required)/(app)/admin/server/— thelegacyEnvload field and theenvNotesnippet that renders it.src/app.d.ts— the old names inApp.Platform['env'], under a TEMPORARY comment.docker-compose.yml— the optional pass-through lines, so an upgraded self-hoster's.envis read on the first start.src/lib/server/settings/index.test.ts— the "the one-time import from the environment" tests.
Production (and its previews) having started once on this build, with the
admin page no longer listing any old variable as still set — at which point
delete them (wrangler secret delete …, and the Preview base config's) —
and enough time passed that self-hosters have upgraded through it.
- Delete
legacy-env.ts, and infillsForthe loop overlegacyEnvSettings. - Drop the
legacyEnvload field, thestillInEnvhelper, theenvNotesnippet and each{@render envNote(…)}on the settings page. - Drop the old names from
App.Platform['env'](keepOPENROUTER_BASE_URLandRUNWARE_BASE_URL, which are test seams) and the pass-through block fromdocker-compose.yml. - Delete the import tests, and the paragraph about it in docs/server-settings.md and docs/self-hosting.md.
What stays: everything else in src/lib/server/settings/, including
generating the secrets — a new server still needs nothing set.
/home was the signed-in app until the Dashboard became Today, at /today
(section-widgets.md). Every other old page address
under /home and /partner/[id] simply 404s now, with no redirect: the worst
case there is an old bookmark or notification landing on the error page and
navigating on. /home itself is the one exception, and it is a 307 to
/today (the query string kept). Grep for LEGACY-SPACES.
An app added to the iOS Home Screen keeps the start_url it was installed
with and never refetches the manifest. Every install from before the move
launches at /home, so without the redirect each launch would be a 404 that
reloading cannot fix — which fails the "worst case is a reload" rule the
other removals were judged by. A 307 rather than a 308, so no browser caches
it for good: this one is meant to go.
src/routes/home/+server.ts— the redirect, aGETwith no page, so it runs no layout loads and answers before the sign-in guard.src/routes/home/server.test.ts— its test, and the/homechecks ine2e/today.spec.ts("an app installed on the home screen before the move").
static/site.webmanifest's start_url is already /today, so a fresh install
never touches it.
The user and their partner (production's two accounts) have removed the app
from their Home Screens and added it again, so both installs start at
/today. There is no server-side query for this: the server cannot see which
start_url an install launches with, beyond a /home request arriving.
src/routes/home/(the route and its test).- The two
/hometests ine2e/today.spec.ts, keeping the "old pages are gone" one with/homeadded to its list of 404s. - This section, and the mentions of the redirect in
docs/section-widgets.md,docs/contexts.mdand AGENTS.md.
/today as the start URL and the post-sign-in default.