{# ============ TOP STRIP — dark kaidera brand navy ============ #}
{{ portal_title or 'Kaidera OS' }} KOS Enterprise AI
{# Current-project indicator — updates on project switch (syncRail). Distinct from the Cortex surface-version pill on the right (which is global, not a project). #}
{{ selected_key or 'all projects' }}
{# Top-bar nav tabs. Each switches the CENTER view via HTMX (GET /views/{view} scoped to the current project). Only Dashboard is live in R1; the rest swap in a "coming in a later increment" placeholder. The active tab is toggled client-side on htmx:afterSwap (reads data-active-view off the swapped center). #}
{# Crew-activity strip. Always-present shell indicator surfacing the orchestrator's live activity ring buffer, so "watch the crew work" works from ANY center view — not buried in the Dispatch tab. Polls /activity (scoped to the selected project) every 4s; syncRail keeps its hx-get pointed at the current project on a project switch. #}
{% include "_activity_strip.html" %}
{# Health pill. Polls /health-pill every 10s as the live-feed fallback. TODO(SSE): replace this poll with an EventSource on /events once the SSE bridge lands (push health + fleet deltas instead of polling). #}
{% include "_health_pill.html" %}
{# ============ BODY — rail · agents · center · workspace ============ #}
{# COLUMN DIVIDERS — drag to resize adjacent columns (center 1fr absorbs the delta). Positioned on the grid seams via the width vars; wired in JS (initColResizers). The workspace divider coexists with toggleDock() — it is hidden + inert while the dock is collapsed to its strip. #} {# ---------- COLUMN 1 — project rail ---------- #} {% include "_rail.html" %} {# ---------- COLUMNS 2 + 3 — agents + center (swap together) ---------- #}
{% include "_scope.html" %}
{# ---------- COLUMN 4 — workspace: project-scoped file tree + viewer ---------- #} {% include "_workspace.html" %}
v{{ app_version }}