Skip to content
This repository was archived by the owner on Nov 12, 2026. It is now read-only.

fix(monitor list): report the list's total, tolerate a missing meta — HAT-1264 review - #27

Merged
beengud merged 1 commit into
mainfrom
hat-1264-review-fixes
Nov 10, 2026
Merged

beengud merged 1 commit into
mainfrom
hat-1264-review-fixes

Conversation

@beengud

@beengud beengud commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Follow-ups from the fresh-context review of #26 (HAT-1264).

  • listMonitorsPage returns {monitors, totalCount}; listMonitors stays the monitors-only wrapper. monitor list prints Found <total> again (the server's meta.totalCount, or the filtered length when windowed locally) instead of the window size, so the default call says Found 135 with 100 rows and the --offset 100 hint, as before fix(monitor list): page through the REST list, forward --limit/--offset — HAT-1264 #26.
  • meta is read defensively: the generated client hands the JSON through unconverted, so a response without meta no longer throws a TypeError, and like a -1 total it is paged until an empty page rather than stopping on a short page.
bun test src/commands/monitor/list.test.ts src/rest/monitor/list-monitors.test.ts → 46 pass / 0 fail
bun test src → 726 pass, 23 fail, 16 errors (749; the failures are the trimmed areas, unchanged)
tsc 0 errors in the monitor files; eslint + prettier clean

🤖 Generated with Claude Code

Review follow-ups to #26 (HAT-1264):

- `listMonitorsPage` returns `{monitors, totalCount}`; `listMonitors` is
  the monitors-only wrapper. `monitor list` prints `Found <total>` again
  (the server's `meta.totalCount`, or the filtered length when windowed
  locally) instead of the window size.
- `meta` is read defensively: the generated client hands the JSON through
  unconverted, so a response without `meta` no longer throws, and like a
  `-1` total it is paged until an empty page rather than stopping on a
  short page.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@beengud
beengud merged commit e6d9506 into main Nov 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants