Skip to content

[Improve] Browse the full Brain corpus - #1524

Merged
mrubens merged 2 commits into
developfrom
feature/full-brain-corpus-1feo022ksfk06
Aug 22, 2026
Merged

[Improve] Browse the full Brain corpus#1524
mrubens merged 2 commits into
developfrom
feature/full-brain-corpus-1feo022ksfk06

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

​Opened on behalf of @mrubens. Follow up by mentioning @roomote-roomote or in the web UI.

What changed

  • Replaced the 500-page recent sample with an exhaustive list_pages census using ascending keyset pagination and overlap-checked offset paging for large timestamp ties.
  • Persisted completed corpus snapshots in Redis and added process-local stale-while-refresh caching so settings loads and browse searches reuse the same full-corpus view.
  • Moved browse search and namespace filtering to the server, returning at most 100 rows with explicit pagination controls and debounced client queries.
  • Updated the composition and activity UI to report the complete listing without sample or truncation language.

Why this change was made

The Brain settings page previously described only the newest 500 pages, which could misrepresent namespace composition and made older pages impossible to find. The new flow covers the full corpus while keeping repeat loads and keystroke filtering bounded.

Impact

Admins can inspect composition and search or filter across every Brain page. A deployment performs one full enumeration when no shared snapshot exists; completed snapshots are then reused across web processes, served stale during refresh, and refreshed every ten minutes. Refresh deduplication is process-local, so multiple stale processes can still refresh concurrently, but they never replace a complete snapshot with a partial walk.

Browser screenshots were not available because the local authenticated app redirects Brain settings to mandatory provider setup. Automated coverage includes exhaustive and tie-cluster pagination, shared-cache hydration and refresh throttling, server filtering/pagination, and debounced browse requests.

@roomote-community

roomote-community Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

No code issues found. See task

  • Prevent an unbounded list_pages loop when the pagination cursor does not advance (packages/sdk/src/server/lib/brain-corpus.ts:301).

Reviewed 2044b70

Comment thread packages/sdk/src/server/lib/brain-corpus.ts
@mrubens
mrubens marked this pull request as ready for review August 22, 2026 00:31
@mrubens
mrubens merged commit 67a3b2c into develop Aug 22, 2026
17 checks passed
@mrubens
mrubens deleted the feature/full-brain-corpus-1feo022ksfk06 branch August 22, 2026 00:31
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.

1 participant