Skip to content

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

fix: link PR reviews to their owning task queues

[._.]/ Adam Eivya02b2dfbc242
diff --git a/client/src/components/apps/tabs/PullRequestsTab.jsx b/client/src/components/apps/tabs/PullRequestsTab.jsx
index 3eeb2a552d..6b244419e7 100644
--- a/client/src/components/apps/tabs/PullRequestsTab.jsx
+++ b/client/src/components/apps/tabs/PullRequestsTab.jsx
@@ -781,8 +781,10 @@ export default function PullRequestsTab({ appId, appName }) {
// shown — the old link went unconditionally to the Agents
// page, so "Queued — view" landed on a page with nothing on
// it until an agent actually spawned.
+ // Do:Review queues user tasks; the scheduled review and
+ // merge follow-up are system tasks.
const taskHref = action?.taskId
- ? `/cos/tasks?task=${encodeURIComponent(action.taskId)}&source=internal`
+ ? `/cos/tasks?task=${encodeURIComponent(action.taskId)}&source=${kind === 'doReview' ? 'user' : 'internal'}`
: null;
if (actionStatus === 'failed') {
return (
diff --git a/client/src/components/apps/tabs/PullRequestsTab.test.jsx b/client/src/components/apps/tabs/PullRequestsTab.test.jsx
index d438aa5f52..d54b201415 100644
--- a/client/src/components/apps/tabs/PullRequestsTab.test.jsx
+++ b/client/src/components/apps/tabs/PullRequestsTab.test.jsx
@@ -462,7 +462,7 @@ describe('PullRequestsTab', () => {
} }));
expect(await screen.findByRole('link', { name: /Do:Review: Active/ }))
- .toHaveAttribute('href', '/cos/tasks?task=task-doreview-1&source=internal');
+ .toHaveAttribute('href', '/cos/tasks?task=task-doreview-1&source=user');
// The resolve row is backed by a different task and must not follow along.
expect(screen.getByRole('button', { name: 'Resolve & merge' })).toBeInTheDocument();
});
diff --git a/client/src/components/github/GitHubPullRequestActions.jsx b/client/src/components/github/GitHubPullRequestActions.jsx
index 0f43545e8f..6996edbb2b 100644
--- a/client/src/components/github/GitHubPullRequestActions.jsx
+++ b/client/src/components/github/GitHubPullRequestActions.jsx
@@ -49,7 +49,7 @@ export default function GitHubPullRequestActions({ notification, onUpdated }) {
return (
<div className="flex max-w-full min-w-0 flex-wrap items-center gap-1.5">
{current && !current.merged && (
- current.taskId ? <Link className="text-xs text-port-accent hover:underline" to={`/cos/tasks?task=${encodeURIComponent(current.taskId)}&source=internal`}>Review: {ACTION_STATUS_LABEL[current.status] || 'View task'}</Link>
+ current.taskId ? <Link className="text-xs text-port-accent hover:underline" to={`/cos/tasks?task=${encodeURIComponent(current.taskId)}&source=${current.action === 'do-review' ? 'user' : 'internal'}`}>Review: {ACTION_STATUS_LABEL[current.status] || 'View task'}</Link>
: current.appId ? <Link className="text-xs text-port-accent hover:underline" to={`/apps/${encodeURIComponent(current.appId)}/pull-requests`}>Review requested — view PRs</Link> : null
)}
{['do-review', 'untrusted-review'].filter(action => pr[action === 'do-review' ? 'doReviewEligible' : 'reviewEligible']).map(action => (
diff --git a/client/src/pages/GitHub.test.jsx b/client/src/pages/GitHub.test.jsx
index 415969e504..1e7a5e9b17 100644
--- a/client/src/pages/GitHub.test.jsx
+++ b/client/src/pages/GitHub.test.jsx
@@ -451,6 +451,27 @@ describe('GitHub inbox tab', () => {
expect(screen.getByRole('button', { name: 'Merge #7' })).toBeTruthy();
});
+ it('links reviews to their owning task queues through completion and preflight handoff', async () => {
+ mock.getGitHubNotifications.mockResolvedValue({ notifications: [
+ { ...NOTIFICATION, pullRequest: { number: 7, doReviewEligible: true },
+ pullRequestAction: { action: 'do-review', taskId: 'user-review', at: 'review-start' } },
+ { ...NOTIFICATION, threadId: '102', title: 'Outside change', pullRequest: { number: 8, reviewEligible: true },
+ pullRequestAction: { action: 'untrusted-review', taskId: 'review-preflight', at: 'preflight-start' } },
+ ], sync: {} });
+ await renderInbox();
+
+ act(() => {
+ socket.emit('cos:tasks:changed', { task: { id: 'user-review', status: 'completed' } });
+ socket.emit('cos:tasks:changed', { task: { id: 'review-preflight', status: 'completed',
+ metadata: { preflightResultTaskId: 'system-review' } } });
+ });
+
+ expect(screen.getByRole('link', { name: 'Review: Completed — view' }))
+ .toHaveAttribute('href', '/cos/tasks?task=user-review&source=user');
+ expect(screen.getByRole('link', { name: 'Review: Active — view' }))
+ .toHaveAttribute('href', '/cos/tasks?task=system-review&source=internal');
+ });
+
it('opens by default, syncs on arrival, and links only to the stored GitHub page', async () => {
await renderInbox('');
expect(await screen.findByText('Example change')).toBeTruthy();