Skip to content

Keep git fatal stderr off the TUI and teach /yolo - #733

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-7290-keep-git-fatal-stderr-off-the-tui-when-cwd-is-not-a
Aug 31, 2026
Merged

Keep git fatal stderr off the TUI and teach /yolo#733
TheGreatAxios merged 2 commits into
mainfrom
cl-7290-keep-git-fatal-stderr-off-the-tui-when-cwd-is-not-a

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Git worktree listing and environment probes discard stderr, so a folder that is not a checkout no longer paints fatal: not a git repository through the TUI
  • Idle landing shows /yolo as a second door, and the permission overlay names /yolo skip prompts

Brian Fox hit both on first run: git fatal over the permission prompt, and no discoverable skip-permissions path.

Verification

  • bun run typecheck and bun run build pass
  • Focused tests for the changed files pass (worktree-roots, environment, landing, overlays)

Fixes CL-7290
Fixes CL-7289

@linear-code

linear-code Bot commented Aug 31, 2026

Copy link
Copy Markdown

CL-7290

CL-7289

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critic · Comment

Git probes discard stderr; /yolo is named on landing and the permissions overlay only.

Findings

  • src/agent/environment.test.ts — async “no git fatal” tests spy process.stderr.write, which does not observe inherited fd 2. Sync listWorktreeRootsSync is a real detector for the original execFileSync leak. Not blocking: production stdio already ignores stderr.

Notes

  • Focused tests on the changed files: 58 pass. bun run typecheck exits 0.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greybeard · Comment

Stderr is silenced at the git subprocess, not the renderer. Permissions-overlay /yolo is the right ask-time layer.

Findings

  • src/agent/environment.ts — hand-rolled spawn is extra. Async execFile already pipes stderr. The load-bearing fix is listWorktreeRootsSync with stdio: ["ignore", "pipe", "ignore"], same as src/session/project-key.ts.
  • src/tui/landing.ts — a second idle door spends chrome on a sticky skip-permissions switch. Overlay hint is the friction-moment layer.

Notes

  • Landing /yolo is the CL-7289 product ask (teach the escape hatch before the first prompt). Overlay stays either way.
  • Spawn rewrite is being folded back to execFile + ignored stderr.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Draper · Comment

Landing two-door and the permissions title compose at 80-col. Nothing critical.

Findings

  • src/tui/landing.ts:84/yolo rest is 51 cols; MARK_SMALL is flush at 80-col (77/77). MARK_LARGE now needs 102 content cols (hero test moved 96 → 120).
  • src/tui/shell.ts:1341 — admin permissions · Enter revokes plus the long hint overflows an 80-col interior and falls back to Esc · Enter · /yolo.

@TheGreatAxios
TheGreatAxios merged commit afe3944 into main Aug 31, 2026
5 checks passed

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review · Comment

Git worktree listing and environment probes discard stderr; idle landing and the permissions overlay name /yolo.

No blocking findings. GitHub blocks self-approve on this PR.

Notes

  • Landing /yolo is the CL-7289 product ask. Overlay hint stays at the ask.
  • Greybeard spawn rewrite is folded: probes use execFile/execFileSync with ignored stderr, matching project-key.ts.
  • Async stderr tests still spy process.stderr.write; the load-bearing detector is listWorktreeRootsSync.

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