AI tab unification
Collapsing four AI-adjacent repo tabs (Prompts, Sessions, Activity, Prompt context) into one "AI" umbrella with sub-sections.
Between Stage 0c Pillar 1 and Stage 2d-ui, the repository top-tab strip grew four AI-adjacent tabs — Prompts, Sessions, Activity, and Prompt context — that are all views of the same underlying agent runs. This plan collapses them into a single "AI" umbrella entry with sub-sections, so the four slices of one run live under one navigation home.
Status: drafted — phase 1 (the umbrella shell) in flight.
The problem
Between Stage 0c Pillar 1 (just shipped) and Stage 2d-ui (shipped 2026-06-03), the repository top-tab strip grew four AI-adjacent tabs:
| Tab | URL | What it shows | Stage |
|---|---|---|---|
| Prompts | /<org>/<repo>/prompts | Prompt-PR submission UI + history of prompt jobs | Stage 0 |
| Sessions | /<org>/<repo>/sessions | Distinct AI agent sessions → drill-down to per-session timeline | Stage 2d-ui |
| Activity | /<org>/<repo>/activity | graph_events trace ("operator's first stop") | Stage 5a |
| Prompt context | /<org>/<repo>/prompt-context | Per-surface byte budgets + guidance breakdown + memory + per-agent overrides | Stage 0c Pillar 1 capstone |
These are four views of the same underlying agent runs. A single prompt-PR submission
ends up represented in all four (Prompts as the job row, Sessions as a session entry,
Activity as a graph_event, Prompt context as the input layer). Users have to remember
which tab to open for which slice of the same story.
The "holy trinity" thesis in gitoku-product-direction memory implies a single
coherent per-run view: the sellable/forkable unit is (git ref, fs snapshot, trace subgraph). That implication never landed as an explicit UI plan — this doc fixes that.
Goal
One top-strip entry — "AI" — that absorbs the four current tabs as sub-sections. The sub-sections preserve the existing slices but live under one navigation umbrella.
Pillar 2 surfaces (runner kind / provider / cost) will land as chips and columns inside this umbrella rather than as a fifth top tab.
Phased delivery
Phase 1 — umbrella shell (this PR, v0.1.15)
- New
RepositoryAiTabenum value inApplication/PageTabs.hs. - New route
/<org>/<repo>/ai+ slug-and-id variants registered inWeb/Routes.hs+Web/Types.hs+Application/RepositoryUrls.hs. - New view
Web/View/Repositories/Ai.hswith a sub-nav (Submit / Sessions / Trace / Context). For phase 1, each sub-nav entry links to the existing standalone URL — we don't compose yet. - The four current top tabs (Prompts / Sessions / Activity / Prompt context) are
removed from
renderRepositoryTopTabs. Their URLs stay fully functional for bookmarks, deep-links, and rgh / API consumers. Tab enums stay inPageTabs.hsso parsing doesn't break. doc/README.mdstage table gets a new row for this work.
Acceptance for phase 1:
- Top strip shows one "AI" entry where four used to be.
/<org>/<repo>/airenders the umbrella shell with sub-nav.- Clicking each sub-nav entry navigates to the existing standalone page.
- Old URLs still resolve (no 404s on
/prompts,/sessions,/activity,/prompt-context). - Nix-build green; deploy clean.
Phase 2 — composed sections (later PRs)
Progressively absorb each old view into the umbrella as an actual rendered section rather than a link out. Order of absorption (smallest first):
- Prompt context — already a pure read-only render; trivial to fold in.
- Sessions — render the index inline, drill-down still navigates to the per-session timeline.
- Activity — the
graph_eventstable inline; sticky filter bar. - Prompts — the submission form + recent-jobs list inline.
Each phase-2 PR also deletes the corresponding old tab's standalone view if no external system relies on its URL. URLs we know external systems depend on (rgh / API):
/<org>/<repo>/prompts— used by rgh'ssubmitflow (verify before removing)./<org>/<repo>/sessions/<id>— likely referenced in commit-context payloads.
Keep the *BySlug*Action constructors in Web/Types.hs for as long as any external
system might link to them.
Phase 3 — (git, fs, trace) triple per run
Pillar 2 (CLI runners / HTTP providers) + Stage 4b ZFS-snapshot UI eventually let one agent-run row inside Sessions surface its three legs together: the commit it produced, the filesystem snapshot it ran inside, the trace subgraph it generated. That's the "holy trinity" UI manifestation. Out of scope for this plan but the umbrella established here is the home for that surfacing.
Non-goals
- Settings consolidation. The plan-doc reference to a "single AI providers tab" (continuity-completion §"Stage 0c", line 560) is about the account settings UI for credentials — out of scope here; that lands with Pillar 2.
- Renaming or migrating data. No schema changes. No data movement. Pure UI shell.
- Adding new functionality. Sub-sections render exactly what their old standalone views rendered, just under the umbrella.
Risks
- Bookmarks. Mitigated by keeping old URLs functional.
- External consumers (rgh, MCP). Audit before removing any old URL. Phase 2 PRs must verify.
- Test fixtures referencing the old tab IDs. Keep
RepositoryPromptsTabetc. inPageTabs.hsenum so parsing stays backward-compatible.
Done (whole plan)
A single "AI" entry in the repo top strip. Clicking it lands on /ai with sub-nav.
Every AI-adjacent view in the repo (Submit prompt, Sessions, Trace, Context preview,
and eventually per-run triple) is reachable through that umbrella. The four old tabs
are gone from the top strip; their URLs may still respond, but only as compatibility
shims for external consumers.