Context. surface admin · domain isis · route /isis/output-gallery · auth signed-in (admin) · source apps/oshun/admin/src/app/isis/output-gallery/page.tsx
Last walked. —
Purpose#
Operator view of the output gallery (§24.10) with the same filter facets as the customer gallery, plus bulk actions (re-tag, send-to-editorial, revoke-consent, takedown) with operator audit and an undo window.
Entry points#
- Direct URL —
/isis/output-gallery - External runbooks / deep links
- Not in canonical IA — no sidebar entry
Layout regions#
Page does NOT wrap in AdminShell. Resolves a GalleryAdminContext
({ records, authorization, nowUnixSeconds }) via binding
(bindGalleryAdminLoader) and renders <OutputGalleryAdminPanel {...ctx} />.
Default binding yields
{ records: [], authorization: { operatorId: 'operator-anon', tier: 'operator-admin' }, nowUnixSeconds: now }.
- OutputGalleryAdminPanel:
- Filter controls —
GalleryFilterstate shaped byapplyGalleryFilter; facets includeexcludeTakenDown, domain set (tara/veritas/nyx/nisaba/metis/arete/sophia), kind set (image/video/audio-narration/audio-music/mesh-3d/caption-dub/accessibility-pass), entitlement set (contemplative/curated-creator/aaa-creator/operator-admin), CSV fields parsed viacsvToList - Records list — filtered records; selection set tracked in
selected: readonly string[] - Bulk action chooser —
BulkAction['kind']selector (default'takedown'); reason / tags textbox bound toreasonOrTags - Validate + record —
validateBulkActionandrecordBulkActionrun on submit; undo window provided byundoBulkAction
- Filter controls —
States#
- Anonymous → global middleware redirects
- Binding unset → empty records list; authorization
operator-anon/ tieroperator-admin - Filter
excludeTakenDown: false→ taken-down records visible - Domain / kind / entitlement filter toggled →
applyGalleryFilternarrows the records list - CSV input parsed into list → empty list returns
undefinedfromcsvToList(clears the filter) - Bulk action
validateBulkActionrejects → no record written - Bulk action recorded →
recordBulkActionreturns aBulkActionInvocation; undo window opens - Undo within window →
undoBulkActionreverses the action
Interactions#
- Domain toggle chips (per
OutputDomain) - Kind toggle chips (per
OutputKind) - Entitlement toggle chips (per
OutputRecord['entitlementTier']) - CSV inputs (e.g., creator id list) — parsed via
csvToList - "Exclude taken-down" checkbox
- Record-row checkbox (selection)
- Bulk action kind select — sets
actionKind - Reason / tags textbox — bound to
reasonOrTags; meaning depends onactionKind - Submit bulk action — validates + records
- Undo bulk action (within undo window)
Data & contracts#
- Reads:
binding()returnsGalleryAdminContextwithrecords: readonly OutputRecord[],authorization: AuthorizationCheck,nowUnixSeconds: number - Writes: in-component via
recordBulkAction/undoBulkAction(pure functions from@isis/output-gallerycontract). Persistence happens via a downstream binding (not visible at page level) - Realtime: None.
- Auth/role check: only the global middleware; tier supplied by
authorization(defaultsoperator-admin)
Cross-references#
- Shell:
shell/02-routing-layouts.md - Sibling Isis routes:
isis-runpod-endpoints.md(execution),isis-civitai-intake.md(intake) - Related canonical workspace:
../workspaces/safety/rights.md(provenance / consent),../workspaces/content/editorial.md(send-to-editorial target) - Library:
@isis/output-gallery—applyGalleryFilter,recordBulkAction,undoBulkAction,validateBulkAction,AuthorizationCheck,BulkAction,BulkActionInvocation,GalleryFilter,OutputDomain,OutputKind,OutputRecord - Component source:
apps/oshun/admin/src/app/isis/output-gallery/OutputGalleryAdminPanel.tsx
Open questions / known gaps#
- No session / scope check at the page level
-
tier: 'operator-admin' as constdefault lets the binding defaults grant maximum scope — verify production binding gates appropriately - The relationship between gallery
send-to-editorialbulk action and the/editorialworkspace is not declared inOSHUN_ADMIN_WORKSPACE_RELATIONSHIPS