feat: add local workspace workflow#334
Conversation
b91efc7 to
2582220
Compare
2582220 to
8af39f2
Compare
There was a problem hiding this comment.
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: Runpnpm changesetand commit the generated.mdfile 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 openinghttp://localhost:*andhttp://127.0.0.1:*URLs viashell.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 characters —
FilesPanel.tsxuses...(apps/desktop/src/renderer/src/components/FilesPanel.tsx:30) whileFilesTabView.tsxuses 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
There was a problem hiding this comment.
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.mddocuments the minor bump and the scope of changes. - ✅ Loopback URL documented — A comment block in
apps/desktop/src/main/open-external.tsexplains the security rationale for allowing loopback URLs. - ✅ Ellipsis consistency —
FilesPanel.tsxnow uses…matchingFilesTabView.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
Summary
msruntime dependency so packaged builds can loaddebug/puppeteer-coreVerification
node_modules/msis packaged alongsidenode_modules/debug/src/common.jsScope
This intentionally excludes local doc-only changes from the working tree and keeps the PR focused on the local workspace workflow.