fix(memos-local-plugin): hide pager when filter empties tasks list#1714
Merged
syzsunshine219 merged 1 commit intoMay 12, 2026
Merged
Conversation
When users filter the v2 viewer tasks page by status (all/enabled/done/skipped/failed), the empty state was shown but the pager kept rendering against full-dataset total/hasMore, which misleads users into thinking "there is data on other pages". Root cause: - /api/v1/episodes did not accept a `status` filter, so total/hasMore were always computed against the full session count. - TasksView.tsx only filtered the current 20 rows on the client and rendered the pager based on (page > 0 || hasMore), independent of the filtered length. Fix: - Server: introduce shared deriveStatus + parseTaskStatusFilter (agent-contract/episode-status.ts) and add `status` query support to GET /api/v1/episodes; total/hasMore now reflect the filtered set, with q + status combinable. - Web: send status/q to the server, debounce + add deps to the loader effect, drop the client-side filter, and add a `filtered.length === 0` guard so the pager hides under any active filter that yields no rows. - i18n: new tasks.empty.filtered string (zh/en). - Tests: 11 unit cases for episode-status derivation + 4 server route cases covering status filter, pagination, garbage tolerance, and status+q combinations. Co-authored-by: Cursor <cursoragent@cursor.com>
6 tasks
hijzy
added a commit
that referenced
this pull request
May 13, 2026
## Summary Merge the `mem-agent-0512` integration branch into `main`. This branch consolidates three lines of work that have been individually PR-reviewed and tested: - **PR #1712** — `mem-agent-0509` (namespace visibility, Windows installer, telemetry, bug fixes) - **PR #1713** — `mem-agent-0509-magent` (multi-agent owner filtering, NamespaceSelect component) - **PR #1714** — `bug/tasks-pager-empty-state-magent` (tasks list pager bug fix) Published as **`@memtensor/memos-local-plugin@2.0.1`** (npm `latest`). ## Highlights ### Features - **Namespace visibility isolation** — `visibilityWhere` SQL + `visibleToCurrent` in-memory filtering - **Multi-agent owner filtering** — `ownerAgentKind` / `ownerProfileId` fields, `includeAllNamespaces` escape hatch - **NamespaceSelect viewer component** — dropdown to filter Memories/Policies/Skills/WorldModels by agent namespace - **Windows installer** — auto-detection, interactive UI, improved Hermes path/encoding/log handling - **Embedding dimension auto-inference** — no longer requires manual specification on rebuilds ### Bug fixes - fix: hide pager when status filter empties tasks list (server-side status filter on `/api/v1/episodes`) - fix: preserve OpenClaw memory context - fix: reward score always negative - fix: ghost overview memory - fix: fix namespace - fix: improve Windows bridge launch - fix: close v2 ARMS telemetry coverage gaps - fix: harden multi-agent memory handling ### Engineering - chore: rename `web/` to `viewer/`, drop unused `site/` scaffolding - chore: gitignore telemetry.credentials.json - Shared `agent-contract/episode-status.ts` for status derivation ## Test results (mem-agent-0512 branch) | Suite | Passed | Failed | Skipped | |-------|--------|--------|---------| | Contracts (API structure) | 70 | 0 | 0 | | Scenarios (business intent) | 469 | 0 | 36 | | **Total** | **539** | **0** | **36** | Plugin unit tests: 111 passed / 8 failed (all 8 are pre-existing failures from upstream 0509/0509-magent, 0 regressions introduced). ## Stats 187 files changed, +5714 / −2178 lines ## Test plan - [x] `npm run lint` passes - [x] `npm run test:unit` — 0 new failures vs baseline - [x] Intent-driven contracts: 70/70 pass (hermes + openclaw dual-agent) - [x] Intent-driven scenarios: 469/469 pass - [x] npm publish `@memtensor/memos-local-plugin@2.0.1` verified on registry - [ ] Reviewer sign-off
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bug fix for v2 viewer Tasks page: when status filter (all / enabled / done / skipped / failed) yields no rows, the pager kept rendering with full-dataset total/hasMore, misleading users.
Root cause
Fix
Note
Branch was originally cut from mem-agent-0509-magent. Now landing on mem-agent-0512 (which already contains 0509 + 0509-magent merges).
Test plan
Made with Cursor