{# Active-tab state. Computed once here (Jinja `set` at template scope is visible to both the desktop and mobile menus below) and as an explicit match per page — an earlier negative-match chain ("not /runs and not /settings and …") silently gave the wrong tab its highlight every time a new page was added. #} {% set path = request.url.path %} {% set is_detail = '/tasks/' in path %} {% set is_settings = path.startswith('/settings') %} {% set is_terminals = path == '/terminals' or path.startswith('/terminal/') %} {% set is_disk = path == '/disk' %} {% set is_sources = path == '/sources' or path.startswith('/sources/') %} {% set is_runs = (path.startswith('/runs') or path.startswith('/task-sources')) and not is_detail %} {% set is_backends = path == '/backends' or path.startswith('/backends/') %} {% set is_overview = path == '/' %}