feat(FN-5222): remove docs link from secrets view

Removes a docs link from the SecretsView component and adds a regression test to cover the change.

Fusion-Task-Id: FN-5222
This commit is contained in:
Fusion (runfusion.ai)
2026-05-20 03:00:55 -07:00
committed by gsxdsm
parent c89d68dd2d
commit 99665009f3
2 changed files with 17 additions and 2 deletions

View File

@@ -275,8 +275,7 @@ export const SecretsView = ({ addToast }: SecretsViewProps) => {
</div>
</div>
<p className="secrets-sync-copy">
Shared passphrase used to wrap cross-node secret bundles. Both nodes in a sync pair must share the same value. Stored locally only; never transmitted. {" "}
<a href="/docs/secrets.md#cross-node-sync" target="_blank" rel="noreferrer">Learn more</a>
Shared passphrase used to wrap cross-node secret bundles. Both nodes in a sync pair must share the same value. Stored locally only; never transmitted.
</p>
</article>

View File

@@ -60,6 +60,22 @@ describe("SecretsView", () => {
expect(screen.getByRole("button", { name: "Clear" })).toBeInTheDocument();
});
it("FN-5222: does not render a docs link in the cross-node sync card", async () => {
vi.stubGlobal(
"fetch",
vi
.fn()
.mockResolvedValueOnce(mockJsonResponse({ ok: true, body: { secrets: [] } }))
.mockResolvedValueOnce(mockJsonResponse({ ok: true, body: { configured: false } })),
);
render(<SecretsView addToast={vi.fn()} />);
await screen.findByText("Not configured");
expect(screen.queryByRole("link", { name: "Learn more" })).not.toBeInTheDocument();
expect(document.querySelector('a[href^="/docs/secrets.md"]')).toBeNull();
});
it("submitting matching passphrases issues PUT and re-fetches status", async () => {
const fetchMock = vi
.fn()