feat: operator admin UI + backing endpoints (v0.2.0) #16

Merged
padreug merged 4 commits from feat/admin-ui into main 2026-07-19 22:46:12 +00:00
Owner

Replaces the placeholder admin page (which you hit on aio-demo) with a real operator admin. Bumps to v0.2.0.

Frontend — 4-tab admin (Vue 3 + Quasar 2 UMD, no build)

  • Rooms — table with create/edit dialog (title, description, price/currency/frequency, guests, min-nights, amenities, images, location, geohash, check-in instructions), publish/unpublish toggle, delete.
  • Bookings — pick a room → its bookings (status-chipped, dates, guests, sats, truncated guest npub).
  • Calendar blocks — pick a room → add/delete manual date blocks.
  • Settings — operator account id, relays, hold minutes, deposit %, check-in/out times, cancellation policy, publish-availability toggle.

UMD gotchas honored per workspace rules: no self-closing tags, ${ } interpolation, :style for typography, static_url_for(path=...). Follows the spirekeeper admin pattern.

Backend — the endpoints the UI needs (all admin-key + ownership-scoped)

GET /rooms (filtered to caller's wallet), PUT /rooms/{id}, DELETE /rooms/{id}, POST /rooms/{id}/publish|unpublish, GET /rooms/{id}/bookings, GET /rooms/{id}/blocks, DELETE /blocks/{id}, GET|PUT /settings. _owned_room centralizes the 404/403 guard; publish/unpublish flip status and sync the relay listing.

Tests — 28 pass

+5 admin-endpoint tests (call the view functions directly with a fake key, monkeypatched crud): _owned_room 403/404, list-rooms wallet filter, room update applies only mutable fields (wallet/id immutable), settings PUT merges editable fields only.

Verified here / needs your eyes

  • Suite green, JS node --check clean, no self-closing tags, all 15 routes register.
  • 👀 Live rendering needs a browser — I can't load the Quasar page here. Please reinstall/upgrade on aio-demo after merge and click through the tabs. The classic UMD failure modes are checked, but a visual pass is the real test.

After merge (release)

Tag v0.2.0, sha256 the archive, add a new catalog entry alongside v0.1.0 (don't overwrite — instances on 0.1.0 need it resolvable). I'll carry that through.

Why PR

Money-adjacent extension → PR category. Handing off merge to you via the Forgejo UI.

🤖 Generated with Claude Code

Replaces the placeholder admin page (which you hit on aio-demo) with a real operator admin. Bumps to **v0.2.0**. ## Frontend — 4-tab admin (Vue 3 + Quasar 2 UMD, no build) - **Rooms** — table with create/edit dialog (title, description, price/currency/frequency, guests, min-nights, amenities, images, location, geohash, **check-in instructions**), publish/unpublish toggle, delete. - **Bookings** — pick a room → its bookings (status-chipped, dates, guests, sats, truncated guest npub). - **Calendar blocks** — pick a room → add/delete manual date blocks. - **Settings** — operator account id, relays, hold minutes, deposit %, check-in/out times, cancellation policy, publish-availability toggle. UMD gotchas honored per workspace rules: **no self-closing tags**, `${ }` interpolation, `:style` for typography, `static_url_for(path=...)`. Follows the `spirekeeper` admin pattern. ## Backend — the endpoints the UI needs (all admin-key + ownership-scoped) `GET /rooms` (filtered to caller's wallet), `PUT /rooms/{id}`, `DELETE /rooms/{id}`, `POST /rooms/{id}/publish|unpublish`, `GET /rooms/{id}/bookings`, `GET /rooms/{id}/blocks`, `DELETE /blocks/{id}`, `GET|PUT /settings`. `_owned_room` centralizes the 404/403 guard; publish/unpublish flip status and sync the relay listing. ## Tests — 28 pass +5 admin-endpoint tests (call the view functions directly with a fake key, monkeypatched crud): `_owned_room` 403/404, list-rooms wallet filter, room update applies **only** mutable fields (wallet/id immutable), settings PUT merges editable fields only. ## Verified here / needs your eyes - ✅ Suite green, JS `node --check` clean, no self-closing tags, all 15 routes register. - 👀 **Live rendering needs a browser** — I can't load the Quasar page here. Please reinstall/upgrade on aio-demo after merge and click through the tabs. The classic UMD failure modes are checked, but a visual pass is the real test. ## After merge (release) Tag `v0.2.0`, sha256 the archive, add a **new** catalog entry alongside v0.1.0 (don't overwrite — instances on 0.1.0 need it resolvable). I'll carry that through. ## Why PR Money-adjacent extension → PR category. Handing off merge to you via the Forgejo UI. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Adds the HTTP surface the admin UI needs, all admin-key + ownership-scoped:
- rooms: list (filtered to caller's wallet), update (PUT), delete, publish /
  unpublish (with ownership checks; publish/unpublish flip status + sync the
  relay listing).
- per-room: GET bookings, GET blocks.
- blocks: create (ownership-checked) + delete.
- settings: GET + PUT (merges only the editable fields).

_owned_room centralizes the 404/403 ownership guard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019VUQCfdqiLSsFS2jcGnaFD
Replaces the placeholder page with a real 4-tab admin (Vue 3 + Quasar 2 UMD,
no build). Rooms table with create/edit dialog + publish-toggle + delete;
per-room bookings view; per-room calendar blocks add/delete; operator
settings form (identity, relays, hold, deposit, times, policy).

UMD gotchas honored: no self-closing tags, ${ } interpolation, :style for
typography, static_url_for(path=...). Follows the spirekeeper admin pattern.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019VUQCfdqiLSsFS2jcGnaFD
5 tests calling the view functions directly with a fake auth key: _owned_room
403/404, list-rooms wallet filter, room update applies only mutable fields
(wallet/id immutable), settings PUT merges editable fields. 28 pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019VUQCfdqiLSsFS2jcGnaFD
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019VUQCfdqiLSsFS2jcGnaFD
padreug deleted branch feat/admin-ui 2026-07-19 22:46:12 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiolabs/chatelet!16
No description provided.