You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(desktop): add IDE workspace switcher with recent folders
Expose GET /api/workspaces and POST /api/workspaces/open so users can switch
between on-disk project folders like VS Code/Cursor, with persisted recents
and Nexus-inspired topbar UI including browser and pywebview open-folder flows.
-`POST /api/router/suggest` — intent-aware model suggestions from `instances.ttl` BFO7 realizabilities
120
122
123
+
## Workspace switcher (IDE folder semantics)
124
+
125
+
A workspace is a **folder on disk** (VS Code / Cursor semantics), not a Nexus tenant.
126
+
127
+
-**UI**: topbar-left button (logo + basename + chevron) opens a Nexus-inspired dropdown (square corners). Shows the current path (dimmed), recent workspaces, and **Open Folder…**.
128
+
-**Switch / open**: `POST /api/workspaces/open` or `PUT /api/settings` with a new `workspace_root`. Triggers `ensure_workspace`, harness restart, terminal reconnect, file index refresh, org/model context reload, and graph rescaffold.
129
+
-**Recent list**: `recent_workspaces` setting (JSON array, max 10 paths). Updated on every open/switch.
130
+
-**First run**: `maybe_upgrade_workspace_setting()` auto-detects `~/abi` (git + `.env`) when still on the factory default.
131
+
-**Open Folder**:
132
+
-**Browser dev** (`--browser-only`): modal with absolute path input; server validates the folder exists and is writable.
133
+
-**pywebview app**: same modal plus **Browse…** calling `pywebview.api.pick_workspace_folder()` (native `FOLDER_DIALOG` via `main.py``DesktopApi` bridge).
134
+
-**Nexus reference**: `apps/nexus/apps/web/src/components/shell/sidebar/index.tsx` (workspace logo menu, glass dropdown portal).
Expected footer: `237 passed, 0 failed` and `TOTAL coverage 90%` (approximate; run the script for the current number). CI one-liner: `scripts/coverage-kpi.sh` → `desktop_coverage=90.0 pass=237 fail=0`.
285
+
Expected footer: `244 passed, 0 failed` and `TOTAL coverage 90%` (approximate; run the script for the current number). CI one-liner: `scripts/coverage-kpi.sh` → `desktop_coverage=90.0 pass=244 fail=0`.
271
286
272
287
See [README.md](README.md) for prerequisites, quick start, and folder map.
Copy file name to clipboardExpand all lines: libs/naas-abi/naas_abi/apps/desktop/README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@ uv run python libs/naas-abi/naas_abi/apps/desktop/run.py --browser-only
27
27
28
28
Open [http://127.0.0.1:54242](http://127.0.0.1:54242). Override the port with `ABI_DESKTOP_PORT` if needed.
29
29
30
+
Use the **workspace switcher** (top-left: logo + folder name + chevron) to open or switch IDE workspaces. Each workspace is a folder on disk (e.g. `~/abi`). In browser dev, **Open Folder…** accepts a typed path; in the pywebview app, **Browse…** opens the native folder picker.
0 commit comments