Docked terminal: an _Open in terminal_ launch no longer prints a raw…#341
Merged
Conversation
…und" on launch (#2208) * fix(open-knowledge): docked terminal never prints raw "command not found" on launch An "Open in terminal" launch now writes the `<bin> '<prompt>'` command only when a PATH probe confirms the CLI is present. On a flaky `unknown` probe it re-probes once; a `not-found` verdict, a still-`unknown` re-probe, or an IPC-level probe failure all suppress the write and surface the existing missing-CLI banner instead — so a missing binary never dumps a raw `command not found` into the terminal. Covers codex/cursor/ opencode (via cliPreflight) and claude (gated on the fresh claudePreflight recheck). * fix(open-knowledge): claude launch IPC-rejection surfaces the readiness banner A claude launch-time claudePreflight IPC rejection suppressed the write silently — no banner, unlike the codex/cursor/opencode suppress() path which shows the missing-CLI banner on an unconfirmed probe. Surface the readiness banner on the claude rejection too so the user gets feedback after clicking "Open in terminal" instead of a silent no-op. Addresses reviewer asymmetry note. * fix(open-knowledge): claude launch always surfaces feedback on unconfirmed probe Close the remaining silent-no-op gap: when the fresh claudePreflight recheck returns `unknown` (not just `not-found`), the launch was suppressed but the readiness banner hides for `unknown` by design — leaving the user with no feedback after clicking "Open in terminal". Map an unconfirmed verdict to not-found for DISPLAY so the banner always shows, matching the IPC-catch path and the codex/cursor/opencode suppress() banner. Also include `nonce` in the claude catch diagnostic log for correlation parity with the codex/cursor catch. Addresses reviewer threads (MAJOR: silent suppress on unconfirmed claude probe; nit: nonce in catch log). * refactor(open-knowledge): guard re-probe on cancel + assert banner in fresh-not-found test Two reviewer Consider items: (1) bail before the codex/cursor/opencode re-probe when the effect was cancelled during the first probe, so the second cliPreflight doesn't go out over a torn-down channel (avoids a wasted round-trip + a spurious StrictMode warn); (2) assert the readiness banner appears in the claude fresh-not-found suppression test so it verifies both halves of the contract (suppress + feedback), matching its three sibling tests. * refactor(open-knowledge): guard codex/cursor catch warn on cancel (claude-catch parity) The codex/cursor/opencode cliPreflight catch logged unconditionally even after the effect was cancelled; the claude catch already early-returns on `cancelled`. Add the same guard so a post-teardown rejection doesn't emit log noise. State was already safe (suppress() guards internally) — this is log-hygiene parity only. --------- GitOrigin-RevId: 80f0f826f83701af581bf6f6dac24c2be73d00bf
Contributor
There was a problem hiding this comment.
Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28274141055). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.
|
|
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.
Docked terminal: an Open in terminal launch no longer prints a raw
command not found. The launch gate now writes the<bin> '<prompt>'command only when a PATH probe confirms the CLI is present. On a flakyunknownprobe it re-probes once; anot-foundverdict, a still-unknownre-probe, or an IPC-level probe failure all suppress the write and surface the existing missing-CLI banner instead. This applies to Codex / Cursor / OpenCode (viacliPreflight) and to Claude (gated on the freshclaudePreflightrecheck it already runs). The trade-off is a rare false-negative — an installed CLI whose probe flakes twice won't auto-launch — in exchange for a guaranteed-clean terminal.