feat(app): default draft directory to workspace folder (amicode#872) - #308
Merged
Merged
Conversation
… (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.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
5 tasks
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
marked this pull request as ready for review
September 7, 2026 04:48
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.
Closes harmoniqs/amicode#872
Two code paths create drafts —
draftDirectory()intabs.tsxand the navigate bridge inapp.tsx. Both now checkworkspaceProjects()first (the extension's real VS Code folder list) before falling back toserver.projects.list()(which returns the engine scaffold dir).This makes
session.directorya 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()— checkworkspaceProjects()beforeserver.projects.list()app.tsx:AmicodeNavigateBridge— same pattern for/new-sessiondraftsamicode-workspace-projects.test.tscovering preference, fallback, and override pathsTest results