fix: convert navigate() calls to Link components for cmd-click support

Replaced button/div onClick + navigate() patterns with React Router
<Link> components so that cmd-click (or ctrl-click) opens pages in a
new browser tab. Changes across:

- AgentDetail: RunListItem, "Issues Touched" items, "Manage" config
  link, "Back to runs" mobile button
- CompanySwitcher: "Company Settings" and "Manage Companies" items
- Approvals: pass detailLink prop instead of onOpen callback
- Org: OrgTree nodes now render as Links

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Forgotten
2026-02-23 14:50:20 -06:00
parent cf4b338cd4
commit 0db2795d1d
4 changed files with 41 additions and 46 deletions

View File

@@ -117,7 +117,7 @@ export function Approvals() {
requesterAgent={approval.requestedByAgentId ? (agents ?? []).find((a) => a.id === approval.requestedByAgentId) ?? null : null}
onApprove={() => approveMutation.mutate(approval.id)}
onReject={() => rejectMutation.mutate(approval.id)}
onOpen={() => navigate(`/approvals/${approval.id}`)}
detailLink={`/approvals/${approval.id}`}
isPending={approveMutation.isPending || rejectMutation.isPending}
/>
))}