Skip to content

Add workspace switcher and health dashboard#97

Merged
slashdevcorpse merged 5 commits into
mainfrom
feature/workspace-health-dashboard
May 31, 2026
Merged

Add workspace switcher and health dashboard#97
slashdevcorpse merged 5 commits into
mainfrom
feature/workspace-health-dashboard

Conversation

@slashdevcorpse
Copy link
Copy Markdown
Owner

@slashdevcorpse slashdevcorpse commented May 31, 2026

Summary\n- add persisted local workspaces with independent Codex CLI command, workdir, sandbox, and state directory settings\n- add workspace health checks for Codex CLI, auth, git, Node, pnpm, and state-path writability\n- expose workspace management through the settings dialog with activate, create, save, delete, and copy-fix-command controls\n- cover workspace registry selection, rename, and deletion behavior\n\n## Testing\n- pnpm -C apps/codex-claw lint\n- pnpm -C apps/codex-claw build\n- pnpm -C apps/codex-claw test\n\nCloses #84


Summary by cubic

Add a workspace switcher and a health dashboard. Each workspace has its own Codex CLI command, workdir, sandbox mode, and state directory, and you can create, rename, activate, and delete them from Settings.

  • New Features

    • Persist workspaces to state (workspaces.json); default workspace is derived from current env/config.
    • Health checks for Codex CLI, auth, git, Node, pnpm, and state-path, with copyable fix commands; tools are invoked directly (no shell quoting) for cross-OS reliability.
    • New /api/workspaces (GET/POST/PATCH/DELETE) and updated /api/ping to return health; /api/paths now includes the active workspace and workspacesStorePath.
    • Settings dialog adds a Workspace selector/editor and Health & Paths sections; sidebar wired to create/update/activate/delete.
  • Migration

    • No breaking changes. A new workspaces.json is created in the state directory.
    • To use, open Settings → Workspace to create or switch workspaces.

Written for commit 16f2408. Summary will update on new commits.

Review in cubic

Copilot AI review requested due to automatic review settings May 31, 2026 07:28
Comment thread apps/codex-claw/src/server/codex-cli.ts Fixed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 10 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/codex-claw/src/routes/api/workspaces.ts">

<violation number="1" location="apps/codex-claw/src/routes/api/workspaces.ts:41">
P1: Do not ignore JSON parse errors in POST; malformed payloads currently create a default workspace instead of failing.</violation>
</file>

<file name="apps/codex-claw/src/server/codex-cli.ts">

<violation number="1" location="apps/codex-claw/src/server/codex-cli.ts:218">
P1: Session writes are routed by the current active workspace, so switching workspaces during an in-flight run can write one workspace’s session data into another workspace’s store.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

},
POST: async ({ request }) => {
try {
const body = (await request.json().catch(() => ({}))) as Record<
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Do not ignore JSON parse errors in POST; malformed payloads currently create a default workspace instead of failing.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/codex-claw/src/routes/api/workspaces.ts, line 41:

<comment>Do not ignore JSON parse errors in POST; malformed payloads currently create a default workspace instead of failing.</comment>

<file context>
@@ -0,0 +1,98 @@
+      },
+      POST: async ({ request }) => {
+        try {
+          const body = (await request.json().catch(() => ({}))) as Record<
+            string,
+            unknown
</file context>

}

function getStateDir() {
return getActiveWorkspace().stateDir
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Session writes are routed by the current active workspace, so switching workspaces during an in-flight run can write one workspace’s session data into another workspace’s store.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/codex-claw/src/server/codex-cli.ts, line 218:

<comment>Session writes are routed by the current active workspace, so switching workspaces during an in-flight run can write one workspace’s session data into another workspace’s store.</comment>

<file context>
@@ -147,33 +194,218 @@ const supportedImageMimeTypes = new Set([
+}
+
+function getStateDir() {
+  return getActiveWorkspace().stateDir
+}
+
</file context>

@slashdevcorpse slashdevcorpse merged commit 2cfc642 into main May 31, 2026
5 checks passed
@slashdevcorpse slashdevcorpse deleted the feature/workspace-health-dashboard branch May 31, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants