From 8bff7783831727d5122d0a0aad8041253ec741d8 Mon Sep 17 00:00:00 2001 From: Sawyer Hood Date: Tue, 2 Jun 2026 17:27:14 -0700 Subject: [PATCH 01/12] Global app storage + top-level Apps sidebar; remove built-in status app Apps are now global on the local host (filesystem source-of-truth at /apps//, manifest.id == applicationId, no install DB). Adds global /api/v1/apps/* routes, BB_APPS_ROOT/BB_APP_* runtime roots, app-session message target context, atomic create/tombstone-delete, bb app current CLI, daemon app-data tracking + apps-root watcher, and a top-level sidebar Apps section (drops per-manager app nesting). Removes the old thread-scoped /threads/:id/apps routes and the built-in manager status app. --- .../src/components/layout/AppLayout.test.tsx | 4 +- .../secondary-panel/AppTabContent.test.tsx | 88 +- .../secondary-panel/AppTabContent.tsx | 37 +- .../secondary-panel/FilePreview.test.tsx | 10 +- .../ManagerThreadStorageBrowser.stories.tsx | 4 +- .../secondary-panel/NewTabFileSearch.tsx | 44 +- .../secondary-panel/NewTabPage.test.tsx | 42 +- .../ThreadSecondaryPanel.test.tsx | 18 +- .../ThreadSecondaryPanelNewTab.stories.tsx | 26 +- .../useThreadFileTabs.test.tsx | 61 +- .../secondary-panel/useThreadFileTabs.ts | 92 +- .../components/sidebar/ProjectList.test.tsx | 242 ++- .../src/components/sidebar/ProjectList.tsx | 43 +- .../app/src/components/sidebar/ProjectRow.tsx | 79 +- .../components/sidebar/SidebarAppsSection.tsx | 140 ++ .../src/components/sidebar/ThreadAppRow.tsx | 94 -- apps/app/src/components/sidebar/ThreadRow.tsx | 22 +- .../sidebar/sidebarCollapsedAtoms.ts | 3 +- .../cache-owners/cache-owner-registry.test.ts | 12 +- .../cache-owners/realtime-cache-registry.ts | 6 - .../cache-owners/system-cache-effects.ts | 12 +- apps/app/src/hooks/queries/query-keys.ts | 86 +- apps/app/src/hooks/queries/thread-queries.ts | 65 +- .../src/hooks/realtime-cache-effects.test.ts | 86 - .../hooks/useFileSearchSuggestions.test.tsx | 24 +- .../app/src/hooks/useFileSearchSuggestions.ts | 18 +- apps/app/src/lib/api.ts | 26 +- apps/app/src/lib/file-content-urls.ts | 30 +- .../src/lib/fixed-panel-tabs-state.test.ts | 4 +- apps/app/src/lib/fixed-panel-tabs-state.ts | 33 +- .../views/thread-detail/ThreadDetailView.tsx | 42 +- apps/cli/src/__tests__/command-output.test.ts | 101 +- apps/cli/src/commands/app.ts | 447 +++-- .../src/app-data-change-reporter.test.ts | 114 +- .../src/app-data-change-reporter.ts | 219 ++- apps/host-daemon/src/app-data-files.test.ts | 73 +- apps/host-daemon/src/app-data-files.ts | 194 ++- apps/host-daemon/src/app.test.ts | 3 + apps/host-daemon/src/app.ts | 47 +- .../src/command-handlers/host-files.test.ts | 6 +- apps/host-daemon/src/runtime-manager.test.ts | 114 +- apps/host-daemon/src/runtime-manager.ts | 129 +- .../host-daemon/src/runtime-shell-env.test.ts | 6 + apps/host-daemon/src/runtime-shell-env.ts | 2 + apps/host-daemon/src/start-host-daemon.ts | 2 + apps/host-daemon/test/helpers/test-server.ts | 1 + apps/server/src/internal/app-data-changes.ts | 56 +- apps/server/src/internal/session.ts | 7 + apps/server/src/routes/apps.ts | 1456 +++++++++++++++++ apps/server/src/routes/threads/apps.ts | 1320 --------------- apps/server/src/routes/threads/index.ts | 2 - apps/server/src/server.ts | 2 + .../apps/tracked-application-data-targets.ts | 79 + .../src/services/threads/app-client-script.ts | 24 +- .../services/threads/blank-app-scaffold.ts | 13 +- .../apps/status/manifest.json | 9 - .../threads/manager-storage-templates.ts | 112 +- apps/server/src/ws/hub.ts | 4 +- apps/server/test/app/hub.test.ts | 20 +- .../internal/internal-app-data-change.test.ts | 105 +- apps/server/test/public/public-apps.test.ts | 229 +++ .../test/public/public-thread-apps.test.ts | 1375 ---------------- ...blic-threads.manager-and-ownership.test.ts | 20 +- .../threads/app-client-script.test.ts | 21 +- .../threads/manager-storage-templates.test.ts | 113 +- docs/migrating-status-to-apps.md | 199 --- packages/config/package.json | 5 + packages/config/src/app-storage-paths.ts | 34 + packages/domain/src/apps.ts | 5 +- packages/domain/src/change-kinds.ts | 1 + packages/domain/src/index.ts | 4 +- packages/host-daemon-contract/src/index.ts | 2 + packages/host-daemon-contract/src/session.ts | 19 +- .../test/contract.test.ts | 10 +- .../host-watcher/src/host-watcher-types.ts | 59 +- packages/host-watcher/src/index.ts | 4 + .../host-watcher/src/parcel-host-watcher.ts | 219 ++- .../test/thread-storage-watch.test.ts | 118 +- packages/server-contract/src/api-types.ts | 63 +- packages/server-contract/src/index.ts | 7 +- packages/server-contract/src/public-api.ts | 81 +- .../server-contract/test/contract.test.ts | 14 +- .../src/generated/templates.generated.ts | 18 +- .../templates/src/templates/bb-guide-app.md | 128 +- .../templates/bb-guide-manager-templates.md | 61 +- .../src/templates/bb-guide-overview.md | 2 +- .../templates/manager-agent-instructions.md | 3 +- .../system-message-manager-quick-start.md | 2 +- .../system-message-manager-welcome.md | 19 +- packages/templates/test/templates.test.ts | 11 +- 90 files changed, 4005 insertions(+), 5001 deletions(-) create mode 100644 apps/app/src/components/sidebar/SidebarAppsSection.tsx delete mode 100644 apps/app/src/components/sidebar/ThreadAppRow.tsx create mode 100644 apps/server/src/routes/apps.ts delete mode 100644 apps/server/src/routes/threads/apps.ts create mode 100644 apps/server/src/services/apps/tracked-application-data-targets.ts delete mode 100644 apps/server/src/services/threads/default-template/apps/status/manifest.json create mode 100644 apps/server/test/public/public-apps.test.ts delete mode 100644 apps/server/test/public/public-thread-apps.test.ts delete mode 100644 docs/migrating-status-to-apps.md create mode 100644 packages/config/src/app-storage-paths.ts diff --git a/apps/app/src/components/layout/AppLayout.test.tsx b/apps/app/src/components/layout/AppLayout.test.tsx index 093741282..0d9853275 100644 --- a/apps/app/src/components/layout/AppLayout.test.tsx +++ b/apps/app/src/components/layout/AppLayout.test.tsx @@ -351,12 +351,12 @@ describe("AppLayout desktop chrome", () => { await renderAppLayout({ desktopInfo: null, initialEntry: "/projects/proj_sidebar_resize", - children: