Skip to content

Commit 720bbde

Browse files
committed
test(web): adopt upstream private-host favicon filter in workspace tree
Upstream pingdotgg#5644 added isPublicFaviconHost, and the merged favicon.ts now returns null for private/loopback hosts (Google's favicon service cannot resolve them). buildTree.test.ts pinned the old behavior with a `localhost:3000` url node expecting a favicon URL, so the merge broke it cleanly with no conflict. Point the favicon assertion at a public URL (example.com) and add a localhost url node asserting no iconUrl, so the new filter is pinned and a future sync that loosens it conflicts loudly here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y7hnoykEhpviir998tucot
1 parent cd9333a commit 720bbde

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

‎apps/web/src/unifiedWorkspace/buildTree.test.ts‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,17 @@ describe("buildUnifiedWorkspaceTree — leaf capability flags", () => {
535535
id: "url-1",
536536
parentId: null,
537537
rank: "b0",
538+
label: "Docs",
539+
url: "https://example.com",
540+
}),
541+
// Google's favicon service cannot resolve private/loopback hosts, so
542+
// upstream's isPublicFaviconHost filters them out (feat #5644). This
543+
// localhost node pins that: it must carry no iconUrl, so a future
544+
// sync that loosens the filter conflicts loudly here.
545+
urlEntry({
546+
id: "url-2",
547+
parentId: null,
548+
rank: "b1",
538549
label: "Local",
539550
url: "http://localhost:3000",
540551
}),
@@ -547,9 +558,11 @@ describe("buildUnifiedWorkspaceTree — leaf capability flags", () => {
547558
expect(node.isLive).toBe(false);
548559
expect(node.canMove).toBe(true);
549560
}
550-
const urlNode = roots.find((n) => n.kind === "url")!;
561+
const urlNode = roots.find((n) => n.kind === "url" && n.label === "Docs")!;
551562
expect(urlNode.canRename).toBe(true);
552563
expect(urlNode.iconUrl).toContain("google.com/s2/favicons");
564+
const localUrlNode = roots.find((n) => n.kind === "url" && n.label === "Local")!;
565+
expect(localUrlNode.iconUrl).toBeUndefined();
553566
const commandNode = roots.find((n) => n.kind === "command")!;
554567
expect(commandNode.canRename).toBe(false);
555568
expect(commandNode.canRemove).toBe(true);

0 commit comments

Comments
 (0)