Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

move Messages pages out of Brain into a top-level Comms sidebar section

[._.]/ Adam Eivyb848d4e29afe
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index ae201d76bc..915c4180a5 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -1,5 +1,9 @@
# Unreleased
+## Navigation
+
+- **Messages moved out of Brain into its own top-level "Comms" section.** The four Messages pages (Inbox, Drafts, Sync, Config) were buried as loose children inside the Brain group, mixed in with notes/feeds/links. They now live under a dedicated **Comms** sidebar section (between Chief of Staff and Create, alphabetically), with clean labels — so messaging is a first-class destination rather than a Brain sub-item. The page routes are unchanged (`/messages/*`), so existing links, ⌘K, and voice ("messages" / "comms") still resolve; only the sidebar grouping and the nav-manifest section moved. (`client/src/components/Layout.jsx`, `server/lib/navManifest.js`)
+
## CoS / task learning
- **Learning-based model routing now prefers the lightest tier that succeeds, instead of the marginally-highest-success tier.** `suggestModelTier` sorted candidate tiers by success rate and returned the top one, so a `heavy` tier at 85% would beat a `light` tier at 82% — silently over-allocating compute for the same outcome, despite an inline comment that said "if a lighter tier has high success, no need to upgrade." It now picks the **lightest** tier among all that clear the high-success threshold (≥80%), realizing that intent and saving the heavier model for task types that actually need it. The cost-ranking covers the full tier namespace that actually lands in `routingAccuracy` — not just `light`/`default`/`medium`/`heavy` but the thinking-level names (`minimal`/`low`/`high`/`xhigh`) recorded by `selectModelForTask`, with `minimal`/`low` (local models) cheapest and `xhigh` (opus) heaviest; an unknown/future tier name (e.g. `user-specified`) ranks as heaviest so it can never masquerade as the cheapest option. Failing-tier avoidance and the insufficient-data short-circuit are unchanged. The model selector now resolves a learned thinking-level suggestion (`high`/`xhigh`/`off`) through `getModelForLevel` instead of only its four-entry static map, so a proven thinking-level tier is actually used rather than silently falling through to the provider default. Local-preferred thinking levels (`minimal`/`low`) are excluded from suggestion candidates because the learning→selection path can't switch the active provider to a local one — so the recommender never suggests a tier nothing can run, and the lightest tier the runtime *can* run (e.g. `light`) wins instead of falling through to default. (`server/services/taskLearning/routing.js`, `server/services/agentModelSelection.js`)
diff --git a/client/src/components/Layout.jsx b/client/src/components/Layout.jsx
index b5b0d34f70..064f26aea7 100644
--- a/client/src/components/Layout.jsx
+++ b/client/src/components/Layout.jsx
@@ -139,7 +139,6 @@ const navItems = [
{ to: '/brain/config', label: 'Config', icon: Settings },
{ to: '/brain/daily-log', label: 'Daily Log', icon: NotebookPen },
{ to: '/brain/digest', label: 'Digest', icon: Calendar },
- { to: '/messages/drafts', label: 'Drafts', icon: FilePen },
{ to: '/brain/feeds', label: 'Feeds', icon: Rss },
{ to: '/brain/graph', label: 'Graph', icon: Network },
{ to: '/brain/import', label: 'Import', icon: Upload },
@@ -147,9 +146,6 @@ const navItems = [
{ to: '/insights/overview', label: 'Insights', icon: Lightbulb },
{ to: '/brain/links', label: 'Links', icon: Link2 },
{ to: '/brain/memory', label: 'Memory', icon: Database },
- { to: '/messages/inbox', label: 'Messages', icon: Inbox },
- { to: '/messages/config', label: 'Messages Config', icon: Settings },
- { to: '/messages/sync', label: 'Messages Sync', icon: RefreshCw },
{ to: '/brain/notes', label: 'Notes', icon: FileText },
{ to: '/openclaw', label: 'OpenClaw', icon: MessagesSquare },
{ to: '/rapid-reader', label: 'Rapid Reader', icon: Zap },
@@ -195,6 +191,17 @@ const navItems = [
{ to: '/cos/workflow', label: 'Workflow', icon: WorkflowIcon },
],
},
+ {
+ label: 'Comms',
+ icon: MessagesSquare,
+ defaultTo: '/messages/inbox',
+ children: [
+ { to: '/messages/config', label: 'Config', icon: Settings },
+ { to: '/messages/drafts', label: 'Drafts', icon: FilePen },
+ { to: '/messages/inbox', label: 'Inbox', icon: Inbox },
+ { to: '/messages/sync', label: 'Sync', icon: RefreshCw },
+ ],
+ },
{
label: 'Create',
icon: Sparkles,
diff --git a/server/lib/navManifest.js b/server/lib/navManifest.js
index 4db3464428..87f5937b68 100644
--- a/server/lib/navManifest.js
+++ b/server/lib/navManifest.js
@@ -91,10 +91,10 @@ export const NAV_COMMANDS = [
{ id: 'nav.cos.workflow', path: '/cos/workflow', label: 'Workflow', section: 'Chief of Staff', aliases: ['workflow', 'cos-workflow'], keywords: ['pipeline', 'dependencies', 'order', 'stages', 'task pipeline'] },
{ id: 'nav.cos.productivity', path: '/cos/productivity', label: 'Streaks', section: 'Chief of Staff', aliases: ['streaks', 'cos-productivity'] },
- { id: 'nav.messages.inbox', path: '/messages/inbox', label: 'Inbox', section: 'Brain', aliases: ['messages'] },
- { id: 'nav.messages.drafts', path: '/messages/drafts', label: 'Drafts', section: 'Brain', aliases: ['drafts'] },
- { id: 'nav.messages.config', path: '/messages/config', label: 'Config', section: 'Brain', aliases: ['messages-config'] },
- { id: 'nav.messages.sync', path: '/messages/sync', label: 'Sync', section: 'Brain', aliases: ['messages-sync'] },
+ { id: 'nav.messages.inbox', path: '/messages/inbox', label: 'Inbox', section: 'Comms', aliases: ['messages', 'comms'], keywords: ['comms', 'email', 'inbox'] },
+ { id: 'nav.messages.drafts', path: '/messages/drafts', label: 'Drafts', section: 'Comms', aliases: ['drafts'], keywords: ['comms'] },
+ { id: 'nav.messages.config', path: '/messages/config', label: 'Config', section: 'Comms', aliases: ['messages-config'], keywords: ['comms'] },
+ { id: 'nav.messages.sync', path: '/messages/sync', label: 'Sync', section: 'Comms', aliases: ['messages-sync'], keywords: ['comms'] },
{ id: 'nav.openclaw', path: '/openclaw', label: 'OpenClaw', section: 'Brain', aliases: ['openclaw'] },
{ id: 'nav.tribe', path: '/tribe', label: 'Tribe', section: 'Brain', aliases: ['tribe', 'relationships', 'relationship-manager', 'people'], keywords: ['dunbar', 'friends', 'family', 'network', 'social graph', 'care cadence'] },
diff --git a/server/lib/navManifest.test.js b/server/lib/navManifest.test.js
index dc3ef42c23..0fe03e96fa 100644
--- a/server/lib/navManifest.test.js
+++ b/server/lib/navManifest.test.js
@@ -100,7 +100,7 @@ describe('navManifest — shape invariants', () => {
it('every section is one of the approved sidebar group labels', () => {
const ALLOWED_SECTIONS = new Set([
- 'Main', 'Apps', 'Brain', 'Calendar', 'Chief of Staff', 'Create',
+ 'Main', 'Apps', 'Brain', 'Calendar', 'Chief of Staff', 'Comms', 'Create',
'Dev Tools', 'Goals', 'Health', 'Settings', 'Identity', 'POST',
]);
const bad = NAV_COMMANDS.filter((c) => !ALLOWED_SECTIONS.has(c.section));