fix(tui): clear channel picker subscriptions on sub-step transitions (#792)#797
Merged
Conversation
…792) ChannelPickerStepView.ManagesOwnFocusState returns true, which prevents InitWizardPage from clearing step-scoped subscriptions between sub-step renders. Each SlackStepView/DiscordStepView.BuildContent() call added new Submitted subscriptions without disposing old ones. A cursor blink timer re-triggering the DynamicLayoutNode factory created duplicates, causing multiple AdvanceStep() calls per Enter and erratic navigation. Clear callbacks.Subscriptions at the top of ChannelPickerStepView .BuildContent() and call ClearFocusState() on the adapter view before delegation. Add regression tests verifying subscription count stays bounded across re-renders and sub-step transitions.
Aaronontheweb
marked this pull request as ready for review
April 29, 2026 03:46
Aaronontheweb
enabled auto-merge (squash)
April 29, 2026 03:46
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.
Summary
ChannelPickerStepViewthat caused Slack/Discord bot token sub-step to loop instead of advancing (Bug: Slack/Discord bot token sub-step loops back instead of advancing #792)ManagesOwnFocusState = truepreventedInitWizardPagefrom clearing step-scoped subscriptions; nowChannelPickerStepView.BuildContent()clears them itself before delegating to adapter viewsClearFocusState()call on adapter view before delegation to prevent staleTextInputNodeinstances from intercepting keysTest plan
dotnet test src/Netclaw.Cli.Tests/)SubFlow_BuildContent_ClearsSubscriptionsOnReRender,SubFlow_BuildContent_ClearsSubscriptionsAcrossSubStepTransitionsdotnet slopwatch analyze— no new violationsnetclaw init→ Channel Picker → Slack → enterxoxb-...→ press Enter → should advance to App TokenCloses #792