fix(inventory+history): address post-merge CR findings on #792 (closes #896) - #897
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR updates skeleton UI column counts and related comments in the history and inventory loaders to match the current table structures. PR ChangesSkeleton UI Column Count Corrections
Sequence Diagram(s)No diagram needed; these are comment and literal configuration updates with no functional control flow or component interactions. Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
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 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
… tables (closes #896) PR #792 added the "Monthly Cost" column to two history tables and to the active-commitments table, but the skeleton-loader call sites + their explanatory comments still referenced the pre-#792 column counts. The shimmer placeholders therefore render with one fewer cell than the real table on first paint, and the comments are out of sync with the rendered <th> lists. - history.ts:217 — purchase-history skeleton: showSkeletonRows 3rd arg 11 -> 12; comment lists the 12 rendered columns (adds "Monthly Cost"). - history.ts:224 — pending-approval queue skeleton: showSkeletonRows 3rd arg 8 -> 12; comment lists the 12 rendered columns (Date / Account / Provider / Service / Count / Term / Payment / Monthly Cost / Upfront Cost / Monthly Savings / Created by / Actions). - inventory.ts:86 — active-commitments skeleton comment: "10 cols" -> "11 cols" to match ACTIVE_COMMITMENTS_COLS (the call site already uses the constant, so this is comment-only). Verified against the rendered <th> lists in renderHistoryList (history.ts:650-663), the pending-approval queue (history.ts:946-959), and renderActiveCommitmentsTable's headers array (inventory.ts:156). Test suite (10 suites / 202 tests) and tsc --noEmit both pass.
a2d14c0 to
ac140fc
Compare
|
@coderabbitai review This PR's trigger from 2026-06-01 was acknowledged but no review body was posted (auto-reviews are disabled on the non-default base branch). Re-pinging for a fresh pass on commit |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
gh pr view 897 --repo LeanerCloud/CUDly --json headRefName,baseRefName,commits
echo "---DIFF---"
gh pr diff 897 --repo LeanerCloud/CUDlyLength of output: 4541
No issues found. The changes are minimal, accurate, and consistent with the rendered [approve] 🧠 Learnings used |
Summary
Follow-up to #792: CodeRabbit posted a substantive review on #792 about an hour after the PR was merged, so the findings could not be addressed in-PR. This PR applies the three valid findings.
Closes #896.
Findings + disposition
All three findings re-verified against the post-merge tip of
feat/multicloud-web-frontendand still present.frontend/src/history.ts:217showSkeletonRows(listEl, 8, 11)— purchase-history table now renders 12<th>(Status / Date / Provider / Service / Type / Region / Count / Term / Upfront Cost / Monthly Cost / Monthly Savings / Plan). Comment lines 213-215 also out of sync.frontend/src/history.ts:224showSkeletonRows(queueEl, 3, 8)— approval queue table now renders 12<th>(Date / Account / Provider / Service / Count / Term / Payment / Monthly Cost / Upfront Cost / Monthly Savings / Created by / Actions). Comment lines 218-222 also out of sync.frontend/src/inventory.ts:86ACTIVE_COMMITMENTS_COLS = 11(line 72) after #792 added "Monthly savings". Runtime is already correct (call site uses the constant); comment is the only thing stale.None of the findings were dismissed as stale or out-of-scope. No new follow-up issues were filed (the review surfaced no architectural concerns beyond the column-count mismatches).
Verification
The renderer's runtime behaviour is unchanged — these are skeleton placeholder column counts (cosmetic, pre-data), and tests don't assert the skeleton cell count, so no test changes are required.
Test plan
npx jest --testPathPattern='(inventory|history)'green (10 suites / 202 tests)npx tsc --noEmitclean<th>lists inrenderHistoryList, the pending-approval queue (history.ts:946-959), andrenderActiveCommitmentsTable'sheadersarray (inventory.ts:156).Summary by CodeRabbit
Bug Fixes
Documentation