Skip to content

refactor(devtui): split setup_guide into model/view/apply files#1027

Merged
Soner (shyim) merged 2 commits into
nextfrom
refactor/setup-guide-split
May 18, 2026
Merged

refactor(devtui): split setup_guide into model/view/apply files#1027
Soner (shyim) merged 2 commits into
nextfrom
refactor/setup-guide-split

Conversation

@shyim

Copy link
Copy Markdown
Member

Summary

  • Split internal/devtui/setup_guide.go (was 769 lines, mixed model/view/persistence) into three files along the seams: model + step transitions stay in setup_guide.go, rendering moves to setup_guide_view.go, and applyToConfig / ensureDeploymentHelper / localConfig move to setup_guide_apply.go.
  • Address all gopls check warnings in the internal/devtui package: split +-concatenated WriteString arguments into separate calls (styles.go, model_view.go, tab_general.go, setup_guide_view.go), and check bufio.Scanner.Err() after stream loops in model_commands.go and tab_logs.go so read errors aren't silently swallowed.

No behavior changes — setup_guide_test.go continues to cover all three new files. Addresses item #4 from the next vs main code review.

Test plan

  • go build ./...
  • go vet ./...
  • gopls check internal/devtui/*.go — zero warnings
  • go test ./internal/devtui/

setup_guide.go was 769 lines mixing model, step transitions, rendering,
and config persistence. Split along those seams:

- setup_guide.go        — model, step transitions
- setup_guide_view.go   — rendering methods
- setup_guide_apply.go  — applyToConfig, ensureDeploymentHelper, localConfig

No behavior changes; existing setup_guide_test.go continues to cover all three.
- Split `+`-concatenated arguments to strings.Builder.WriteString into
  separate calls (styles.go, model_view.go, tab_general.go).
- Check `bufio.Scanner.Err()` after stream loops so read errors aren't
  silently swallowed. streamCmdOutput now propagates the scanner error;
  the log-tailing goroutines in tab_logs.go discard it explicitly.
@shyim Soner (shyim) merged commit 967f0d5 into next May 18, 2026
2 checks passed
@shyim Soner (shyim) deleted the refactor/setup-guide-split branch May 18, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant