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

feat: Rate completed CoS run actions render the agent card inline so feedback can be submitted without opening the drawer

Adam Eivyb35ee551d9ff
diff --git a/client/src/pages/Review.jsx b/client/src/pages/Review.jsx
index 3b5a3855cc..325859d774 100644
--- a/client/src/pages/Review.jsx
+++ b/client/src/pages/Review.jsx
@@ -512,6 +512,8 @@ export default function Review() {
onResolve={handleQueueResolve}
onPromoteAsk={handleQueuePromoteAsk}
onTriage={handleQueueTriage}
+ onFeedbackSaved={fetchQueue}
+ detailOpen={item.id === actionId}
resolving={resolvingQueueIds.has(item.id)}
/>
))}
@@ -871,7 +873,7 @@ function QueueTriageControls({ item, onTriage, disabled = false }) {
);
}
-function QueueRow({ item, onSelect, onDrill, onResolve, onPromoteAsk, onTriage, resolving = false }) {
+function QueueRow({ item, onSelect, onDrill, onResolve, onPromoteAsk, onTriage, onFeedbackSaved, detailOpen = false, resolving = false }) {
const config = QUEUE_SOURCE_CONFIG[item.source] || { icon: Inbox, color: 'text-gray-400' };
const Icon = config.icon;
const borderTone = QUEUE_SEVERITY_STYLE[item.severity] || QUEUE_SEVERITY_STYLE.normal;
@@ -886,6 +888,11 @@ function QueueRow({ item, onSelect, onDrill, onResolve, onPromoteAsk, onTriage,
? item.operations.filter(operation => operation && operation.available !== false)
: [];
const rateOperation = sourceOperations.find((operation) => operation.id === 'rate' && operation.input?.type === 'rating');
+ // Agent-run feedback renders the shared agent card right in the queue so the
+ // rating can be submitted without opening the detail drawer. While that drawer
+ // is open it hosts the card, so the row defers to it (one live card at a time).
+ const feedbackRun = item.source === 'feedback' && item.available !== false && item.availability !== 'unavailable';
+ const inlineFeedback = feedbackRun && !detailOpen;
const inlineActions = item.action
? [{ id: 'resolve', label: item.action }]
: sourceOperations.filter((operation) => operation.id !== 'rate');
@@ -930,9 +937,14 @@ function QueueRow({ item, onSelect, onDrill, onResolve, onPromoteAsk, onTriage,
</p>
)}
</div>
+ {inlineFeedback && (
+ <div className="col-span-2 min-w-0 border-t border-port-border/50 pt-2">
+ <AgentFeedbackReview key={item.sourceRef} item={item} onSaved={onFeedbackSaved} />
+ </div>
+ )}
<div className="col-span-2 flex min-w-0 items-center gap-2 flex-wrap border-t border-port-border/50 pt-2 sm:col-start-2 sm:col-span-1 [&_button]:min-h-[44px] [&_select]:min-h-[44px]">
<QueueInvestigation item={item} />
- {onResolve && rateOperation && (
+ {onResolve && rateOperation && !feedbackRun && (
<button type="button" onClick={() => onSelect?.(item)} className="inline-flex items-center gap-2 rounded border border-port-accent/30 px-3 py-2 text-sm text-port-accent">
<Eye size={14} /> Review run and give feedback
</button>
diff --git a/client/src/pages/Review.test.jsx b/client/src/pages/Review.test.jsx
index 209e51dc07..d3c7f1d6ea 100644
--- a/client/src/pages/Review.test.jsx
+++ b/client/src/pages/Review.test.jsx
@@ -324,12 +324,21 @@ describe('Review Hub queue-card triage (#3282)', () => {
));
});
- it('opens feedback review from the queue instead of a separate rating form', async () => {
+ it('renders the agent run card inline in the queue and submits feedback without opening the drawer', async () => {
api.getReviewQueue.mockResolvedValueOnce({ items: [FEEDBACK_ITEM], sources: {}, partial: false });
+ api.getCosAgent.mockResolvedValue({
+ id: 'agent-example', status: 'completed', taskId: 'user-example',
+ startedAt: '2026-08-01T11:00:00Z', completedAt: '2026-08-01T12:00:00Z',
+ metadata: { taskDescription: 'Full example task context', taskType: 'user' },
+ output: [{ line: 'Example diagnostic output', timestamp: '2026-08-01T12:00:00Z' }],
+ });
+ api.submitCosAgentFeedback.mockResolvedValue({ success: true, agent: { id: 'agent-example', feedback: { rating: 'positive' } } });
render(<Review />);
- fireEvent.click(await screen.findByRole('button', { name: 'Review run and give feedback' }));
- expect(routerState.navigate).toHaveBeenCalledWith('/review/feedback%3Aagent-example?view=today');
- expect(screen.queryByLabelText('Rating (required)')).not.toBeInTheDocument();
+ expect(await screen.findByText('Full example task context')).toBeInTheDocument();
+ expect(screen.queryByRole('button', { name: 'Review run and give feedback' })).not.toBeInTheDocument();
+ fireEvent.click(await screen.findByRole('button', { name: 'Mark as helpful' }));
+ await waitFor(() => expect(api.submitCosAgentFeedback).toHaveBeenCalledWith('agent-example', { rating: 'positive', comment: undefined }, { silent: true }));
+ expect(routerState.navigate).not.toHaveBeenCalled();
});
it.each([['positive', 'Mark as helpful'], ['negative', 'Mark as not helpful']])('reviews the completed run and submits %s feedback using the shared agent card', async (rating, label) => {