feat(web): admin organizations review pages (#44 slice A) #131

Merged
amiryahaya merged 10 commits from feat/44-admin-organizations into main 2026-10-29 20:20:48 +01:00
Owner

What

Admin portal slice for #44 (organizations only): menu entry, list /organizations (status filter, Load more), detail /organizations/:id (fields, documents, history), private document download, and the status-change form (offers only the moves the user's admin_portal.organizations.* keys allow; remarks 1..500 runes; fixed texts for stale-version, bad-move, missing-documents conflicts). Web only; no Go or API change.

Reviews

Superpower Code Review, dual pass, per task and on the whole branch: Pass 1 (ponytail) Must fix empty; Pass 2 (correctness) no Critical/Important left after the fix waves (detail refetch on mount + Reload, success announcement and focus, rune-counted trimmed remarks, one status label map, single Reload on 409, and more).

Checks

  • make cover: 91.3% (minimum 80%), Go unchanged.
  • Web unit: ui 35, auth 45, ticket 303, admin 132. Typecheck and build clean.
  • scripts/web-e2e.sh: admin 68 passed / 1 skipped, ticket 207 / 58 (unchanged).

Rulings

  • List paging ends on a page shorter than 50 (list schema has items only); one extra empty request if the last page is exactly full.
  • Document type names come from the public /v1/organization-document-types (staff with only .view cannot call the admin list); retired types show their id.
  • Not in this PR: textarea for remarks, confirm step for rejected/disabled, Back-to-list keeping the filter.

Known limits

  • Roles, users and role assignment (rest of #44) have no admin API yet: slice B needs Go + OpenAPI first.
  • Uploading a document does not bump organizations.version, so staff can approve against a stale document list without a 409 (server follow-up).
  • Remarks is a single-line input. No live polling on the detail page (Reload button).
  • Not verified: real phones, Safari/Firefox, real IdP.

🤖 Generated with Claude Code

## What Admin portal slice for #44 (organizations only): menu entry, list `/organizations` (status filter, Load more), detail `/organizations/:id` (fields, documents, history), private document download, and the status-change form (offers only the moves the user's `admin_portal.organizations.*` keys allow; remarks 1..500 runes; fixed texts for stale-version, bad-move, missing-documents conflicts). Web only; no Go or API change. ## Reviews Superpower Code Review, dual pass, per task and on the whole branch: Pass 1 (ponytail) Must fix empty; Pass 2 (correctness) no Critical/Important left after the fix waves (detail refetch on mount + Reload, success announcement and focus, rune-counted trimmed remarks, one status label map, single Reload on 409, and more). ## Checks - `make cover`: 91.3% (minimum 80%), Go unchanged. - Web unit: ui 35, auth 45, ticket 303, admin 132. Typecheck and build clean. - `scripts/web-e2e.sh`: admin 68 passed / 1 skipped, ticket 207 / 58 (unchanged). ## Rulings - List paging ends on a page shorter than 50 (list schema has `items` only); one extra empty request if the last page is exactly full. - Document type names come from the public `/v1/organization-document-types` (staff with only `.view` cannot call the admin list); retired types show their id. - Not in this PR: textarea for remarks, confirm step for `rejected`/`disabled`, Back-to-list keeping the filter. ## Known limits - Roles, users and role assignment (rest of #44) have no admin API yet: slice B needs Go + OpenAPI first. - Uploading a document does not bump `organizations.version`, so staff can approve against a stale document list without a 409 (server follow-up). - Remarks is a single-line input. No live polling on the detail page (Reload button). - Not verified: real phones, Safari/Firefox, real IdP. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Refetch the detail on mount with a Reload button, announce a status change,
trim and count remarks in characters, one status label map, org-specific
download failure text, typed list hooks, hint linked by aria-describedby.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fix(web): organizations fix round 1 (#44)
Some checks failed
ci / changes (pull_request) Successful in 37s
ci / api (pull_request) Has been skipped
ci / clients (pull_request) Has been skipped
ci / web (pull_request) Failing after 2m33s
ci / ci-gate (pull_request) Failing after 3s
c75b34f0b6
One Reload button, stale text tied to the version, status message cleared
on a new change or newer version, single in-flight reload, 429 download text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(web): set the 501-character remark in one step (#44)
Some checks failed
ci / changes (pull_request) Successful in 27s
ci / api (pull_request) Has been skipped
ci / clients (pull_request) Has been skipped
ci / web (pull_request) Failing after 3m36s
ci / ci-gate (pull_request) Has been cancelled
be42c20a39
Typing 501 characters one by one timed out on the CI runner, and the
leftover typing leaked into the next two tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test(web): wait up to 5 s in findBy* on the CI runner (#44)
All checks were successful
ci / changes (pull_request) Successful in 24s
ci / api (pull_request) Has been skipped
ci / clients (pull_request) Has been skipped
ci / web (pull_request) Successful in 8m1s
ci / ci-gate (pull_request) Successful in 3s
cfc5d429bc
The shared runner is slow under load; App and ParkPage tests timed out
at the 1 s default although nothing was wrong.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
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
primatekuntech/kws!131
No description provided.