Skip to content

feat: add local workspace workflow#334

Merged
hqhq1025 merged 3 commits into
OpenCoworkAI:mainfrom
mussonking:codex/workspace-local-v0.2
May 12, 2026
Merged

feat: add local workspace workflow#334
hqhq1025 merged 3 commits into
OpenCoworkAI:mainfrom
mussonking:codex/workspace-local-v0.2

Conversation

@mussonking
Copy link
Copy Markdown
Contributor

@mussonking mussonking commented May 11, 2026

Summary

  • add workspace-backed design creation, rebinding, file browsing, import, and preview hydration flows
  • wire local workspace reads/writes through main/preload/renderer and core agent tools
  • tighten workspace path validation, preview source resolution, local loopback preview support, and generation coordination
  • package the preview executor's ms runtime dependency so packaged builds can load debug/puppeteer-core
  • add focused coverage for workspace IPC, file tree loading, preview hydration, generation races, and tool behavior

Verification

  • pnpm test
  • pnpm lint
  • pnpm typecheck
  • pnpm build
  • pnpm --filter @open-codesign/desktop test -- preview-runtime.test.ts
  • pnpm --filter @open-codesign/desktop build:dir
  • inspected generated app.asar and confirmed node_modules/ms is packaged alongside node_modules/debug/src/common.js
  • pre-push hook: typecheck + lint + test

Scope

This intentionally excludes local doc-only changes from the working tree and keeps the PR focused on the local workspace workflow.

@github-actions github-actions Bot added docs Documentation area:desktop apps/desktop (Electron shell, renderer) area:core packages/core (generation orchestration) labels May 11, 2026
@mussonking mussonking force-pushed the codex/workspace-local-v0.2 branch from b91efc7 to 2582220 Compare May 11, 2026 12:13
@mussonking mussonking force-pushed the codex/workspace-local-v0.2 branch from 2582220 to 8af39f2 Compare May 11, 2026 12:44
@github-actions github-actions Bot added the area:build Turbo/Vite/Biome/tsconfig toolchain label May 11, 2026
@Sun-sunshine06 Sun-sunshine06 marked this pull request as ready for review May 12, 2026 02:19
@Sun-sunshine06 Sun-sunshine06 added the safe-to-review Allow bot review on external pull_request_target PRs label May 12, 2026
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Review mode: initial

Findings

  • [Minor] Missing changeset for user-visible features — The PR adds workspace creation, rebinding, file browsing, preview detection/hydration, preview mode persistence, generation race prevention per workspace, and new i18n strings. These are user-visible changes and should be accompanied by a changeset entry before merging.
    Suggested fix: Run pnpm changeset and commit the generated .md file with a semver bump that reflects the scope (likely minor, given new features).

  • [Minor] Loopback URL allowance in open-external.ts (apps/desktop/src/main/open-external.ts:17-35) — The change allows opening http://localhost:* and http://127.0.0.1:* URLs via shell.openExternal. This is intentional for local preview, but it widens the external URL surface from a restricted set of GitHub paths to any loopback host. The risk is low because URLs are only opened on explicit user action (e.g. clicking "Open" in preview UI), not automatically. Consider documenting this in a comment or release note.

  • [Nit] Inconsistent ellipsis charactersFilesPanel.tsx uses ... (apps/desktop/src/renderer/src/components/FilesPanel.tsx:30) while FilesTabView.tsx uses the literal ellipsis (apps/desktop/src/renderer/src/components/FilesTabView.tsx:90). Pick one style for consistency.

Summary

The PR adds a substantial local workspace workflow to the agentic design system: workspace-backed design creation, rebinding, lazy file tree browsing, import, preview mode selection (integrated/connected-url/external-app/off), automatic dev-server detection, generation race prevention per workspace, and preview hydration from workspace files. The changes are well-structured, include thorough tests (unit and integration), and respect the project's hard constraints (no bundled runtimes, permissive deps, BYOK, local-first).

One changeset is missing, and the loopback URL change should be clearly documented. No blockers; this is ready to merge after the changeset is added.

Testing

Extensive coverage: ask-ipc, generation-ipc, workspace-reader, workspace-files IPC, naming, rename races, session isolation, preview detection, export path helpers, preferences migration, store logic, and more. Good.

Open-CoDesign Bot

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Review mode: follow-up after new commits

Findings

No new issues found.

Summary

The follow-up diff resolves all previously flagged items:

  • Changeset added.changeset/local-workspace-preview.md documents the minor bump and the scope of changes.
  • Loopback URL documented — A comment block in apps/desktop/src/main/open-external.ts explains the security rationale for allowing loopback URLs.
  • Ellipsis consistencyFilesPanel.tsx now uses matching FilesTabView.tsx.

The PR is now complete. Ready to merge.

Testing

No new tests needed for the follow-up changes (documentation comment, ellipsis character, changeset file). Existing test suite covers the functional changes.

Open-CoDesign Bot

@hqhq1025 hqhq1025 merged commit 923b0fe into OpenCoworkAI:main May 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:build Turbo/Vite/Biome/tsconfig toolchain area:core packages/core (generation orchestration) area:desktop apps/desktop (Electron shell, renderer) docs Documentation safe-to-review Allow bot review on external pull_request_target PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants