Skip to content

fix(coding-agent): load the saved catalog when the agents view opens - #1960

Merged
sethkarten merged 2 commits into
mainfrom
fix/agents-view-inactive-catalog
Sep 1, 2026
Merged

sethkarten merged 2 commits into
mainfrom
fix/agents-view-inactive-catalog

Conversation

@snimu

@snimu snimu commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Regression

Introduced in v0.9.0 by the roster seed scoping (#1951): the agents view's Inactive section is empty on a fresh view. Before v0.9.0 the daemon's boot seed pushed the whole saved-session corpus as inactive roster rows through roster_subscribe, and the view rendered those. #1951 scoped the seed to registered workers' families (CLI list --all kept full parity), but the agents view's other source — the saved-session catalog — was only loaded once a search query was typed (armSavedSearchFetch gates on editor text, a #1900 optimization whose stated premise was that deep catalog data is needed only for search; display rows were assumed to come from the roster seed). Fresh TUI + agents view + no query = no catalog = empty Inactive section.

Fix

Delete the dead-premise gate: the view loads the saved catalog when it opens, not first at search time. The load path is unchanged and stays progressive (refreshSavedSessions streams rows in via onSession as the daemon reads them) and once-per-view (savedSearchFetchStarted latch plus persisted savedCatalogLoaded across view instances). No new load path, no wire change.

Measured (3051-session corpus, local M-series laptop)

Progressive catalog load after opening the view: first inactive row after ~10 ms, complete after ~6.0 s on a cold daemon (~2.2 s warm), filling in as it loads. For context, v0.8.1 showed all inactive rows immediately at view open, but only because the daemon had spent ~5.2 s at startup seeding and every roster subscriber received the full ~3300-row corpus as one payload; v0.9.0+ daemon startup is ~0.7-1.4 s on the same corpus.

Tests

New pin in agents-view-mode.test.ts: armSavedSearchFetch with an empty query starts the catalog fetch (fails on v0.9.0 main: the mock is never called). The agents-view-inactive-reply.test.ts latch test drops only its empty-query-never-arms assertion (the reverted behavior); its loaded-catalog one-shot and failure re-arm pins are unchanged. Suites: agents-view + roster/daemon-adjacent files green in a sandbox (10 files, 226 tests), root npm run check clean.

Linear: https://linear.app/primeintellect/issue/ENG-5840/v090-regression-agents-view-inactive-section-empty-on-fresh-view


Note

Low Risk
Narrow agents-view UX fix: earlier progressive catalog load on open, no protocol or auth changes; main tradeoff is extra daemon work when opening the view with many saved sessions.

Overview
Fixes a v0.9.0 regression where the agents view Inactive section stayed empty until the user typed a search. Roster seed scoping stopped pre-filling inactive rows from the daemon boot seed, but the saved-session catalog was still only armed when the search box had text.

armSavedSearchFetch no longer returns early on an empty trimmed query. The inactive list is catalog-driven, so refreshSavedSessions still runs progressively on view open (and on reconnect / query changes) with the same once-per-view latch and savedCatalogLoaded guard.

Tests add a pin that an empty query starts the catalog fetch; the inactive-reply latch test drops the obsolete “empty query never arms” assertion.

Reviewed by Cursor Bugbot for commit 79c9256. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Load saved session catalog on AgentsViewMode view open regardless of query

Fixes a v0.9.0 regression where the agents view Inactive section stayed empty until the user typed a search. AgentsViewMode.armSavedSearchFetch no longer gates the fetch on a non-empty editor query — it now returns early only if a fetch already started or savedCatalogLoaded is true. Tests in agents-view-inactive-reply.test.ts and agents-view-mode.test.ts are updated to match.

Macroscope summarized 79c9256.

v0.9.0 regression: the Inactive section was empty on a fresh agents
view until a search query was typed. The saved catalog was loaded
only for search (a #1900 optimization premised on the roster boot
seed carrying the saved corpus as inactive rows); #1951 scoped that
seed to live families, so the view must load what it displays.
The load stays progressive and once-per-view.
@sethkarten
sethkarten self-requested a review September 1, 2026 18:41
@sethkarten
sethkarten merged commit c32f272 into main Sep 1, 2026
23 checks passed
@sethkarten
sethkarten deleted the fix/agents-view-inactive-catalog branch September 1, 2026 18:42
ketema added a commit to ketema/prime-agent that referenced this pull request Sep 1, 2026
- Direct session transport between TUI and worker (ENG-5817, PrimeIntellect-ai#1926)
- Event-driven supervisor agent roster with push subscriptions (PrimeIntellect-ai#1897, PrimeIntellect-ai#1900, PrimeIntellect-ai#1895)
- Hardened daemon startup, recovery ownership, and worker launch diagnostics (PrimeIntellect-ai#1929, PrimeIntellect-ai#1918)
- Python REPL runtime single-dump snapshots and bash preview tool (PrimeIntellect-ai#1945, PrimeIntellect-ai#1911)
- Non-blocking RLM subagent deletion and snapshot update suppression (PrimeIntellect-ai#1954, PrimeIntellect-ai#1944)
- Saved catalog loading on Agents View open (PrimeIntellect-ai#1960)
- Advanced Anthropic prompt caching marker across tool results (PrimeIntellect-ai#1927)
- TUI process replacement on update and empty draft eviction (PrimeIntellect-ai#1631, PrimeIntellect-ai#1946, PrimeIntellect-ai#1920)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants