Skip to content

Hide console windows for child processes on Windows - #631

Open
Rakly3 wants to merge 1 commit into
trailhq:mainfrom
Rakly3:fix/windows-hide-console
Open

Rakly3 wants to merge 1 commit into
trailhq:mainfrom
Rakly3:fix/windows-hide-console

Conversation

@Rakly3

@Rakly3 Rakly3 commented Oct 16, 2026

Copy link
Copy Markdown

On Windows, each hook run, git call and sync started by trail flashes a console window.
This adds windowsHide: true to every child-process call in src/claude/ (hooks, init, sync-run, shim-template), matching the sync spawn that already has it.

It has no effect on other platforms, and on Windows the windows no longer appear.

🤖 Generated with [Claude Code]

…n Windows

The Stop-hook sync, the hooks' git calls and init's helpers ran without
windowsHide, so each one flashed a console window on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trailhq-graft

trailhq-graft Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🌱 graft blast radius

1 area changed → 2 areas can be affected. 6 dependent symbols, depth 2.
Tests: Claude Initialization has tests the diff did not touch.
Tag: @anirudhkumar-nanonets — 3 of 3 areas · @shhdwi — 3 of 3 areas

flowchart TB
  A0(("Host Integration<br/>3 symbols"))
  A1(("CLI Wiring<br/>3 symbols"))
  classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
  class A0,A1 reached;
Loading
Can be affected Symbols Nearest hop Reached from
Host Integration 3 src/hosts/claude-global.ts:L95-L135 installClaudeGlobal — calls, depth 2 Claude Initialization
CLI Wiring 3 src/cli.ts:L1728-L1829 wireTarget — calls, depth 1 Claude Initialization
Who knows this code — 2 people across 3 areas
Area Who knows it
Claude Initialization · changed @anirudhkumar-nanonets — 25 commits, last yesterday · @shhdwi — 16 commits, last 2d ago
Host Integration · affected @shhdwi — 5 commits, last 2d ago · @anirudhkumar-nanonets — 4 commits, last yesterday
CLI Wiring · affected @anirudhkumar-nanonets — 58 commits, last yesterday · @shhdwi — 26 commits, last yesterday

Ownership is git history over each area's own files, weighted towards recent work (120-day half-life). Merge commits and bots are dropped, and you are dropped from your own PR. A name with no @ has no GitHub handle in its commit email — tag them by hand, or add a .mailmap entry. A suggestion from history, not a CODEOWNERS rule.

All 6 dependent symbols, grouped by area

Host Integration — 3 symbols in 3 files

  • src/hosts/claude-global.ts:L95-L135 — installClaudeGlobal (calls, depth 2)
    96: const [shim, settings] = claudeGlobalTargets(home, brand);
  • src/hosts/codex-hooks.ts:L60-L89 — installCodexHooks (calls, depth 2)
    65: const shimWrite = writeOwned('codex-hook-shim', shimPath, hooksShim(), 0o755);
  • src/hosts/cursor-hooks.ts:L86-L114 — installCursorHooks (calls, depth 2)
    88: const shimWrite = writeOwned('cursor-hook-shim', shimPath, hooksShim(), 0o755);

CLI Wiring — 3 symbols in 2 files

  • src/cli.ts:L1728-L1829 — wireTarget (calls, depth 1)
    1823: buildGraphIfMissing(repo, { build: opts.build, cliPath })
  • src/cli.ts:L1432-L1717 — runInitCommand (calls, depth 2)
    1498: // graph, so each child's own `buildGraphIfMissing` then finds one and no-ops.
  • src/upkeep-run.ts:L46-L66 — rewriteWiring (calls, depth 2)
    53: if (place.git) ensureRepoTrail(place.checkout);
Test signal per changed area — 1 ⚠

Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.

  • ⚠ Claude Initialization — 4 of 9 reached · 3 test files reach it, none changed here
    • not reached: graftJson, trackRepoSeen, git, shim, realBuild
10 test suites also reference this code

11 symbols, kept out of the diagram and the table so they cannot crowd out the areas a reviewer has to look at.

  • test/claude-hook-layers.test.ts
  • test/claude-init.test.ts
  • test/claude-shim-resolve.test.ts
  • test/claude-shim-template.test.ts
  • test/graft-to-trail.test.ts
  • test/hosts-claude-global.test.ts
  • test/hosts-retract.test.ts
  • test/hosts-trail.test.ts
  • test/trail-init-layout.test.ts
  • test/trail-learnings-committed.test.ts

graft blast · origin/main...HEAD · depth 2 · 4 changed files

Open the interactive graph → — click an area to see its dependent symbols at file:line.

github-actions Bot added a commit that referenced this pull request Oct 16, 2026

This branch has not been deployed

No deployments
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.

1 participant