propose: Add visual feedback when the intent input is cleared with Esc…#2
propose: Add visual feedback when the intent input is cleared with Esc…#2atomeam wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughThe Escape key handler for the global intent input field now displays a temporary "Intent cleared" info banner when pressed, providing visual user feedback alongside the existing clear-and-blur behavior. ChangesIntent Input User Feedback
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@mini/index.html`:
- Line 483: The UI now calls showBanner('info', ...) when Escape clears the
intent, but there's no CSS rules for a .banner.info state; add a dedicated style
for .banner.info (similar to existing
.banner.success/.banner.error/.banner.warning) to define background-color,
text-color, and any icon or border styles so the info banner is visually
distinct; update the stylesheet where .banner classes live and ensure the
selector .banner.info is applied when showBanner('info', ...) is invoked.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| intent.addEventListener('keydown', function(e){ | ||
| if (e.key === 'Enter') { e.preventDefault(); press(); } | ||
| else if (e.key === 'Escape') { intent.value = ''; intent.blur(); } | ||
| else if (e.key === 'Escape') { intent.value = ''; intent.blur(); showBanner('info', 'Intent cleared', 1000); } |
There was a problem hiding this comment.
Add a dedicated style for the new info banner state.
showBanner('info', ...) introduces a new banner kind, but there is no .banner.info style, so the feedback can be visually weak/inconsistent.
🎨 Suggested fix
.banner.error { background: `#7f1d1d`; color: `#fecaca`; border-bottom: 2px solid `#ef4444`; }
.banner.warn { background: `#78350f`; color: `#fed7aa`; border-bottom: 2px solid `#f59e0b`; }
.banner.success { background: `#14532d`; color: `#bbf7d0`; border-bottom: 2px solid `#22c55e`; }
+ .banner.info { background: `#1e3a8a`; color: `#dbeafe`; border-bottom: 2px solid `#60a5fa`; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@mini/index.html` at line 483, The UI now calls showBanner('info', ...) when
Escape clears the intent, but there's no CSS rules for a .banner.info state; add
a dedicated style for .banner.info (similar to existing
.banner.success/.banner.error/.banner.warning) to define background-color,
text-color, and any icon or border styles so the info banner is visually
distinct; update the stylesheet where .banner classes live and ensure the
selector .banner.info is applied when showBanner('info', ...) is invoked.
Generated by HomeBase using Mistral.
Summary: Add visual feedback when the intent input is cleared with Escape key
Patches: 1
Review the diff. Merge to deploy.
Notes seen by the model:
(none yet)
Summary by CodeRabbit