Problem:
The codebase contains a layer of legacy pre-BubbleTea code that is no longer reachable from the TUI runtime:
AppState struct in main.go (comment: "kept for compatibility with legacy code still being migrated" — no migration is in progress)
renderHeader, renderStatusBar, printIssueDetail, printPRDetail, printIssuesTable in render.go / terminal.go — write directly to stdout via fmt.Printf, which would corrupt the BubbleTea alt-screen buffer if ever called during TUI operation
withSpinner, startSpinner / stopSpinner in terminal.go — two duplicate spinner implementations, neither used from any BubbleTea Update handler
confirmAction in terminal.go — calls form.Run() which takes over stdin/stdout
This dead code increases cognitive surface area, creates a silent correctness risk if accidentally invoked during TUI operation, and contains stty calls and clearScreen side effects.
Solution:
Audit every function in terminal.go and the legacy rendering functions in render.go. Delete any that are not reachable from the BubbleTea AppModel.Update or AppModel.View path. Delete AppState.
Acceptance Criteria:
Problem:
The codebase contains a layer of legacy pre-BubbleTea code that is no longer reachable from the TUI runtime:
AppStatestruct inmain.go(comment: "kept for compatibility with legacy code still being migrated" — no migration is in progress)renderHeader,renderStatusBar,printIssueDetail,printPRDetail,printIssuesTableinrender.go/terminal.go— write directly to stdout viafmt.Printf, which would corrupt the BubbleTea alt-screen buffer if ever called during TUI operationwithSpinner,startSpinner/stopSpinnerinterminal.go— two duplicate spinner implementations, neither used from any BubbleTea Update handlerconfirmActioninterminal.go— callsform.Run()which takes over stdin/stdoutThis dead code increases cognitive surface area, creates a silent correctness risk if accidentally invoked during TUI operation, and contains
sttycalls andclearScreenside effects.Solution:
Audit every function in
terminal.goand the legacy rendering functions inrender.go. Delete any that are not reachable from the BubbleTeaAppModel.UpdateorAppModel.Viewpath. DeleteAppState.Acceptance Criteria:
AppStateis deletedgo vet ./...andgo test ./...pass after deletion