()
| 466 | } |
| 467 | |
| 468 | func (f FirstTimeSetup) renderPRDNameStep() string { |
| 469 | modalWidth := min(60, f.width-10) |
| 470 | if modalWidth < 45 { |
| 471 | modalWidth = 45 |
| 472 | } |
| 473 | |
| 474 | var content strings.Builder |
| 475 | |
| 476 | // Title |
| 477 | titleStyle := lipgloss.NewStyle(). |
| 478 | Bold(true). |
| 479 | Foreground(PrimaryColor) |
| 480 | |
| 481 | if f.showGitignore && f.result.AddedGitignore { |
| 482 | content.WriteString(lipgloss.NewStyle().Foreground(SuccessColor).Render("✓ Added .chief to .gitignore")) |
| 483 | content.WriteString("\n\n") |
| 484 | } |
| 485 | |
| 486 | content.WriteString(titleStyle.Render("Create Your First PRD")) |
| 487 | content.WriteString("\n") |
| 488 | content.WriteString(DividerStyle.Render(strings.Repeat("─", modalWidth-4))) |
| 489 | content.WriteString("\n\n") |
| 490 | |
| 491 | // Message |
| 492 | messageStyle := lipgloss.NewStyle().Foreground(TextColor) |
| 493 | content.WriteString(messageStyle.Render("Enter a name for your PRD:")) |
| 494 | content.WriteString("\n\n") |
| 495 | |
| 496 | // Input field |
| 497 | inputStyle := lipgloss.NewStyle(). |
| 498 | Border(lipgloss.RoundedBorder()). |
| 499 | BorderForeground(PrimaryColor). |
| 500 | Padding(0, 1). |
| 501 | Width(modalWidth - 8) |
| 502 | |
| 503 | displayName := f.prdName |
| 504 | if displayName == "" { |
| 505 | displayName = " " // Show cursor position |
| 506 | } |
| 507 | content.WriteString(inputStyle.Render(displayName + "█")) |
| 508 | content.WriteString("\n") |
| 509 | |
| 510 | // Error message |
| 511 | if f.prdNameError != "" { |
| 512 | errorStyle := lipgloss.NewStyle().Foreground(ErrorColor) |
| 513 | content.WriteString("\n") |
| 514 | content.WriteString(errorStyle.Render(f.prdNameError)) |
| 515 | } |
| 516 | |
| 517 | // Hint |
| 518 | content.WriteString("\n") |
| 519 | hintStyle := lipgloss.NewStyle().Foreground(MutedColor) |
| 520 | content.WriteString(hintStyle.Render("PRD will be created at: .chief/prds/" + f.prdName + "/")) |
| 521 | |
| 522 | // Footer |
| 523 | content.WriteString("\n\n") |
| 524 | content.WriteString(DividerStyle.Render(strings.Repeat("─", modalWidth-4))) |
| 525 | content.WriteString("\n") |
no test coverage detected