Skip to content

feat(sidebar): separate team threads, my threads, and agents#4230

Merged
pedrofrxncx merged 10 commits into
mainfrom
vibegui/separate-threads-agents
Jul 11, 2026
Merged

feat(sidebar): separate team threads, my threads, and agents#4230
pedrofrxncx merged 10 commits into
mainfrom
vibegui/separate-threads-agents

Conversation

@vibegui

@vibegui vibegui commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Reorganizes the left sidebar so threads and agents are cleanly separated, plus a batch of related toolbar/UX fixes. The old sidebar nested threads under collapsible per-agent groups and buried the "Mine only / All members" audience toggle three clicks deep in a filter popover (defaulting to mine, so team activity was invisible).

The sidebar is now three collapsible peer sections, top to bottom:

  1. Team threadsother members' threads (collapsed by default). A See all link jumps to the monitoring Threads tab so you can browse what everyone's doing without digging through Settings. Read-only rows.
  2. My threads — flat chronological list of your threads, all agents mixed (each row shows its agent icon). The group-by toggle flips this between flat and status-grouped; a global Show more pages the list.
  3. Agents — flat, draggable agent list. Clicking an agent opens its most-recent existing thread (server-checked), or starts a new one if it has none.

What changed

Sidebar reorg

  • Removed the member (Mine/All) toggle entirely — the split is now structural. The Type filter (All tasks / Chats / Automation) and the group-by-status toggle stay.
  • Three sections extracted into their own components (team-threads-section, my-threads-section, agent-row + sortable-agent-rows) with a shared, collapsible sidebar-section-header (chevron + count, plus an optional trailing action/slot).
  • The Agents list reuses the existing DnD layout (AgentGroupsSortableLayout), so decopilot-pinning, org-pin sections, and drag-to-reorder behave exactly as before — only the rendered item changed from a thread group to a single agent row.
  • Deleted the now-dead TaskGroup/SortableTaskGroups; pruned task-group.tsx down to the still-used StatusGroup.

Toolbar & new-task placement

  • Removed the < > back/forward buttons from the top toolbar (Toolbar.Nav + dead imports).
  • Chat toggle guard — the chat toggle is disabled when chat is the only open panel, so untoggling can't leave a blank content area.
  • New task button moved into the sidebar toolbar row (removed from the top toolbar). It always targets the currently selected agent and reuses that agent's empty "New chat" (verified 0 messages via a message lookup) instead of piling up empty threads.
  • Browse-agents + moved into the AGENTS section header.
  • Dropped the per-agent-row hover + (new thread is available via clicking the agent / its context menu / the toolbar New task).

Shared component

  • TaskRow.onArchive is now optional so team/agent rows can be read-only — archiving hides a thread org-wide and must not fire from a glance at a teammate's work.

Not included (deferred)

Claude Code thread titles staying "New chat" is a separate backend issue, not fixed here. The title pipeline is correctly wired end-to-end (harness → NATS → projector persists + emits a decopilot.thread.status SSE event with the title → client applies it; decopilot works). The failure is in claude-code's title generation: it spawns the Claude Code CLI in plan-mode to produce the title (createClaudeCodeModel(...:haiku)), which is fragile and fails silently → falls back to no title. The real fix (use a normal fast-model call like decopilot) touches packages/harness + the sandbox daemon and can only be verified by running claude-code end-to-end, so it belongs in a dedicated backend PR rather than unverified here. A short-lived client-side fallback title was prototyped and reverted (it either got clobbered by DB reconcile or, when persisted, suppressed the backend enricher).

Testing

  • bun run check (all workspaces incl. @decocms/e2e), bun run lint, bun run fmt, bunx knip — all clean.
  • Updated the two sidebar e2e specs to the new layout (they encoded the removed per-agent expandable groups):
    • sidebar-org-pin — right-clicks the flat agent row instead of an expandable header.
    • sidebar-per-group-show-more — drives the flat "My threads" global pager.
  • Full CI (including e2e and test) was green on the pre-rebase revision; re-run after the latest push before merge.

Affected areas

