Keep Compound Engineering navigation surfaces on the Boxes glyph even when stale plugin metadata is served. - Route desktop and mobile plugin nav entries through a dashboard-view icon resolver. - Pin Compound Engineering plugin nav icons to Boxes by plugin id while preserving normal icon fallback behavior for other plugins. - Align manifest/header icon invariants and add regression coverage for stale Sparkles/Grid3X3 metadata. - Add a patch changeset for the published Fusion package. Files changed: .changeset/FN-7198-compound-engineering-icon-match.md | 7 +++++++ packages/dashboard/app/components/LeftSidebarNav.tsx | 4 ++-- packages/dashboard/app/components/MobileNavBar.tsx | 6 +++--- .../app/components/__tests__/LeftSidebarNav.test.tsx | 6 +++++- .../app/components/__tests__/MobileNavBar.test.tsx | 10 +++++++--- .../app/components/__tests__/pluginNavIcon.test.ts | 10 +++++++++- packages/dashboard/app/components/pluginNavIcon.tsx | 12 ++++++++++++ .../src/__tests__/manifest.test.ts | 14 ++++++++++++++ .../src/dashboard/CompoundEngineeringView.tsx | 3 ++- 9 files changed, 61 insertions(+), 11 deletions(-) Fusion-Task-Id: FN-7198 Fusion-Task-Lineage: e910bb82-55a7-4c81-a4fe-947a07b3e308 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
23 lines
989 B
TypeScript
23 lines
989 B
TypeScript
import { Boxes, Grid3X3 } from "lucide-react";
|
|
import { describe, expect, it } from "vitest";
|
|
import { getPluginDashboardViewNavIcon, getPluginNavIcon } from "../pluginNavIcon";
|
|
|
|
describe("getPluginNavIcon", () => {
|
|
it("resolves the Compound Engineering Boxes icon to the registered lucide glyph", () => {
|
|
expect(getPluginNavIcon("Boxes")).toBe(Boxes);
|
|
expect(getPluginNavIcon("Boxes")).not.toBe(Grid3X3);
|
|
});
|
|
|
|
it("pins Compound Engineering dashboard-view nav entries to Boxes even when stale metadata is served", () => {
|
|
expect(getPluginDashboardViewNavIcon({
|
|
pluginId: "fusion-plugin-compound-engineering",
|
|
view: { viewId: "compound-engineering", label: "Compound Engineering", componentPath: "./dashboard-view", icon: "Sparkles" },
|
|
})).toBe(Boxes);
|
|
});
|
|
|
|
it("falls back to Grid3X3 for empty or unknown icon names", () => {
|
|
expect(getPluginNavIcon()).toBe(Grid3X3);
|
|
expect(getPluginNavIcon("not-a-real-plugin-icon")).toBe(Grid3X3);
|
|
});
|
|
});
|