Skip to content

feat: add watch mode (v0.3)#40

Merged
gpolanco merged 4 commits intomainfrom
feat/watch
Feb 10, 2026
Merged

feat: add watch mode (v0.3)#40
gpolanco merged 4 commits intomainfrom
feat/watch

Conversation

@gpolanco
Copy link
Copy Markdown
Owner

Summary

  • Add devw watch command that watches .dwf/ for YAML changes and recompiles automatically via chokidar v3
  • Extract executePipeline from compile.ts with structured return types (BridgeResult, CompileResult) for reuse by watch
  • Add watch tab to landing page terminal demo and fix global focus-visible styles

Changes

CLI (packages/cli/)

  • compile.ts: Extract executePipeline function and export BridgeResult, CompileResult, PipelineOptions types
  • watch.ts: New watch command with chokidar watcher, 200ms debounce, per-bridge output, SIGINT cleanup
  • index.ts: Register watch command
  • utils/ui.ts: Add reload icon to shared ICONS
  • package.json: Add chokidar ^3.6.0, update test scripts to build dist before test compilation

Docs

  • README.md: Add devw watch to commands table
  • docs/commands/watch.mdx: New Mintlify docs page
  • docs/docs.json: Register watch in navigation

Landing (apps/landing/)

  • Add watch tab to terminal demo section
  • Add global *:focus-visible rule with var(--accent)
  • Fix active tab border styling

Test plan

  • pnpm test — 151 tests pass (137 existing + 8 pipeline + 6 watch)
  • devw watch starts, shows initial compile, stays alive
  • Edit .dwf/rules/*.yml → recompile triggers within ~400ms
  • Write invalid YAML → error shown, watch continues
  • devw watch --tool claude → only claude bridge in output
  • Ctrl+C → clean exit
  • Landing page: watch tab renders correctly in terminal demo

Add `devw watch` — a long-running process that watches `.dwf/` for
YAML changes and recompiles automatically. Thin wrapper around compile
with debounced filesystem events via chokidar v3.

- Extract `executePipeline` from compile.ts with structured return types
- New watch.ts with chokidar watcher, 200ms debounce, SIGINT cleanup
- Add `reload` icon to shared ICONS in utils/ui.ts
- Register watch command in index.ts
- Add unit tests for executePipeline (8) and integration tests for watch (6)
- Update test scripts to build dist before test compilation
- Add devw watch row to README commands table
- Create docs/commands/watch.mdx for Mintlify docs site
- Register watch page in docs.json navigation between compile and doctor
- Add watch tab to terminal demo section between compile and doctor
- Update command count from six to seven
- Add global *:focus-visible rule using var(--accent) for consistent styling
- Fix active tab border to use border: 1px solid var(--accent)
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
landing Ready Ready Preview, Comment Feb 10, 2026 4:10pm

@gpolanco gpolanco merged commit 050eaae into main Feb 10, 2026
3 checks passed
@gpolanco gpolanco deleted the feat/watch branch February 10, 2026 16:14
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