Skip to content

chore: remove dead style vars and unused listItem.display#9

Merged
brtkwr merged 1 commit into
mainfrom
chore/remove-dead-code
Jun 22, 2026
Merged

chore: remove dead style vars and unused listItem.display#9
brtkwr merged 1 commit into
mainfrom
chore/remove-dead-code

Conversation

@brtkwr

@brtkwr brtkwr commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

What

Maintainability finding from the codebase review (Leia + Yoda lenses, compiler-confirmed).

  • 8 unused lipgloss style vars - normalStyle, dimStyle, projectStyle, headerStyle, userStyle, assistantStyle, borderStyle, helpStyle were each referenced only at their own declaration. The UI is actually rendered with raw ANSI escapes (\033[…m); only selectedStyle is used. Go doesn't flag unused package-level vars, so they rotted silently and presented a second, fake styling subsystem - a maintainer "fixing a colour" by editing one would see no effect.
  • listItem.display - declared with a misleading comment ("What to show in the list") but never written or read.

Deletes both. selectedStyle and the lipgloss import stay (still used by selectedStyle and inline lipgloss.NewStyle() calls in View).

Pure deletion, no behaviour change: go build, go vet, and the full test suite pass. 40 lines lighter.

Eight lipgloss style vars (normalStyle, dimStyle, projectStyle,
headerStyle, userStyle, assistantStyle, borderStyle, helpStyle) were
never referenced - the UI is rendered with raw ANSI escapes, and only
selectedStyle is used. Go doesn't flag unused package-level vars, so
they rotted silently and presented a second, fake styling system to the
next reader. Likewise listItem.display was never written or read.

Deletes both. selectedStyle and the lipgloss import stay (still used).
@brtkwr brtkwr merged commit 2f56361 into main Jun 22, 2026
1 check passed
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