fix(ui): restore resource-row expand chevron to leading edge (closes #1006) - #1446
Conversation
…1006) The expand/collapse chevron on multi-variant cell summary rows was rendered inline inside the content cell (before the Resource Type text) for readonly/viewer sessions because buildListMarkup zeroed out the leading td.checkbox-col when showCheckboxes was false. Restore the chevron to the far-left column (before Provider) for all roles by: - Always emitting td.checkbox-col as the first cell in cell summary rows (contains the chevron button; no change for admin/editor). - Always emitting an empty th.checkbox-col in the table header for viewers, keeping column alignment consistent. - Always emitting an empty td.checkbox-col in variant rows for viewers, so expanded row columns align with the header and summary rows. - Updating the zero-rows empty-hint colspan to always include 1 for the leading column. SP-group parent rows were already correct (they always emitted the leading cell). This change makes non-SP cell summary rows consistent. Owner decision: chevron belongs at the table's far-left edge, before the Provider column, matching the standard row-expander control placement (QA row 568, issue #1006). Tests updated: readonly grouped-row test now asserts the chevron lives in td.checkbox-col; SP-group variant-row test updated to expect one empty td.checkbox-col per row (no checkbox input).
|
@coderabbitai review |
|
@coderabbitai full review |
✅ Action performedFull review finished. You're currently rate limited under our Fair Usage Limits Policy. Your recent PR review activity is in the 95th percentile or higher among CodeRabbit users, so adaptive limits apply. Your next review will be available in 7 minutes. |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 40 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughReadonly recommendations tables now preserve the leading checkbox column for structural alignment, place expand chevrons within it, and keep checkbox inputs disabled by omission. Empty-state colspan calculations and permission tests were updated accordingly. ChangesReadonly recommendations alignment
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
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 `@frontend/src/__tests__/recommendations-permissions.test.ts`:
- Around line 340-351: Strengthen the readonly DOM assertions in
frontend/src/__tests__/recommendations-permissions.test.ts at lines 340-351 by
asserting the first header cell and first summary-row cell are checkbox-col
elements, while preserving the existing count and chevron checks. At lines
520-524, assert each child row’s first cell is td.checkbox-col and has empty
text content; no other sites require changes.
🪄 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
Run ID: 736b3ed9-69bd-4003-b8ba-b766b552a4f9
📒 Files selected for processing (2)
frontend/src/__tests__/recommendations-permissions.test.tsfrontend/src/recommendations.ts
Assert that th.checkbox-col and td.checkbox-col are the first cells in their respective rows (not just present), and that variant rows' leading td.checkbox-col has empty text content. Addresses CodeRabbit finding on PR #1446 (actionable comment, minor).
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
buildListMarkupomitted the leadingtd.checkbox-colwhenshowCheckboxeswas false.td.checkbox-colandth.checkbox-colregardless of role, with the chevron inside it for cell summary rows and an empty cell for variant/header rows.Changes
frontend/src/recommendations.ts: remove theshowCheckboxescondition fromchevronCell(cell summary rows); dropinlineChevroninline-injection; always emit<th class="checkbox-col">in the header (empty for viewers); always emit<td class="checkbox-col">in variant rows (empty for viewers); update zero-rows empty-hint colspan to always include 1 for the leading column.frontend/src/__tests__/recommendations-permissions.test.ts: update readonly grouped-row test to assert chevron lives intd.checkbox-col; update SP-group variant-row test to expect one emptytd.checkbox-colper row (noinput[data-rec-id]).Test plan
npm run typecheckpassesnpm run buildpasses (pre-existing entrypoint-size warning only)npx jest --no-coverage src/__tests__/recommendations.test.ts src/__tests__/recommendations-permissions.test.ts- 422 tests, 0 failuresCloses #1006
Summary by CodeRabbit