Repository navigation
fix(desktop): keep clarify/connection cards open for /btw and /bg side tasks - #127051
Merged
austinpickett merged 3 commits intoSep 29, 2026
Merged
Conversation
Generalize the /btw exemption to every registry action that runs beside the live turn (/btw, /bg, /background) via isSideTaskSlashCommand, keep the ordinary-message behavior when attachments ride along, and fix the gateway mock cast so desktop typecheck passes. Fixes NousResearch#126188 Co-authored-by: Charan Rathore <[email protected]>
austinpickett
enabled auto-merge (rebase)
September 29, 2026 01:03
13 of 19 tasks
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.
Root cause
useComposerSubmitauto-skips a parked clarify card (skipClarifyRequest→clarify.respond {answer: ''}) and a parked connection card (skipConnectionRequest→connection.respond {settled_by: 'continue'}) for any non-empty draft./btw(and/bg//background) never speak into the blocked turn — they fork a side question / separate session — yet sending one resolved the pending card with an empty answer.Fix
isSideTaskSlashCommand(text)inlib/desktop-slash-commands.ts: resolves the command through the slash registry (aliases + catalog) and returns true for side-task actionsbtwandbackground(/btw,/bg,/background, any case, bare or with args).use-composer-submit.ts: both auto-skips are bypassed for side-task commands. With attachments the draft is not routed as a slash command, so it keeps the ordinary-message behavior. Other slash commands (e.g./status) and plain replies still skip the card as before.TS2352cast in the contributor's gateway mock so desktop typecheck passes.Validation (in worktree,
apps/desktop)npx vitest run --project ui src/app/chat/composer/hooks/use-composer-submit.test.tsx src/lib/desktop-slash-commands.test.ts src/store/connection-request.test.ts→ 77 passed.use-composer-submit.tsrestored fromorigin/main→ 10 failed. Each of the 5 side-task drafts × the clarify and connection cards fails: the clarify gets{answer: ''}, or the connection getssettled_by: 'continue'.npm run typecheck→ exit 0, no TS errors.npx eslint+npx prettier --checkon the 3 changed files → clean.Supersedes #126220. Based on #126220 by @charan-rathore: the two cherry-picked commits keep their authorship, and the follow-up commit carries a co-author trailer. This PR adds the
/bg//backgroundsiblings, resolves commands through the registry instead of a regex, adds the attachment guard, and fixes the typecheck.Fixes #126188