feat(FN-3824): remove dashboard roadmap backend and add reports plugin scaf
The merge introduces a new reports plugin scaffold, removing the dashboard roadmap backend entirely (roadmap routes, suggestions engine, and associated tests deleted), while wiring plugin-based routes as the replacement. It adds universal web fetch to reviewer, merger, and triage agents, isolates Wh Fusion-Task-Id: FN-3824
This commit is contained in:
@@ -49,6 +49,10 @@ export function MessageComposer({
|
||||
const textareaRef = useRef<HTMLTextAreaElement>(null);
|
||||
|
||||
const selectedAgent = useMemo(() => agents.find((agent) => agent.id === toId), [agents, toId]);
|
||||
const prefilledRecipientAgent = useMemo(
|
||||
() => (recipient ? agents.find((agent) => agent.id === recipient.id) : undefined),
|
||||
[agents, recipient],
|
||||
);
|
||||
const recipientIsAgent = toType === "agent";
|
||||
const recipientAlwaysImmediate = recipientIsAgent && selectedAgent?.runtimeConfig?.messageResponseMode === "immediate";
|
||||
const wakeImmediately = recipientIsAgent && (wakeRecipient || recipientAlwaysImmediate);
|
||||
@@ -164,7 +168,7 @@ export function MessageComposer({
|
||||
<span className="message-composer-label">To:</span>
|
||||
<span className="message-composer-recipient-fixed">
|
||||
<Bot size={14} />
|
||||
{recipient.id}
|
||||
{prefilledRecipientAgent?.name || recipient.id}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -255,15 +255,29 @@ describe("MessageComposer", () => {
|
||||
}).not.toThrow();
|
||||
});
|
||||
|
||||
it("pre-fills recipient when provided", () => {
|
||||
it("shows pre-filled recipient agent name when recipient id exists in agents list", () => {
|
||||
render(
|
||||
<MessageComposer
|
||||
{...defaultProps}
|
||||
agents={mockAgents}
|
||||
recipient={{ id: "agent-001", type: "agent" }}
|
||||
/>,
|
||||
);
|
||||
// When recipient is pre-filled, it shows a fixed label instead of dropdown
|
||||
expect(screen.getByText("agent-001")).toBeDefined();
|
||||
|
||||
expect(screen.getByText("Test Agent")).toBeDefined();
|
||||
expect(screen.queryByText("agent-001")).toBeNull();
|
||||
});
|
||||
|
||||
it("falls back to pre-filled recipient id when agent is not in agents list", () => {
|
||||
render(
|
||||
<MessageComposer
|
||||
{...defaultProps}
|
||||
agents={mockAgents}
|
||||
recipient={{ id: "agent-missing", type: "agent" }}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.getByText("agent-missing")).toBeDefined();
|
||||
});
|
||||
|
||||
it("shows loading state while sending", async () => {
|
||||
|
||||
Reference in New Issue
Block a user