Left sidebar + top toolbar (apps/mesh/src/web/components/sidebar/task-groups/*, layouts/agent-shell-layout/*, layouts/{org-shell,settings}-layout, task-row.tsx) and the two sidebar e2e specs. No API/DB/schema changes.

🤖 Generated with Claude Code

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/mesh/src/web/components/sidebar/task-groups/agent-row.tsx
Comment thread apps/mesh/src/web/components/sidebar/task-groups/task-groups-list.tsx Outdated
Comment thread apps/mesh/src/web/components/sidebar/task-groups/agent-row.tsx Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

@pedrofrxncx pedrofrxncx force-pushed the vibegui/separate-threads-agents branch from 7add013 to 27da5a1 Compare July 10, 2026 23:16
vibegui and others added 10 commits July 10, 2026 20:44
Replace the threads-nested-under-agents sidebar with three structural
sections: a collapsed "Team threads" accordion (other members' threads,
with a "See all" jump to the monitoring Threads tab), a flat chronological
"My threads" list, and a flat "Agents" list where clicking an agent opens
its most-recent thread (or a new one).

Removes the buried "Mine only / All members" filter toggle entirely — the
member split is now structural. The Type filter and group-by-status toggle
stay. Makes TaskRow's onArchive optional so team/agent rows are read-only
(archiving hides a thread org-wide). Reuses the existing DnD layout for the
agent list so pinning/ordering survive. Deletes the now-dead TaskGroup /
SortableTaskGroups.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Restyle the Team threads header to match the other section labels (small
uppercase, chevron + count, hover "See all"), and give My threads and Agents
the same collapsible affordance. Extract a shared SidebarSectionHeader so all
three read as peers. Team collapsed by default; My threads and Agents open.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- agent-row: compose dnd-kit's keyboard listener (restore keyboard reorder)
  and stop the "+" button's pointerdown from starting a drag.
- task-groups-list: when an agent has no thread in the loaded window, look up
  its most recent personal thread on the server before opening a new one.
- sidebar-section-header: add aria-controls linking each header to its panel.
- e2e: the redesign removed per-agent expandable groups, so update
  sidebar-org-pin (right-click the agent row) and rename the show-more spec to
  drive the flat "My threads" global pager.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lbar cleanup

Bundle of UI fixes on top of the sidebar reorg:

- Remove the < > back/forward buttons from the top toolbar (Toolbar.Nav).
- Disable the chat toggle when chat is the only open panel, so untoggling
  can't leave a blank content area.
- Fallback thread title: on the first user message of an untitled thread,
  patch a title derived from the prompt locally so the sidebar isn't stuck on
  "New chat". Local-only — the persisted title stays "New chat" so the
  server-side auto-titler still runs and enriches it via data-thread-title.
- Move the browse-agents "+" into the Agents section header; put the New task
  button in the sidebar toolbar row (removed from the top toolbar). New task
  always targets the currently selected agent, reusing an empty "New chat" for
  that agent (verified 0 messages) instead of piling up empties.
- Drop the per-agent-row hover "+".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A local-only patch was reverted when the run reconciled the thread row from
the DB (still "New chat"). Persist the fallback via rename so it survives
reconciles and reloads. This supersedes the server auto-titler (which only
enriches while the title is still the default) — acceptable since a readable
title beats "New chat" and titling is unreliable for some harnesses.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove the client-side fallback title — the real issue is the claude-code
title-generation path, not a missing UI fallback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… Library panel tab

- Remove uppercase/tracking-wider from section headers; bump to text-sm
- Move Agents section above My threads; remove Home and Library nav items
- Decopilot row navigates to /$org (home) instead of opening a thread
- Remove separator above task list (was separating removed Home/Library items)
- Accordion open/close uses grid-template-rows animation to eliminate CLS
- Per-accordion max-height with ScrollFade (bottom gradient when overflowing)
- Mobile: replace accordions with pill tabs (Agents / My threads / Team)
- Mobile: base font-size bumped to 18.3px so text-sm renders at ~16px
- Library tab added to the right panel tab bar (always visible, Folder icon)
- Library file clicks open as library-file: tab; skills/brands open as dialogs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Threads section moves above agents; mine/all toggle in toolbar flips between personal and all threads
- Threads accordion removed; section fills remaining height when agents collapse
- Clicking an agent navigates to agent home: compact header + bottom-aligned thread list + docked input
- "Decopilot" renamed to "Home" across sidebar and context panel

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Changed the expected title of the synthesized decopilot entity from "Decopilot" to "Home" in the virtual integration test.
- Deleted the CenteredComposer component and its associated tests, as they are no longer needed.
- Removed the TeamThreadsSection component, streamlining the sidebar structure.
- Cleaned up unused library tab parsing functions in the main panel tabs.
- Updated the TaskGroupsList component to use a utility function for class names.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Gate the archive affordance on thread ownership (created_by === current
  user) in both flat and status renders; guard handleArchive too. Previously
  any member could hide a teammate's thread org-wide from the All view.
- Don't leak all members' threads into My threads while the session is still
  resolving (currentUserId undefined) — same guard in agent-home.
- Enable pagination in the All/team view (was capped at the first page).
- Fix the scope toggle label (All/Mine instead of the inverted Show all/Mine).
@pedrofrxncx pedrofrxncx force-pushed the vibegui/separate-threads-agents branch from f2c3e45 to 0e5f220 Compare July 10, 2026 23:54
@pedrofrxncx pedrofrxncx enabled auto-merge (squash) July 10, 2026 23:56
@pedrofrxncx pedrofrxncx merged commit eae216c into main Jul 11, 2026
14 checks passed
@pedrofrxncx pedrofrxncx deleted the vibegui/separate-threads-agents branch July 11, 2026 00:00
decocms Bot pushed a commit that referenced this pull request Jul 11, 2026
PR: #4230 feat(sidebar): separate team threads, my threads, and agents
Bump type: minor

- decocms (apps/mesh/package.json): 4.3.1 -> 4.4.0
- @decocms/e2e (packages/e2e/package.json): 1.0.0 -> 1.1.0
- @decocms/mesh-sdk (packages/mesh-sdk/package.json): 1.17.0 -> 1.18.0

Deploy-Scope: both
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants