From e47f2179ea1dff2cde427346914377f4e417f6d1 Mon Sep 17 00:00:00 2001 From: Echo Date: Mon, 9 Feb 2026 10:40:42 +0000 Subject: [PATCH] Fix API directory listing: build paths relative to request, not workspace --- dashboard/api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dashboard/api.py b/dashboard/api.py index d04649a..dd99ff1 100644 --- a/dashboard/api.py +++ b/dashboard/api.py @@ -707,12 +707,14 @@ class TaskBoardHandler(SimpleHTTPRequestHandler): try: for item in sorted(target.iterdir()): stat = item.stat() + # Build relative path from original request path + item_path = f"{path}/{item.name}" if path else item.name items.append({ 'name': item.name, 'type': 'dir' if item.is_dir() else 'file', 'size': stat.st_size if item.is_file() else None, 'mtime': stat.st_mtime, - 'path': str(item.relative_to(workspace)) + 'path': item_path }) self.send_json({ 'type': 'dir',