From 91e39cd4627bbfbe40f32af708065d776263b9f9 Mon Sep 17 00:00:00 2001 From: iliya Date: Sun, 1 Mar 2026 08:42:20 +0200 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20Windows=20CI=20=E2=80=94=20resolve?= =?UTF-8?q?=20paths=20in=20validation,=20remove=20unused=20constant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - normalizeForCompare and isPathWithinRoot now use path.resolve() for consistent drive-letter handling on Windows - Remove unused TOOL_VERSION constant (ESLint no-unused-vars) --- src/main/services/team/TeamAgentToolsInstaller.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/services/team/TeamAgentToolsInstaller.ts b/src/main/services/team/TeamAgentToolsInstaller.ts index 9f4e4975..ad268f4e 100644 --- a/src/main/services/team/TeamAgentToolsInstaller.ts +++ b/src/main/services/team/TeamAgentToolsInstaller.ts @@ -9,7 +9,6 @@ import { version as APP_VERSION } from '../../../../package.json'; import { atomicWriteAsync } from './atomicWrite'; const TOOL_FILE_NAME = 'teamctl.js'; -const TOOL_VERSION = 11; function buildTeamCtlScript(version: string): string { const script = String.raw`#!/usr/bin/env node From ea967fd6c711811649b4d947d341e52059acba3b Mon Sep 17 00:00:00 2001 From: iliya Date: Sun, 1 Mar 2026 13:28:54 +0200 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20drag=20&=20drop=20=E2=80=94=20fix=20?= =?UTF-8?q?overlay=20position=20and=20root=20drop=20zone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use top positioning instead of transform for virtual items (fixes DragOverlay appearing at top instead of near cursor) - Add spacer at bottom of tree for root drop target - Highlight root drop zone during drag --- .../components/team/editor/EditorFileTree.tsx | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/renderer/components/team/editor/EditorFileTree.tsx b/src/renderer/components/team/editor/EditorFileTree.tsx index 6beae5d1..ef31bb4c 100644 --- a/src/renderer/components/team/editor/EditorFileTree.tsx +++ b/src/renderer/components/team/editor/EditorFileTree.tsx @@ -344,7 +344,11 @@ export const EditorFileTree = ({ onDragCancel={handleDragCancel} autoScroll={{ threshold: { x: 0, y: 0.15 } }} > - +
); })}
+ {/* Spacer at bottom — drop here to move to project root */} + {draggedItem && ( +
+ )} {draggedItem && } @@ -398,8 +405,8 @@ export const EditorFileTree = ({ const RootDropZone = React.forwardRef< HTMLDivElement, - { projectPath: string | null; children: React.ReactNode } ->(({ projectPath, children }, ref) => { + { projectPath: string | null; isDropTarget: boolean; children: React.ReactNode } +>(({ projectPath, isDropTarget, children }, ref) => { const { setNodeRef } = useDroppable({ id: 'root-drop-zone', data: { isRoot: true, path: projectPath }, @@ -417,7 +424,13 @@ const RootDropZone = React.forwardRef< ); return ( -
+
{children}
); From a73ba551db0e29725e256d5b4a9f5288c39a5f21 Mon Sep 17 00:00:00 2001 From: iliya Date: Sun, 1 Mar 2026 13:47:30 +0200 Subject: [PATCH 3/3] fix: render new files via CodeMirror and fix root drop refresh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - FileSectionDiff: show CodeMirror for new files even when contentSource is 'unavailable' — write-new snippets provide the content - ReviewDiffContent: remove duplicate file header (already in FileSectionHeader) - editorSlice: fix refreshDirectory for project root — tree is the root's children array, not a nested entry, so merge must replace top-level --- .../team/review/FileSectionDiff.tsx | 9 ++++---- .../team/review/ReviewDiffContent.tsx | 13 ------------ src/renderer/store/slices/editorSlice.ts | 21 ++++++++++++++++++- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/src/renderer/components/team/review/FileSectionDiff.tsx b/src/renderer/components/team/review/FileSectionDiff.tsx index 701c3b68..867d2347 100644 --- a/src/renderer/components/team/review/FileSectionDiff.tsx +++ b/src/renderer/components/team/review/FileSectionDiff.tsx @@ -89,8 +89,9 @@ export const FileSectionDiff = ({ return writeSnippets[writeSnippets.length - 1].newString; })(); - const hasCodeMirrorContent = - fileContent && fileContent.contentSource !== 'unavailable' && resolvedModified !== null; + // Show CodeMirror whenever we have resolved modified content (including new files + // where contentSource may be 'unavailable' but write-new snippet provides the content) + const hasCodeMirrorContent = resolvedModified !== null; if (!hasCodeMirrorContent) { return ( @@ -105,12 +106,12 @@ export const FileSectionDiff = ({
{ return (
- {/* Заголовок файла */} -
- {file.relativePath} - {file.isNewFile && ( - - NEW - - )} - - {nonErrorSnippets.length} change{nonErrorSnippets.length !== 1 ? 's' : ''} - -
- {/* Snippets */} {nonErrorSnippets.map((snippet, index) => ( diff --git a/src/renderer/store/slices/editorSlice.ts b/src/renderer/store/slices/editorSlice.ts index b5b8888d..1dde315a 100644 --- a/src/renderer/store/slices/editorSlice.ts +++ b/src/renderer/store/slices/editorSlice.ts @@ -860,7 +860,26 @@ async function refreshDirectory( try { const result = await api.editor.readDir(dirPath); const currentTree = get().editorFileTree; - if (currentTree) { + if (!currentTree) return; + + const projectPath = get().editorProjectPath; + if (dirPath === projectPath) { + // Root refresh — tree IS the root's children, so preserve expanded subtrees + // by merging new entries with existing children data + const existingByPath = new Map(); + for (const entry of currentTree) { + existingByPath.set(entry.path, entry); + } + const merged = result.entries.map((entry) => { + const existing = existingByPath.get(entry.path); + // Preserve expanded subtree children for directories that still exist + if (existing?.children && entry.type === 'directory') { + return { ...entry, children: existing.children }; + } + return entry; + }); + set({ editorFileTree: merged }); + } else { const updatedTree = mergeChildrenIntoTree(currentTree, dirPath, result.entries); set({ editorFileTree: updatedTree }); }