sessions: server-side search and incremental inventory browsing
Open
@JAORMX is already working on this.
Since Aug 15, 2026.
enhancement
tui
ui
ux
- Dominant language
- Go
- Stars
- 152
- Forks
- 16
- Avg merge
- 14h 48m
- Merged PRs (30d)
- 536
Description
Problem
The session API returns bounded cursor pages, but the mecatui client currently fetches every page eagerly so filtering remains entirely client-side. Large stores therefore still incur a full backend scan/list transfer before the picker becomes useful.
Desired outcome
Add real server-side session search and incremental picker browsing while preserving stable keyset pagination, owner filtering, opaque IDs, and deterministic ordering.
Scope
- server-side filters for title, exact/full ID, model, workspace, state, kind, and relationship names;
- filtering before page formation and count;
- an opaque cursor bound to the normalized query so it cannot be replayed across incompatible searches;
- mecatui debounce/cancellation and page-at-a-time loading as the operator types or scrolls;
- honest count/loading/error/empty states without retaining the entire inventory in memory.
Acceptance criteria
- Filter normalization and matching semantics are documented and identical across in-tree stores and the remote driver.
- Ownership filtering happens before search, count, and page formation; foreign rows do not affect counts/cursors/timing-visible result shape.
- Cursors are query-bound, tamper-resistant/fail-closed, deterministic under
(modified_at DESC, session_id ASC), and safely best-effort under concurrent saves. - In-tree durable stores and grpcdriver pass shared search/paging conformance.
- Mecatui cancels stale requests, debounces input, appends the next page near the viewport tail, and never replaces a newer query with an older response.
- Empty, partial-page, backend-error, unsupported-store, and concurrent-update paths are covered offline.
- Performance tests demonstrate bounded client memory/response size and no eager all-pages fetch.
- Update API docs, architecture/implementation notes, TUI docs, and user docs.
Related
- #471
- #556
- #557
- ADR 0108
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.