feat(web): add orchestrator events widget with matrix signal visibility
All checks were successful
ci/woodpecker/push/web Pipeline was successful
All checks were successful
ci/woodpecker/push/web Pipeline was successful
This commit is contained in:
@@ -55,6 +55,15 @@ const WIDGET_REGISTRY = {
|
||||
minWidth: 1,
|
||||
minHeight: 1,
|
||||
},
|
||||
OrchestratorEventsWidget: {
|
||||
name: "orchestrator-events",
|
||||
displayName: "Orchestrator Events",
|
||||
description: "Recent events and stream health for orchestration",
|
||||
defaultWidth: 2,
|
||||
defaultHeight: 2,
|
||||
minWidth: 1,
|
||||
minHeight: 1,
|
||||
},
|
||||
} as const;
|
||||
|
||||
type WidgetRegistryKey = keyof typeof WIDGET_REGISTRY;
|
||||
|
||||
@@ -12,6 +12,9 @@ vi.mock("@/components/widgets", () => ({
|
||||
AgentStatusWidget: ({ id }: { id: string }): React.JSX.Element => (
|
||||
<div>Agent Status Widget {id}</div>
|
||||
),
|
||||
OrchestratorEventsWidget: ({ id }: { id: string }): React.JSX.Element => (
|
||||
<div>Orchestrator Events Widget {id}</div>
|
||||
),
|
||||
}));
|
||||
|
||||
function createWidgetPlacement(id: string): WidgetPlacement {
|
||||
@@ -34,4 +37,11 @@ describe("WidgetRenderer", () => {
|
||||
render(<WidgetRenderer widget={createWidgetPlacement("agent-status-123")} />);
|
||||
expect(screen.getByText("Agent Status Widget agent-status-123")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("renders hyphenated orchestrator-events widget IDs correctly", () => {
|
||||
render(<WidgetRenderer widget={createWidgetPlacement("orchestrator-events-123")} />);
|
||||
expect(
|
||||
screen.getByText("Orchestrator Events Widget orchestrator-events-123")
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
CalendarWidget,
|
||||
QuickCaptureWidget,
|
||||
AgentStatusWidget,
|
||||
OrchestratorEventsWidget,
|
||||
} from "@/components/widgets";
|
||||
import type { WidgetPlacement } from "@mosaic/shared";
|
||||
|
||||
@@ -24,6 +25,7 @@ const WIDGET_COMPONENTS = {
|
||||
calendar: CalendarWidget,
|
||||
"quick-capture": QuickCaptureWidget,
|
||||
"agent-status": AgentStatusWidget,
|
||||
"orchestrator-events": OrchestratorEventsWidget,
|
||||
};
|
||||
|
||||
const WIDGET_CONFIG = {
|
||||
@@ -43,6 +45,10 @@ const WIDGET_CONFIG = {
|
||||
displayName: "Agent Status",
|
||||
description: "View running agent sessions",
|
||||
},
|
||||
"orchestrator-events": {
|
||||
displayName: "Orchestrator Events",
|
||||
description: "Recent orchestration events and stream health",
|
||||
},
|
||||
};
|
||||
|
||||
export function WidgetRenderer({
|
||||
|
||||
Reference in New Issue
Block a user