Skip to content

Simplify TUI: remove dead code, deduplicate, -153 lines#34

Merged
bearmug merged 3 commits into
mainfrom
simplify-tui
Mar 27, 2026
Merged

Simplify TUI: remove dead code, deduplicate, -153 lines#34
bearmug merged 3 commits into
mainfrom
simplify-tui

Conversation

@bearmug
Copy link
Copy Markdown
Contributor

@bearmug bearmug commented Mar 27, 2026

Summary

  • Remove unused glow animation (150ms tick that caused full re-renders but never visually rendered)
  • Remove dead code: approveAllSafe(), hand-rolled itoa(), formatDuration()
  • Deduplicate: prKey() used everywhere, merge picker extracted, pillName() computed once, checks count computed once, failingPRs derived internally
  • Fix redundant bounds checks, use truncateMiddle consistently

Test plan

  • go build ./... passes for both tui and daemon
  • go test ./... passes (all existing tests updated)
  • Binaries reinstalled and verified

bearmug added 3 commits March 26, 2026 10:38
Script scans ~/.claude session data, aggregates token usage by date/model/machine.
Dashboard is a self-contained HTML playground with log scale, model filtering, and editable pricing.
- Remove unused glow animation (glowPos/glowDir/150ms tick that never rendered)
- Remove dead approveAllSafe(), hand-rolled itoa(), formatDuration()
- Use prKey() helper everywhere instead of 5 inline fmt.Sprintf calls
- Extract handleMergePick() from 4 copy-pasted merge picker cases
- Compute pillName() once in disambiguateNames instead of twice per session
- Compute checks passing/total once in renderPRZoom instead of twice
- Derive failingPRs inside renderStatusBar, removing a parameter
- Fix redundant bounds checks in trackSelection and scroll logic
- Use truncateMiddle instead of hand-rolled truncation
- Replace section banner comments with single-line comments
ShouldAutoApprove was called before RegisterSession (hook race),
so the session had no mode set and the config default was never
consulted. Now falls back to config.DefaultAutopilot when no
per-session mode exists.
@bearmug bearmug merged commit e4b4c7f into main Mar 27, 2026
1 check passed
@bearmug bearmug deleted the simplify-tui branch March 27, 2026 23:39
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