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
Editable MCP server URL, Tool/Simulation dropdowns, demo mode (#18)
Replace inspectMode/prodTools with a unified Tool + Simulation dropdown model.
The Tool dropdown is always visible and the Simulation dropdown shows available
fixtures with a "None (call server)" option. The MCP server URL is always
editable with connection status. Add demoMode prop for marketing embeds. The
--prod-tools flag now controls whether external MCP callers (Claude, ChatGPT)
get real handler results or simulation mocks.
|`--prod-tools --prod-resources`| Production bundle | Real handlers | Final smoke test (simulator shell around production behavior) |
65
+
-**Tool dropdown** — selects which tool to inspect. Always visible when tools exist.
66
+
-**Simulation dropdown** — selects a simulation fixture with mock data. Shown when fixtures exist for the selected tool. Includes a "None (call server)" option to bypass mock data and call the real handler via the **Run** button.
72
67
73
-
```bash
74
-
# Integration test: real tool handlers with HMR UI
75
-
sunpeak dev --prod-tools
68
+
For programmatic testing, these map to URL parameters:
76
69
77
-
# CI/E2E: production bundles with mock data
78
-
sunpeak dev --prod-resources
70
+
```bash
71
+
# Mock data renders immediately (simulation fixture selected):
When `--prod-resources` is used, `sunpeak build` runs automatically before the dev server starts. The built HTML is served from `dist/`.
78
+
### `--prod-resources` flag
79
+
80
+
When `--prod-resources` is used, `sunpeak build` runs automatically before the dev server starts. The built HTML is served from `dist/` instead of Vite HMR. Useful for catching build regressions in CI/E2E testing.
81
+
82
+
```bash
83
+
# CI/E2E: production bundles with simulation mock data
Override `callServerTool` resolution. When provided, enables the**Prod Tools** toggle in the sidebar. In Prod Tools mode, tool calls are forwarded to this callback instead of using simulation mock data. The `sunpeak dev` command wires this up automatically.
47
+
Handler for tool calls. When the user clicks**Run**, or when the app calls `callServerTool`, calls are forwarded to this callback. The `sunpeak dev` command wires this up automatically.
Direct tool handler call, bypassing MCP server mock data. Used by the **Run** button to call real handlers. Falls back to `onCallTool` if not provided.
Initial state of the Prod Resources toggle. When `true`, the simulator loads resources from `dist/` production builds instead of HMR. Set by the `--prod-resources` CLI flag.
0 commit comments