Skip to content

Release: dashboard 3B + 3C (first production deploy) - #3

Merged
iboughtamouse merged 2 commits into
mainfrom
staging
Jul 8, 2026
Merged

iboughtamouse merged 2 commits into
mainfrom
staging

Conversation

@iboughtamouse

Copy link
Copy Markdown
Owner

First production release of the admin dashboard: read-only pages (3B) + editing and publish (3C). Deploys via the new Vercel project (ethogram-admin → admin.wbsethogram.org, DNS pending; VITE_API_BASE_URL=https://api.wbsethogram.org baked at build). Suites: 61 green.

* feat(3B): read-only dashboard pages

Layout with topbar + nav wraps five pages: Overview (aviary cards,
latest published version, unpublished-changes badge), Aviary detail
(subject episodes, perch diagrams, perches, enablement counts),
Vocabulary (grouped behavior catalog with requires_* flags and the
aviary enablement matrix, plus the four option kinds), Versions, and
Submissions (P3-D6: draft-vs-applied filters, Excel download links via
the existing public endpoint). Data flows through a small useFetch hook
over the credentialed api client. +9 tests (26 total).

* fix(3B): return to login when the session dies mid-browse

Review finding: useFetch treated a 401 like any page error, so an
expired/revoked session showed 'Not signed in' alerts under a header
still claiming 'Signed in as X'. apiFetch now reports 401s from
dashboard endpoints through an onUnauthorized subscription that App
wires to its signed-out transition. Auth endpoints are excluded (/me's
401 is the normal signed-out answer; a failed redeem is a page-level
error). +5 tests (31 total).
* feat(3C): admin API client + useFetch reload (WIP — editing pages next)

Client wrappers for every 3C write endpoint (aviary/perch/subject/
behavior/group/option CRUD, enablement replace-set, config diff +
publish) and a reload() on useFetch so pages can refetch after a
mutation. Additive and green (31 tests, lint, build); the editing pages
that consume these are the next step.

* feat(3C): subject + perch editing on the aviary page

SubjectsSection: add a subject (P2-D8 reserved names and the Excel
sheet-name rule are enforced server-side; errors surface inline),
record a departure, change type (one close+reopen action), and remove
— removal of a published episode shows the API's friendly refusal.
PerchesSection: add / edit label+group / retire / unretire / remove,
same refusal handling. Shared useAction hook wraps every mutation
(busy + friendly error), constants.js centralizes wire-value labels.
41 tests.

* feat(3C): per-aviary enabled-vocabulary editor

EnablementSection replaces the read-only counts block on the aviary
page: the full catalog renders as checkbox grids (behaviors by group,
then the four option kinds), seeded from the aviary's enabled sets, and
Save submits the complete replace-set the PUT endpoint expects. Save
stays disabled until something actually changed. Draft-config hint
added at the top of the page.

* feat(3C): vocabulary catalog editing

VocabularyPage splits into BehaviorCatalog and OptionsCatalog. Add a
behavior captures everything the schema and Excel derivation need
(design §5): group picker, the six requires-flags as plain-language
checkboxes, Excel row label, and row placement via insert-after. Add a
group prefills the next sort order. Both catalogs get inline editing,
one-click retire/unretire, and draft removal with the API's refusal
surfaced for published entries. The enablement matrix stays read-only
here — each aviary's page owns its enabled set.

* feat(3C): Publish page — diff review, confirmations, notes

GET /config/diff drives the review step: the change list since the
latest version, a blocking violations panel when a draft change would
break published values (with the server's fix-it messages), and the
two explicit confirmation checkboxes the publish endpoint requires
when behaviors changed requires-flags or Excel rows. Optional notes
ride into the version history. Success shows the published version and
its changes; the diff reloads to the clean state. Nav gains Publish;
the Overview drift badge now links here.

* fix(3C): pre-merge review findings — reload survival, publish-diff refresh

Review findings fixed (same find→verify pass as the api branch):

- AviaryPage/VocabularyPage/PublishPage only blank to 'Loading…' on
  first load. During post-mutation reloads the stale data keeps
  rendering, so sibling sections (an open editor row, a half-built
  form) are no longer unmounted and silently discarded.
- EnablementSection resyncs its draft on enablement CONTENT, not prop
  identity — a perch rename two sections up no longer clobbers a dirty
  enabled-vocabulary draft. Real content changes still resync.
- PublishPage refreshes the diff after a FAILED publish too: the
  server may require a confirmation the mount-time diff didn't show
  (draft moved under the page); without the refresh the needed
  checkbox never rendered and the page dead-ended.
- Test gap closed: the default at-the-end add-behavior path is pinned
  to OMIT insertAfter (the server rejects an empty string).

61 tests (was 58).

* chore: drop unused variable flagged by lint
@vercel

vercel Bot commented Jul 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ethogram-admin Ready Ready Preview, Comment Jul 8, 2026 2:45pm

Request Review

@iboughtamouse
iboughtamouse merged commit 1d36d06 into main Jul 8, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Production — 99698625 Deployed Jul 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant