groove-dev 0.27.71 → 0.27.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <link rel="icon" type="image/png" href="/favicon.png" />
8
8
  <title>Groove GUI</title>
9
- <script type="module" crossorigin src="/assets/index-BK6tvmxx.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-CHSXqfwy.js"></script>
10
10
  <link rel="modulepreload" crossorigin href="/assets/vendor-C0HXlhrU.js">
11
11
  <link rel="modulepreload" crossorigin href="/assets/reactflow-BQPfi37R.js">
12
12
  <link rel="modulepreload" crossorigin href="/assets/codemirror-BBL3i_JW.js">
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groove-dev/gui",
3
- "version": "0.27.71",
3
+ "version": "0.27.72",
4
4
  "description": "GROOVE GUI — visual agent control plane",
5
5
  "license": "FSL-1.1-Apache-2.0",
6
6
  "type": "module",
@@ -431,6 +431,17 @@ export function FileTree({ rootDir }) {
431
431
  )}
432
432
  </div>
433
433
  ))}
434
+ {rootEntries.length === 0 && !filter && (
435
+ <div className="px-3 py-6 text-center">
436
+ <p className="text-xs text-text-4">No files found</p>
437
+ <button
438
+ onClick={() => fetchTreeDir('')}
439
+ className="mt-2 text-xs text-accent hover:underline cursor-pointer"
440
+ >
441
+ Retry
442
+ </button>
443
+ </div>
444
+ )}
434
445
  </div>
435
446
  </ScrollArea>
436
447
 
@@ -2082,8 +2082,11 @@ export const useGrooveStore = create((set, get) => ({
2082
2082
  async fetchTreeDir(dirPath) {
2083
2083
  try {
2084
2084
  const data = await api.get(`/files/tree?path=${encodeURIComponent(dirPath)}`);
2085
- set((s) => ({ editorTreeCache: { ...s.editorTreeCache, [dirPath]: data.entries } }));
2086
- } catch { /* ignore */ }
2085
+ set((s) => ({ editorTreeCache: { ...s.editorTreeCache, [dirPath]: data.entries || [] } }));
2086
+ } catch (err) {
2087
+ console.error('[file-tree] fetchTreeDir failed for', dirPath, err.message);
2088
+ set((s) => ({ editorTreeCache: { ...s.editorTreeCache, [dirPath]: [] } }));
2089
+ }
2087
2090
  },
2088
2091
 
2089
2092
  async createFile(relPath) {
@@ -33,6 +33,7 @@ export default function EditorView() {
33
33
  const sidebarWidth = useGrooveStore((s) => s.editorSidebarWidth);
34
34
  const setSidebarWidth = useGrooveStore((s) => s.setEditorSidebarWidth);
35
35
 
36
+ const projectDir = useGrooveStore((s) => s.projectDir);
36
37
  const [rootDir, setRootDir] = useState('');
37
38
  const [previewMode, setPreviewMode] = useState(false);
38
39
  const [previewKey, setPreviewKey] = useState(0);
@@ -44,10 +45,17 @@ export default function EditorView() {
44
45
  const startX = useRef(0);
45
46
  const startW = useRef(0);
46
47
 
47
- // Fetch root dir
48
+ // Fetch root dir — refetch when project directory changes (e.g. SSH remote folder selection)
48
49
  useEffect(() => {
49
50
  api.get('/files/root').then((d) => setRootDir(d.root || '')).catch(() => {});
50
- }, []);
51
+ }, [projectDir]);
52
+
53
+ // Clear tree cache when project dir changes so stale entries don't persist
54
+ useEffect(() => {
55
+ if (projectDir) {
56
+ useGrooveStore.setState({ editorTreeCache: {} });
57
+ }
58
+ }, [projectDir]);
51
59
 
52
60
  // Reset preview mode when switching files
53
61
  useEffect(() => { setPreviewMode(false); }, [activeFile]);