Repository navigation
Keep the project notes current, check in the schema and delete dead sample data (app review batch 6b) - #33
Conversation
The design fixtures (sample communes, notes with a Wi-Fi password and door codes, expenses and tasks) and the helpers built on them were no longer read by the app, its tests or its build. The TypeScript language service found no reference to any of them from src, tests, scripts or the Vite and Vitest configs, and the typecheck and every web test pass without them. HUBS keeps only the three default cover photos, which live/model.ts, the covers and the tests still read. equalShares in live/model.ts is also unused but is left for the batch that owns that file. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6P7aTcMBccooYYr4xYnVS
The shared base config switches off strictFunctionTypes and noUnusedLocals. The web app, the reminder worker and the local API now switch both on (the local API's strict already covered function types), so a callback with the wrong parameter type and an import or variable nothing reads fail the typecheck. The base config is left as it is for the older packages that extend it. The web app had two unused locals, both values read from useApp() and never used: native in the Notes screen and go in Windows. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6P7aTcMBccooYYr4xYnVS
Eighteen more test files declare the Node environment, as five already did, so 23 of the 56 skip starting jsdom: the logic, contract, copy, token and design reference tests (the last builds its own JSDOM). The 33 that render components, or read local storage, stay in jsdom, the default. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6P7aTcMBccooYYr4xYnVS
infra/neon/schema.sql is a pg_dump of a database built from the migrations (the auth stand-ins and every migration, as the database tests build their stub database), with every function, policy and grant in full, so the current version of a function can be read without a database. infra/neon/dump-schema.sh rewrites it in one command; with --check it fails while the file is out of date, and CI runs that after the database tests. The script uses a disposable, randomly named database under SQL_TEST_PREFIX on a loopback PostgreSQL 16 server, drops it afterwards, and leaves out the lines pg_dump changes on every run. infra/neon/README.md now says how to write a migration: complete function bodies copied from schema.sql, never replace() over pg_get_functiondef(), and the regenerated schema.sql in the same commit. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6P7aTcMBccooYYr4xYnVS
CLAUDE.md now matches the code: the folders that exist (apps/mobile and the landing apps are gone; web-backup and the CI workflow are listed), Vite 7 and Vitest, the 39 migrations and the schema dump, the ports, how each suite runs and what CI checks. Its rules, principles and voice are kept, with one new rule: a migration writes complete function bodies and commits the regenerated schema dump. AGENTS.md now points to CLAUDE.md instead of repeating it, so the two cannot drift apart. Documents that describe the earlier Supabase, Mantine or Replit-era code say so at the top: GO-LIVE-REVIEW.md, the July go-live plan, the homepage-to-app brief, the Mantine-era design audit and palette, and replit.md. Their content is unchanged. docs/HANDOFF.md has today's ports, test counts, migration status (0013 to 0039 for hosted parity) and launch names. .claude/launch.json lists only servers that exist: the web app, its QA variant, the local API, the website, its backup and the Expo app, in place of the Supabase, Turborepo, landing and old mobile entries. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6P7aTcMBccooYYr4xYnVS
The test read the address as soon as the expense list appeared, but the effect that adds the commune to it can run just after. Under load it failed about once in thirteen runs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6P7aTcMBccooYYr4xYnVS
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
The Vercel preview for Generated by Claude Code |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Before: CLAUDE.md and AGENTS.md, which every coding session reads first, listed folders that no longer exist (
apps/mobile,apps/landing*), said nothing about tests or CI, and repeated each other. HANDOFF.md had old ports, test counts and migration status, the Supabase-era documents read as current, and.claude/launch.jsonstarted servers that are gone. The current version of a database function could only be read from a database, because later migrations patch earlier ones by find-and-replace. Sample data nothing shows, including a sample note with a password-like Wi-Fi string, sat in the app's source, two TypeScript checks were off, and every web test file set up a browser environment, needed or not.After: CLAUDE.md is true today (folders, stack, migrations, ports, install, tests and CI) and keeps its rules and voice; AGENTS.md points to it. Documents about the earlier app say so at the top, HANDOFF.md and
launch.jsonmatch what runs, andinfra/neon/schema.sqlholds the schema the migrations produce with every function in full, regenerated by one command and checked by CI. The unused sample data and exports are gone,strictFunctionTypesandnoUnusedLocalsare on, and 23 of the 56 web test files run in Node.This is app review batch 6b, built on #32 (Home and notices), so review that first; the diff here shows only this part. Nothing a person sees in the app changes.
What changed, by finding
COMMUNE_API_PORT, the pnpm 10 pin and the filtered install, and a new "Tests and CI" section. AGENTS.md now only points to CLAUDE.md, so the two cannot drift apart.docs/GO-LIVE-REVIEW.md, the July go-live plan, the homepage direction brief, two design mock notes andreplit.mdopen with a note that they describe an earlier app. HANDOFF.md has today's ports, test counts and migration status..claude/launch.jsonlistscommune-web,commune-web-qa,commune-api(new, port 3002),website,website-backupandmobile-v2.infra/neon/dump-schema.shbuilds a disposable database from the migrations, dumps its schema toinfra/neon/schema.sql(133 functions in full, with tables, policies, triggers and grants) and drops it;--checkfails and shows the difference while the file is out of date. A new "Schema dump" step in CI runs the check.infra/neon/README.mdgains "Writing a migration": copy the function fromschema.sql, write its complete body, neverreplace()overpg_get_functiondef(), and commit the regenerated file with the migration. CLAUDE.md carries the same rule.data/household.tsdrops from 858 to 339 lines anddata/operations.tsfrom 499 to 210: the sample notes (with the Wi-Fi password string), sample expenses and status, the sample task seed and the helpers only they used. AlsopathOnly,reminderLimitReachedand the unusedChoosemenu. Of the exports nothing else imports, 16 were used nowhere and are deleted; the last,equalShares, goes with the next pull request, which changes its file. Another 49 are used inside their own file, so only theirexportkeyword is spare, and they stay.strictFunctionTypes(0 errors) andnoUnusedLocals(2, both fixed) are on for the web app and the reminder worker; the local API'sstrictalready covered the first, so it gains the second. They are set per app because the Replit-era packages sharetsconfig.base.json.localStoragestart with// @vitest-environment node, so 23 of 56 run in Node and the browser environment is built 33 times instead of 56. In alternating runs on a shared 4-CPU machine the suite took 65 to 67 seconds against 74 to 76 before (about 12% less), and the time spent setting up environments fell from 63 seconds to between 37 and 40.Not in this pull request: scoping the Vercel install (needs the owner, finding 65), ESLint (needs a lockfile refresh, which the network here blocks), the repository's weight (finding 62, the owner's call), and code splitting, which comes with the styles change after the next pull request.
Releasing
Nothing hosted was touched and there is no migration.
schema.sqlis for reading only: every database, Neon included, is still built from the migrations in order.Needs the owner
commune_loading_test_20260927), so back it up and apply 0024 to 0039 in order before running the current local API against it. Say if you know otherwise..claude/launch.jsonwas rewritten to the servers that exist. If your copy has local additions, merge them in rather than overwriting.replit.mdis marked historical because it describes the Replit-era packages, not the app. Say if you still use it.How it was checked
On this branch:
run-local.sh(2 more need a Neon branch), thendump-schema.sh --check.The schema dump was built three times from scratch with identical results; a stale file, a missing file, the wrong
pg_dump, bad arguments, a non-loopback host and an interrupted run each fail with a clear message and leave no database behind. The newcommune-apilaunch entry was started against a disposable database and answered its health check. The secret scan finds nothing inschema.sql.How
Every deletion was proved unused by the TypeScript language service across the source, tests, scripts and configs, then by
noUnusedLocalsfor code only those exports used; anything a test reads stays. The dump uses PostgreSQL 16'spg_dumpagainst a PostgreSQL 16 server, as CI does, and leaves out the lines that change from run to run (the random\restrictkeys and the version stamps), so the same migrations always produce the same file.🤖 Generated with Claude Code
https://claude.ai/code/session_01A6P7aTcMBccooYYr4xYnVS
Generated by Claude Code