feat(desktop): add host-bound folder references to the composer - #4097
Open
sunrioa wants to merge 5 commits into
Open
feat(desktop): add host-bound folder references to the composer#4097sunrioa wants to merge 5 commits into
sunrioa wants to merge 5 commits into
Conversation
Add a separate Reference folder action and removable directory chips without changing the selected Project, Session cwd, or filesystem permissions. Prepare a bounded one-level directory observation at message admission and preserve it with Host-bound references through persistence, queued submission, and replay. Bump protocol compatibility to 57 and cover the contract with regression tests and Desktop E2E. Generated-by: OpenAI Codex
Close execution and artifact stores before releasing the fixture owner and removing its temporary root. Assert SQLite lease release with and without artifacts, and record explicit Windows exclusions for privileged file symlinks and Linux directory-descriptor mounts. Generated-by: OpenAI Codex
Release the standalone linked-child test's execution stores before its root owner and temporary directory. Assert that the shared SQLite connection is closed so POSIX runs also detect the Windows teardown regression. Generated-by: OpenAI Codex
Keep listing deadlines and expected directory request rejections from draining the Runtime Host while preserving fail-stop handling for unexpected failures. Validate Glob enumeration roots within the existing execution boundary, and count escaped entries against the shared byte budget. Cover timeout, cancellation, invalid references, unreadable roots, and subsequent message admission with regression tests. Generated-by: OpenAI Codex
Merge main at 3b9a470 while preserving Host-bound directory references and upstream session, retry, and redaction changes. Advance the compatibility epoch to 62, refresh generated inventories, and cover merged protocol and conversation-copy behavior. Generated-by: OpenAI Codex
sunrioa
marked this pull request as ready for review
August 28, 2026 15:55
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
Fixes #3994.
This PR separates the composer’s “Add files or directories” entry into “Add files” and “Reference folder”, with a native folder picker and removable folder-reference chips.
Before
After
Review focus
Directory selection adds a reference, not a recursive upload or a permission grant. Listing follows the existing filesystem boundary; inaccessible directories are reported as requiring access or unavailable, rather than silently treated as empty.
Preparation is limited to 100 entries per directory, a shared 8 KiB serialized-entry budget, and a five-second timeout. Timeout, cancellation, foreign-host references, and unsupported external execution are handled without turning expected preparation failures into a Runtime Host drain.
The implementation spans the Desktop picker/composer, message contracts, Runtime Host admission, runtime directory preparation, and persistence/rendering. After merging main at
3b9a4706b, Runtime Host compatibility advances from 61 to 62, so Desktop and Runtime Host must be updated together.Supporting test changes close SQLite fixture stores before cleanup and handle platform-specific symlink and
/proc/self/fdassumptions. Generated source/test inventories are updated; local verification notes and build artifacts are not included.Verification
Unless noted otherwise, these results apply to head
aa342d561304c7604ae7cb36751e86686901d863.macOS
--repeat-each=10, covering removal, send/reload persistence, bounded listing, and unchanged project selection.check:releasepassed, including 110 tests.Windows — local verification
Environment: Node.js
25.2.1, npm11.12.1, Cargo1.98.0.npm ciandnpm run buildcompleted successfully.EBUSYerror or residual Broker/worker processes were observed.Earlier full local Windows regression, packaging, and manual-acceptance records apply to
f6f9c04fbdd73640038f178831cd7e52df3c5788. They are not counted as a complete local rerun on the current head.GitHub Actions
Validation limitations
Local adjacent E2E:
deleting the session while a toggle is pending settles cleanfailed because the sidebar still contained one session row after the ten-second wait. The same assertion also failed on unmodified main at3b9a4706b; two baseline runs produced one failure and one pass. This shows that the failure is not unique to this branch, but its root cause remains unidentified. The full local Desktop E2E matrix was not rerun after the merge.Hosted Windows W0: all four smoke cases passed, but suite teardown failed with
EBUSYwhile removing the temporaryPrograms\Maka\node.exe. The locking process has not been identified, and no successful hosted rerun has been recorded. The six successful local runs used a different toolchain from W0’s Node.js24.19.0/ npm11.17.0, so they do not establish that the hosted failure is resolved. A maintainer rerun of the failed W0 job is needed.AI use
Tool(s) and scope: OpenAI Codex assisted with source inspection, implementation, regression tests, local verification, code review, and drafting this PR. I have reviewed the changes and take responsibility for this contribution.
Checklist
Does this PR entail a change in behavior?