test: add failing tests for sort/order on GET /api/instances #71

Merged
josh merged 5 commits from dev into main 2026-05-29 16:05:54 -04:00
Owner
No description provided.
josh added 5 commits 2026-05-29 16:05:07 -04:00
Tests cover:
- sort by vmid asc/desc
- sort by name desc
- sort by created_at asc/desc (id tiebreaker for same-second inserts)
- sort by updated_at asc/desc (id tiebreaker for same-second inserts)
- invalid sort field falls back to name asc

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: add sort by vmid, name, last created, last updated on dashboard
CI / test (pull_request) Successful in 9s
CI / build-dev (pull_request) Has been skipped
b6ca460ac6
- GET /api/instances now accepts ?sort= (name|vmid|created_at|updated_at)
  and ?order= (asc|desc); invalid sort fields fall back to name asc
- Timestamp sorts use id as a tiebreaker (datetime() precision is 1 s)
- Toolbar gains a sort-field <select> and a ↑/↓ direction toggle button
- toggleSortDir() flips direction and re-fetches; state held in data-dir attr

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Merge pull request 'feat/sort-instances' (#69) from feat/sort-instances into dev
CI / test (push) Successful in 9s
CI / build-dev (push) Successful in 25s
fb3c6405c9
Reviewed-on: #69
feat: accept partial bodies on PUT /api/instances/:vmid
CI / test (pull_request) Successful in 10s
CI / build-dev (pull_request) Has been skipped
ea671535fc
Merge the request body onto the existing instance row before validating,
so external callers (n8n, scripts) can send only the fields they want to
change instead of GET-then-splat-then-PUT the full record.

Mirrors the partial-update pattern already used by PUT /api/jobs/:id.
Full-body PUTs (today's frontend) are unaffected.
Merge pull request 'feat: accept partial bodies on PUT /api/instances/:vmid' (#70) from feat/partial-instance-updates into dev
CI / test (push) Successful in 11s
CI / build-dev (push) Successful in 38s
CI / test (pull_request) Successful in 18s
CI / build-dev (pull_request) Has been skipped
64eacb28d2
Reviewed-on: #70
josh scheduled this pull request to auto merge when all checks succeed 2026-05-29 16:05:11 -04:00
josh merged commit a0381b12cc into main 2026-05-29 16:05:54 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: josh/Catalyst#71