feat(FN-4173): enable always-on web search in ResearchView

Adds a changeset for a minor feature that locks the web search provider UI as always-on in ResearchView, with corresponding component and test updates.

Fusion-Task-Id: FN-4173
This commit is contained in:
Fusion
2026-05-12 22:26:36 -07:00
committed by gsxdsm
parent fb00a1d97b
commit cec9bcbd53
4 changed files with 18 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
---
"@runfusion/fusion": patch
---
Align the Research view provider checklist with the always-on web search behavior from FN-4135 by keeping **Web Search** visible as a locked checked option with an **Always on** affordance.

View File

@@ -86,6 +86,11 @@
gap: var(--space-xs);
}
.research-view__provider-lock {
margin-left: var(--space-xs);
color: var(--text-muted);
}
.research-view__history-header {
display: flex;
flex-direction: column;

View File

@@ -278,7 +278,10 @@ export function ResearchView({ projectId, addToast, onOpenSettings, readinessVer
);
}}
/>
<span>{PROVIDER_LABELS[provider] ?? provider}{providerLocked ? " (always on)" : ""}</span>
<span>
{PROVIDER_LABELS[provider] ?? provider}
{providerLocked ? <span className="research-view__provider-lock">Always on</span> : null}
</span>
</label>
);
})}

View File

@@ -384,7 +384,8 @@ describe("ResearchView", () => {
});
mockFetchAuthStatus.mockResolvedValue({ providers: [{ id: "openrouter", type: "api_key", authenticated: true }] });
render(<ResearchView projectId="p1" />);
expect(await screen.findByText("Web Search (always on)")).toBeInTheDocument();
expect(await screen.findByText("Web Search")).toBeInTheDocument();
expect(screen.getByText("Always on")).toBeInTheDocument();
expect(screen.getByText("Page Fetch")).toBeInTheDocument();
expect(screen.getByText("LLM Synthesis")).toBeInTheDocument();
});
@@ -412,7 +413,8 @@ describe("ResearchView", () => {
render(<ResearchView projectId="p1" />);
const webSearch = (await screen.findByLabelText("Web Search (always on)")) as HTMLInputElement;
const webSearch = (await screen.findByLabelText(/Web Search/i)) as HTMLInputElement;
expect(screen.getByText("Always on")).toBeInTheDocument();
const pageFetch = screen.getByLabelText("Page Fetch") as HTMLInputElement;
expect(webSearch.disabled).toBe(true);
expect(webSearch.checked).toBe(true);