Context. surface studio · domain isis · route /studio/isis/lora-training · auth signed-in + studio entitlement (AAA-gated — lora-training is in AAA_ONLY_STUDIO_ROUTES) · source apps/oshun/web/src/app/studio/isis/lora-training/page.tsx
Last walked. 2026-06-28 Codex automated deepening — route boundary, real-BFF LoRA lifecycle, loading/unauthorized/malformed states, route-map/sibling targets, and mobile overflow covered by apps/oshun/web/e2e/studio-isis-lora-training.spec.ts. Prior: 2026-05-29 automated runtime walk (Playwright headless) — render, /v1 data (2xx), console/page-errors, expected content, screenshot verified.
Purpose#
Admin §24.5 operator console for the LoRA training queue: it reads the live run
set from GET /v1/admin/isis/lora-training and drives each run through its
lifecycle (rights attestation → pre-flight → training → evaluation → promotion)
via POST …/runs/:runId/transition, plus a create form (POST …/runs). The BFF
state machine is the enforcer — the panel only offers the transitions valid for
a run's current state. It is admin-scoped and fails closed (no run data without
the Isis scope).
Entry points#
- Sibling quick-action from
/studio/isis/civitai-integration - Studio index (
/studio) - Direct URL / bookmark (AAA entitlement required)
Layout regions#
page.tsx mounts <ShellLayout active="studio"> (no breadcrumb panel) and
three panels: the workspace, the Route Map, and sibling quick-actions.
- Header: shell header
- Workspace panel (
data-isis-lora-training-workspace):<h1>(WorkspaceHeading) "Isis LoRA Training Workspace"- Summary paragraph (
data-isis-lora-training-summary) + per-state counts (data-lora-state-count) - Run list (
data-lora-run-list, eachdata-lora-run-row/ activedata-lora-run-row-active); empty statedata-lora-run-list-empty; filterdata-lora-search - Create-run form (
data-lora-create-form, toggled bydata-lora-create-toggle) - Run detail (
data-lora-detail) with the action panel (data-lora-action-panel) offering only the transitions valid for the run's current state
- Route Map panel (
data-isis-lora-training-route-map):<h2>Route Map</h2>overSTUDIO_ISIS_LORA_TRAINING_ROUTE_MAP(5 entries) - Sibling quick-actions panel:
/studio/isis/civitai-integration,/studio
States#
- Loading —
data-lora-loading - Unauthorized — 401/403 admin-scope fail-closed;
data-lora-unauthorized(governance message, no run data) - Error — non-OK or malformed response;
data-lora-error - Ready — runs present; list + detail + action panel render
- Result — after a create or transition POST,
data-lora-create-result/data-lora-action-resultwithdata-lora-create-status/data-lora-action-status
Interactions#
Create-run form (data-lora-create-form)#
- Create fields (
data-lora-create-field=<field>) — run config inputs - Create (
data-lora-create-submit) —POST /v1/admin/isis/lora-training/runs
Run action panel (data-lora-action-panel) — state-gated transitions#
- Attest rights (
data-lora-action-attest→data-lora-action-attest-submit) - Start (
data-lora-action-start) - Pause (
data-lora-action-pause) - Evaluate (
data-lora-action-evaluate) - Complete (
data-lora-action-complete→data-lora-action-complete-submit) - Promote (
data-lora-action-promote→data-lora-action-promote-submit) - Abort (
data-lora-action-abort→data-lora-action-abort-submit) - Each transition →
POST /v1/admin/isis/lora-training/runs/:runId/transition
Route Map#
- Route-map articles ×5
Sibling quick-actions#
- Open Isis Civitai Integration workspace →
/studio/isis/civitai-integration(target href verified; destination has its own route walkthrough) - Back to Studio workspace index →
/studio(target href verified)
Current E2E Evidence#
apps/oshun/web/e2e/studio-isis-lora-training.spec.ts covers this route against
the real Next dev shell plus the real BFF. The production AAA route boundary
stays hard-blocked/AAA-redirected; the spec reaches the underlying Studio Isis
lane only through an explicit localhost-only __oshunStudioIsisLaneE2E=1 bypass
that is enabled in Playwright env and rejected for non-local hosts.
- Boundary: direct
/studio/isis/lora-trainingreturns the Studio boundary headers for hard-block and AAA CTA cases. - Lifecycle: seeded rows render, search/filter/empty state work, route-map entries and sibling targets render, then a created run moves through pending-rights-attestation → pre-flight → training → paused → training → evaluating → pending-promotion → promoted. A second run is attested to pre-flight and then aborted.
- Failure states: insufficient BFF scope renders
data-lora-unauthorized; delayed/malformed BFF response renders loading and thendata-lora-error. - Mobile: 390px viewport opens the workspace/create form with no horizontal document overflow.
Data & contracts#
- Reads:
GET /v1/admin/isis/lora-training(run set + per-state counts) - Writes:
POST /v1/admin/isis/lora-training/runs(create a run)POST /v1/admin/isis/lora-training/runs/:runId/transition(drive the lifecycle state machine)
- Realtime: none
- Caching: client fetch on mount,
cache: 'no-store',buildBffAuthHeaders() - Auth/role check: admin-scoped, fail-closed (401/403); route gated on signed-in + studio entitlement (AAA segment)
- Component sources:
apps/oshun/web/src/components/studio/StudioIsisLoRATrainingWorkspace.tsxapps/oshun/web/src/components/studio/StudioIsisLoRATrainingRouteMap.ts
Cross-references#
- Studio overview:
../../studio-overview.md - AAA gating:
libs/isis/entitlements/src/studio-boundary.ts - Sibling routes:
Open questions / known gaps#
- No breadcrumb on this route — navigation is via sibling quick-actions
- Manual AT pass still pending for live screen-reader behavior and touch ergonomics beyond automated axe/mobile overflow coverage