From 409d873aa0a40ee4b753a69b43ad69f9538a90ff Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 3 Apr 2026 22:52:28 +0200 Subject: [PATCH] Toolbar is now view-provided via useToolbar composable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each view declares its toolbar groups and connection via provideToolbar(). AppToolbar injects and renders only what the active view needs. - AgentsView: quad-view + themes + panels + chat connection - TestsView: themes + test SSE connection (replaces raw EventSource) - ViewerView: themes only - Home/Login: no provide → toolbar hidden useConnection() manages any SSE endpoint: connect, reconnect, state. Tenant feature gating follows naturally — routes that don't exist contribute no toolbar config. Co-Authored-By: Claude Sonnet 4.6 --- src/components/AppToolbar.vue | 92 ++++++++++++----------------------- src/composables/useToolbar.ts | 80 ++++++++++++++++++++++++++++++ src/views/AgentsView.vue | 25 ++++++++++ src/views/TestsView.vue | 28 +++-------- src/views/ViewerView.vue | 4 +- 5 files changed, 146 insertions(+), 83 deletions(-) create mode 100644 src/composables/useToolbar.ts diff --git a/src/components/AppToolbar.vue b/src/components/AppToolbar.vue index 8f62926..fc7bf1a 100644 --- a/src/components/AppToolbar.vue +++ b/src/components/AppToolbar.vue @@ -1,8 +1,8 @@ diff --git a/src/views/ViewerView.vue b/src/views/ViewerView.vue index df4774a..fb5f566 100644 --- a/src/views/ViewerView.vue +++ b/src/views/ViewerView.vue @@ -85,8 +85,10 @@ import { OverlayScrollbarsComponent } from 'overlayscrollbars-vue'; import { scrollbarOptions } from '../composables/useScrollbar'; import { FolderOpenIcon, FolderIcon, DocumentIcon, ArrowDownTrayIcon } from '@heroicons/vue/20/solid'; import { useViewer } from '../composables/useViewer'; - +import { provideToolbar } from '../composables/useToolbar'; import { computed } from 'vue'; + +provideToolbar({ groups: ['themes'] }); import { getApiBase } from '../utils/apiBase'; const {