diff --git a/CHANGELOG.md b/CHANGELOG.md index 6def9609..b7618121 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,18 @@ All notable changes to this project will be documented in this file. ## [Unreleased] -- Multi Run / Agent Manager: Select the Agent you want to run for the Worktree sessions (thanks to @wienans). -- Agent Manager now submits the prompt if valid, similar to the Chat interfaces. -- Added worktree management actions in Agent Manager: delete the group or individual worktrees or keep only selected one (thanks to @wienans). -- Fixed IME (Input Method Editor) composition handling for CJK input methods, preventing accidental message send during character conversion (thanks to @madebyjun). -- Added project management with multi-project support and per-project settings for agents/commands/skills. -- Enhanced SSE event stream with heartbeat management, permission bootstrap on connect, and improved reconnection logic. +- Agent Manager / Multi Run: select agent per worktree session (thanks to @wienans). +- Agent Manager / Multi Run: worktree actions to delete group or individual worktrees, or keep only selected one (thanks to @wienans). +- Agent Manager: added "Copy Worktree Path" action in the more menu (thanks to @wienans). +- Worktrees: added session creation flow with loading screen, auto-create worktree setting, and setup commands management. +- Session sidebar: refactoring with unified view for sessions in worktrees. +- Settings: added ability to create new session in worktree by default +- Git view: added branch rename for worktree. +- Chat: fixed IME composition for CJK input to prevent accidental send (thanks to @madebyjun). +- Projects: added multi-project support with per-project settings for agents/commands/skills. +- Event stream: improved SSE with heartbeat management, permission bootstrap on connect, and reconnection logic. +- Tunnel: added QR code and password URL for Cloudflare tunnel (thanks to @martindonadieu). +- Model selector: fixed dropdowns not responding to viewport size. ## [1.4.3] - 2026-01-04 diff --git a/packages/ui/src/components/session/SessionSidebar.tsx b/packages/ui/src/components/session/SessionSidebar.tsx index 1e509d52..586bce0c 100644 --- a/packages/ui/src/components/session/SessionSidebar.tsx +++ b/packages/ui/src/components/session/SessionSidebar.tsx @@ -36,6 +36,7 @@ import { RiDeleteBinLine, RiErrorWarningLine, RiFileCopyLine, + RiFolderAddLine, RiGitBranchLine, RiLinkUnlinkM, RiMore2Line, @@ -50,10 +51,12 @@ import { useSessionStore } from '@/stores/useSessionStore'; import { useDirectoryStore } from '@/stores/useDirectoryStore'; import { useProjectsStore } from '@/stores/useProjectsStore'; import { useUIStore } from '@/stores/useUIStore'; +import { useConfigStore } from '@/stores/useConfigStore'; import type { WorktreeMetadata } from '@/types/worktree'; import { opencodeClient } from '@/lib/opencode/client'; import { checkIsGitRepository } from '@/lib/gitApi'; import { getSafeStorage } from '@/stores/utils/safeStorage'; +import { createWorktreeSession } from '@/lib/worktreeSessionCreator'; const PROJECT_COLLAPSE_STORAGE_KEY = 'oc.sessions.projectCollapse'; const SESSION_EXPANDED_STORAGE_KEY = 'oc.sessions.expandedParents'; @@ -232,10 +235,6 @@ const SortableProjectItem: React.FC = ({ - - - New Session - {isRepo && !hideDirectoryControls && ( @@ -252,18 +251,17 @@ const SortableProjectItem: React.FC = ({ - {/* Collapse arrow */} + {/* New session button */} @@ -278,13 +276,11 @@ const SortableProjectItem: React.FC = ({ interface ProjectDragOverlayProps { projectLabel: string; isActiveProject: boolean; - isCollapsed: boolean; } const ProjectDragOverlay: React.FC = ({ projectLabel, isActiveProject, - isCollapsed, }) => { return (
= ({ {projectLabel} - {isCollapsed ? ( - - ) : ( - - )} +
@@ -361,6 +353,8 @@ export const SessionSidebar: React.FC = ({ const setSessionSwitcherOpen = useUIStore((state) => state.setSessionSwitcherOpen); const openMultiRunLauncher = useUIStore((state) => state.openMultiRunLauncher); + const settingsAutoCreateWorktree = useConfigStore((state) => state.settingsAutoCreateWorktree); + const sessions = useSessionStore((state) => state.sessions); const sessionsByDirectory = useSessionStore((state) => state.sessionsByDirectory); const currentSessionId = useSessionStore((state) => state.currentSessionId); @@ -1420,9 +1414,8 @@ export const SessionSidebar: React.FC = ({ || project.normalizedPath ), isActive: project.id === activeProjectId, - isCollapsed: collapsedProjects.has(project.id), }; - }, [activeDragId, projectSections, homeDirectory, activeProjectId, collapsedProjects]); + }, [activeDragId, projectSections, homeDirectory, activeProjectId]); return (
= ({ aria-label="Add project" title="Add project" > - +
@@ -1538,7 +1531,11 @@ export const SessionSidebar: React.FC = ({ if (mobileVariant) { setSessionSwitcherOpen(false); } - openNewSessionDraft({ directoryOverride: project.normalizedPath }); + if (settingsAutoCreateWorktree && isRepo) { + createWorktreeSession(); + } else { + openNewSessionDraft({ directoryOverride: project.normalizedPath }); + } }} onOpenMultiRunLauncher={() => { if (projectKey !== activeProjectId) { @@ -1567,7 +1564,6 @@ export const SessionSidebar: React.FC = ({ ) : null}