* refactor: group workspace creation and preparation owners
* refactor: coalesce concrete owner type imports
* test: preserve IPC default-ref mock at its concrete owner
* fix(git): apply textconv filter to original blob in diff view (#37100)
Apply git cat-file --textconv when reading non-previewable blobs for diffs so that encrypted or filtered files (git-crypt, sops, etc.) are rendered as readable text instead of binary.
Fixes#37100
* fix(git): apply textconv to binary working-tree files for unstaged diffs
* fix(git): textconv only diffs whose editable side stays byte-exact
Unstaged diffs keep raw bytes unless the path's driver leaves the working
tree unchanged (clean/smudge encryption such as git-crypt); the check runs
in a scratch object store so nothing is written to the repo. Drops the
binary working-tree textconv, which made converted text editable.
* fix(git): read the stored blob first and convert only paths with a driver
cat-file --textconv pretty-prints trees, so a directory replaced by a file
showed a tree listing. Reading the blob first keeps absence and type
handling unchanged, and drivers are looked up in parallel so paths without
one cost no extra wait. Driver failures are kept out of the settled cache,
deleted files convert, and the clean-filter probe gets a read deadline.
* fix(git): never settle-cache diffs that ran a textconv driver
Driver output depends on config, keys and tools the worktree stamp does not
cover, so a locked key or failing driver could pin a raw result. Deleted
files stay raw, since Monaco's revert arrows would restore converted text,
and drivers run off the WSL direct-read route so profile variables reach
them.
* fix(git): show the editable unstaged side against checkout bytes
A worktree that the driver leaves unchanged does not make the converted
original safe: Monaco's revert copies the original into the editable side,
and a driver like `tr a-z A-Z` would restore ONE where checkout writes
one. Unstaged diffs now read the Git side with `cat-file --filters`, which
is exactly what checkout writes and decrypts clean/smudge encryption, so
the scratch-store probe is gone.
* fix(git): share one driver lookup per path and keep editable ranges in checkout form
check-attr is a read, so it no longer counts as a worktree mutation or
waits on WSL write probes. Commit, branch and submodule diffs look the
driver up once per path, the unstaged submodule range shows checkout bytes
like the rest of the editable side, and a staged rename stays out of the
settled cache when either path has a driver.
* test(git): age the diff stamp with a fixed timestamp
---------
Co-authored-by: Hrithik <hrithik@Hrithiks-MacBook-Pro.local>
Co-authored-by: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com>
* test: remove 462 low-value test declarations
* Shrink flaky test pattern baseline after audit896 test removal
* Remove two empty hook-only suites after audit896 test removal
---------
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
git status honors status.renames/diff.renames, but the numstat pass that
attaches line counts always forced -M. With rename detection off, status
listed an added and a deleted row while numstat reported one rename, so
the added row showed +0 and the deleted row had no counts.
Each staged/unstaged numstat pass now uses -M only when that area's
parsed status rows contain a rename, and --no-renames otherwise.
Fixes#36689
Co-authored-by: Neil <neil@stably.ai>
* fix(wsl): retry the setup-runner .git link read and fall back to the distro's Git
A Windows stat over \\wsl.localhost can report a transient ENOENT. Retry the link read once,
then ask the distro's Git asynchronously (fenced) before failing setup-script creation.
* fix(wsl): map a mounted-drive Git answer to its Windows drive
- Codex managed-home ownership check runs async in the distro via runWslProcess, fenced
- transcript running observer reuses fresh running-list reads; 5s cadence, first look at 2s
- synchronous Git refuses a WSL cwd; the setup runner reads a WSL worktree's .git link instead
* fix(github): start explicit Checks refreshes after the action
* fix(github): give explicit Checks refreshes fresh checks and comments
The same Refresh or Link click that now reads PR metadata after the
action also reads checks and comments after it: an explicit request no
longer joins or waits on a read begun before the click, in the renderer
or (for checks) the host coalescer. A superseded read's callers show the
owner's answer, so a late pre-click reply cannot repaint the panel, and
comments posted during either read are kept.
A lost IPC/RPC reply is reported only to the click that asked; polls stay
silent as before, and a later answer clears a failure older than itself.
The manual hook takes its verdict from its own lookup, the link flow's
card-read failure no longer skips checks, and the web shim forwards the
intent.
* fix(github): land the older Checks reply when a newer explicit read fails
When a click's checks or comments read fails while the read it replaced
succeeds, the click's read now lands that older reply through its owner
path instead of leaving the cache behind it. Post-write comments
refreshes (mutation events, bulk resolve) carry the explicit intent so
they cannot be answered by a read begun before the write.
* test(github): drop type assertions from the explicit-refresh tests
The RPC tests call the handlers with a real runtime service and spies,
and the panel test passes typed fixtures straight to the hooks.
* test(github): type the Checks panel fixtures for the renderer project
The renderer tests build their PR fixture locally instead of importing a
main-process harness, and the panel setter mocks take the hooks'
SetStateAction form.