Compare commits
2 Commits
b0bfc66d65
...
43f29ee904
| Author | SHA1 | Date | |
|---|---|---|---|
| 43f29ee904 | |||
| 18a42873b2 |
@@ -1,19 +1,19 @@
|
|||||||
---
|
---
|
||||||
description: Build the dashboard UI if needed and print its URL
|
description: Rebuild the dashboard UI and print its URL
|
||||||
---
|
---
|
||||||
|
|
||||||
Build the dashboard bundle if it is not there yet, then print the URL. The
|
Rebuild the dashboard bundle, then print the URL. Always forces a rebuild so a
|
||||||
bootstrap already builds it on session start, so this is usually a no-op — use
|
stale bundle (e.g. after a fix commit landed but the bootstrap's build predates
|
||||||
it to force a rebuild, or to finish the build if the bootstrap's own attempt
|
it) never serves silently. Also finishes the build if the bootstrap's own
|
||||||
failed (check `~/.claude/agent-dashboard/runtime/client-build.log`).
|
attempt failed (check `~/.claude/agent-dashboard/runtime/client-build.log`).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
node "${CLAUDE_PLUGIN_ROOT}/scripts/plugin-open.js"
|
node "${CLAUDE_PLUGIN_ROOT}/scripts/plugin-open.js" --force
|
||||||
```
|
```
|
||||||
|
|
||||||
The first run installs the client toolchain and takes a few minutes; later runs
|
Install + build takes a few minutes if the client toolchain isn't already
|
||||||
print the URL immediately. No server restart is needed — the server already
|
installed; otherwise the rebuild itself takes ~10-15s. No server restart is
|
||||||
serves from that directory.
|
needed — the server already serves from that directory.
|
||||||
|
|
||||||
Then help the user open it:
|
Then help the user open it:
|
||||||
|
|
||||||
@@ -25,5 +25,4 @@ uname -s
|
|||||||
- `Linux` → `xdg-open <url>`
|
- `Linux` → `xdg-open <url>`
|
||||||
- otherwise → tell them to open the URL in a browser.
|
- otherwise → tell them to open the URL in a browser.
|
||||||
|
|
||||||
Keep the output to a few lines. Pass `--force` to the script only if the user
|
Keep the output to a few lines.
|
||||||
asks for a rebuild.
|
|
||||||
|
|||||||
@@ -79,6 +79,13 @@ describe("syncMcp — reading and relocating", () => {
|
|||||||
`${lane.cwd}/.playwright-mcp/profiles/default`
|
`${lane.cwd}/.playwright-mcp/profiles/default`
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("falls back to the lane's own cwd when source_repo is null (adopted lane)", async () => {
|
||||||
|
const lane = makeLane(null);
|
||||||
|
writeClaudeJson({ [lane.cwd]: { mcpServers: { playwright: { command: "npx", args: [] } } } });
|
||||||
|
const result = await laneMcp.syncMcp(lane);
|
||||||
|
assert.deepEqual(result.servers, ["playwright"]);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("syncMcp — Playwright output-dir pinning", () => {
|
describe("syncMcp — Playwright output-dir pinning", () => {
|
||||||
|
|||||||
@@ -120,8 +120,9 @@ function excludeFromGit(laneDir, line) {
|
|||||||
* @returns {{servers: string[], profilesSeeded: string[]}}
|
* @returns {{servers: string[], profilesSeeded: string[]}}
|
||||||
*/
|
*/
|
||||||
async function syncMcp(lane) {
|
async function syncMcp(lane) {
|
||||||
const sourceServers = readSourceMcpServers(lane.source_repo);
|
const sourceRepo = lane.source_repo || lane.cwd;
|
||||||
const relocated = relocate(sourceServers, lane.source_repo, lane.cwd);
|
const sourceServers = readSourceMcpServers(sourceRepo);
|
||||||
|
const relocated = relocate(sourceServers, sourceRepo, lane.cwd);
|
||||||
pinPlaywrightOutputDir(relocated, lane.cwd);
|
pinPlaywrightOutputDir(relocated, lane.cwd);
|
||||||
|
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
@@ -130,7 +131,7 @@ async function syncMcp(lane) {
|
|||||||
);
|
);
|
||||||
excludeFromGit(lane.cwd, ".mcp.json");
|
excludeFromGit(lane.cwd, ".mcp.json");
|
||||||
|
|
||||||
const profilesSeeded = seedProfiles(lane.source_repo, lane.cwd);
|
const profilesSeeded = seedProfiles(sourceRepo, lane.cwd);
|
||||||
|
|
||||||
return { servers: Object.keys(relocated), profilesSeeded };
|
return { servers: Object.keys(relocated), profilesSeeded };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user