fix(browser): default control url uses 18791

This commit is contained in:
Peter Steinberger
2025-12-13 15:29:39 +00:00
parent 2d36ae6326
commit d7a8d9a1c7
8 changed files with 21 additions and 21 deletions

View File

@@ -8,8 +8,8 @@ describe("browser config", () => {
it("defaults to enabled with loopback control url and lobster-orange color", () => {
const resolved = resolveBrowserConfig(undefined);
expect(resolved.enabled).toBe(true);
expect(resolved.controlPort).toBe(18790);
expect(resolved.cdpPort).toBe(18791);
expect(resolved.controlPort).toBe(18791);
expect(resolved.cdpPort).toBe(18792);
expect(resolved.controlHost).toBe("127.0.0.1");
expect(resolved.color).toBe("#FF4500");
expect(shouldStartLocalBrowserServer(resolved)).toBe(true);
@@ -17,7 +17,7 @@ describe("browser config", () => {
it("normalizes hex colors", () => {
const resolved = resolveBrowserConfig({
controlUrl: "http://localhost:18790",
controlUrl: "http://localhost:18791",
color: "ff4500",
});
expect(resolved.color).toBe("#FF4500");
@@ -25,7 +25,7 @@ describe("browser config", () => {
it("falls back to default color for invalid hex", () => {
const resolved = resolveBrowserConfig({
controlUrl: "http://localhost:18790",
controlUrl: "http://localhost:18791",
color: "#GGGGGG",
});
expect(resolved.color).toBe("#FF4500");
@@ -33,7 +33,7 @@ describe("browser config", () => {
it("treats non-loopback control urls as remote", () => {
const resolved = resolveBrowserConfig({
controlUrl: "http://example.com:18790",
controlUrl: "http://example.com:18791",
});
expect(shouldStartLocalBrowserServer(resolved)).toBe(false);
});
@@ -48,7 +48,7 @@ describe("browser config", () => {
it("rejects unsupported protocols", () => {
expect(() =>
resolveBrowserConfig({ controlUrl: "ws://127.0.0.1:18790" }),
resolveBrowserConfig({ controlUrl: "ws://127.0.0.1:18791" }),
).toThrow(/must be http/i);
});
});

View File

@@ -1,5 +1,4 @@
export const DEFAULT_CLAWD_BROWSER_ENABLED = true;
export const DEFAULT_CLAWD_BROWSER_CONTROL_URL = "http://127.0.0.1:18790";
export const DEFAULT_CLAWD_BROWSER_CDP_PORT = 18791;
export const DEFAULT_CLAWD_BROWSER_CONTROL_URL = "http://127.0.0.1:18791";
export const DEFAULT_CLAWD_BROWSER_COLOR = "#FF4500";
export const DEFAULT_CLAWD_BROWSER_PROFILE_NAME = "clawd";