You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "liuxiaocs7 (via GitHub)" <gi...@apache.org> on 2026/08/31 08:36:12 UTC

[PR] fix(desktop): preserve Git filenames in @ search [maka]

liuxiaocs7 opened a new pull request, #4341:
URL: https://github.com/apache/maka/pull/4341

   ## Summary
   
   Preserve valid Git filenames in the Desktop Composer's `@` file search by requesting NUL-delimited `git ls-files` output and parsing it without trimming path data.
   
   Git's default quoted output can encode non-ASCII paths such as `普通.md`, while newline splitting cannot represent embedded newlines and `trim()` changes leading or trailing spaces. Using `git ls-files -z` makes the path boundary unambiguous and returns the original filename bytes for the existing UTF-8 child-process decoding.
   
   Fixes #4335
   
   ## Verification
   
   - Regression test added for non-ASCII filenames, embedded newlines, and leading/trailing whitespace. Confirmed it fails before the production change and passes afterward.
   - `node --test apps/desktop/dist/main/__tests__/workspace-file-search.test.js` — 7 passed, 0 failed.
   - `npm --workspace @maka/desktop test` — 1,733 passed, 0 failed.
   - `npm --workspace @maka/desktop run typecheck` — passed.
   - `npx biome check apps/desktop/src/main/workspace-file-search.ts apps/desktop/src/main/__tests__/workspace-file-search.test.ts` — passed.
   - Real Git repository smoke check returned `普通.md`, an embedded-newline filename, and filenames with leading/trailing spaces unchanged.
   - `npm test` was also run. Desktop and the affected suites passed, but the aggregate command was not fully green because of unrelated environment-sensitive failures: Storage's child-process test treats Node 24's SQLite experimental warning on stderr as a failure, and Eval requires Python 3.10+ syntax while the local `python3` is 3.9.6. Runtime and CLI passed when rerun independently; the other transient Storage lease test passed when rerun alone.
   
   ## AI use
   
   Select exactly one:
   
   - [ ] No generative tool made a substantive contribution
   - [x] Generative tooling made a substantive contribution
   
   Tool(s) and scope: OpenAI Codex — reproduced and diagnosed the filename parsing defect, implemented the NUL-delimited Git protocol change, added the regression test, and ran local verification. The commit carries a `Generated-by: OpenAI Codex` trailer.
   
   ## Checklist
   
   - [x] Tests cover the change and fail without it
   - [x] Lint, format, typecheck and the affected suites pass locally
   
   Does this PR entail a change in behavior?
   
   - [x] Yes — described under Summary above
   - [ ] No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(desktop): preserve Git filenames in @ search [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #4341:
URL: https://github.com/apache/maka/pull/4341


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org