The sidebar folded each project's thread list to a flat top-N slice, so
launching a handful of new threads pushed everything else -- including
running threads and ones awaiting approval -- below "Show more".
Make the preview count a floor instead of a ceiling: while folded, a
thread beyond the first N stays visible when it needs attention (has a
status pill: pending approval/input, working, plan ready, or unseen
completion), is the active thread, or had activity within the last two
hours. Recency-driven rows are capped at max(previewCount, 15) so a
busy afternoon doesn't unfold the whole list; attention and active
threads are never dropped by the cap.
The fold now lives in getVisibleThreadsForProject, which Sidebar.tsx
previously reimplemented inline in two places; both call sites (row
rendering and jump-hint key assignment) now share the tested helper.
Co-Authored-By: Claude Fable 5 <[email protected]>