Skip to content

fix(tui): reset model manager manual entry state#1344

Merged
Aaronontheweb merged 2 commits into
netclaw-dev:devfrom
Aaronontheweb:investigate/model-dialog-live-models
Jun 6, 2026
Merged

fix(tui): reset model manager manual entry state#1344
Aaronontheweb merged 2 commits into
netclaw-dev:devfrom
Aaronontheweb:investigate/model-dialog-live-models

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Summary

  • reset stale manual model-entry state before each model provider probe
  • add regressions for returning from manual entry to provider selection and for stale manual state before discovery results render

Verification

  • kubectl exec -n netclaw-support deploy/netclaw-support -- netclaw model discover openai
  • dotnet test src/Netclaw.Cli.Tests --filter ManualEntry_DoesNotPersistAfterReturningToProviderSelection
  • dotnet test src/Netclaw.Cli.Tests --filter ModelManager
  • dotnet test src/Netclaw.Cli.Tests
  • dotnet slopwatch analyze
  • pwsh ./scripts/Add-FileHeaders.ps1 -Verify
  • git diff --check

Note

The native smoke harness published binaries successfully but could not proceed because this environment lacks local Ollama and the harness attempted a sudo install without a password-capable TTY.

@Aaronontheweb Aaronontheweb added bug Something isn't working tui Terminal UI (Termina) issues providers Provider integrations and capability detection across OpenAI-compatible backends. labels Jun 6, 2026
@Aaronontheweb Aaronontheweb enabled auto-merge (squash) June 6, 2026 23:05
@Aaronontheweb

Copy link
Copy Markdown
Collaborator Author

The provider discovery path is working here; the failure is stale TUI state.

ManualModelEntry is a substate of the model-discovery screen. If the user enters manual model-id mode, backs out to provider selection, and then selects openai again, the probe can succeed and populate DiscoveredModels, but the old ManualModelEntry == true value still causes the page to render the manual textbox instead of the discovered model list.

Resetting these fields at the start of each provider probe makes each probe a fresh model-selection attempt:

ManualModelEntry = false;
SelectedModelId = null;

ManualModelEntry = false ensures the successful probe renders the selectable discovered-model list. SelectedModelId = null clears any stale model ID typed during a previous attempt so the next provider selection cannot carry old input forward.

I verified this with a baseline proof test: the regression failed on unmodified dev because ManualModelEntry remained true after backing out and selecting openai again, even though the probe returned models. The same test passes with this reset in place.

@Aaronontheweb Aaronontheweb merged commit a3c604f into netclaw-dev:dev Jun 6, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working providers Provider integrations and capability detection across OpenAI-compatible backends. tui Terminal UI (Termina) issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant