v0.3.1 — HF4 reconfigure
HF4 fix — the GUI's Reconfigure flow now actually swaps the chat backend (mock ↔ Ollama) on a running stack instead of silently no-op'ing. Three compounding bugs were found and fixed in this single ship.
What was broken
Clicking Reconfigure on a running stack and switching backend (mock → Ollama, or back) would walk through the wizard but leave Docker Compose untouched. The user would land back on /status with the old backend still serving.
Three compounding bugs (all fixed)
-
state::readclobbered env-set values — the GUI exportedCHAT_BACKEND=ollama, but the wizard's state-loader overwrote it with the previously savedmockbefore the new compose got rendered. Inverted the guard so env wins. Also normalizedOLLAMA_MODEL, which was missing the empty-state check the other four vars had. -
F13_STATE_ACTIONwas shadowed beforestate::checkread it —bin/f13-configdidF13_STATE_ACTION=""unconditionally, so the GUI's exportededitvalue was discarded and the wizard defaulted tokeep. Without this, the wizard never even entered the edit branch. -
Reconfigure didn't bring down the running stack — even after the wizard correctly took the edit path, the previous run's containers stayed bound to the chosen ports and the new chat container couldn't claim them. The user got stuck on the GUI's port-check screen because both ports were reported as in-use. Now the Reconfigure button on /status calls
compose.downbefore navigating, and a new_wizard_stop_running_stackhelper in the shell wizard adds defense-in-depth for direct CLI invocations.
Tests
- 4 new bats regressions in
tests/state.bats(env-wins forCHAT_BACKEND,OLLAMA_MODEL,FRONTEND_PORT, plus an empty-env case) - 4 new bats assertions in
tests/f13-config.bats(stop event on edit / reset, absent on keep / fresh init) - 4 new vitest assertions (
stateAction:"edit"plumbing + Reconfigure stops a running stack) - Pre-existing
re-run with edit action re-renders configtest tightened — old form was a no-op assertion
Validated on
- macOS (Apple Silicon, manual smoke test of the full reconfigure round-trip: mock → Ollama → mock → fresh init)
Linux validation will happen on the maintainer's WSL2 box during the next session there; the changes are pure logic/state-machine fixes with no Linux-specific surface area.
Known loose ends carried forward
- HF2 — Cancel button in the launch pipeline doesn't kill the bash subprocess (deferred since v0.2.x)
- HF3 — Sporadic
pull access deniedon frontend image (deferred since v0.2.x)
PRD also flags some "likely-others" edge cases that may surface now that the reconfigure flow actually works (port changes mid-cycle, stale OLLAMA_MODEL on Ollama → mock). Worth a sweep but out of scope for this patch.
Full Changelog: v0.3.0...v0.3.1