Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
feat: surface the goal-fidelity follow-up's filed issue and queued task on the agent card
[._.]/ Adam Eivy2301e1d70317
diff --git a/client/src/components/cos/tabs/AgentCard.jsx b/client/src/components/cos/tabs/AgentCard.jsxindex 7de69d49d6..b6d1c3f708 100644--- a/client/src/components/cos/tabs/AgentCard.jsx+++ b/client/src/components/cos/tabs/AgentCard.jsx@@ -234,6 +234,33 @@ function GoalFidelityPanel({ review }) {</div>)}{review.evidence && <p className="mt-1.5 text-xs text-gray-400">{review.evidence}</p>}+ <GoalFidelityFollowUp followUp={review.followUp} />+ </div>+ );+}++// What the configured follow-up actually did with this finding (#7690) — the+// issue it filed or reused, and the task it queued. Rendered here rather than+// only logged, because the whole point of the follow-up is that the finding+// outlives the run record: a filed issue nobody can reach from the card is+// half-delivered. An arm that could not run says so, with its reason.+function GoalFidelityFollowUp({ followUp }) {+ if (!followUp) return null;+ const { issue, issueError, taskId, taskError } = followUp;+ return (+ <div className="mt-1.5 text-xs text-gray-400 flex flex-col gap-0.5">+ {issue?.url && (+ <a href={issue.url} target="_blank" rel="noreferrer" className="text-port-accent hover:underline w-fit">+ {issue.duplicate ? 'Already tracked as' : 'Filed as'} {issue.number ? `#${issue.number}` : 'an issue'}+ </a>+ )}+ {issueError && <span className="text-port-warning">No issue filed: {issueError}</span>}+ {taskId && (+ <Link className="text-port-accent hover:underline w-fit" to={`/cos/tasks?task=${encodeURIComponent(taskId)}&source=internal`}>+ View the queued follow-up task+ </Link>+ )}+ {taskError && <span className="text-port-warning">No follow-up queued: {taskError}</span>}</div>);}@@ -989,7 +1016,12 @@ export default function AgentCard({ agent, onPause, onKill, onDelete, onResume,)}{agent.result?.goalFidelity && <GoalFidelityPanel review={agent.result.goalFidelity} />}- {completed && !remote && ['fix-first', 'rethink'].includes(agent.result?.goalFidelity?.verdict) && (+ {/* The manual button is the fallback for an install that has not armed+ the automatic follow-up. Once that already queued a task for this+ finding, offering it again would queue a second agent on the same+ work — the panel above links the one that exists instead. */}+ {completed && !remote && !agent.result?.goalFidelity?.followUp?.taskId+ && ['fix-first', 'rethink'].includes(agent.result?.goalFidelity?.verdict) && (<InvestigateFindingsButton key={agent.id} agent={agent} />)}diff --git a/client/src/components/cos/tabs/AgentCard.test.jsx b/client/src/components/cos/tabs/AgentCard.test.jsxindex 18899e40c2..45c65efd69 100644--- a/client/src/components/cos/tabs/AgentCard.test.jsx+++ b/client/src/components/cos/tabs/AgentCard.test.jsx@@ -776,6 +776,69 @@ describe('AgentCard goal fidelity', () => {expect(screen.getByText('no tests were run')).toBeInTheDocument();});+ // #7690: the automatic follow-up — the finding's durable half. What it did+ // belongs beside the verdict, or a filed issue is unreachable from the card+ // that reported the problem.+ it('links the issue the follow-up filed and the task it queued', () => {+ render(+ <MemoryRouter>+ <AgentCard agent={withReview({+ verdict: 'rethink',+ followUp: { issue: { number: 42, url: 'https://example.com/issues/42', duplicate: false }, taskId: 'cos-9' },+ })} completed />+ </MemoryRouter>+ );+ expect(screen.getByRole('link', { name: 'Filed as #42' })).toHaveAttribute('href', 'https://example.com/issues/42');+ expect(screen.getByRole('link', { name: 'View the queued follow-up task' }))+ .toHaveAttribute('href', '/cos/tasks?task=cos-9&source=internal');+ });++ it('says an existing issue already tracks the finding rather than implying it filed one', () => {+ render(+ <MemoryRouter>+ <AgentCard agent={withReview({+ verdict: 'rethink',+ followUp: { issue: { number: 5, url: 'https://example.com/issues/5', duplicate: true } },+ })} completed />+ </MemoryRouter>+ );+ expect(screen.getByRole('link', { name: 'Already tracked as #5' })).toBeInTheDocument();+ });++ // Silence here would read as the follow-up having found nothing to do, on a+ // card whose whole point is that something does need doing.+ it('names why an arm could not run', () => {+ render(+ <MemoryRouter>+ <AgentCard agent={withReview({+ verdict: 'rethink',+ followUp: { issueError: 'could not read the github issue list', taskError: 'the follow-up task could not be queued' },+ })} completed />+ </MemoryRouter>+ );+ expect(screen.getByText(/could not read the github issue list/)).toBeInTheDocument();+ expect(screen.getByText(/could not be queued/)).toBeInTheDocument();+ });++ // Offering the manual button after the automation already queued a task would+ // put two agents on one finding.+ it('withdraws the manual button once the follow-up queued a task, and keeps it otherwise', () => {+ const { unmount } = render(+ <MemoryRouter>+ <AgentCard agent={withReview({ verdict: 'rethink', followUp: { taskId: 'cos-9' } })} completed />+ </MemoryRouter>+ );+ expect(screen.queryByRole('button', { name: 'Investigate findings' })).not.toBeInTheDocument();+ unmount();++ render(+ <MemoryRouter>+ <AgentCard agent={withReview({ verdict: 'rethink', followUp: { issue: { number: 42, url: 'u' } } })} completed />+ </MemoryRouter>+ );+ expect(screen.getByRole('button', { name: 'Investigate findings' })).toBeInTheDocument();+ });+it('shows a clean ship verdict, and renders nothing at all for a run the gate never judged', () => {const { unmount } = render(<MemoryRouter>