gabriel / musehub public
refactor BREAKING feat/cursor-pagination-cleanup #2 / 2
gabriel · 167 days ago · Apr 11, 2026 · Diff

refactor: complete cursor pagination audit — remove all offset patterns

- mcp/tools/musehub.py: replace dead offset param with cursor in musehub_list_domains schema; replace offset with cursor in musehub_list_symbols schema - mcp/dispatcher.py: rewrite musehub_list_symbols handler to use last_modified|address composite cursor instead of integer offset slice - services/musehub_repository.py: global_search renames offset→page_start, uses last repo_id as cursor value instead of integer position - api/routes/api/search.py: fix stale docstring (page_size → limit, page → cursor) - src/ts/pages/topics.ts: replace pageNum/pageSize page-number navigation with opaque cursor; reads cursor from URL ?cursor= param, renders Next link only when nextCursor exists; TopicDetailData removes page/pageSize - templates/musehub/pages/topics.html: remove pageNum/pageSize from page_json - src/ts/pages/explore.ts: page_size=10 → limit=10 in search URL - tests: assert cursor is repo_id (not integer), no-overlap between pages, tool schema no longer exposes offset, list_symbols response has next_cursor

sha256:ad43c5901d5ba9687dcb7c513a5050f39253e6b7efa8b0409e73f7ac4ac71271 sha
+1 ~12 −1 symbols
sha256:5a606e089be77534bcd10924d7ad9533df67e24eaaa69f5159c269fe7b2e8231 snapshot
+1
symbol added
~12
symbols modified
−1
symbol removed
0
dead code introduced
Semantic Changes 14 symbols
~ musehub/mcp/dispatcher.py .py 1 symbol modified
~ src/ts/pages/topics.ts .ts 1 symbol removed, 4 symbols modified
− pageUrl function function pageUrl L207–209
~ tests/test_mcp_smoke.py .py 1 symbol added, 2 symbols modified
+ test_mcp_list_domains_schema_has_cursor_not_offset function async_function test_mcp_list_domains_schema_has_cursor_not_offset L223–245

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:ad43c5901d5ba9687dcb7c513a5050f39253e6b7efa8b0409e73f7ac4ac71271 --body "your comment"