fix(wizard): init wizard fixes for 0.10.1 (#537, #538, #540)#559
Merged
Conversation
…air local device (#537, #538, #540) Three init wizard fixes for the 0.10.1 milestone: - #537: Security posture step now asks "Who will interact with this Netclaw instance?" instead of asking about access method. Stripped parenthetical transport hints from Team/Public option labels. - #538: Moved exposure mode step from position 3 to second-to-last (before health check). Natural inside-out order: who trusts it → where it talks → what it does → how to reach it. - #540: Auto-register the local machine as a paired device during init when a non-Local exposure mode is selected. Generates a bootstrap device token, writes the hash to devices.json and the raw token to secrets.json. This satisfies ExposureModeValidationService's requirement of at least one paired device, fixing the chicken-and-egg problem where the daemon crashed on first boot because the pairing flow requires a running daemon.
…vice The orchestrator already calls EnsureDirectoriesExist() before WriteBootstrapDevice is invoked, so the config directory is guaranteed to exist.
bd6ca97 to
6a46904
Compare
Two root causes prevented Up/Down arrows and A/D keys from working on the Channels step: 1. Stale IFocusable components (SelectionListNode, TextInputNode) from prior wizard steps remained on Termina's focus stack, consuming keys before they reached the Channels view's custom handler. Fixed by overriding HandlePageInput to intercept Channels keys at the capture phase, before the focus manager routes them. 2. The DynamicLayoutNode rebuild callback called ClearFocusState() on every content invalidation, resetting _addMode and _cursorIndex. This meant pressing 'A' would enter add mode but immediately reset it when InvalidateAndRedraw triggered a layout rebuild. Fixed by skipping ClearFocusState for the Channels step, which manages its own state across invalidations. Also promotes Ctrl+Q to the capture phase so it always triggers shutdown even when a TextInputNode has focus. Adds headless TUI tests using VirtualInputSource that exercise the full Termina rendering and input-routing pipeline for the Channels step.
6a46904 to
5c8fa9a
Compare
194de73 to
6445fc0
Compare
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
Three init wizard fixes for the 0.10.1 milestone:
Closes #537, closes #538, closes #540
Test plan
dotnet buildpassesExposureModeStepViewModelTestspass (5 new)WizardOrchestratorTests+SecurityPostureStepViewModelTests+WizardConfigBuilderTestspassnetclaw initwith Tailscale Funnel → daemon starts successfully (devices.json + DeviceToken written)netclaw initwith Local mode → no devices.json, no DeviceToken in secrets