You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drop accumulated dead code, unused npm dependencies, stale upstream specs, and unused asset files from the repo so the working surface stays small and the install footprint shrinks. None of these block users today, but each adds noise during code search, lengthens bun install, and makes the repo feel "patched" during refactors. Findings come from a knip sweep run on dev branch 2026-04-30; counts and references verified file by file before listing.
What do you do today?
Right now these dead artifacts sit in the repo and cause low-grade friction:
packages/app/src/components/dialog-settings.tsx exists with zero references in the codebase. It's dead but typecheck still walks it.
Three unused PNGs at packages/ui/src/assets/images/social-share-black.png (32KB, 0 refs), social-share-zen.png (21KB, 0 refs), and social-share.png (14KB, only referenced by og:image / twitter:image meta tags in 4 HTML files which serve no purpose for a desktop Electron renderer that never gets shared as a URL).
Two stale upstream spec docs left from the original opencode fork: packages/app/create-effect-simplification-spec.md (19KB, talks about createEffect reactive misuse from the SolidJS migration era, 0 references) and packages/opencode/BUN_SHELL_MIGRATION_PLAN.md (3.6KB, 0 references).
Two placeholder npm scripts in root package.json that came from the initial template: random: echo 'Random script' and hello: echo 'Hello World!'.
Around 16 unused npm dependencies across packages, including @aws-sdk/client-s3 and heap-snapshot-toolkit at root, @shikijs/transformers / marked / marked-shiki / shiki (an entire markdown-highlight stack) / @solid-primitives/active-element / audio / scroll / websocket / solid-list / diff / virtua in packages/app, @opentelemetry/sdk-trace-node / semver in packages/core, and effect in packages/desktop-electron. Note: tailwindcss looks unused but is a peer of @tailwindcss/vite, do not remove.
Three unused catalog entries in root package.json: dompurify, @playwright/test, @solidjs/start.
One duplicate export layer | defaultLayer in packages/opencode/src/env/index.ts.
@opencode-ai/function package has zero in-repo references and no wrangler.toml / sst.config exists, so deployment status is unclear (active external Cloudflare Worker / dead / placeholder).
What would a good result look like?
Each cleanup is independently shippable as its own commit/PR. After the sweep:
bun install finishes faster (fewer unused deps in the lockfile).
Code search returns less noise from spec docs and dead files.
knip rerun shows substantially fewer findings.
@opencode-ai/function package status is documented or the package is removed.
Note: virtua removal is a deliberate non-goal because it is the existing virtualization library that issue #348 (Session view performance) needs, and removing it now means re-installing it during that work.
What would count as done?
Six independent commits / PRs landed:
Drop stale upstream spec docs (create-effect-simplification-spec.md + BUN_SHELL_MIGRATION_PLAN.md).
Drop unused root npm scripts (random + hello).
Drop unused social-share images (3 PNGs + 2 symlinks) and remove the 4 og:image / twitter:image meta tags from packages/app/index.html + packages/desktop-electron/src/renderer/index.html + packages/desktop-electron/src/renderer/loading.html.
Remove unused catalog entries (dompurify + @playwright/test + @solidjs/start) and consolidate the duplicate layer | defaultLayer export.
After all six land, rerun bunx knip and bun install --frozen-lockfile to verify no regressions.
What should stay out of scope?
The 117 "unused files" knip flags inside packages/app/e2e/ and the various __fixture__ directories. These are false positives because knip cannot trace files loaded dynamically by playwright.config.ts or test runners.
tailwindcss removal (peer dep of @tailwindcss/vite).
The 114 "unused exported types" knip lists. These are mostly hygiene-level cleanup; defer to a separate hygiene sweep.
SDK gen files (packages/sdk/js/src/gen/** and packages/sdk/js/src/v2/gen/**). Generated code, do not hand-edit.
This sweep was scoped while evaluating the UI rewrite v2 idea (issue #348). The rewrite was deferred for ROI reasons, and this cleanup surfaced as the higher-leverage holiday work because it is small, low-risk, and individually reversible. The @opencode-ai/function question is the only remaining unknown that requires the maintainer's input before action.
Tooling notes for the worker picking this up: run bunx --bun knip --max-issues 500 from the repo root to regenerate the inventory at any point. depcheck is largely a subset of knip output and is not required.
What task are you trying to do?
Drop accumulated dead code, unused npm dependencies, stale upstream specs, and unused asset files from the repo so the working surface stays small and the install footprint shrinks. None of these block users today, but each adds noise during code search, lengthens
bun install, and makes the repo feel "patched" during refactors. Findings come from aknipsweep run on dev branch 2026-04-30; counts and references verified file by file before listing.What do you do today?
Right now these dead artifacts sit in the repo and cause low-grade friction:
packages/app/src/components/dialog-settings.tsxexists with zero references in the codebase. It's dead but typecheck still walks it.packages/ui/src/assets/images/social-share-black.png(32KB, 0 refs),social-share-zen.png(21KB, 0 refs), andsocial-share.png(14KB, only referenced byog:image/twitter:imagemeta tags in 4 HTML files which serve no purpose for a desktop Electron renderer that never gets shared as a URL).packages/app/create-effect-simplification-spec.md(19KB, talks aboutcreateEffectreactive misuse from the SolidJS migration era, 0 references) andpackages/opencode/BUN_SHELL_MIGRATION_PLAN.md(3.6KB, 0 references).package.jsonthat came from the initial template:random: echo 'Random script'andhello: echo 'Hello World!'.@aws-sdk/client-s3andheap-snapshot-toolkitat root,@shikijs/transformers/marked/marked-shiki/shiki(an entire markdown-highlight stack) /@solid-primitives/active-element/audio/scroll/websocket/solid-list/diff/virtuain packages/app,@opentelemetry/sdk-trace-node/semverin packages/core, andeffectin packages/desktop-electron. Note:tailwindcsslooks unused but is a peer of@tailwindcss/vite, do not remove.package.json:dompurify,@playwright/test,@solidjs/start.layer | defaultLayerinpackages/opencode/src/env/index.ts.@opencode-ai/functionpackage has zero in-repo references and nowrangler.toml/sst.configexists, so deployment status is unclear (active external Cloudflare Worker / dead / placeholder).What would a good result look like?
Each cleanup is independently shippable as its own commit/PR. After the sweep:
bun installfinishes faster (fewer unused deps in the lockfile).kniprerun shows substantially fewer findings.@opencode-ai/functionpackage status is documented or the package is removed.Note:
virtuaremoval is a deliberate non-goal because it is the existing virtualization library that issue #348 (Session view performance) needs, and removing it now means re-installing it during that work.What would count as done?
Six independent commits / PRs landed:
create-effect-simplification-spec.md+BUN_SHELL_MIGRATION_PLAN.md).random+hello).og:image/twitter:imagemeta tags frompackages/app/index.html+packages/desktop-electron/src/renderer/index.html+packages/desktop-electron/src/renderer/loading.html.dialog-settings.tsx.virtuawhich stays for [Feature] UI rewrite v2: replace packages/app + packages/ui with kit-based design #348). May further split per package if the PR feels too wide.dompurify+@playwright/test+@solidjs/start) and consolidate the duplicatelayer | defaultLayerexport.After all six land, rerun
bunx knipandbun install --frozen-lockfileto verify no regressions.What should stay out of scope?
packages/app/e2e/and the various__fixture__directories. These are false positives because knip cannot trace files loaded dynamically byplaywright.config.tsor test runners.tailwindcssremoval (peer dep of@tailwindcss/vite).packages/sdk/js/src/gen/**andpackages/sdk/js/src/v2/gen/**). Generated code, do not hand-edit.virtuapackage removal (needed by [Feature] UI rewrite v2: replace packages/app + packages/ui with kit-based design #348).Extra context
This sweep was scoped while evaluating the UI rewrite v2 idea (issue #348). The rewrite was deferred for ROI reasons, and this cleanup surfaced as the higher-leverage holiday work because it is small, low-risk, and individually reversible. The
@opencode-ai/functionquestion is the only remaining unknown that requires the maintainer's input before action.Tooling notes for the worker picking this up: run
bunx --bun knip --max-issues 500from the repo root to regenerate the inventory at any point.depcheckis largely a subset of knip output and is not required.