Repository navigation
chore(web): delete the legacy React app - #336
Confidence 7/10 · 1 issue to address
🟢 Confidence 7/10 · likely safe to merge
The ~ alias, dependency and reference checks all come out consistent; the dropped sw.js retire worker is the one behavior risk and nothing tests the served assets.
quality 90/100 · 1 warning · tests partial · risk medium · 1 file not read
Deletes apps/web and the React-only libs/tanstack-db-atom, moving the 119 framework-free modules Foldkit still uses into apps/web-foldkit/src/core with ~/ repointed and the Worker build rewired. The move checks out, except it drops the retire service worker existing browsers need. The ten open apps/web/src/lib/registry.ts error issues come from the maple-ai and maple-chat bundles, not this app, and are not addressed here.
~/resolves toapps/web-foldkit/src/core, its dependencies declared in that package- The
webWorker now builds and servesapps/web-foldkitincluding its ownpublic/ parityloses thelegacy-headtarget;coveragereads the route tree withgit showbun run setupwritesapps/web-foldkit/.env
Before merge
- Infra · Check every environment has what this config now expects ·
alchemy.run.ts - Infra · Check every environment has what this config now expects ·
apps/web-foldkit/alchemy.run.ts - Manual · Re-run
bun run setupsoapps/web-foldkit/.envis written whereenv-writernow reads and writes
Findings
🟠 Warning · F1 · The sw.js retire worker is dropped in the public/ move
correctness · apps/web-foldkit/vite.config.ts:30
apps/web/public/sw.js held the URL the Foldkit site served so browsers still running the React app's workbox worker could update into it and unregister; the move carried every other public asset across but left this one behind, and dropping publicDir means /sw.js now falls through to the SPA shell (apps/web-foldkit/alchemy.run.ts:21). A service worker whose update fetch returns text/html fails with an unsupported MIME type, so the workbox registration survives and keeps serving its precached HTML. Move sw.js into apps/web-foldkit/public/.
Move `apps/web/public/sw.js` to `apps/web-foldkit/public/sw.js`; it is the only public asset this move dropped.
Production impact
Open errors in the changed files
| Issue | Service | Occurrences | File |
|---|---|---|---|
| @maple/api/vcs/VcsSourceRepositoryNotFoundError | maple-ai | 68 | apps/web/src/lib/registry.ts |
| @maple/mcp/errors/McpQueryError | maple-chat | 45 | apps/web/src/lib/registry.ts |
| @maple/mcp/errors/McpQueryError | maple-chat | 36 | apps/web/src/lib/registry.ts |
| @maple/mcp/errors/McpQueryError | maple-ai | 18 | apps/web/src/lib/registry.ts |
| @maple/http/errors/IntegrationsUpstreamError | maple-chat | 15 | apps/web/src/lib/registry.ts |
| @maple/api/vcs/GithubAppError | maple-chat | 14 | apps/web/src/lib/registry.ts |
| @maple/http/errors/IntegrationsUpstreamError | maple-chat | 11 | apps/web/src/lib/registry.ts |
| @maple/mcp/errors/McpQueryError | maple-ai | 9 | apps/web/src/lib/registry.ts |
| @maple/mcp/errors/McpQueryError | maple-ai | 9 | apps/web/src/lib/registry.ts |
| @maple/mcp/errors/McpQueryError | maple-chat | 8 | apps/web/src/lib/registry.ts |
After this merges, Maple checks whether they stop.
Production traffic of the changed files (last 7 days)
| File | Calls/day | Busiest operations |
|---|---|---|
apps/web-foldkit/src/core/lib/hotkeys/hotkey-registry.ts |
244 | navigation 244/day, 0.0% err |
What was checked
- Every
~/…specifier in the tree resolves undersrc/core(grep of both apps) - No references remain to
libs/tanstack-db-atomor the three deleted generator scripts (git grepat the head) LEGACY_BASELINE_REFexists as a commit, socoverage'sgit showand thelegacyworktree build resolve
Files not reviewed (1)
The review ended before it read these diffs, so nothing above vouches for them.
apps/web/package.json
f156a84 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Annotations
Check warning on line 30 in apps/web-foldkit/vite.config.ts
maple-review-bot / Maple / review
correctness: The `sw.js` retire worker is dropped in the `public/` move
`apps/web/public/sw.js` held the URL the Foldkit site served so browsers still running the React app's workbox worker could update into it and unregister; the move carried every other public asset across but left this one behind, and dropping `publicDir` means `/sw.js` now falls through to the SPA shell (`apps/web-foldkit/alchemy.run.ts:21`). A service worker whose update fetch returns `text/html` fails with an unsupported MIME type, so the workbox registration survives and keeps serving its precached HTML. Move `sw.js` into `apps/web-foldkit/public/`.