renderLoopStateIndicator renders a visual indicator for the loop state.
(entry PRDEntry)
| 674 | |
| 675 | // renderLoopStateIndicator renders a visual indicator for the loop state. |
| 676 | func (p *PRDPicker) renderLoopStateIndicator(entry PRDEntry) string { |
| 677 | switch entry.LoopState { |
| 678 | case loop.LoopStateRunning: |
| 679 | // Show spinning indicator with iteration count |
| 680 | runningStyle := lipgloss.NewStyle().Foreground(PrimaryColor).Bold(true) |
| 681 | return runningStyle.Render(fmt.Sprintf("▶ %d", entry.Iteration)) |
| 682 | case loop.LoopStatePaused: |
| 683 | pausedStyle := lipgloss.NewStyle().Foreground(WarningColor) |
| 684 | return pausedStyle.Render("⏸") |
| 685 | case loop.LoopStateComplete: |
| 686 | completeStyle := lipgloss.NewStyle().Foreground(SuccessColor) |
| 687 | return completeStyle.Render("✓") |
| 688 | case loop.LoopStateError: |
| 689 | errorStyle := lipgloss.NewStyle().Foreground(ErrorColor) |
| 690 | return errorStyle.Render("✗") |
| 691 | case loop.LoopStateStopped: |
| 692 | stoppedStyle := lipgloss.NewStyle().Foreground(MutedColor) |
| 693 | return stoppedStyle.Render("■") |
| 694 | default: |
| 695 | // Ready state - show story status |
| 696 | if entry.InProgress { |
| 697 | inProgressStyle := lipgloss.NewStyle().Foreground(PrimaryColor) |
| 698 | return inProgressStyle.Render("●") |
| 699 | } else if entry.Completed == entry.Total && entry.Total > 0 { |
| 700 | completeStyle := lipgloss.NewStyle().Foreground(SuccessColor) |
| 701 | return completeStyle.Render("✓") |
| 702 | } |
| 703 | return "" |
| 704 | } |
| 705 | } |
| 706 | |
| 707 | // renderInputMode renders the input mode for new PRD name. |
| 708 | func (p *PRDPicker) renderInputMode(width int) string { |