Repository navigation
Sidebar: keep threads in place when their status changes #37510
msharifafx
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The problem
Threads jump around the sidebar whenever their state changes. When a thread starts running, finishes, fails, wakes from snooze or settles, it moves to a different section or a different position. With several agents running, the list keeps reshuffling under me. I lose my place, I click a row that has just slid under the pointer, and I can't build up any memory of where a thread lives.
Two smaller problems make this worse:
What I found in the source
I read
apps/web/src/components/Sidebar.tsx,Sidebar.logic.ts,Sidebar.shiftGuard.ts,Sidebar.motion.tsandsidebar/SidebarThreadRow.tsx.Why rows move
useSidebarThreadsdivides threads into pinned / working / active / snoozed / settled based on their current runtime state, so any state change can move a thread to another section.sortWorkingThreadsBySend, and Active (with the Working shelf on) bysortInboxThreadsByReturn, meaning when the run came back. Every finished run moves its thread to the top of Active.clockKeysays snooze wakes, the queued-turn grace and the Working shelf's exit grace depend on the clock, so "the minute tick ... a new key repartitions". Rows can move even when I've done nothing.Sidebar.shiftGuard.tsignores clicks for 500 ms on a row the list has just moved ("so a thread settling, waking or arriving above the pointer cannot hand its click to the neighbouring row"), andSidebar.motion.tsanimates the moves. Both help, but the code is clearly built around rows that move unexpectedly. I'd rather they didn't move.Why status is hard to read
resolveThreadStatusPillsays Pending Approval / Awaiting Input / Guest Request / Connecting / Completed, while the row says Approval / Input / Request / Setting up / Done.shouldRecedeSidebarThreadreturns true forapprovalwhen!isUnread && !isWoke, so a thread still blocked on me gets muted like background work.resolveSidebarRowStatusturns a seen failure intoready. There's no stopped state, so a thread stopped halfway shows a green Done badge (Stopping a thread midway shows a green Done badge in the sidebar #37469).What I'm asking for
1. Stable positions (the main ask)
Status changes should update a row's badge, not its position. A thread's place should change only when I do something: create it, send a message, pin, snooze, archive, or drag it.
Concretely:
sortActiveBySend), so most of this exists.Some people want the opposite. #33374 asks for finished threads to come to the top, and #6964 asks to sort by recent activity. So this could be a setting, something like "Thread order: Stable / Latest activity". Either way, I think stable should be the default, because rows moving on their own makes clicks land on the wrong thread (that's the reason the shift guard exists).
2. Show "needs you" without moving anything
Add a small "Needs you (3)" count at the top of the sidebar. Clicking it filters the list or steps through those threads, so the rows don't have to move to get my attention. "Needs you" covers approval, input, guest request, plan ready, unseen failure and usage limit.
3. Three row states instead of eleven
The specific reason (Approval, Input, Failed) can stay as small text or in the tooltip. Use the same words in the row, pill, hover card, window title and notifications.
4. Separate stopped, failed and done
Give stopped threads a neutral state of their own. Keep a failure visible (as a small mark on the row and in the hover card) after it's been opened.
5. Fewer sections by default
Default: Pinned → Threads, with Snoozed and older threads behind one "More" fold. Keep the current Working / Active / Settled layout as an option for people who like it.
Why it matters
The sidebar is the control surface when several agents run in parallel, which is exactly when states change most often. If the list reshuffles every time an agent starts or stops, it gets harder to use the more you use the app. Stable positions let you remember where a thread is, and clicks land on the row you aimed at.
Related
All reactions