Hotfixes (#293)
* fix(mcp): delegate tool carries the collision surface the B1a gate demands
TASK_AT_DELEGATE (5fc85419) requires intends_to_touch on code delegations,
but the MCP delegate tool never gained the parameter — PMs were rejected
with incomplete_input and could never comply (live fleet-wide delegation
wall, 2026-07-02). Adds intends_to_touch / adds_migration / touches_shared /
depends_on to the tool and forwards them; parity test locks the invariant.
* fix(git): assembly-integrity guard accepts squash-merged children
git cherry patch-matches each child commit individually, so a squash merge
(N patches -> one commit, new patch-id) read as 'work missing' and the #11
guard refused every legitimate submit_up (live 2026-07-02: S6 cell, three
squash-merged children at the branch tip). A parent commit carrying the
child's [taskid8] prefix now proves the child landed; children with no
marker stay flagged — the original incident the guard exists for.
* fix(git): diff head prefers origin when the local ref is behind it
Assembled branches advance on ORIGIN as child PRs squash-merge on GitHub,
but _resolve_head_ref preferred the inspecting clone's parked local ref —
the PR-gate reviewer's evidence diff was built from a pre-merge snapshot
and re-flagged work that had already landed (two false pr_fail verdicts
on the S6 cell PR, live 2026-07-02). When both refs exist and the local
ref is strictly behind origin, resolve to origin/<branch>; local-ahead
(unpushed) and diverged refs keep priority, single-ref cases unchanged.
* test(mcp): plan-gate fields must be tool parameters (parity class lock)
Extends the delegate parity test to every choreographer plan-depth gate:
a gate that can reject with missing=[field] must name only fields the
corresponding MCP tool can send, else the agent can never comply.
* perf(api): wire TaskSummaryResponse into a bounded /tasks/summary route
The panel fetched /api/tasks unbounded and full-fat — 2MB per refresh
measured live (2026-07-02), ~21KB/task, and the trimmed
TaskSummaryResponse was dead code. /tasks/summary returns exactly the
fields list views render (~50x lighter); the status-only branch of
/tasks now honors its limit, and the eleven unbounded task list routes
are capped.
* perf(panel): kill the per-page request flood and fat payloads
Every page load funneled ~85 default-prefetch RSC requests + 665KB of
images + the 2MB task list through the browser's six HTTP/1.1
connections — real data calls queued ~2s before being sent (measured
via Playwright resource timing, 2026-07-02).
- prefetch={false} on all 59 Links (sidebar, task rows, kanban cards,
list rows) — ~85 requests/refresh down to a handful
- icon/apple-icon/logo resized to render size: 665KB -> 54KB; unused
219KB PNG removed
- task list fetches the trimmed /tasks/summary (2MB -> ~100KB),
normalized into the Task shape so list consumers keep their types
- ReactQueryDevtools rendered only in development
* fix(api): Annotated limit defaults so direct-call tests get real ints
Query(...) positional defaults arrive as Query objects when a route
function is invoked outside the HTTP layer (integration tests call
handlers directly) and broke the new [:limit] slices.
* fix(api,panel): summary carries completed_at + board_review_complete
The metrics page computes velocity client-side from completed_at and the
CEO approval queue gates on board_review_complete — both were nulled by
the summary normalizer, so Completed Today/Week read 0 against 63 real
completions and approved-board tasks could vanish from the queue. The
queue also renders quick_context, so it fetches the full list (small,
status-scoped) via tasksApi.listFull instead of the summary.
* fix(runtime): spawn manifest workspace_path follows the task's project
_build_manifest_for_agent hardcoded the roboco project workspace for
every agent; a guard-core task's manifest claimed /data/workspaces/roboco
while the container cwd sat in the task worktree. The manifest now takes
the same _resolve_workspace_cwd the container -w uses — one resolver,
both surfaces agree by construction.
* fix(runtime): respawn breaker catches status ping-pong loops
Any status CHANGE fully reset the strike counter, so a blocked <->
in_progress oscillation — which changes status on every spawn while
advancing nothing — never tripped the gate (live 2026-07-02: 8 spawns
over two hours). A status never seen on the (agent, task) still fully
resets; a REVISITED status gets a bounded reset budget mirroring
tracing_resets, after which strikes accrue and the gate fires.
* fix(runtime): unassigned-QA dispatch spawns without pre-claiming
The transitioning pre-claim moved awaiting_qa -> claimed before the QA
agent existed; the spawned agent's claim_review/pass_review both demand
awaiting_qa, so it bounced twice and unclaimed (live 2026-07-02,
ba7b751c). Matches _spawn_assigned_qa and the external-PR reviewer
dispatch: no pre-claim, the agent claims itself via claim_review.
* fix(tests): narrow await_args before kwargs access (mypy union-attr)
* Minor upgrades
* fix(policy): team-match gate gains org-wide exemption; resume/unblock/activate now team-matched
needs_team_match sat in its permissive fallback since shipping (no
caller supplied Context.agent_team) and three PM verbs opted out
entirely — a misrouted frontend cell PM blocked, escalated, and held a
backend task through exactly that gap (live 2026-07-02). Org-wide roles
(main_pm, board, CEO, PR reviewer) are exempt so escalation handling
and root-PR gating keep working; cell-scoped roles are now enforced
wherever the caller supplies the team.
---------
Co-authored-by: Renn F <rennf93@users.noreply.github.com>
|
Before Width: | Height: | Size: 214 KiB |
|
Before Width: | Height: | Size: 436 KiB After Width: | Height: | Size: 7.3 KiB |
@@ -154,7 +154,7 @@ function SessionDetailContent() {
|
||||
if (!session) {
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<Link href={backUrl}>
|
||||
<Link href={backUrl} prefetch={false}>
|
||||
<Button variant="ghost" size="sm">
|
||||
<ArrowLeft className="h-4 w-4 mr-2" />
|
||||
Back to Communications
|
||||
@@ -181,7 +181,7 @@ function SessionDetailContent() {
|
||||
{/* Header */}
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
<div className="flex items-center gap-4">
|
||||
<Link href={backUrl}>
|
||||
<Link href={backUrl} prefetch={false}>
|
||||
<Button variant="ghost" size="sm">
|
||||
<ArrowLeft className="h-4 w-4 mr-2" />
|
||||
Back
|
||||
@@ -235,6 +235,7 @@ function SessionDetailContent() {
|
||||
<ListTodo className="h-4 w-4 text-muted-foreground" />
|
||||
{primaryTask && (
|
||||
<Link
|
||||
prefetch={false}
|
||||
href={`/tasks/${primaryTask.task_id}`}
|
||||
className="text-sm text-primary hover:underline"
|
||||
>
|
||||
|
||||
@@ -204,6 +204,7 @@ function SessionList({ channelId, groupId }: SessionListProps) {
|
||||
<div className="p-2 space-y-2">
|
||||
{sessions.map((session) => (
|
||||
<Link
|
||||
prefetch={false}
|
||||
key={session.id}
|
||||
href={`/communications/${session.id}?channel=${channelId}&group=${groupId}`}
|
||||
className="block p-3 rounded-lg border bg-card hover:bg-muted/50 hover:border-primary/50 transition-all"
|
||||
|
||||
@@ -60,7 +60,7 @@ export default function JournalEntryPage({ params }: JournalEntryPageProps) {
|
||||
if (error || !entry) {
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<Link href="/journals">
|
||||
<Link href="/journals" prefetch={false}>
|
||||
<Button variant="ghost" size="sm">
|
||||
<ArrowLeft className="h-4 w-4 mr-2" />
|
||||
Back to Journals
|
||||
@@ -81,7 +81,7 @@ export default function JournalEntryPage({ params }: JournalEntryPageProps) {
|
||||
<RefreshCw className="h-4 w-4 mr-2" />
|
||||
Retry
|
||||
</Button>
|
||||
<Link href="/journals">
|
||||
<Link href="/journals" prefetch={false}>
|
||||
<Button>View All Journals</Button>
|
||||
</Link>
|
||||
</div>
|
||||
@@ -97,7 +97,7 @@ export default function JournalEntryPage({ params }: JournalEntryPageProps) {
|
||||
{/* Header */}
|
||||
<div className="flex items-center justify-between border-b pb-4">
|
||||
<div className="flex items-center gap-4">
|
||||
<Link href="/journals">
|
||||
<Link href="/journals" prefetch={false}>
|
||||
<Button variant="ghost" size="icon">
|
||||
<ArrowLeft className="h-5 w-5" />
|
||||
</Button>
|
||||
@@ -143,7 +143,7 @@ export default function JournalEntryPage({ params }: JournalEntryPageProps) {
|
||||
<Link2 className="h-4 w-4" />
|
||||
<span>Related Task</span>
|
||||
</div>
|
||||
<Link href={`/tasks/${entry.task_id}`}>
|
||||
<Link href={`/tasks/${entry.task_id}`} prefetch={false}>
|
||||
<Badge
|
||||
variant="outline"
|
||||
className="hover:bg-muted cursor-pointer"
|
||||
|
||||
@@ -414,7 +414,7 @@ export default function TaskDetailPage({ params }: TaskDetailPageProps) {
|
||||
if (error || !task) {
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<Link href="/tasks">
|
||||
<Link href="/tasks" prefetch={false}>
|
||||
<Button variant="ghost" size="sm">
|
||||
<ArrowLeft className="h-4 w-4 mr-2" />
|
||||
Back to Tasks
|
||||
@@ -435,7 +435,7 @@ export default function TaskDetailPage({ params }: TaskDetailPageProps) {
|
||||
<RefreshCw className="h-4 w-4 mr-2" />
|
||||
Retry
|
||||
</Button>
|
||||
<Link href="/tasks">
|
||||
<Link href="/tasks" prefetch={false}>
|
||||
<Button>View All Tasks</Button>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
|
Before Width: | Height: | Size: 436 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 214 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -74,7 +74,7 @@ export function AgentCard({ agent, agentStatus, usageRow }: AgentCardProps) {
|
||||
{isActive && (
|
||||
<>
|
||||
<DropdownMenuItem asChild>
|
||||
<Link href={"/agents/" + agent.id}>
|
||||
<Link href={"/agents/" + agent.id} prefetch={false}>
|
||||
<Activity className="h-4 w-4 mr-2" />
|
||||
View Details
|
||||
</Link>
|
||||
|
||||
@@ -30,6 +30,7 @@ export function AgentStatusCards({ agent }: AgentStatusCardsProps) {
|
||||
<CardContent>
|
||||
{agent.task_id ? (
|
||||
<Link
|
||||
prefetch={false}
|
||||
href={"/tasks/" + agent.task_id}
|
||||
className="text-blue-500 hover:underline"
|
||||
>
|
||||
|
||||
@@ -36,7 +36,9 @@ export function WaitingAgentsAlert({ waitingAgents }: WaitingAgentsAlertProps) {
|
||||
</span>
|
||||
</div>
|
||||
<Button variant="outline" size="sm" asChild>
|
||||
<Link href={"/agents/" + agent.agent_id}>Resolve</Link>
|
||||
<Link href={"/agents/" + agent.agent_id} prefetch={false}>
|
||||
Resolve
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@@ -76,7 +76,7 @@ export function FlaggedItem({
|
||||
{formatTime(flag.created_at)}
|
||||
</span>
|
||||
{flag.related_task_id && (
|
||||
<Link href={"/tasks/" + flag.related_task_id}>
|
||||
<Link href={"/tasks/" + flag.related_task_id} prefetch={false}>
|
||||
<span className="text-primary hover:underline">
|
||||
Task #{flag.related_task_id.slice(0, 8)}
|
||||
</span>
|
||||
@@ -88,7 +88,7 @@ export function FlaggedItem({
|
||||
{!isResolved && (
|
||||
<div className="flex items-center gap-2 shrink-0">
|
||||
{flag.related_task_id && (
|
||||
<Link href={"/tasks/" + flag.related_task_id}>
|
||||
<Link href={"/tasks/" + flag.related_task_id} prefetch={false}>
|
||||
<Button variant="ghost" size="sm">
|
||||
<Eye className="h-4 w-4" />
|
||||
</Button>
|
||||
|
||||
@@ -29,7 +29,7 @@ export function CommunicationsView() {
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Link href="/communications">
|
||||
<Link href="/communications" prefetch={false}>
|
||||
<Button variant="outline">
|
||||
<ExternalLink className="h-4 w-4 mr-2" />
|
||||
Full View
|
||||
@@ -80,6 +80,7 @@ export function CommunicationsView() {
|
||||
</Badge>
|
||||
</div>
|
||||
<Link
|
||||
prefetch={false}
|
||||
href={`/communications?channel=${selectedChannel.id}`}
|
||||
>
|
||||
<Button variant="outline" size="sm">
|
||||
@@ -118,6 +119,7 @@ export function CommunicationsView() {
|
||||
Open the channel to view sessions and send messages
|
||||
</p>
|
||||
<Link
|
||||
prefetch={false}
|
||||
href={`/communications?channel=${selectedChannel.id}`}
|
||||
>
|
||||
<Button>View Sessions</Button>
|
||||
|
||||
@@ -56,7 +56,7 @@ export function MessageItem({ message }: MessageItemProps) {
|
||||
)}
|
||||
{/* Related Task */}
|
||||
{message.task_id && (
|
||||
<Link href={"/tasks/" + message.task_id}>
|
||||
<Link href={"/tasks/" + message.task_id} prefetch={false}>
|
||||
<Badge variant="outline" className="text-xs mt-2 hover:bg-muted">
|
||||
<Link2 className="h-3 w-3 mr-1" />
|
||||
Task #{message.task_id.slice(0, 8)}
|
||||
|
||||
@@ -66,7 +66,7 @@ export function ActiveBlockersPanel({
|
||||
) : (
|
||||
<div className="space-y-3">
|
||||
{blockedTasks.map((task) => (
|
||||
<Link key={task.id} href={"/tasks/" + task.id}>
|
||||
<Link key={task.id} href={"/tasks/" + task.id} prefetch={false}>
|
||||
<div className="flex items-start gap-3 p-3 rounded-lg border border-red-200 bg-red-50 hover:bg-red-100 dark:border-red-900 dark:bg-red-950 dark:hover:bg-red-900 transition-colors">
|
||||
<span className="text-lg">\uD83D\uDD34</span>
|
||||
<div className="flex-1 min-w-0">
|
||||
@@ -91,7 +91,7 @@ export function ActiveBlockersPanel({
|
||||
</div>
|
||||
)}
|
||||
<div className="mt-4 pt-3 border-t">
|
||||
<Link href="/tasks?status=blocked">
|
||||
<Link href="/tasks?status=blocked" prefetch={false}>
|
||||
<Button variant="ghost" size="sm" className="w-full">
|
||||
View All Blocked
|
||||
<ArrowRight className="h-4 w-4 ml-2" />
|
||||
|
||||
@@ -98,7 +98,7 @@ export function AuditorAlertsPanel({
|
||||
</div>
|
||||
)}
|
||||
<div className="mt-4 pt-3 border-t">
|
||||
<Link href="/auditor">
|
||||
<Link href="/auditor" prefetch={false}>
|
||||
<Button variant="ghost" size="sm" className="w-full">
|
||||
View All Flags
|
||||
<ArrowRight className="h-4 w-4 ml-2" />
|
||||
|
||||
@@ -65,7 +65,9 @@ export function CeoApprovalQueue({ className }: CeoApprovalQueueProps) {
|
||||
const { data: startTasks } = useQuery({
|
||||
queryKey: ["tasks", "awaiting-approve-start"],
|
||||
queryFn: async () => {
|
||||
const pending = await tasksApi.list({ status: TaskStatus.PENDING });
|
||||
// Full-fat fetch: this card renders quick_context, which the trimmed
|
||||
// summary list deliberately omits. The PENDING set is small.
|
||||
const pending = await tasksApi.listFull({ status: TaskStatus.PENDING });
|
||||
return pending.filter(
|
||||
(t) => t.board_review_complete === true && t.team !== Team.MAIN_PM,
|
||||
);
|
||||
@@ -219,6 +221,7 @@ export function CeoApprovalQueue({ className }: CeoApprovalQueueProps) {
|
||||
<Badge variant="outline">{task.team}</Badge>
|
||||
</div>
|
||||
<Link
|
||||
prefetch={false}
|
||||
href={`/tasks/${task.id}`}
|
||||
className="font-medium hover:underline line-clamp-1"
|
||||
>
|
||||
@@ -231,7 +234,7 @@ export function CeoApprovalQueue({ className }: CeoApprovalQueueProps) {
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center gap-2 ml-4 flex-shrink-0">
|
||||
<Link href={`/tasks/${task.id}`}>
|
||||
<Link href={`/tasks/${task.id}`} prefetch={false}>
|
||||
<Button variant="ghost" size="sm">
|
||||
<FileText className="h-4 w-4" />
|
||||
</Button>
|
||||
@@ -348,6 +351,7 @@ export function CeoApprovalQueue({ className }: CeoApprovalQueueProps) {
|
||||
</p>
|
||||
)}
|
||||
<Link
|
||||
prefetch={false}
|
||||
href={`/tasks/${selectedTask.id}`}
|
||||
target="_blank"
|
||||
className="text-sm text-primary flex items-center gap-1 mt-2 hover:underline"
|
||||
|
||||
@@ -76,7 +76,7 @@ export function CommandCenter() {
|
||||
<RefreshCw className="h-4 w-4 mr-2" />
|
||||
Refresh
|
||||
</Button>
|
||||
<Link href="/settings">
|
||||
<Link href="/settings" prefetch={false}>
|
||||
<Button variant="ghost" size="icon">
|
||||
<Settings className="h-5 w-5" />
|
||||
</Button>
|
||||
|
||||
@@ -166,6 +166,7 @@ export function PrReviewQueue({ className }: PrReviewQueueProps) {
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="flex items-center gap-2">
|
||||
<Link
|
||||
prefetch={false}
|
||||
href={`/tasks/${task.id}`}
|
||||
className="font-medium hover:underline line-clamp-1"
|
||||
>
|
||||
@@ -202,7 +203,11 @@ export function PrReviewQueue({ className }: PrReviewQueueProps) {
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center gap-2 ml-4 flex-shrink-0">
|
||||
<Link href={`/tasks/${task.id}`} title="Review details">
|
||||
<Link
|
||||
href={`/tasks/${task.id}`}
|
||||
title="Review details"
|
||||
prefetch={false}
|
||||
>
|
||||
<Button variant="ghost" size="sm">
|
||||
<FileText className="h-4 w-4" />
|
||||
</Button>
|
||||
|
||||
@@ -17,42 +17,42 @@ export function QuickActionsBar() {
|
||||
<div className="flex flex-wrap gap-3">
|
||||
<CreateTaskDialog />
|
||||
|
||||
<Link href="/agents">
|
||||
<Link href="/agents" prefetch={false}>
|
||||
<Button variant="outline">
|
||||
<Users className="h-4 w-4 mr-2" />
|
||||
Spawn Agent
|
||||
</Button>
|
||||
</Link>
|
||||
|
||||
<Link href="/prompter">
|
||||
<Link href="/prompter" prefetch={false}>
|
||||
<Button variant="outline">
|
||||
<Sparkles className="h-4 w-4 mr-2" />
|
||||
Task Intake
|
||||
</Button>
|
||||
</Link>
|
||||
|
||||
<Link href="/business?tab=secretary">
|
||||
<Link href="/business?tab=secretary" prefetch={false}>
|
||||
<Button variant="outline">
|
||||
<Bot className="h-4 w-4 mr-2" />
|
||||
Secretary
|
||||
</Button>
|
||||
</Link>
|
||||
|
||||
<Link href="/communications">
|
||||
<Link href="/communications" prefetch={false}>
|
||||
<Button variant="outline">
|
||||
<Megaphone className="h-4 w-4 mr-2" />
|
||||
Broadcast Message
|
||||
</Button>
|
||||
</Link>
|
||||
|
||||
<Link href="/journals">
|
||||
<Link href="/journals" prefetch={false}>
|
||||
<Button variant="outline">
|
||||
<BookOpen className="h-4 w-4 mr-2" />
|
||||
View Journals
|
||||
</Button>
|
||||
</Link>
|
||||
|
||||
<Link href="/auditor">
|
||||
<Link href="/auditor" prefetch={false}>
|
||||
<Button variant="outline">
|
||||
<Shield className="h-4 w-4 mr-2" />
|
||||
Auditor Report
|
||||
|
||||
@@ -47,7 +47,7 @@ export function RecentActivityFeed({
|
||||
</ScrollArea>
|
||||
)}
|
||||
<div className="mt-4 pt-3 border-t">
|
||||
<Link href="/notifications">
|
||||
<Link href="/notifications" prefetch={false}>
|
||||
<Button variant="ghost" size="sm" className="w-full">
|
||||
View Full Activity
|
||||
<ArrowRight className="h-4 w-4 ml-2" />
|
||||
|
||||
@@ -55,6 +55,7 @@ export function ScorecardOverviewPanel() {
|
||||
Performance
|
||||
</CardTitle>
|
||||
<Link
|
||||
prefetch={false}
|
||||
href="/metrics?tab=scorecards"
|
||||
className="text-muted-foreground hover:text-foreground flex items-center gap-1 text-xs"
|
||||
>
|
||||
|
||||
@@ -25,7 +25,7 @@ function OnDemandAgentCard({
|
||||
description: string;
|
||||
}) {
|
||||
return (
|
||||
<Link href={href} className="block">
|
||||
<Link href={href} className="block" prefetch={false}>
|
||||
<div className="rounded-lg border bg-card p-4 hover:bg-accent/50 transition-colors h-full flex flex-col gap-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<Icon className="h-4 w-4 text-muted-foreground" />
|
||||
|
||||
@@ -24,7 +24,7 @@ function formatTime(timestamp: string): string {
|
||||
|
||||
export function EntryCard({ entry }: EntryCardProps) {
|
||||
return (
|
||||
<Link href={`/journals/${entry.id}`}>
|
||||
<Link href={`/journals/${entry.id}`} prefetch={false}>
|
||||
<Card className="hover:shadow-md transition-shadow cursor-pointer group">
|
||||
<CardContent className="pt-4">
|
||||
{/* Header */}
|
||||
|
||||
@@ -105,7 +105,7 @@ export function KanbanCard({
|
||||
<CardContent className="p-3">
|
||||
<div className="flex items-start gap-2">
|
||||
<div className="flex-1 min-w-0 overflow-hidden">
|
||||
<Link href={"/tasks/" + task.id} className="block">
|
||||
<Link href={"/tasks/" + task.id} className="block" prefetch={false}>
|
||||
<p className="font-medium text-sm line-clamp-2 hover:underline break-words">
|
||||
<span
|
||||
className="font-mono text-muted-foreground"
|
||||
|
||||
@@ -41,6 +41,7 @@ export function MobileSidebar() {
|
||||
<SheetHeader className="h-16 justify-center border-b px-4 text-left">
|
||||
<SheetTitle asChild>
|
||||
<Link
|
||||
prefetch={false}
|
||||
href="/overview"
|
||||
onClick={close}
|
||||
className="flex items-center gap-2"
|
||||
|
||||
@@ -81,6 +81,7 @@ export function SidebarNav({
|
||||
const isActive = pathname.startsWith(item.href);
|
||||
return (
|
||||
<Link
|
||||
prefetch={false}
|
||||
key={item.href}
|
||||
href={item.href}
|
||||
onClick={onNavigate}
|
||||
@@ -114,6 +115,7 @@ export function SidebarFooter({
|
||||
<div className="space-y-1">
|
||||
{footerItems.map((item) => (
|
||||
<Link
|
||||
prefetch={false}
|
||||
key={item.href}
|
||||
href={item.href}
|
||||
onClick={onNavigate}
|
||||
@@ -146,7 +148,11 @@ export function Sidebar() {
|
||||
{/* Logo */}
|
||||
<div className="flex h-16 items-center justify-between border-b px-4">
|
||||
{!sidebarCollapsed && (
|
||||
<Link href="/overview" className="flex items-center gap-2">
|
||||
<Link
|
||||
href="/overview"
|
||||
className="flex items-center gap-2"
|
||||
prefetch={false}
|
||||
>
|
||||
<Image
|
||||
src="/roboco-logo.png"
|
||||
alt="RoboCo"
|
||||
|
||||
@@ -79,7 +79,11 @@ export function NotificationBell() {
|
||||
)}
|
||||
|
||||
<div className="pt-2 border-t">
|
||||
<Link href="/notifications" onClick={() => setOpen(false)}>
|
||||
<Link
|
||||
href="/notifications"
|
||||
onClick={() => setOpen(false)}
|
||||
prefetch={false}
|
||||
>
|
||||
<Button variant="outline" size="sm" className="w-full">
|
||||
View All Notifications
|
||||
</Button>
|
||||
|
||||
@@ -73,6 +73,7 @@ export function BoardReviewSentCard({
|
||||
<CardFooter className="gap-2 pt-0">
|
||||
<Button variant="outline" size="sm" asChild className="flex-1">
|
||||
<Link
|
||||
prefetch={false}
|
||||
href={`/tasks/${taskId}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
|
||||
@@ -52,6 +52,7 @@ export function SuccessCard({
|
||||
<CardFooter className="gap-2 pt-0">
|
||||
<Button variant="outline" size="sm" asChild className="flex-1">
|
||||
<Link
|
||||
prefetch={false}
|
||||
href={`/tasks/${taskId}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
|
||||
@@ -46,7 +46,9 @@ export function Providers({ children }: { children: React.ReactNode }) {
|
||||
<AgentRosterSync />
|
||||
{children}
|
||||
<Toaster position="top-right" />
|
||||
<ReactQueryDevtools initialIsOpen={false} />
|
||||
{process.env.NODE_ENV === "development" && (
|
||||
<ReactQueryDevtools initialIsOpen={false} />
|
||||
)}
|
||||
</QueryClientProvider>
|
||||
</ThemeProvider>
|
||||
);
|
||||
|
||||
@@ -78,7 +78,10 @@ export function SubtasksList({ task }: SubtasksListProps) {
|
||||
{completionPercent}% complete
|
||||
</span>
|
||||
)}
|
||||
<Link href={`/tasks?parent=${task.id}&team=${task.team}`}>
|
||||
<Link
|
||||
href={`/tasks?parent=${task.id}&team=${task.team}`}
|
||||
prefetch={false}
|
||||
>
|
||||
<Button size="sm" variant="ghost">
|
||||
<Plus className="h-4 w-4 mr-1" />
|
||||
Add
|
||||
@@ -118,6 +121,7 @@ export function SubtasksList({ task }: SubtasksListProps) {
|
||||
{/* Subtask list */}
|
||||
{subtasks.map((subtask) => (
|
||||
<Link
|
||||
prefetch={false}
|
||||
key={subtask.id}
|
||||
href={`/tasks/${subtask.id}`}
|
||||
className="block"
|
||||
|
||||
@@ -155,7 +155,11 @@ function DependencyList({
|
||||
className={`flex items-center gap-2 p-3 rounded-lg ${itemBorderClass} ${itemBgClass} transition-colors`}
|
||||
>
|
||||
<Link2 className="h-4 w-4 text-muted-foreground shrink-0" />
|
||||
<Link href={`/tasks/${depId}`} className="flex-1">
|
||||
<Link
|
||||
href={`/tasks/${depId}`}
|
||||
className="flex-1"
|
||||
prefetch={false}
|
||||
>
|
||||
<span className="font-mono text-sm hover:underline">
|
||||
{depId.slice(0, 8)}...
|
||||
</span>
|
||||
@@ -406,6 +410,7 @@ export function TabDependencies({ task }: TabDependenciesProps) {
|
||||
>
|
||||
<Link2 className="h-4 w-4 text-muted-foreground" />
|
||||
<Link
|
||||
prefetch={false}
|
||||
href={`/tasks/${task.parent_task_id}`}
|
||||
className="flex-1"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
|
||||
@@ -24,6 +24,7 @@ export function TabOverview({ task }: TabOverviewProps) {
|
||||
<div className="flex items-center gap-2 text-sm">
|
||||
<span className="text-muted-foreground">Subtask of:</span>
|
||||
<Link
|
||||
prefetch={false}
|
||||
href={`/tasks/${task.parent_task_id}`}
|
||||
className="text-primary hover:underline font-medium"
|
||||
>
|
||||
|
||||
@@ -76,7 +76,7 @@ function SessionCard({ session }: { session: TaskSessionLink }) {
|
||||
</CardHeader>
|
||||
<CardContent className="pt-0">
|
||||
<div className="flex justify-end">
|
||||
<Link href={`/communications/${session.session_id}`}>
|
||||
<Link href={`/communications/${session.session_id}`} prefetch={false}>
|
||||
<Button variant="outline" size="sm" className="gap-2">
|
||||
<ExternalLink className="h-3 w-3" />
|
||||
View Session
|
||||
|
||||
@@ -460,7 +460,7 @@ export function TaskHeader({ task, onAction }: TaskHeaderProps) {
|
||||
title truncates, so a long title never pushes the controls or the
|
||||
Actions menu out of place. */}
|
||||
<div className="flex items-start gap-3 min-w-0 flex-1">
|
||||
<Link href="/tasks">
|
||||
<Link href="/tasks" prefetch={false}>
|
||||
<Button variant="ghost" size="icon" className="shrink-0">
|
||||
<ArrowLeft className="h-5 w-5" />
|
||||
</Button>
|
||||
|
||||
@@ -507,6 +507,7 @@ export function TaskMetadata({ task }: TaskMetadataProps) {
|
||||
</div>
|
||||
{task.project_id && project ? (
|
||||
<Link
|
||||
prefetch={false}
|
||||
href={`/projects`}
|
||||
className="font-medium text-blue-600 hover:underline dark:text-blue-400"
|
||||
>
|
||||
|
||||
@@ -231,7 +231,7 @@ export function WorkSessionCard({ taskId }: WorkSessionCardProps) {
|
||||
|
||||
{/* View Full Session Link */}
|
||||
<div className="flex justify-end pt-2">
|
||||
<Link href={`/work-sessions/${session.id}`}>
|
||||
<Link href={`/work-sessions/${session.id}`} prefetch={false}>
|
||||
<Button variant="outline" size="sm" className="gap-2">
|
||||
<ExternalLink className="h-3 w-3" />
|
||||
View Details
|
||||
|
||||
@@ -566,6 +566,7 @@ export function TaskTable({
|
||||
<span className="w-5 shrink-0" />
|
||||
)}
|
||||
<Link
|
||||
prefetch={false}
|
||||
href={"/tasks/" + task.id}
|
||||
className="block hover:underline min-w-0"
|
||||
>
|
||||
|
||||
@@ -103,6 +103,7 @@ export function WorkSessionTable({
|
||||
<div className="flex items-center gap-2">
|
||||
<GitBranch className="h-4 w-4 text-muted-foreground" />
|
||||
<Link
|
||||
prefetch={false}
|
||||
href={`/work-sessions/${session.id}`}
|
||||
className="font-medium hover:underline font-mono text-sm"
|
||||
>
|
||||
@@ -112,6 +113,7 @@ export function WorkSessionTable({
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Link
|
||||
prefetch={false}
|
||||
href={`/tasks/${session.task_id}`}
|
||||
className="text-sm text-muted-foreground hover:text-foreground hover:underline"
|
||||
>
|
||||
@@ -135,7 +137,7 @@ export function WorkSessionTable({
|
||||
})}
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Link href={`/work-sessions/${session.id}`}>
|
||||
<Link href={`/work-sessions/${session.id}`} prefetch={false}>
|
||||
<Button variant="ghost" size="icon">
|
||||
<ExternalLink className="h-4 w-4" />
|
||||
</Button>
|
||||
|
||||
@@ -31,8 +31,66 @@ export interface BoardReviewEntry {
|
||||
timestamp: string | null;
|
||||
}
|
||||
|
||||
// Wire shape of GET /tasks/summary (backend TaskSummaryResponse) — exactly
|
||||
// the fields list views render; everything fat stays on GET /tasks/{id}.
|
||||
interface TaskSummaryWire {
|
||||
id: string;
|
||||
title: string;
|
||||
status: TaskStatus;
|
||||
priority: number;
|
||||
team: Team;
|
||||
assigned_to: string | null;
|
||||
created_at: string;
|
||||
updated_at: string | null;
|
||||
estimated_complexity: Complexity;
|
||||
nature: TaskNature;
|
||||
task_type: TaskType;
|
||||
sequence: number;
|
||||
parent_task_id: string | null;
|
||||
batch_id: string | null;
|
||||
project_id: string | null;
|
||||
product_id: string | null;
|
||||
branch_name: string | null;
|
||||
pr_number: number | null;
|
||||
pr_url: string | null;
|
||||
pr_created: boolean;
|
||||
docs_complete: boolean;
|
||||
completed_at: string | null;
|
||||
board_review_complete: boolean;
|
||||
description_snippet: string | null;
|
||||
}
|
||||
|
||||
// Normalize a summary into the Task shape so list consumers keep their
|
||||
// types. Defaulted fields are never rendered by list views (verified in the
|
||||
// 2026-07-02 audit); anything needing them must fetch the full task.
|
||||
const summaryToTask = (s: TaskSummaryWire): Task => ({
|
||||
...s,
|
||||
description: s.description_snippet ?? "",
|
||||
acceptance_criteria: [],
|
||||
created_by: "",
|
||||
dependency_ids: [],
|
||||
blocker_ids: [],
|
||||
claimed_at: null,
|
||||
started_at: null,
|
||||
target_date: null,
|
||||
pm_approvals: {},
|
||||
plan: null,
|
||||
checkpoints: [],
|
||||
progress_updates: [],
|
||||
commits: [],
|
||||
dev_notes: null,
|
||||
qa_notes: null,
|
||||
auditor_notes: null,
|
||||
quick_context: null,
|
||||
self_verified: false,
|
||||
qa_verified: null,
|
||||
sessions: [],
|
||||
});
|
||||
|
||||
export const tasksApi = {
|
||||
// List tasks with optional filters
|
||||
// List tasks with optional filters — served by the trimmed summary route
|
||||
// (~50x lighter than the full TaskResponse list that measured 2MB and made
|
||||
// every page slow, 2026-07-02). Detail views fetch the full task via get().
|
||||
list: async (filters?: TaskFilters): Promise<Task[]> => {
|
||||
if (isMockMode()) {
|
||||
let tasks = [...mockTasks];
|
||||
@@ -49,10 +107,31 @@ export const tasksApi = {
|
||||
if (filters?.status) params.append("status", filters.status);
|
||||
if (filters?.team) params.append("team", filters.team);
|
||||
if (filters?.limit) params.append("limit", String(filters.limit));
|
||||
if (filters?.offset) params.append("offset", String(filters.offset));
|
||||
|
||||
const url = "/tasks?" + params.toString();
|
||||
const { data } = await api.get<Task[]>(url);
|
||||
const url = "/tasks/summary?" + params.toString();
|
||||
const { data } = await api.get<TaskSummaryWire[]>(url);
|
||||
return data.map(summaryToTask);
|
||||
},
|
||||
|
||||
// Full-fat list for consumers that render fields beyond the summary
|
||||
// (the CEO approval queue shows quick_context). Hits the heavy /tasks
|
||||
// route — keep the filter narrow and the limit small.
|
||||
listFull: async (filters?: TaskFilters): Promise<Task[]> => {
|
||||
if (isMockMode()) {
|
||||
let tasks = [...mockTasks];
|
||||
if (filters?.status) {
|
||||
tasks = tasks.filter((t) => t.status === filters.status);
|
||||
}
|
||||
if (filters?.team) {
|
||||
tasks = tasks.filter((t) => t.team === filters.team);
|
||||
}
|
||||
return tasks;
|
||||
}
|
||||
const params = new URLSearchParams();
|
||||
if (filters?.status) params.append("status", filters.status);
|
||||
if (filters?.team) params.append("team", filters.team);
|
||||
params.append("limit", String(filters?.limit ?? 100));
|
||||
const { data } = await api.get<Task[]>("/tasks?" + params.toString());
|
||||
return data;
|
||||
},
|
||||
|
||||
|
||||