An open-source, faster Devin alternative
TypeScript
Hide Triage: unroute the screen, drop the rail link, Home lists asks again
Igor Zalutski via Computerde41a8a53a7f
diff --git a/TRIAGE_WEB_NOTES.md b/TRIAGE_WEB_NOTES.mdindex 910af9b7..313296f8 100644--- a/TRIAGE_WEB_NOTES.md+++ b/TRIAGE_WEB_NOTES.md@@ -1,5 +1,14 @@# Triage (web): design notes+> **Hidden for now.** The Board ships first; Triage returns with the attention+> step. The `computer/triage` route and the rail link (with its count) are+> removed, so the screen is unreachable, and the new-session home lists the+> open asks again as it did before Triage (each `AskCard` names its session).+> `Triage.tsx`, `triage.ts`, `AnswerDock.tsx` and their tests stay in place,+> unrouted. `RailLink` keeps its `badge` prop for the count. To bring it back,+> revert the commit "Hide Triage: unroute the screen, drop the rail link,+> Home lists asks again".+Second pass on the Triage screen (ux-spec 3). What the screen does isunchanged; how it is arranged and answered is redesigned. Same family as theBoard's visual pass (WORK_WEB_NOTES.md): Inter, `text-sm` (14/20) for namesdiff --git a/web/src/App.tsx b/web/src/App.tsxindex 3fd30552..b819ebf7 100644--- a/web/src/App.tsx+++ b/web/src/App.tsx@@ -25,9 +25,6 @@ const ComputerSessionsHome = lazy(const ComputerSession = lazy(() => import('./managed-agents/computer-sessions/Session'),)-const ComputerTriage = lazy(- () => import('./managed-agents/computer-sessions/Triage'),-)const WorkBoard = lazy(() => import('./managed-agents/work/Board'))const WorkItem = lazy(() => import('./managed-agents/work/Item'))const ManagedAgentDetail = lazy(() => import('./managed-agents/Detail'))@@ -128,7 +125,6 @@ export default function App() {</Suspense>}>- <Route path="computer/triage" element={<ComputerTriage />} /><Route path="computer/sessions"><Route index element={<ComputerSessionsHome />} />{/* The same home, for a phone, where the index is the list. */}diff --git a/web/src/managed-agents/computer-sessions/Home.tsx b/web/src/managed-agents/computer-sessions/Home.tsxindex c1a31043..237ffd60 100644--- a/web/src/managed-agents/computer-sessions/Home.tsx+++ b/web/src/managed-agents/computer-sessions/Home.tsx@@ -1,7 +1,7 @@import { useState } from 'react'-import { Link, useNavigate } from 'react-router-dom'+import { useNavigate } from 'react-router-dom'import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'-import { ArrowUp, ChevronRight, Loader2 } from 'lucide-react'+import { ArrowUp, Loader2 } from 'lucide-react'import { ChatTextarea } from '@/components/chat-textarea'import { Button } from '@/components/ui/button'import { notifyError } from '@/lib/errors'@@ -11,9 +11,8 @@ import {sessionKeys,type SessionSettings,} from '../computer-sessions-api'-import { SettingsPickers, StatusDot } from './parts'-import { WORKING } from './state'-import { useTriageCount } from './triage'+import { AskCard, SettingsPickers } from './parts'+import { NEEDS_YOU, WORKING } from './state'// No session open: start one, and answer what is waiting on you.export default function ComputerSessionsHome() {@@ -22,7 +21,11 @@ export default function ComputerSessionsHome() {const [input, setInput] = useState('')const [settings, setSettings] = useState<SessionSettings>({})const [computerStarting, setComputerStarting] = useState(false)- const asks = useTriageCount()+ const needs = useQuery({+ queryKey: sessionKeys.list(NEEDS_YOU),+ queryFn: () => listSessions(NEEDS_YOU),+ refetchInterval: 5_000,+ })const working = useQuery({queryKey: sessionKeys.list(WORKING),queryFn: () => listSessions(WORKING),@@ -43,6 +46,9 @@ export default function ComputerSessionsHome() {if (input.trim() && !start.isPending) start.mutate()}+ const waiting = (needs.data?.sessions ?? []).flatMap((s) =>+ s.asks.filter((a) => a.status === 'open').map((ask) => ({ s, ask })),+ )const busy = working.data?.sessions.length ?? 0return (@@ -87,21 +93,15 @@ export default function ComputerSessionsHome() {</p>) : null}- {asks ? (- <Link- to="/computer/triage"- className="bg-card hover:bg-muted/60 mt-10 flex items-center gap-2 rounded-lg border border-amber-500/40 px-3 py-2.5 text-sm transition-colors"- >- <StatusDot status="waiting" />- <span className="flex-1">- {asks} {asks === 1 ? 'ask needs' : 'asks need'} you- </span>- <span className="text-muted-foreground text-xs">Open triage</span>- <ChevronRight- className="text-muted-foreground size-3.5"- aria-hidden- />- </Link>+ {waiting.length ? (+ <section className="mt-10 space-y-2">+ <h2 className="text-muted-foreground text-xs font-medium tracking-wide uppercase">+ Needs you+ </h2>+ {waiting.map(({ s, ask }) => (+ <AskCard key={ask.id} ask={ask} session={s} showSession />+ ))}+ </section>) : null}<div className="flex-1" />{busy ? (diff --git a/web/src/managed-agents/computer-sessions/Layout.tsx b/web/src/managed-agents/computer-sessions/Layout.tsxindex 0a10a6aa..9e504374 100644--- a/web/src/managed-agents/computer-sessions/Layout.tsx+++ b/web/src/managed-agents/computer-sessions/Layout.tsx@@ -16,7 +16,6 @@ import {ChevronsUpDown,CreditCard,KeyRound,- Inbox,Loader2,LogOut,MessagesSquare,@@ -59,7 +58,6 @@ import {WORKING,} from './state'import { timeAgo } from './transcript'-import { useTriageCount } from './triage'// The computer's own full-screen view (work 107): a flat icon rail, the// sessions sidebar, and the open session or the new-session home.@@ -72,8 +70,9 @@ export default function ComputerSessionsLayout() {const { user } = useAuth()const { pathname } = useLocation()const sessions = !!useMatch('/computer/sessions/*')- // Triage is full height too, with its own panel instead of the sidebar.- const full = !!useMatch('/computer/triage') || sessions+ // Full height, with its own panel instead of the sidebar. Triage (unrouted+ // for now, see TRIAGE_WEB_NOTES.md) joins this when it returns.+ const full = sessions// On a phone the list and a session take turns: the list at// /computer/sessions, the session (or the new-session home) on its own.const listing = !!useMatch({ path: '/computer/sessions', end: true })@@ -172,7 +171,6 @@ function Rail() {const navigate = useNavigate()const orgs = user?.orgs ?? []const activeOrg = orgs.find((o) => o.isActive)- const asks = useTriageCount(!!user?.computerEnabled)return (<nav className="bg-sidebar border-sidebar-border flex w-14 shrink-0 flex-col items-center gap-1 border-r py-3"><Link@@ -183,14 +181,9 @@ function Rail() {<OpenComputerMark className="size-8" /></Link>{user?.computerEnabled ? (- <>- <RailLink to="/computer/triage" label="Triage" badge={asks}>- <Inbox className="size-4" aria-hidden />- </RailLink>- <RailLink to="/computer/sessions" label="Sessions">- <MessagesSquare className="size-4" aria-hidden />- </RailLink>- </>+ <RailLink to="/computer/sessions" label="Sessions">+ <MessagesSquare className="size-4" aria-hidden />+ </RailLink>) : null}<RailLink to="/computer/work" label="Board"><SquareKanban className="size-4" aria-hidden />