on main help sign in
docs: fix misleading TODO comments

- commands.go: correct factually wrong claim that os.Getenv does I/O (it reads from in-memory process environment). Rewritten to accurately describe the TEA paradigm concern. - onboarding.go: remove stale 'TODO: initialize the project' comment in skipInitializeProject which deliberately skips initialization

commit490c2f844b5e471f6b2456a1416f886c90e34623 authoriko <mail@iko.soy> dateThu 9 Jul 2026, 03:04 (3 months ago) parent6f4906c
2 files changed+3−4
internal/ui/dialog/commands.go+3−3 internal/ui/model/onboarding.go−1
internal/ui/dialog/commands.go+3−3
@@ -370,9 +370,9 @@ func (c *Commands) defaultCommands() []*CommandItem {
370370
371371 // Add external editor command if $EDITOR is available.
372372 //
373− // TODO: Use [tea.EnvMsg] to get environment variable instead of os.Getenv;
374− // because os.Getenv does IO is breaks the TEA paradigm and is generally an
375− // antipattern.
373+ // TODO: Use [tea.EnvMsg] to get environment variables instead of os.Getenv;
374+ // reading the environment directly bypasses the TEA message system and is
375+ // generally an antipattern.
376376 if os.Getenv("EDITOR") != "" {
377377 commands = append(commands, NewCommandItem(c.com.Styles, "open_external_editor", "Open External Editor", "ctrl+o", ActionExternalEditor{}))
378378 }
internal/ui/model/onboarding.go−1
@@ -72,7 +72,6 @@ func (m *UI) initializeProject() tea.Cmd {
7272
7373// skipInitializeProject skips project initialization and transitions to the landing view.
7474func (m *UI) skipInitializeProject() tea.Cmd {
75− // TODO: initialize the project
7675 m.setState(uiLanding, uiFocusEditor)
7776 // mark the project as initialized
7877 return m.markProjectInitializedCmd()