Skip to content

feat(cli): wmill dev with per-flow proxy and responsive Dev UI#8529

Draft
Guilhem-lm wants to merge 11 commits intomainfrom
glm/add-local-dev-proxy-v2
Draft

feat(cli): wmill dev with per-flow proxy and responsive Dev UI#8529
Guilhem-lm wants to merge 11 commits intomainfrom
glm/add-local-dev-proxy-v2

Conversation

@Guilhem-lm
Copy link
Copy Markdown
Contributor

@Guilhem-lm Guilhem-lm commented Mar 25, 2026

Summary

  • Add --path and --proxy-port flags to wmill dev for single-flow watching with reverse proxy (replaces standalone wmill flow dev)
  • Add round-trip support: editing flows in the Dev UI writes changes back to disk (disabled in VS Code iframe)
  • Auto-generate .claude/launch.json for flow and raw_app folders during wmill init and wmill sync pull
  • Auto-detect flow path from cwd when running wmill dev inside a flow folder
  • Responsive Dev page layout: horizontal split when portrait, vertical split when landscape
  • Move Test Flow button into the graph pane (top-right of graph, not page)
  • Hide splitter handle when only one pane is active
  • Fix flow graph height clamping between minHeight and maxHeight
  • Claude Desktop/CLI detection hints in wmill flow new and wmill app new

Usage Examples

1. wmill dev without proxy (preview any script/flow)

cd my-windmill-workspace
wmill dev
# Opens http://localhost:3000/dev?workspace=...
# Automatically watches the last modified file
# Edit locally → changes appear in browser

# Or target a specific path:
wmill dev --path u/admin/my_script

2. wmill dev with proxy for Claude Desktop

cd my-windmill-workspace/f/local-dev/handle_user_subscription__flow
wmill dev --proxy-port 4000
# Auto-detects the flow path from cwd
# Starts reverse proxy on port 4000
# Claude Desktop preview connects to localhost:4000

This is what the auto-generated .claude/launch.json does:

{
  "version": "0.0.1",
  "configurations": [{
    "name": "windmill",
    "runtimeExecutable": "bash",
    "runtimeArgs": ["-c", "wmill dev --proxy-port ${PORT:-4000}"],
    "port": 4000,
    "autoPort": true
  }]
}

App demo:

Snake.mov

Flow demo:

flow.demo.mov

3. wmill app new + open Claude session

wmill app new
# Creates a new raw app scaffold with .claude/launch.json
# Detects Claude CLI/Desktop and prints instructions:
#   → "cd <app-path> && claude" (if CLI installed)
#   → "Open Claude Desktop with <app-path> as root folder" (if Desktop installed)
# Claude Desktop can then use /preview to launch the dev server

Test plan

  • Run wmill dev --path f/some/flow --proxy-port 4000 and verify proxy forwards to Windmill
  • Run wmill dev inside a flow folder and verify auto-detection works
  • Edit flow in Dev UI and verify changes written back to local files
  • Run wmill init and verify .claude/launch.json created in flow and raw_app folders
  • Run wmill sync pull and verify launch.json generated for new flows and apps
  • Run wmill flow new and verify Claude hints are printed
  • Resize Dev page window: wide → side-by-side split, tall → top/bottom split
  • Open an aiagent step and verify no splitter handle is visible
  • Open a large flow and verify the graph respects max height

🤖 Generated with Claude Code

Guilhem-lm and others added 4 commits March 25, 2026 16:10
…y and launch.json

Also generates .claude/launch.json for existing flow folders during `wmill init`.

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

- Add .claude/launch.json to generated app scaffold for Claude Code preview support
- Add "Open in Claude Desktop?" prompt that creates a CLI session and opens it
  in Claude Desktop Code mode via the claude://resume deep link
- Improve default CSS template with body background, system fonts, and padding

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 25, 2026

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0ac96b9
Status: ✅  Deploy successful!
Preview URL: https://92ccc3e3.windmill.pages.dev
Branch Preview URL: https://glm-add-local-dev-proxy-v2.windmill.pages.dev

View logs

Guilhem-lm and others added 7 commits March 25, 2026 18:08
The flow detection in loadPaths only checked the configured suffix
(dotted or non-dotted), so users with nonDottedPaths=true who had
.flow folders (or vice versa) would see inline script edits treated
as standalone script changes instead of flow changes.

Now checks both suffix forms everywhere: type classification,
folder path extraction, path stripping, and loadWmPath lookup.
Also adds raw_app launch.json generation to init and sync pull.

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

Update cli-commands, write-flow, and raw-app skills to document the new
local dev workflow (wmill dev --path, --proxy-port, .claude/launch.json).
Add wmill script preview and wmill flow preview to all script/flow skills
so agents know how to test without deploying.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Append &path= to the printed/opened URL when --path is specified
- Use open.default(url) instead of open.openApp for more reliable browser opening

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Show contextual instructions for previewing flows based on available tools.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolved conflict in FlowModuleSchemaMap.svelte, taking main's
refactored move logic with affectedGroups/commit pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The ignore() function uses isFlowPath() which only checks the configured
suffix (__flow or .flow), causing files in the other variant to be silently
ignored. Bypass the ignore check for any file inside a flow folder and
force flow type detection regardless of suffix configuration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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