refactor(agents): inline shortcut buttons inside the card#282
Conversation
Shortcut row was rendering outside the card with raw unicode glyphs, visually inconsistent with the existing action icons (logs/skills/etc). Move into the card as leftActions, existing actions to the right via justify-between flex. Use lucide icons matching the existing action style (same Button variant/size and 15px icon size).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAgentRow gains an optional Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 8/10 reviews remaining, refill in 6 minutes and 13 seconds. Comment |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by grok-code-fast-1:optimized:free · 120,909 tokens |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@desktop/src/apps/AgentsApp.tsx`:
- Line 2040: Left shortcut button is hardcoded to desktop size via btnCls="h-8
w-8" which causes inconsistent sizing on mobile; update the prop passed to
AgentShortcutRow (leftActions) so the button uses responsive classes or the same
mobile size as the right-side actions (e.g., make it match the right action
class by using responsive sizing like mobile h-11 w-11 and desktop h-8 w-8 or
reuse the same size variable/class used for right-side actions) so both sides
render consistently across breakpoints.
- Around line 352-354: The divider is currently rendered based on leftActions
truthiness, which is true when leftActions is a React element (e.g.,
<AgentShortcutRow />) even if that component renders null; compute an explicit
presence flag (e.g., leftHasContent) by inspecting leftActions with
React.Children.toArray(leftActions).filter(Boolean).length > 0 and use that flag
to conditionally render both the divider and leftActions instead of relying on
leftActions truthiness; update the render logic that uses leftActions and the
divider (references: leftActions, AgentShortcutRow, actionButtons) to check
leftHasContent before emitting the separator.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: fc46370f-7c51-479b-99c2-9f6a13c3d622
📒 Files selected for processing (3)
desktop/src/apps/AgentsApp.tsxdesktop/src/components/AgentShortcutRow.test.tsxdesktop/src/components/AgentShortcutRow.tsx
…tons CodeRabbit on PR #282: divider span rendered based on leftActions JSX truthiness, not on whether the row actually produced shortcuts (it's truthy even when AgentShortcutRow returns null). Drop the separator entirely — flex justify-between + gap already separate the two sides. Also: button size was hardcoded h-8 w-8 (desktop). Mobile actions are h-11 w-11 for finger targets. Use responsive 'h-11 w-11 md:h-8 md:w-8' to match.
…tcuts-inline # Conflicts: # desktop/src/apps/AgentsApp.tsx
Summary
Shortcut row from PR #274 rendered outside the agent card with raw unicode glyphs (⌨ ▣ ⚕ ⊞), looking jarringly inconsistent with the styled action icons inside the card.
This refactor:
Test plan
Summary by CodeRabbit
New Features
Improvements
Tests