feat(sidebar): merge tasks panel into collapsible sidebar with VM groups#3473
Conversation
🧪 BenchmarkShould we run the Virtual MCP strategy benchmark for this PR? React with 👍 to run the benchmark.
Benchmark will run on the next push after you react. |
Release OptionsSuggested: Minor ( React with an emoji to override the release type:
Current version:
|
There was a problem hiding this comment.
4 issues found across 21 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/mesh/src/web/components/sidebar/top-actions.tsx">
<violation number="1" location="apps/mesh/src/web/components/sidebar/top-actions.tsx:34">
P2: Error boundary never resets after first failure. Credit chip can disappear until full remount. Add a reset path so transient query errors can recover.</violation>
</file>
<file name="apps/mesh/src/web/components/sidebar/task-groups/task-groups-list.tsx">
<violation number="1" location="apps/mesh/src/web/components/sidebar/task-groups/task-groups-list.tsx:140">
P2: Collapsed mode skips infinite-scroll sentinel. More task groups never load there. Reuse the same scroll ref + sentinel in collapsed branch.</violation>
</file>
<file name="docs/superpowers/plans/2026-05-25-sidebar-tasks-merge.md">
<violation number="1" location="docs/superpowers/plans/2026-05-25-sidebar-tasks-merge.md:734">
P2: handleArchive navigates to next task from unfiltered sortedThreads. With member/type filters active this can land on a task invisible in the current filtered view.</violation>
<violation number="2" location="docs/superpowers/plans/2026-05-25-sidebar-tasks-merge.md:760">
P1: Missing await on navigate before createNewTask. The navigate sets virtualmcpid in the URL so createNewTask can read it, but without await the create uses the stale URL.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| }), | ||
| }); | ||
| } | ||
| createNewTask(); |
There was a problem hiding this comment.
P1: Missing await on navigate before createNewTask. The navigate sets virtualmcpid in the URL so createNewTask can read it, but without await the create uses the stale URL.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/superpowers/plans/2026-05-25-sidebar-tasks-merge.md, line 760:
<comment>Missing await on navigate before createNewTask. The navigate sets virtualmcpid in the URL so createNewTask can read it, but without await the create uses the stale URL.</comment>
<file context>
@@ -0,0 +1,1833 @@
+ }),
+ });
+ }
+ createNewTask();
+ };
+
</file context>
| static getDerivedStateFromError(): { hasError: boolean } { | ||
| return { hasError: true }; | ||
| } | ||
| override componentDidCatch(_error: Error, _info: ErrorInfo): void {} |
There was a problem hiding this comment.
P2: Error boundary never resets after first failure. Credit chip can disappear until full remount. Add a reset path so transient query errors can recover.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/mesh/src/web/components/sidebar/top-actions.tsx, line 34:
<comment>Error boundary never resets after first failure. Credit chip can disappear until full remount. Add a reset path so transient query errors can recover.</comment>
<file context>
@@ -0,0 +1,141 @@
+ static getDerivedStateFromError(): { hasError: boolean } {
+ return { hasError: true };
+ }
+ override componentDidCatch(_error: Error, _info: ErrorInfo): void {}
+ override render(): ReactNode {
+ if (this.state.hasError) return null;
</file context>
|
|
||
| const isCollapsed = sidebarState === "collapsed"; | ||
|
|
||
| if (isCollapsed) { |
There was a problem hiding this comment.
P2: Collapsed mode skips infinite-scroll sentinel. More task groups never load there. Reuse the same scroll ref + sentinel in collapsed branch.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/mesh/src/web/components/sidebar/task-groups/task-groups-list.tsx, line 140:
<comment>Collapsed mode skips infinite-scroll sentinel. More task groups never load there. Reuse the same scroll ref + sentinel in collapsed branch.</comment>
<file context>
@@ -0,0 +1,275 @@
+
+ const isCollapsed = sidebarState === "collapsed";
+
+ if (isCollapsed) {
+ return (
+ <div className="flex flex-col min-h-0 px-1 py-1 gap-0.5 overflow-y-auto">
</file context>
| const wasActive = task.id === activeTaskId; | ||
| hide(task.id); | ||
| if (!wasActive) return; | ||
| const next = sortedThreads.find((t) => t.id !== task.id); |
There was a problem hiding this comment.
P2: handleArchive navigates to next task from unfiltered sortedThreads. With member/type filters active this can land on a task invisible in the current filtered view.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/superpowers/plans/2026-05-25-sidebar-tasks-merge.md, line 734:
<comment>handleArchive navigates to next task from unfiltered sortedThreads. With member/type filters active this can land on a task invisible in the current filtered view.</comment>
<file context>
@@ -0,0 +1,1833 @@
+ const wasActive = task.id === activeTaskId;
+ hide(task.id);
+ if (!wasActive) return;
+ const next = sortedThreads.find((t) => t.id !== task.id);
+ if (next) {
+ setTaskId(next.id, next.virtual_mcp_id);
</file context>
There was a problem hiding this comment.
1 issue found across 17 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/mesh/src/web/components/sidebar/top-actions.tsx">
<violation number="1" location="apps/mesh/src/web/components/sidebar/top-actions.tsx:34">
P2: Error boundary never resets after first failure. Credit chip can disappear until full remount. Add a reset path so transient query errors can recover.</violation>
</file>
<file name="apps/mesh/src/web/components/sidebar/task-groups/task-groups-list.tsx">
<violation number="1" location="apps/mesh/src/web/components/sidebar/task-groups/task-groups-list.tsx:140">
P2: Collapsed mode skips infinite-scroll sentinel. More task groups never load there. Reuse the same scroll ref + sentinel in collapsed branch.</violation>
</file>
<file name="docs/superpowers/plans/2026-05-25-sidebar-tasks-merge.md">
<violation number="1" location="docs/superpowers/plans/2026-05-25-sidebar-tasks-merge.md:734">
P2: handleArchive navigates to next task from unfiltered sortedThreads. With member/type filters active this can land on a task invisible in the current filtered view.</violation>
<violation number="2" location="docs/superpowers/plans/2026-05-25-sidebar-tasks-merge.md:760">
P1: Missing await on navigate before createNewTask. The navigate sets virtualmcpid in the URL so createNewTask can read it, but without await the create uses the stale URL.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
|
You're iterating quickly on this pull request. To help protect your rate limits, cubic has paused automatic reviews on new pushes for now—when you're ready for another review, comment |
f976f11 to
891a217
Compare
891a217 to
4b008ad
Compare
650f008 to
64d8bc1
Compare
Squashes the sidebar-tasks-refactor branch into a single commit: - Resizable sidebar rail with persisted width - Task groups list with status grouping, header search and filters - Mobile sidebar polish; collapsed-group popover; flat checklist cards - Drop avatar from TaskRow, inline automation badge - Move credits + connections to top actions; release-channel inbox feed Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ver trigger - org-shell-layout: drop the hasTaskRoute branch that pinned the sidebar to SIDEBAR_MAX_WIDTH on the home route; always use the persisted resizable width so /:org and /:org/:taskId render the same width. Resize handle is now shown on all org-shell routes. - inbox footer: move PopoverTrigger out of InboxPopover and into each caller so the icon variant can compose PopoverTrigger+TooltipTrigger asChild directly around the button. Previously the Tooltip provider sat between PopoverTrigger asChild and the button, swallowing the trigger props and preventing the popover from opening. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Design for replacing the pre-seeded welcome threads + sidebar "Up next" view with a home-page next-actions row driven by MCP prompts, plus the remaining storefront-manager dialog cards. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
18-task plan covering server-side prompt definitions + new endpoint (Phase A) and removal of the welcome-thread + sidebar Up-next surface (Phase B). Includes TDD for useStartThreadFromPrompt and the group-threads welcome-row filter. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ield Replace fragile slug derivation in the home-next-actions endpoint with an explicit promptName field on each open-agent-thread checklist item. Adds new Task 1b before the selectedPrompts whitelist. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Group by toggles agent ↔ status (LayoutAlt04 icon, active when status). - Members toggles all ↔ mine (User01 icon, active when mine). - Type cycles all → manual → automation → all; icon morphs per state, active when not "all". Each button has a Tooltip reflecting the current state. Popover + selects + FilterRow helper removed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop the "all types" state; the toggle now flips between "Chats only" (MessageCircle01, default) and "Automation only" (Zap, active). Cycle map + FilterLines icon removed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…on)" This reverts commit 133ff5c.
…ttons" This reverts commit bf8a071.
Use `height: env(titlebar-area-height)` instead of `min-height` so the header collapses to the OS strip's height (~28-32px on macOS) instead of staying at Tailwind's h-12 (48px). Keeps close/min/max buttons vertically centered with the header's icon buttons. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wraps the StatusGroup count in a size-5 centered div so it sits in a fixed-size slot like the other right-side icons. Adds mb-2 below the task-groups-list header row. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Extract SidebarTriggerButton + MobileSidebarSheet to a shared shell-controls.tsx file so both org-shell-layout and settings-layout use the same trigger button and mobile sheet wrapper. - Restructure settings-layout to mirror the org shell: full-width Toolbar.Header on top (with `← Settings` link, sidebar trigger, and browser back/forward), then SidebarLayout with SettingsSidebar (desktop) + content area below. - Remove the in-sidebar "Back to org" entry from SettingsSidebar and the back-button header from SettingsSidebarMobile — that affordance now lives in the shared header. - Delete SettingsToolbar and MobileToolbar (replaced by the unified header). - WCO mode now works on settings routes for free: the header is app-titlebar wco-drag and collapses to env(titlebar-area-height), so OS controls line up beside the back-to-org and trigger buttons. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CenterSlot calls useToolbarCtx() which throws without a provider. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Settings sidebar is always open on desktop. Keep the trigger button on mobile (it acts as the hamburger that opens the mobile sheet). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…up thread The "Set up your brand" home card now opens a small dialog (optional website_url field) before creating the Brand Manager thread. With a URL the autosent first message routes the agent into BRAND_CONTEXT_EXTRACT; empty falls back to manual BRAND_CONTEXT_CREATE. Extends GuidePrompt with an optional `arguments` field and a function form of `text`. registerPrompt now emits an argsSchema and interpolates the resolved values. /home-next-actions forwards the argument metadata that was previously hardcoded to undefined. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Rewrites all four home-page prompts (set up brand, complete profile, create landing page, browse store) with simpler, outcome-oriented copy and renames brand-setup's arg from website_url to website. Adds optional `goal` arg to create-landing-page and `problem` arg to browse-store so users can shape the first message before the thread opens. Also forwards entry.title into the constructed Prompt so the args dialog title reads "Set up your brand" instead of the auto-slugified "Brand Manager Set Up". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…onal fields react-hook-form's isValid stays false until the first validation tick fires, so a prompt whose only argument is optional opened with the button disabled even though an empty value was valid per the Zod schema. Drop the isValid check — handleSubmit still gates submission on validation, so required fields are unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…d is claimed
setTaskId previously omitted the ?autosend=true query param, so the
chat-context consumer treated the navigation as a plain task open and
left the autosend payload sitting in sessionStorage. Extends setTaskId
with an optional { autosend } flag and opts in from
useStartThreadFromPrompt so the first user message fires when the
home-page prompt cards open a new thread.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The / picker's args dialog was constructing a Prompt object without title or _meta, so PromptArgsDialog fell back to displayToolName on the namespaced prompt name — rendering the gateway slug plus the inner connection key (e.g. "Vb9joemnfqqirpvaddip6ydeu7ngjeku Self Brand Manager Set Up") instead of the friendly title. Also stops looking up per-prompt connection icons in the / picker so the popover is icon-free and visually consistent with resources (which never had icons). Deletes the now-unused use-prompt-connection-map hook and its query-key entry. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ical tiptap doc
All three prompt-mention entry points (home next-action cards,
in-thread icebreakers, and `/`-mention picker) now hand `sendMessage`
the same tiptap doc shape — a single paragraph containing the mention
atom plus a trailing " " text node — so the sent user message renders
with the same chip styling end-to-end.
- tools/index.ts: attach `.describe()` to prompt arg zod schemas so
`prompts/list` returns argument descriptions; the slash-command args
dialog now shows the placeholder hint.
- api/routes/home-next-actions.ts (+ use-home-next-actions.ts,
components/home/next-actions-row.tsx): emit gateway-namespaced
`promptName` and `_meta.gatewayClientId` so home-card chips share the
id `listPrompts` returns, enabling click-to-edit on the chip.
- components/chat/ice-breakers.tsx: build the tiptap doc directly
(single paragraph, mention + trailing " ") instead of appending to
the editor's empty doc, matching `insertMention`'s output.
- hooks/use-start-thread-from-prompt.tsx: write `{ tiptapDoc }` to
the autosend buffer (was `{ parts }`) with the same single-paragraph
shape, so the rich renderer is used on first render.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9f45bde to
92a1b7c
Compare
Adds a `sidebar-task-groups` release entry surfacing the new group-by-agent/group-by-status switch and refined filter row on the task list sidebar. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Last call site was dropped in the icebreaker doc-shape refactor; knip flags it as an unused export so deleting (rather than excluding) per the repo's knip policy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…n button Sidebar toolbar order is now Search → Group toggle → Filter. The toggle's icon reflects current grouping (Users01 for agent, Activity for status); clicking flips between the two and tracks `tasks_panel_group_by_changed`. The filter popover keeps only Members and Type — `filtersActive` already excluded groupBy, so no logic change there. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Merge the narrow icon rail and the org-wide tasks panel into a single collapsible sidebar. Tasks are grouped client-side by
virtual_mcp_id, with Decopilot pinned first and the rest ordered by most-recent task. The collapsed state turns each group into an avatar in the rail with a hover popover preview.SidebarProvider defaultOpen={true}); today's narrow rail is now thecollapsedstate of the same surface.+popover), Connections, Balance (CreditChip when applicable).TaskGroupaccordion: per-group header (chevron · avatar · title · hover+) and body ofTaskRows.TaskRowkeeps its 2-line layout (title + branch · time) and status/archive hover; the avatar moved to the group header.⋯dropdown.HoverCardshowing the same accordion body and+.pluginRootSidebarItems,pinnedViews, and theWorkflowssidebar entry are removed from the sidebar render path.Spec: `docs/superpowers/specs/2026-05-25-sidebar-tasks-merge-design.md`
Plan: `docs/superpowers/plans/2026-05-25-sidebar-tasks-merge.md`
Test plan
Known follow-ups (not blocking)
🤖 Generated with Claude Code
Summary by cubic
Merged the org-wide tasks panel into a single collapsible, drag‑resizable sidebar with VM groups, and added a Home Next‑Actions row powered by MCP prompts. Adopted a full‑width header shell, kept sidebar width consistent across org routes, and removed the old “Up next” and welcome‑thread flows.
New Features
GET /api/:org/home-next-actions,useHomeNextActions, anduseStartThreadFromPrompt(args dialog + tests). Prompts declareargumentswithargsSchema; Brand setup collects optionalwebsite, with optionalgoal/problemfor landing/store prompts. Prompt mentions from home, icebreakers, and/now share the same editable rich chip.BrowseAgentsButton; added a separator above task actions. Group‑by emitstasks_panel_group_by_changed.Refactors and Fixes
?tasksparam,suggested-actions,studio-pack-checklists,studio-pack-welcome, and the in‑chat NextAction chip. Stopped creating welcome threads.studio-pack-onboardingprompt set; per‑agentselectedPromptswhitelists written on install and backfilled on existing installs; dropped welcome‑message plumbing.homeNextActions; removed old checklist/suggested‑actions keys and the prompt‑connection map key. Dropped prompt‑icon lookup in/picker; args dialog now shows title/meta and argument descriptions.TaskRowsupports agent icon with compact2xsavatar, inline automation badge, and unified archive‑on‑hover; account/org name shown in account popover; Next‑Actions row widened and wraps on desktop.@decocms/mesh-sdkkeep connections alive for 60s to avoid reconnects on brief unmounts;SidebarProviderin@deco/uisupports controlledopen/onOpenChangeand desktop toggling.setTaskIdnow accepts{ autosend }, anduseStartThreadFromPromptsets it so the first user message sends when a home prompt opens a new thread.appendToTiptapDocutil.Written for commit 2fe089e. Summary will update on new commits. Review in cubic