{# Shared modern header — used by base.html and dashboard.html. Styles live in app/web/static/style-custom.css under the .app-* prefix. #} {% if session.user %}
{{ config.INSTANCE_SUBTITLE or 'Data Analyst Portal' }}
{% set _path = request.url.path %} {% set _home = home_route or '/dashboard' %} {# Primary nav: Home → Marketplace → Data Packages → Memory. Activity Center moved into the Admin dropdown — its content is per-team adoption analytics that only admins consume in practice (the route still allows any authed user for direct deep-links). The "Home" link points at the operator-resolved `home_route` (defaults to /dashboard for OSS; customer instances flip to /home via env / yaml). Setup local agent + My Stack used to live in the nav too; Setup is reached from /home's install flow and My Stack lives inside /marketplace as a tab. #} Home Marketplace Data Packages {# Memory + Admin menu: both admin-only. Backend gates the routes themselves via require_admin (see app/web/router.py for /corporate-memory + /corporate-memory/admin + /admin/*), so hiding the links is purely a visibility tidy-up — non-admins who deep-link still get a 403 from the route handler. Single guard wraps both for clarity. #} {% if session.user.is_admin %} {# "Memory" link moved into the Admin dropdown's Agent Experience section (parallel to Curated Marketplaces / Flea Submissions / Prompts). The primary nav no longer carries an admin-only entry — primary nav stays consistently visible to all authenticated users. #} {% set _admin_active = _path.startswith('/admin/tables') or _path.startswith('/admin/tokens') or _path.startswith('/admin/users') or _path.startswith('/admin/groups') or _path.startswith('/admin/access') or _path.startswith('/admin/server-config') or _path.startswith('/admin/agent-prompt') or _path.startswith('/admin/workspace-prompt') or _path.startswith('/admin/marketplaces') or _path.startswith('/admin/store') or _path.startswith('/admin/scheduler-runs') or _path.startswith('/admin/activity') or _path.startswith('/admin/telemetry') or _path.startswith('/admin/usage') or _path.startswith('/admin/sessions') or _path.startswith('/corporate-memory') %}
{# Admin dropdown is grouped into four named sections so admins doing different jobs (debugging activity vs. managing users vs. curating marketplaces) can land on the right page without re-reading the full menu. Section headers are non-clickable, set off by `.app-nav-menu-section` styling (small caps, muted). Items keep the existing `.app-nav-menu-item` look + active state. #}
{% endif %}
{% endif %}