Skip to content

Conversation

@newhook
Copy link
Owner

@newhook newhook commented Jan 18, 2026

Summary

Implements visual feedback for newly created beads in the Plan mode TUI. When a new bead is created (via bd create or other means), it now appears with yellow text highlighting that automatically fades after 5 seconds, making it easy to spot new items in the tree.

Changes

  • cmd/tui_plan.go: Added tracking for newly created beads using a newBeads map that stores bead IDs with their creation timestamps. Implemented detection logic that compares incoming beads against existing items to identify new ones. Added timer-based message system (newBeadExpireMsg) to automatically remove the highlight after 5 seconds.

  • cmd/tui_plan_render.go: Added rendering logic to apply the yellow text style to beads marked as new in the newBeads map.

  • cmd/tui_shared.go: Added new tuiNewBeadStyle using lipgloss color 226 (yellow) for the animation highlight.

Implementation Details

  • New beads are detected by comparing the refreshed bead list against the existing items
  • Each new bead triggers a 5-second timer that fires a message to remove the highlight
  • The animation only triggers when there are existing beads (avoids highlighting everything on initial load)
  • Uses the existing tea.Tick mechanism for timer-based expiration

Issues Resolved

  • ✅ ac-f6og: New issues should be animated in the tree when created
    • ✅ ac-f6og.1: Track newly created beads with timestamp
    • ✅ ac-f6og.2: Detect new beads when refreshing data
    • ✅ ac-f6og.3: Add yellow text style for new items
    • ✅ ac-f6og.4: Implement timer to remove animation after 5 seconds
    • ✅ ac-f6og.5: Test animation behavior with bead creation

Testing

  • Create a new bead using bd create while Plan mode is open
  • Observe the new bead appears with yellow text
  • After 5 seconds, the yellow highlighting should automatically disappear
  • The animation should not trigger on initial TUI load

🤖 Generated with Claude Code

newhook and others added 3 commits January 18, 2026 09:38
- Add newBeads map to planModel for tracking newly created beads with timestamps
- Detect new beads in planDataMsg handler by comparing with existing beadItems
- Add tuiNewBeadStyle with yellow foreground (color 226) for highlighting
- Apply yellow style in renderBeadLine for beads in newBeads map
- Implement 5-second timer using tea.Tick to expire animations
- Add newBeadExpireMsg handler to remove beads from animation map

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fixed ANSI code conflicts by using plain text for styled elements
- Changed to style only the title yellow, not the whole line
- Added debug logging for animation flow
- Simplified detection to comparison-based approach

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@newhook newhook merged commit 2377f4b into main Jan 18, 2026
@newhook newhook deleted the feat/new-issues-should-be-animated-in-the-tree-when-cre branch January 18, 2026 15:12
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.

2 participants