refactor(devtui): split setup_guide into model/view/apply files#1027
Merged
Conversation
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.
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
setup_guide.go, rendering moves tosetup_guide_view.go, andapplyToConfig/ensureDeploymentHelper/localConfigmove tosetup_guide_apply.go.gopls checkwarnings in theinternal/devtuipackage: split+-concatenatedWriteStringarguments into separate calls (styles.go, model_view.go, tab_general.go, setup_guide_view.go), and checkbufio.Scanner.Err()after stream loops inmodel_commands.goandtab_logs.goso read errors aren't silently swallowed.No behavior changes —
setup_guide_test.gocontinues to cover all three new files. Addresses item #4 from thenextvsmaincode review.Test plan
go build ./...go vet ./...gopls check internal/devtui/*.go— zero warningsgo test ./internal/devtui/