test(coverage): Batch 2 — Copilot UI (InsightCard, CopilotComposer, AiModeIndicator)#134
Conversation
…deIndicator (Batch 2) #3 coverage lift — three previously-0% Copilot UI components (targets from CI V8 branch report): - InsightCard (6): title/desc render, Tell-me-more (gated by heuristicsOnly), Open-view (gated by actionable + onNavigate). - CopilotComposer (5): Enter sends / Shift+Enter newline, send-disabled gating, transient-store draft consume+clear. - AiModeIndicator (5): plain mode label, OpenRouter active (free vs paid), circuit-open suffix + pulsing dot, OpenRouter suppression in local mode. Gates: lint OK (1331 files) | typecheck OK | 16 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@CodeAnt-AI review |
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
CodeAnt AI is running the review. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sequence DiagramThis diagram shows how the Copilot composer consumes a transient draft, gates sending on input and streaming state, and how insight cards either send contextual follow-up prompts or navigate to the related view, which are the behaviors exercised by the new tests. sequenceDiagram
participant User
participant CopilotComposer
participant InsightCard
participant TransientStore
participant CopilotService
participant Navigation
User->>CopilotComposer: Open composer
CopilotComposer->>TransientStore: Load draft message once and clear it
User->>CopilotComposer: Type message and press Enter
CopilotComposer->>CopilotService: Send trimmed message if not empty and not streaming
User->>InsightCard: Click Tell me more
InsightCard->>CopilotService: Send contextual question about heuristic finding
User->>InsightCard: Click Open view on actionable finding
InsightCard->>Navigation: Navigate to finding target view
Generated by CodeAnt AI |
|
CodeAnt AI finished reviewing your PR. |
|
CodeAnt AI finished running the review. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
User description
Summary
Coverage lift Batch 2 (plan #3). Three previously-0% Copilot UI components, targeted from the CI V8 per-file branch report.
components/copilot/InsightCard.tsxheuristicsOnly→ callssendMessage), "Open view" (gated byactionable+onNavigate)components/copilot/CopilotComposer.tsxcomponents/copilot/AiModeIndicator.tsxPure test-only PR. Deterministic — Zustand/redux/i18n/service deps mocked; no real timers.
Gates
🤖 Generated with Claude Code
CodeAnt-AI Description
Add coverage for three Copilot UI components
What Changed
Impact
✅ Fewer Copilot UI regressions✅ Safer message sending behavior✅ Clearer AI mode status labels💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.