Skip to content

chunk 1/13: webview 2-pane layout + release/deps foundations#1

Merged
cogeor merged 5 commits into
mainfrom
land/01-webview-infra
Jun 4, 2026
Merged

chunk 1/13: webview 2-pane layout + release/deps foundations#1
cogeor merged 5 commits into
mainfrom
land/01-webview-infra

Conversation

@cogeor

@cogeor cogeor commented Jun 4, 2026

Copy link
Copy Markdown
Owner

First of 13 chunks landing branch dg/work-sessions-1-5 onto main, folded by sub-theme. CI gates each squash-merge.

This chunk (5 commits):

  • feat(webview): 2-pane layout, light default, inline folder files
  • chore(repo): gitignore plans/ + *.log
  • fix(package): raise Node engine floor to >=20.19.0 (chokidar ESM/CJS)
  • fix(parser): lazy tree-sitter core + move to optionalDependencies
  • test(release): npm pack smoke + CI job (tarball install + CLI/MCP surface)

🤖 Generated with Claude Code

cogeor and others added 5 commits June 4, 2026 02:49
Finish the migration away from the Design/Packages tabs toward a focused
Graph + Folders UI:

- theme: default to light (stored preference still wins); toggle unchanged
- ViewToggle: drop Design + Packages; only Graph + Folders render
- shell: remove the middle design pane, splitter-2, and #package-view —
  layout is now Explorer | Graph (MOUNT_POINTS + parity test updated)
- main/router: drop design/package construction, routes, and the
  design-pane visibility special case
- FolderStructureView: clicking a folder expands its direct files inline
  as leaf nodes (sourced from the worktree), with a caret affordance;
  click again to collapse

The dormant PackageView/DesignTextView modules stay on disk (still
type-check + unit-tested); they are simply no longer wired into the UI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…uardrail

plans/ holds local-only planning docs (now gitignored). The artifact-root
allowlist arch test scanned plans/ prose and flagged 27 .artifacts mentions
that are not production callsites. Skip plans/ the same way the test already
skips .delegate/.arch, restoring a green baseline before the dg work loops.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The CJS bundle require()s chokidar 5 (ESM-only); require() of an ESM module
only works on Node >=20.19.0. engines.node ">=20.0.0" advertised a range that
throws ERR_REQUIRE_ESM on 20.0-20.18. Raise the floor (Option A), pin a
contributor Node via .nvmrc, and pin the CI 20.x leg to the exact floor so a
regression on the true floor is caught.

Implements: 1-package-hardening/PH-01

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Top-level `import Parser from 'tree-sitter'` in the four tree-sitter extractors
forced a mandatory native node-gyp build on every `npm i` and eagerly loaded the
native addon when parser/config.ts was imported (a hot path for TS-only repos).

- Extractors now use an inline `import('tree-sitter')` type-query (no runtime
  require emitted, robust under ts-node) + a lazy `require('tree-sitter')` in the
  constructor alongside the existing lazy grammar require.
- tree-sitter moved from dependencies to optionalDependencies; build_claude.ts
  now also externalizes optionalDependencies so esbuild never inlines the addon.
- registry probes core availability and warns when grammars are present but the
  native core failed to build; scan wraps getParser so a missing-native throw
  degrades to an actionable ScanResult error, not a crash.
- New test asserts importing parser/config.ts succeeds with tree-sitter stubbed
  to throw (config-load never touches the native addon).

Implements: 1-package-hardening/PH-02

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… surface)

CI only compiled+tested the source tree, so install/start blockers (missing
files[] entries, the chokidar ESM/CJS require crash, a mandatory native
tree-sitter build) were invisible until a real user installed the package.

scripts/pack-smoke.js builds, `npm pack`s, installs the tarball into an isolated
temp project + temp HOME, then runs `describe`, `serve --no-open --port 0`,
`scan` on a tiny .ts fixture, and a minimal `mcp` initialize+tools/list
handshake. `install --dry-run --print` is soft-skipped until that command lands.
Wired as a dedicated `pack-smoke` CI job on Node 20.19.0 + 22.x across
ubuntu-latest AND windows-latest (where native/bin/tarball behavior diverges).

Implements: 1-package-hardening/PH-09

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cogeor cogeor merged commit 117ec0c into main Jun 4, 2026
6 checks passed
@cogeor cogeor deleted the land/01-webview-infra branch June 4, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant