Add workspace switcher and health dashboard#97
Merged
Conversation
There was a problem hiding this comment.
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< |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Migration
Written for commit 16f2408. Summary will update on new commits.