fix(remote-questions): fire configured channels in interactive mode#3482
Merged
jeremymcs merged 1 commit intogsd-build:mainfrom Apr 4, 2026
Merged
Conversation
tryRemoteQuestions was gated behind if (!ctx.hasUI), so Telegram/Slack/ Discord were never contacted when GSD ran with a terminal UI. The test message sent during setup always worked (direct API call, no guard), which made the feature appear configured but non-functional in practice. Move the remote call before the hasUI guard so configured channels fire regardless of UI availability. When no remote channel is configured, tryRemoteQuestions returns null and the local UI is used as before. Adds a source-level regression test asserting that tryRemoteQuestions is called before the !ctx.hasUI branch. Closes gsd-build#3480 Verified with AI.
Contributor
🟢 PR Risk Report — LOW
|
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.
TL;DR
What: Telegram/Slack/Discord questions were never sent when GSD ran with a terminal UI.
Why:
tryRemoteQuestionswas gated behindif (!ctx.hasUI), so it was unreachable in interactive sessions.How: Move the remote call before the
hasUIguard —tryRemoteQuestionsreturnsnullwhen unconfigured, so the local UI fallback is unchanged.What
src/resources/extensions/ask-user-questions.ts— move remote check before!ctx.hasUIguardsrc/resources/extensions/gsd/tests/remote-questions.test.ts— regression test (source-level, verified red before fix)Why
The setup test message (sent directly via the Telegram API during
/gsd remote telegram) always worked. But when the agent calledask_user_questions, the tool checkedctx.hasUIfirst — and because GSD was running interactively, it went straight to the local TUI, never touching the remote channel.How
One-line reorder.
tryRemoteQuestionsalready returnsnullwhenresolveRemoteConfig()finds no configured channel, so unconfigured users see no behavior change. The dynamic import is cached by the module system — no startup overhead.Closes #3480
Verified with AI.