Audit existing tabbed pages order
## Original requirement (verbatim, epic body)
> "Break long pages into subtabs across the entire system."
> "Important and first hand stuff needs to be on the first page(s), then less important, logs, runs, etc"
Operator decision D8 "Audit order + overlong tabs": re-order where the priority is wrong; split any single tab that is itself long; change nothing that is already right.
Priority tiers (PRD §4): 1 Primary; 2 live status and relationships; 3 runs, logs, history, activity, audit; 4 advanced/diagnostics. **Long** = at 1440×900 in a realistic populated state, (a) content needs more than ~1.5 screens of scrolling, or (b) a secondary-data block (runs, logs, history, audit, payloads, dedup, test console, raw state/JSON) sits below primary content.
## Scope (Architecture K13, §5 — decision rule fixed, this child measures and applies)
Architect's audit: no ordering violation on any of the nine tabbed pages (Task, Node, Project, Account, Credential, User, Group, Org, Profile). Overlong-tab candidates:
| Page | Decision |
|---|---|
| Task (`pages/TaskDetailPage.tsx`) | **Changed if measured long**: the Details tab's Task Run Metrics block moves to a new `metrics` Metrics tab inserted after Details, before Activity; shown only when metrics exist. Order otherwise untouched. |
| Node (`pages/NodeDetailPage.tsx`) | **Changed if measured long**: Overview's Config Snapshot + Rescue Bundles move to a new `diagnostics` Diagnostics tab placed last. |
| Credential, Project, Account, User, Group, Org, Profile | Unchanged (recorded reasons in the PR body). |
"Measured long" = Playwright at 1440×900 against dev data: panel `scrollHeight` > 1.5 × 900 px, or a tier-3/4 block below tier-1 content. Record the numbers in the PR body. Below threshold → leave that page unchanged and say so.
- No existing tab id is renamed. Add ONE unit test that greps the in-repo `?tab=<id>` literals per target page (73 found, e.g. `MembersTable.tsx:51,125–127`, `lib/onboarding.ts:43–44`, `MentionsBell.tsx:119`, `lib/companySetup.ts:112`) and asserts each id is in that page's tab table.
- New tabs follow the pinned pattern: `TabDef` entry, `TabPanel` mounted, gated tab filtered out when it has no data, one-word label, full at 390 px.
## Acceptance criteria (verbatim, PRD R3)
- **AC3.1** Each of the nine tabbed pages is audited. Where a runs, logs, history, activity or audit tab precedes a tier-1 tab, it moves later. Any single tab that is itself long (§4) is split, following the same priority rule.
- **AC3.2** Existing `?tab=` ids keep working. A renamed or split tab keeps its old id as an alias to its new home, so links in `MembersTable`, `onboarding.ts`, `MentionsBell` and billing still land correctly.
- PRD fence: "Do not change the TaskDetailPage tab order except where the D8 audit finds a priority violation, and record the reason if it does."
- **AC6.1** ON by default on dev, no feature flag.
Credentials & reach: `gmind/skynet/dev-orgb` — tenant org admin on `https://app.dev.jaah.ai` — **verified** (task pages). `jaah/debug/main/operator-login` — operator — **verified** (Node pages; MFA risk: ask once if it reappears, else defer that measurement with the reason). Dev console `https://app.dev.jaah.ai/` — **verified**. Do NOT use `gmind/skynet/dev`. Populated records (a task with run metrics, a node with snapshots + bundles): not pre-verified — use existing dev records; if none, record the measurement as **(deferred — no populated record on dev)** and leave that page unchanged.
Out of scope: Do NOT rename any tab id or reorder any tab other than inserting `metrics`/`diagnostics` as stated. Do NOT touch Credential/Project/Account/User/Group/Org/Profile layouts. Do NOT touch `apps/api`, `apps/jaahd`, migrations. Do NOT fork `Tabs`/`useUrlTab`. Do NOT remove/rename any field or section; no copy rewrites beyond new tab labels. No feature flag.
Done means:
- AC3.1 — PR body lists all nine pages as unchanged/changed with reason and the measured px for Task Details and Node Overview; for each change, a component test asserts the new order (Task: …Details, Metrics, Activity…; Node: …, Diagnostics last) and that the moved block lives in the new panel; tab absent when no metrics/snapshots.
- AC3.2 — the `?tab=` literal test passes for every target page.
- Playwright 390 px / 1440 px of any changed page — labels in full.
- AC6.1 — after the PR's Jaah Deploy succeeds, open each changed page on app.dev.jaah.ai.
- `./dc check quick` green; PR merged to develop.
Outcome
D8 audit: 7 pages unchanged; Task gets a Metrics tab (run metrics off Details), Node gets a last Diagnostics tab (snapshot + bundles off Overview). ?tab= link guard added. PR #5085 merged, dev deploy OK, verified live. 5 UI follow-ups named in report.
Artifacts
Activity
- Draft
- Ready
- Runner started
- Runner ended (done)