diff --git a/server/src/__tests__/agent-commentary.integration.test.ts b/server/src/__tests__/agent-commentary.integration.test.ts index 9b2c6ae23ae..0bcdf7ea3ec 100644 --- a/server/src/__tests__/agent-commentary.integration.test.ts +++ b/server/src/__tests__/agent-commentary.integration.test.ts @@ -136,7 +136,7 @@ describe("internal agent commentary through both transports", () => { expect(response.status).toBe(403); const body = await response.json() as { error: string; remediation?: string }; expect(body.error).toBe("Board access required"); - expect(body.remediation).toContain(`/${company!.issuePrefix}/activity/commentary`); + expect(body.remediation).toContain(`[Commentary](/${company!.issuePrefix}/activity/commentary)`); }; // Reading other agents' commentary is never a default agent grant. expect(NEW_STANDARD_AGENT_DEFAULT_GRANT_KEYS).not.toContain("commentary:view"); diff --git a/server/src/routes/agent-commentary.ts b/server/src/routes/agent-commentary.ts index a834d74dff3..6921ea58bc9 100644 --- a/server/src/routes/agent-commentary.ts +++ b/server/src/routes/agent-commentary.ts @@ -20,7 +20,7 @@ export function agentCommentaryRoutes(db: Db) { async function denyAgentRead(companyId: string): Promise { const [company] = await db.select({ issuePrefix: companies.issuePrefix }).from(companies).where(eq(companies.id, companyId)).limit(1); throw forbidden("Board access required", company ? { - remediation: `Agents read only their own commentary unless granted commentary:view. People with commentary access can read it at /${company.issuePrefix}/activity/commentary.`, + remediation: `Agents read only their own commentary unless granted commentary:view. People with commentary access can read it on the Commentary page; give them this link: [Commentary](/${company.issuePrefix}/activity/commentary).`, } : undefined); }