NeedsTree
b4e9924982
fix(editor): open a directory target as the folder window ( #1029 )
...
A path that resolves to a directory (a chat folder link, a sidebar_open
folder, or a directory pasted into the editor address bar) was read as a
file: the host answered 400 fs-error '"<path>" is a directory' and
EditorHost painted that raw message into the tab instead of the plugin's
folder window.
- fs.read / fs.readPage now answer a directory with the dedicated
fs-directory wire code (src/wire.ts, readText/readPage).
- EditorHost promotes the tab to the folder window it already draws.
- The promoted root is a PLATFORM-NATIVE ABSOLUTE path, resolved against
the session workspace root by the new resolveNativeSidebarPath helper
(paths.ts): chat file addresses carry session-relative, forward-slash
spellings, while the host keys every listing by its path.resolve'd
absolute path and FileTree caches levels by the requested root. A
relative root or a mixed-separator root lands in another cache key and
the tree sits on its loading placeholder forever. The helper also drops
a trailing separator (except a drive root) like path.resolve does.
- The fix covers all three entry points at once: conversation folder
links (no meta.dir on the tab), sidebar_open folders (service.openTab
drops the seed meta on the native resource route), and #933 's
pasted/stepped directory path.
Tests: isDirectoryReadError unit cases, the EditorHost relative-path and
Windows-root fallback render cases, resolveNativeSidebarPath win32/POSIX
cases, and the fs.readPage directory code. typecheck + build + lint pass;
targeted suites 78/78; the full suite's remaining failures reproduce on a
clean dev checkout (Windows symlink / pnpm pack / git smokes) and are
unrelated to this change. Verified in the live GUI: a folder opened after
the patch expands its tree immediately.
2026-10-22 17:58:10 +08:00
..
2026-10-17 12:02:59 +08:00
2026-10-15 21:52:59 +08:00
2026-10-06 00:54:24 +08:00
2026-10-17 02:12:44 +08:00
2026-10-11 22:04:28 +08:00
2026-09-03 20:29:50 +08:00
2026-10-16 00:51:11 +08:00
2026-08-15 00:28:59 +08:00
2026-10-11 22:43:30 +08:00
2026-10-16 00:51:11 +08:00
2026-10-17 02:12:44 +08:00
2026-09-09 11:15:30 +08:00
2026-10-08 11:39:11 +08:00
2026-10-17 02:12:44 +08:00
2026-08-21 23:49:13 +08:00
2026-08-12 18:27:28 +08:00
2026-10-05 23:38:04 +08:00
2026-10-15 20:19:35 -07:00
2026-10-16 00:51:11 +08:00
2026-10-15 23:05:22 +08:00
2026-10-11 17:59:32 +08:00
2026-10-16 16:54:41 +08:00
2026-10-16 16:41:11 +08:00
2026-10-17 11:52:48 +08:00
2026-10-12 00:11:07 +08:00
2026-10-05 02:22:03 +08:00
2026-10-09 16:04:24 +08:00
2026-10-05 02:19:58 +08:00
2026-10-11 22:36:42 +08:00
2026-10-17 02:20:53 +08:00
2026-10-17 02:20:53 +08:00
2026-09-07 18:52:18 +08:00
2026-09-14 00:08:38 +08:00
2026-09-03 12:04:35 +08:00
2026-09-07 23:51:10 +08:00
2026-10-11 22:36:42 +08:00
2026-09-01 23:05:26 +08:00
2026-10-10 20:34:23 +08:00
2026-10-15 23:05:22 +08:00
2026-10-17 14:03:22 +08:00
2026-10-16 17:30:44 +08:00
2026-09-03 17:32:04 +08:00
2026-10-11 22:36:42 +08:00
2026-09-15 10:42:46 +08:00
2026-10-13 13:12:00 +08:00
2026-10-22 17:58:10 +08:00
2026-10-12 00:11:07 +08:00
2026-10-11 15:56:49 +08:00
2026-10-22 17:58:10 +08:00
2026-10-11 22:36:42 +08:00
2026-10-12 01:41:08 +08:00
2026-10-05 02:13:53 +08:00
2026-09-11 15:28:49 +08:00
2026-10-11 12:02:55 +08:00
2026-10-17 02:12:44 +08:00
2026-10-11 22:43:30 +08:00
2026-09-30 01:56:11 +08:00
2026-10-13 00:36:19 +08:00
2026-10-13 00:36:19 +08:00
2026-10-15 23:05:26 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-10-05 22:57:58 +08:00
2026-10-01 17:13:10 +08:00
2026-10-01 17:15:49 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-10-05 22:57:58 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-10-05 22:58:01 +08:00
2026-09-02 10:55:03 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-09-28 20:37:56 +08:00
2026-10-06 08:25:30 -07:00
2026-10-05 23:11:11 +08:00
2026-10-08 21:55:12 +08:00
2026-10-05 22:57:58 +08:00
2026-10-11 22:43:30 +08:00
2026-09-27 22:18:57 +08:00
2026-08-22 22:50:13 +08:00
2026-10-17 02:12:44 +08:00
2026-09-28 20:37:56 +08:00
2026-10-16 00:51:11 +08:00
2026-10-22 17:58:10 +08:00
2026-10-16 00:51:11 +08:00
2026-10-16 00:51:11 +08:00
2026-10-16 00:51:11 +08:00
2026-10-16 00:51:11 +08:00
2026-10-16 00:51:11 +08:00
2026-10-16 00:51:11 +08:00
2026-10-16 00:51:11 +08:00
2026-10-16 00:51:11 +08:00
2026-10-17 02:12:44 +08:00
2026-10-16 00:51:11 +08:00
2026-10-16 17:30:44 +08:00
2026-10-15 20:44:33 -07:00
2026-10-16 17:30:44 +08:00
2026-10-17 02:12:44 +08:00
2026-10-16 17:30:44 +08:00
2026-10-16 16:33:38 +08:00
2026-10-15 23:05:36 +08:00
2026-10-17 02:12:44 +08:00
2026-10-13 22:42:16 +08:00
2026-10-16 17:30:44 +08:00
2026-10-16 16:35:59 +08:00
2026-10-16 17:14:06 +08:00
2026-10-15 20:44:33 -07:00
2026-09-12 17:30:58 +08:00
2026-10-01 18:41:27 +08:00
2026-10-05 01:54:17 +08:00
2026-10-16 00:51:11 +08:00
2026-10-11 22:36:42 +08:00
2026-10-11 22:36:42 +08:00
2026-09-01 16:01:34 +08:00
2026-09-09 15:18:06 +08:00
2026-10-05 23:42:45 +08:00
2026-09-22 17:09:08 +08:00
2026-10-15 20:19:35 -07:00
2026-09-27 22:18:19 +08:00
2026-08-13 10:26:57 +08:00
2026-10-06 00:54:24 +08:00
2026-09-02 23:15:19 +08:00
2026-10-05 02:22:03 +08:00
2026-08-24 12:05:14 +08:00
2026-10-06 00:19:11 +08:00
2026-10-11 22:36:42 +08:00
2026-10-11 12:02:55 +08:00
2026-10-15 21:52:59 +08:00
2026-10-15 20:44:33 -07:00
2026-10-17 14:03:22 +08:00
2026-09-03 12:04:35 +08:00
2026-09-28 18:08:21 +08:00
2026-08-18 01:22:28 +08:00
2026-09-23 22:24:56 +08:00
2026-08-18 01:22:28 +08:00
2026-10-06 00:06:37 +08:00
2026-10-01 17:25:16 +08:00
2026-10-17 02:20:53 +08:00
2026-09-13 18:36:46 +08:00
2026-10-11 15:56:49 +08:00
2026-10-05 23:03:40 +08:00
2026-09-03 19:59:00 +08:00
2026-10-05 02:22:03 +08:00
2026-10-05 22:58:01 +08:00
2026-10-05 23:36:02 +08:00
2026-09-28 00:27:31 +08:00
2026-09-28 18:08:21 +08:00
2026-09-28 18:20:08 +08:00
2026-09-21 20:35:11 +08:00
2026-10-05 21:46:26 +08:00
2026-10-01 22:05:56 +08:00
2026-10-22 17:58:10 +08:00
2026-08-16 23:35:57 +08:00
2026-10-07 00:31:16 +08:00
2026-10-16 00:51:11 +08:00
2026-10-17 02:12:44 +08:00
2026-10-05 23:38:04 +08:00
2026-09-23 22:36:05 +08:00
2026-09-27 22:18:35 +08:00
2026-09-27 22:18:35 +08:00
2026-09-06 23:46:46 +08:00
2026-10-05 01:55:36 +08:00
2026-10-05 01:55:36 +08:00
2026-09-09 23:09:48 +08:00
2026-10-15 23:05:22 +08:00
2026-10-05 23:43:14 +08:00
2026-10-16 00:51:11 +08:00
2026-08-13 01:39:59 +08:00
2026-09-03 12:04:35 +08:00
2026-09-28 20:11:46 +08:00
2026-10-11 23:15:40 +08:00
2026-10-16 00:51:11 +08:00
2026-10-15 23:05:22 +08:00
2026-10-15 23:05:26 +08:00
2026-10-15 23:05:22 +08:00
2026-09-09 11:15:30 +08:00
2026-10-05 23:38:04 +08:00
2026-10-05 23:38:04 +08:00
2026-10-05 23:13:23 +08:00
2026-10-05 11:32:16 +08:00
2026-09-09 15:18:06 +08:00
2026-09-07 18:52:18 +08:00
2026-10-17 02:12:44 +08:00
2026-10-12 00:56:34 +08:00
2026-10-12 00:56:34 +08:00
2026-10-17 02:12:44 +08:00
2026-10-12 00:56:34 +08:00
2026-10-12 00:56:34 +08:00
2026-10-12 00:56:34 +08:00
2026-10-17 02:12:44 +08:00
2026-10-15 23:05:26 +08:00
2026-10-16 00:15:45 +08:00
2026-09-22 17:09:08 +08:00
2026-10-17 02:20:53 +08:00
2026-09-27 22:18:35 +08:00
2026-10-15 23:05:36 +08:00
2026-09-27 22:18:35 +08:00
2026-10-05 21:53:08 +08:00
2026-09-09 15:18:06 +08:00
2026-10-05 23:03:40 +08:00
2026-09-09 15:18:06 +08:00
2026-09-21 20:35:11 +08:00
2026-10-08 21:56:03 +08:00
2026-10-11 23:47:29 +08:00
2026-10-11 23:29:51 +08:00
2026-10-13 22:42:37 +08:00
2026-10-12 00:03:20 +08:00
2026-10-17 02:20:53 +08:00
2026-10-11 23:35:52 +08:00
2026-09-30 02:24:36 +08:00
2026-09-27 22:19:05 +08:00
2026-10-16 00:51:11 +08:00
2026-10-12 16:40:18 +08:00
2026-09-03 12:04:24 +08:00
2026-10-05 22:25:51 +08:00
2026-10-11 16:06:42 +08:00
2026-10-05 01:58:18 +08:00
2026-10-08 08:14:34 +08:00
2026-10-16 00:51:11 +08:00
2026-10-12 00:11:07 +08:00
2026-10-17 11:33:55 +08:00
2026-10-17 02:12:44 +08:00
2026-10-13 20:36:55 +08:00
2026-10-16 16:54:41 +08:00
2026-10-11 22:36:42 +08:00
2026-10-15 23:05:26 +08:00
2026-09-27 22:18:14 +08:00
2026-09-27 22:18:14 +08:00