Claude
e320484774
perf: lazy-load CLI commands via dynamic import for code splitting
...
Replace 23 static command imports with lazy-loaded dynamic imports.
Each command's heavy dependencies (Provider, Session, MCP, TUI, AI SDKs)
are now only loaded when that specific command is invoked.
Combined with the Rollup tree-shaking pre-pass, this produces 45 chunks
instead of a single bundle. The entry chunk (what loads on startup) drops
from ~9.8MB to ~120KB — a 98.8% reduction in startup load.
- Add `lazyCmd` helper to `cli/cmd/cmd.ts` for type-safe lazy commands
- Inline all builder options (yargs metadata) in `index.ts`
- Dynamic `import()` in handlers defers heavy module loading
- `opencode --help` / `--version` no longer loads AI SDK, MCP, TUI, etc.
https://claude.ai/code/session_01R7zMpXjsq1R6uR7xpyJ14i
2026-04-16 13:03:44 +00:00
Claude
d1a9ef8053
perf: add Rollup tree-shaking pre-pass for export * as barrels
...
Bun's bundler (and esbuild) cannot tree-shake `export * as X from "./mod"`
barrels — see evanw/esbuild#1420 . Rollup can, using AST-level analysis to
drop unused exports and their transitive imports.
This adds a Rollup pre-pass to the build pipeline that runs before Bun's
compile step. Rollup resolves internal source, eliminates dead code across
the 57 `export * as` barrels, and writes tree-shaken ESM to a temp directory.
Bun then compiles the pre-processed output into the final binary.
- Add `script/treeshake-prepass.ts` with Bun.Transpiler-based Rollup plugin
- Integrate into `script/build.ts` (skippable via `--skip-treeshake`)
- Add `rollup` as devDependency
- Pre-pass completes in ~5s, negligible vs full multi-platform build
Current bundle savings are modest (~0.7%) because the single-entrypoint
architecture means most code paths are reachable. Savings scale with:
- Per-command entry points or lazy loading
- Remaining 50 `export namespace` → `export * as` migrations
- Future code splitting
https://claude.ai/code/session_01R7zMpXjsq1R6uR7xpyJ14i
2026-04-16 12:37:49 +00:00
opencode-agent[bot]
7341718f92
chore: generate
2026-04-16 07:15:05 +00:00
Dax
ef90b93205
fix: restore .gitignore logic for config dirs and migrate to shared Npm service ( #22772 )
2026-04-16 03:14:06 -04:00
Dax
3f7df08be9
perf: make vcs init non-blocking by forking git branch resolution ( #22771 )
2026-04-16 03:02:19 -04:00
opencode-agent[bot]
ef6c26c730
chore: update nix node_modules hashes
2026-04-16 06:59:47 +00:00
opencode-agent[bot]
8b3b608ba9
chore: generate
publish / build-tauri (map[host:windows-2025 target:aarch64-pc-windows-msvc]) (push) Blocked by required conditions
nix-eval / nix-eval (push) Waiting to run
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404, x86_64-linux) (push) Waiting to run
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404-arm, aarch64-linux) (push) Waiting to run
nix-hashes / compute-hash (macos-15-intel, x86_64-darwin) (push) Waiting to run
nix-hashes / compute-hash (macos-latest, aarch64-darwin) (push) Waiting to run
nix-hashes / update-hashes (push) Blocked by required conditions
publish / build-tauri (map[host:blacksmith-4vcpu-windows-2025 target:x86_64-pc-windows-msvc]) (push) Blocked by required conditions
publish / build-tauri (map[host:blacksmith-8vcpu-ubuntu-2404-arm target:aarch64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-tauri (map[host:macos-latest target:aarch64-apple-darwin]) (push) Blocked by required conditions
publish / build-tauri (map[host:macos-latest target:x86_64-apple-darwin]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404 platform_flag:--linux target:aarch64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404 platform_flag:--linux target:x86_64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-windows-2025 platform_flag:--win target:x86_64-pc-windows-msvc]) (push) Blocked by required conditions
publish / build-electron (map[host:macos-latest platform_flag:--mac --arm64 target:aarch64-apple-darwin]) (push) Blocked by required conditions
publish / build-electron (map[host:macos-latest platform_flag:--mac --x64 target:x86_64-apple-darwin]) (push) Blocked by required conditions
publish / build-electron (map[host:windows-2025 platform_flag:--win --arm64 target:aarch64-pc-windows-msvc]) (push) Blocked by required conditions
publish / publish (push) Blocked by required conditions
publish / version (push) Waiting to run
publish / build-cli (push) Blocked by required conditions
publish / sign-cli-windows (push) Blocked by required conditions
publish / build-tauri (map[host:blacksmith-4vcpu-ubuntu-2404 target:x86_64-unknown-linux-gnu]) (push) Blocked by required conditions
storybook / storybook build (push) Waiting to run
test / unit (linux) (push) Waiting to run
test / unit (windows) (push) Waiting to run
test / e2e (linux) (push) Waiting to run
test / e2e (windows) (push) Waiting to run
typecheck / typecheck (push) Waiting to run
release-github-action / release (push) Has been cancelled
containers / build (push) Has been cancelled
2026-04-16 06:11:24 +00:00
Brendan Allan
97918500d4
app: start migrating bootstrap data fetching to TanStack Query ( #22756 )
2026-04-16 06:10:23 +00:00
Brendan Allan
e2c0803962
Fix desktop download asset names for beta channel ( #22766 )
2026-04-16 06:10:03 +00:00
Adam
f418fd5632
beta badge for desktop app ( #14471 )
...
Co-authored-by: Brendan Allan <git@brendonovich.dev>
2026-04-16 06:03:41 +00:00
Dax
675a46e23e
CLI perf: reduce deps ( #22652 )
2026-04-16 02:03:03 -04:00
opencode-agent[bot]
150ab07a83
chore: generate
2026-04-16 05:03:50 +00:00
Kit Langton
6b20838981
feat: unwrap provider namespaces to flat exports + barrel ( #22760 )
2026-04-16 05:02:50 +00:00
opencode-agent[bot]
c8af8f96ce
chore: generate
deploy / deploy (push) Waiting to run
2026-04-16 03:57:53 +00:00
Kit Langton
5011465c81
feat: unwrap tool namespaces to flat exports + barrel ( #22762 )
2026-04-16 03:56:54 +00:00
Kit Langton
f6cc228684
feat: unwrap cli-tui namespaces to flat exports + barrel ( #22759 )
2026-04-16 03:56:51 +00:00
Kit Langton
9f4b73b6a3
fix: clean up final 16 no-unused-vars warnings ( #22751 )
2026-04-16 03:54:21 +00:00
Kit Langton
bd29004831
feat: enable type-aware no-misused-spread rule, fix 8 violations ( #22749 )
2026-04-16 03:50:50 +00:00
Kit Langton
8aa0f9fe95
feat: enable type-aware no-base-to-string rule, fix 56 violations ( #22750 )
2026-04-16 03:50:47 +00:00
Kit Langton
c802695ee9
docs: add circular import rules to namespace treeshake spec ( #22754 )
2026-04-15 23:44:08 -04:00
opencode-agent[bot]
225a769411
chore: generate
2026-04-16 03:42:25 +00:00
Kit Langton
0e20382396
fix: resolve circular sibling imports causing runtime ReferenceError ( #22752 )
2026-04-15 23:41:34 -04:00
Kit Langton
509bc11f81
feat: unwrap lsp namespaces to flat exports + barrel ( #22748 )
2026-04-15 23:30:52 -04:00
Kit Langton
f24207844f
feat: unwrap storage namespaces to flat exports + barrel ( #22747 )
2026-04-15 23:30:49 -04:00
Kit Langton
1ca257e356
feat: unwrap config namespaces to flat exports + barrel ( #22746 )
2026-04-15 23:29:14 -04:00
Kit Langton
d4cfbd020d
feat: unwrap effect namespaces to flat exports + barrel ( #22745 )
2026-04-15 23:29:12 -04:00
Kit Langton
581d5208ca
feat: unwrap share namespaces to flat exports + barrel ( #22744 )
2026-04-15 23:28:46 -04:00
Kit Langton
a427a28fa9
feat: unwrap project namespaces to flat exports + barrel ( #22743 )
2026-04-15 23:28:46 -04:00
opencode-agent[bot]
0beaf04df5
chore: generate
2026-04-16 03:28:30 +00:00
Kit Langton
80f1f1b5b8
feat: enable type-aware no-floating-promises rule, fix all 177 violations ( #22741 )
2026-04-15 23:27:32 -04:00
Kit Langton
343a564183
feat: unwrap 11 util namespaces to flat exports + barrel ( #22739 )
2026-04-15 23:15:58 -04:00
Kit Langton
b0eae5e12f
feat: bridge permission and provider auth routes behind OPENCODE_EXPERIMENTAL_HTTPAPI ( #22736 )
2026-04-15 23:02:48 -04:00
Kit Langton
702f741267
feat: enable oxlint suspicious category, fix 24 violations ( #22727 )
2026-04-16 02:53:10 +00:00
Kit Langton
665a843086
feat: unwrap Archive namespace to flat exports + barrel ( #22722 )
2026-04-16 02:52:34 +00:00
Kit Langton
1508196c0f
feat: bridge question routes from Hono to Effect HttpApi ( #22718 )
2026-04-15 22:50:22 -04:00
opencode-agent[bot]
f6243603f8
chore: generate
2026-04-16 02:46:39 +00:00
Kit Langton
379e40d772
feat: unwrap InstanceState + EffectBridge namespaces to flat exports + barrel ( #22721 )
2026-04-16 02:45:45 +00:00
Kit Langton
6c7e9f6f3a
refactor: migrate Effect call sites from Flock to EffectFlock ( #22688 )
2026-04-16 02:39:59 +00:00
opencode-agent[bot]
48f88af9aa
chore: update nix node_modules hashes
2026-04-16 02:39:40 +00:00
Kit Langton
60c927cf4f
feat: unwrap Pty namespace to flat exports + barrel ( #22719 )
2026-04-16 02:21:46 +00:00
opencode-agent[bot]
069cef8a44
chore: generate
2026-04-16 02:18:58 +00:00
Kit Langton
cf423d2769
fix: remove 10 unused type-only imports and declarations ( #22696 )
2026-04-16 02:17:59 +00:00
Kit Langton
62ddb9d3ad
feat: unwrap uskill namespace to flat exports + barrel ( #22714 )
2026-04-16 02:17:19 +00:00
Kit Langton
0b975b01fb
feat: unwrap ugit namespace to flat exports + barrel ( #22704 )
2026-04-16 02:16:42 +00:00
Kit Langton
bb90aa6cb2
feat: unwrap uworktree namespace to flat exports + barrel ( #22717 )
2026-04-16 02:16:17 +00:00
Kit Langton
ce4e47a2e3
feat: unwrap uformat namespace to flat exports + barrel ( #22703 )
2026-04-16 02:16:01 +00:00
Kit Langton
e3677c2ba2
feat: unwrap upatch namespace to flat exports + barrel ( #22709 )
2026-04-16 02:15:58 +00:00
Kit Langton
a653a4b887
feat: unwrap usync namespace to flat exports + barrel ( #22716 )
2026-04-16 02:15:46 +00:00
Kit Langton
f7edffc11a
feat: unwrap uglobal namespace to flat exports + barrel ( #22705 )
2026-04-16 02:15:36 +00:00
Kit Langton
dc16488bd7
feat: unwrap uide namespace to flat exports + barrel ( #22706 )
2026-04-16 02:15:21 +00:00