Skip to content

feat(app): default draft directory to workspace folder (amicode#872) - #308

Merged
jeonghun-jj-lee merged 1 commit into
local/amicodefrom
872-default-workspace-dir
Sep 7, 2026
Merged

feat(app): default draft directory to workspace folder (amicode#872)#308
jeonghun-jj-lee merged 1 commit into
local/amicodefrom
872-default-workspace-dir

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Closes harmoniqs/amicode#872

Two code paths create drafts — draftDirectory() in tabs.tsx and the navigate bridge in app.tsx. Both now check workspaceProjects() first (the extension's real VS Code folder list) before falling back to server.projects.list() (which returns the engine scaffold dir).

This makes session.directory a real workspace folder from birth, so the sidebar's orphan guard can match it and the #841 expand/scroll feature works end-to-end.

Changes

  • tabs.tsx:draftDirectory() — check workspaceProjects() before server.projects.list()
  • app.tsx:AmicodeNavigateBridge — same pattern for /new-session drafts
  • 7 new tests in amicode-workspace-projects.test.ts covering preference, fallback, and override paths

Test results

  • 1077 unit + 41 browser tests pass, 0 failures

… (amicode#872)

Two code paths create drafts — draftDirectory() in tabs.tsx and the
navigate bridge in app.tsx. Both now check workspaceProjects() first
(the extension's real VS Code folder list) before falling back to
server.projects.list() (which returns the engine scaffold dir).

This makes session.directory a real workspace folder from birth, so
the sidebar's orphan guard can match it and the #841 expand/scroll
feature works end-to-end.

7 new tests covering the preference, fallback, and override paths.
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

jeonghun-jj-lee added a commit to harmoniqs/amicode that referenced this pull request Sep 7, 2026
…for #872)

Syncs the fork's #872 change into the overlay. Two code paths —
draftDirectory() in tabs.tsx and the navigate bridge in app.tsx — now
check workspaceProjects() first before falling back to
server.projects.list().

Fork PR: harmoniqs/opencode#308
7 new tests in amicode-workspace-projects.test.ts.
jeonghun-jj-lee added a commit to harmoniqs/amicode that referenced this pull request Sep 7, 2026
Closes #872

Two draft-creation paths — draftDirectory() in tabs.tsx and the navigate
bridge in app.tsx — now check workspaceProjects() first (the extension's
real VS Code folder list) before falling back to server.projects.list()
(the engine scaffold dir). This makes session.directory a real workspace
folder from birth, so the sidebar expand/scroll from #841 works end-to-end.

Fork PR: harmoniqs/opencode#308
7 new tests, 2794 total, 0 failures.
@jeonghun-jj-lee
jeonghun-jj-lee marked this pull request as ready for review September 7, 2026 04:48
@jeonghun-jj-lee
jeonghun-jj-lee merged commit e6457ec into local/amicode Sep 7, 2026
3 checks passed
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.

feat(app): default new-session directory to workspace folder when workspace-projects available

1 participant