Skip to content

Implement Sidebar project folders and multi-agent chat UI#611

Open
isasardar1-coder wants to merge 1 commit intoValueCell-ai:mainfrom
isasardar1-coder:main
Open

Implement Sidebar project folders and multi-agent chat UI#611
isasardar1-coder wants to merge 1 commit intoValueCell-ai:mainfrom
isasardar1-coder:main

Conversation

@isasardar1-coder
Copy link
Copy Markdown

Summary

This PR introduces first-class project organization in the Sidebar and a session-level multi-agent chat architecture.

  • Sidebar & Project Organization: Added Main, Projects, and AGL folders to the Sidebar with drag-and-drop session assignment. Includes full UI for creating, renaming, moving, and deleting projects securely.
  • State Management: Implemented projectStore and chatMetaStore to handle project persistence and session-level metadata.
  • Multi-Agent UI: Built the + Add Agent UI directly into ChatToolbar to easily attach multiple agents to a single conversation thread.
  • Multi-Agent Routing: Integrated multi-agent routing securely into chat.ts, allowing messages to fan out to attached agents and seamlessly merge their mirrored responses back into the active chat window.

Related Issue(s)

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other

Validation

  • Verified Sidebar folder toggling, project creation, renaming, and session drag-and-drop logic.
  • Confirmed that attaching an agent in the ChatToolbar accurately updates chatMeta state.
  • Successfully compiled the client environment locally and packaged the application using electron-builder with zero build errors.

Checklist

  • I ran relevant checks/tests locally.
  • I updated docs if behavior or interfaces changed.
  • I verified there are no unrelated changes in this PR.

@isasardar1-coder
Copy link
Copy Markdown
Author

ClawX app changes summary:
Scope
These changes are focused on ClawX app behavior/UI, especially the Sidebar and chat organization model.

  1. Chat log rename support
    A rename flow for chat logs was added/worked on through the Sidebar/session metadata path.

Relevant files
src/components/layout/Sidebar.tsx
src/stores/chatMeta.ts

Intent
allow user-facing renaming of chat/session labels from the Sidebar
persist custom names via metadata rather than raw session key

  1. Project rows behave more like first-class items
    The Sidebar was extended so projects themselves have controls similar to chat rows.

Intended/implemented behavior
Each project header/row should support:

  • create a new chat under that project
    three-dot actions menu
    trash/delete icon

Project actions intended in the menu
rename project
move project between sidebar folders/categories

Relevant file
src/components/layout/Sidebar.tsx

  1. Delete confirmation behavior
    Deletion was changed toward a universal confirmation pattern.

Intended behavior
Before deleting either:
a chat
a project
…the app should prompt for confirmation.

Relevant file
src/components/layout/Sidebar.tsx
Project delete behavior

When deleting a project:
associated chats should be moved to Main
rather than disappearing silently

  1. Projects can move between existing sidebar folders
    The project model was extended so projects themselves can belong to one of the three existing sidebar sections:

Main Folder
Projects Folder
AGL (Logs) Folder
Store-level change
A folder/category field was added to project state.

New project store capability
moveProject(...)
Relevant file
src/stores/projectStore.ts
Notes
This is not a brand-new category system — it uses the existing sidebar structure already present in ClawX.

  1. Sidebar rendering updated to support project placement by folder
    The Sidebar was being updated so:

projects render under the correct folder section
project rows expose project controls
chats within projects still render nested under the project
Relevant file
src/components/layout/Sidebar.tsx

  1. New chat creation under a project
    A project-level + control was being added so users can create a chat directly inside that project.

Intended behavior
clicking + on a project creates a new chat
that chat is tagged/placed inside the selected project
Relevant files
src/components/layout/Sidebar.tsx
supporting session/chat metadata flow in chat-related stores

  1. Multi-agent chat attachment
    This is the last major app feature.

Intended behavior
Inside each chat window, add a universal “+” to let the user attach agents to the current conversation.

Concept
agents are created/configured in the Agents section
agents are attached to a conversation from the chat window
one conversation should support multiple agents/subagents

Files
src/pages/Chat/ChatToolbar.tsx
src/pages/Chat/index.tsx
src/stores/chat.ts
src/stores/chat/*
src/lib/routing.ts

Files most relevant to the Sidebar/app changes
Modified
src/components/layout/Sidebar.tsx
src/stores/projectStore.ts
Also involved/inspected
src/stores/chatMeta.ts
src/stores/chat.ts
src/pages/Chat/ChatToolbar.tsx
src/pages/Chat/index.tsx
src/lib/routing.ts

Summary:
Extending ClawX’s Sidebar/Session organization model so projects behave like first-class objects: project-level new chat, rename, move, and delete actions; project movement across the existing Main / Projects / AGL sidebar folders; and confirmation-gated deletion for chats/projects.
In addition, multi-agent participation inside a chat window via an in-chat “+ Add Agent” control.

@isasardar1-coder
Copy link
Copy Markdown
Author

isasardar1-coder commented Mar 28, 2026

Fixed; BUT NOT PUSHED YET - WILL DO TOMORROW.

The real regression was in src/stores/chat.ts: targeted sends were no longer switching to the resolved agent session deterministically. I changed that path to normalize the requested agent id/name, resolve the matching agent, apply buildSessionSwitchPatch(...) directly, and then load the target history before sending. I also cleaned up the duplicate shared-type import block in the same file so the branch typechecks again.

In src/pages/Chat/ChatInput.tsx, I kept the chooser discoverable for UI tests by adding a stable title on the agent-picker wrapper, so the chooser is still findable whether it is showing the button or the selected-target chip.

Verified:

  • pnpm exec vitest run tests\unit\chat-target-routing.test.ts tests\unit\chat-input.test.tsx
  • pnpm run typecheck

Result:

  • 2 test files passed
  • 3 tests passed
  • typecheck passed

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.

1 participant