Repository navigation
Center table Actions as icon buttons with tooltips - #17
Conversation
Dense queues were a right-aligned stack of full “Suspend” / “Make live” outline buttons. DataTable now centers the Actions column and call sites use DataTableRowAction: a 44×44 icon, the old verb as aria-label and tooltip, danger still an outlined icon rather than a red text pill. Mobile cards keep the verb visible so the control is never a mystery glyph.
📝 WalkthroughWalkthroughThe pull request adds responsive ChangesShared row-action foundation
Admin table action migration
Operations table action migration
Supplier table action migration
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score: 🔵 Low · up to The PR replaces table text actions with centered icon buttons while preserving accessible names, tooltips, and existing confirmations. The destructive Hold payout action lacks the matching danger styling, which may reduce warning clarity; the change is otherwise mergeable with explicit owner follow-up. Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 `@src/app/ops/claims/page.tsx`:
- Around line 332-336: Update the Hold payout DataTableRowAction in the claims
page to include variant="danger", matching the confirmation action’s destructive
styling while preserving its existing label, icon, and onClick behavior.
🪄 Autofix
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: 139dbce4-b4f9-4b38-b8b7-80664ddb830e
📒 Files selected for processing (16)
AGENTS.mdsrc/app/admin/catalogue/page.tsxsrc/app/admin/roles/page.tsxsrc/app/admin/verification/page.tsxsrc/app/admin/zones/page.tsxsrc/app/ops/claims/page.tsxsrc/app/ops/dispatch/page.tsxsrc/app/ops/matching/page.tsxsrc/app/ops/payments/page.tsxsrc/app/ops/qa/page.tsxsrc/app/ops/recovery/page.tsxsrc/app/supplier/capacity/page.tsxsrc/app/supplier/catalogue/page.tsxsrc/app/supplier/jobs/page.tsxsrc/components/ui/__tests__/data-table.test.tsxsrc/components/ui/data-table.tsx
| <DataTableRowAction | ||
| label="Hold payout" | ||
| icon={CirclePause} | ||
| onClick={() => openDialog({ type: "hold", claim: c })} | ||
| > | ||
| Hold payout | ||
| </Button> | ||
| /> |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Retain destructive styling for Hold payout.
Hold payout blocks supplier payment. The confirmation action already uses variant="danger". Set the row action to variant="danger" too.
Proposed fix
<DataTableRowAction
label="Hold payout"
icon={CirclePause}
+ variant="danger"
onClick={() => openDialog({ type: "hold", claim: c })}
/>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <DataTableRowAction | |
| label="Hold payout" | |
| icon={CirclePause} | |
| onClick={() => openDialog({ type: "hold", claim: c })} | |
| > | |
| Hold payout | |
| </Button> | |
| /> | |
| <DataTableRowAction | |
| label="Hold payout" | |
| icon={CirclePause} | |
| variant="danger" | |
| onClick={() => openDialog({ type: "hold", claim: c })} | |
| /> |
🤖 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 `@src/app/ops/claims/page.tsx` around lines 332 - 336, Update the Hold payout
DataTableRowAction in the claims page to include variant="danger", matching the
confirmation action’s destructive styling while preserving its existing label,
icon, and onClick behavior.
Dense queues were a right-aligned column of full “Suspend” / “Make live” / “Restore” outline buttons. Actions are now centered icon buttons with the old verb as the accessible name and tooltip.
What changed
DataTableActions header and cells aretext-center(sticky right column stays).DataTableRowAction:Button size="icon"+ lucide icon + shadcnTooltip. Destructive staysvariant="danger"(outlined icon, not a red text pill).rowActions={call site uses the helper. Confirm dialogs are unchanged — the icon opens the same confirm.What I cut
The repeated full-width text outline buttons in every queue row. They were the same verb twice (header + cell) and turned dense tables into a second button column.
Verify
npm run typecheck,lint,test,buildclean.Summary by CodeRabbit
New Features
Tests