Add placeholder text to planning tab message input - #268
Conversation
- Set placeholder to 'ask a question or describe a task' in textinput - Disable virtual cursor via SetVirtualCursor(false) to prevent glyph artifact - Style placeholder with ANSI color 240 (muted gray) - Update integration test to verify placeholder and virtual cursor settings Closes #231 Signed-off-by: Joseph Brinkman <joe.brinkman@improving.com>
|
Warning Review limit reachedNext included review available in 50 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟡 Changes recommended
Placeholder styling currently hard-codes ANSI color 240 (bypassing the theme system) and the new design spec includes a non-compiling code snippet reference.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR reintroduces helpful placeholder text in the Planning tab message input while avoiding the bubbles/v2 “first character rendered as a virtual cursor glyph” artifact by disabling virtual cursor mode.
Changes:
- Added a descriptive placeholder string to the planning message
textinputand disabled virtual cursor rendering. - Applied placeholder styling via the textinput’s focused/blurred placeholder styles.
- Updated the TUI integration test and added a design spec document for Issue #231.
File summaries
| File | Description |
|---|---|
| internal/tui/planning_tab.go | Adds placeholder text/styling and disables virtual cursor for the planning message input. |
| internal/tui/integration_test.go | Updates integration assertions for placeholder presence and virtual cursor disabled. |
| .kiro-krew/specs/issue-231-add-placeholder-text-to-planning-tab.md | Documents the rationale/approach and test expectations for placeholder restoration. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // Style placeholder with universally readable muted gray | ||
| placeholderStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("240")) // ANSI gray | ||
| currentStyles.Focused.Placeholder = placeholderStyle | ||
| currentStyles.Blurred.Placeholder = placeholderStyle |
| // Style placeholder with muted color from theme (same for focused and blurred states) | ||
| placeholderStyle := lipgloss.NewStyle().Foreground(lipgloss.Color(styles.styles.TextMuted)) | ||
| currentStyles.Focused.Placeholder = placeholderStyle | ||
| currentStyles.Blurred.Placeholder = placeholderStyle |
Summary
This PR restores placeholder text to the planning tab's message input while preventing the virtual cursor glyph artifact that was fixed in PR #228.
What Changed
SetVirtualCursor(false)to prevent the first-character glyph artifact ("T") from bubbles/v2Key Files Modified
internal/tui/planning_tab.go- Enhanced textinput initialization with placeholder supportinternal/tui/integration_test.go- Updated test assertions for new functionality.kiro-krew/specs/issue-231-add-placeholder-text-to-planning-tab.md- Design specificationTechnical Details
The solution addresses the root cause identified in commit 3350e44 where the bubbles/v2 textinput's
placeholderView()method renders the first placeholder character as a virtual cursor glyph. By disabling virtual cursor mode while adding styled placeholder text, users get helpful input guidance without visual artifacts.Validation
Closes #231