Skip to content

Use milestone indices for sibling keys where index is the identity - #1081

Closed
Adamsonoladipupo wants to merge 1 commit into
kindfi-org:developfrom
Adamsonoladipupo:fix/1031-milestone-index-keys
Closed

Adamsonoladipupo wants to merge 1 commit into
kindfi-org:developfrom
Adamsonoladipupo:fix/1031-milestone-index-keys

Conversation

@Adamsonoladipupo

@Adamsonoladipupo Adamsonoladipupo commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #1081

Updated the milestone renderers to use their existing array indices as React keys.

Changes

  • Updated milestones-tab.tsx to use key={index}.
  • Updated milestone-reviews-panel.tsx to use key={index}.
  • Preserved existing milestone interaction and index-based behavior.
  • Left tutorial-card.tsx unchanged.
  • No unrelated changes or refactoring.

Verification

  • Confirmed both milestone renderers use key={index}.
  • Confirmed tutorial-card.tsx was not modified.
  • Reviewed the final diff for unrelated changes.

Closes #1081

Summary by CodeRabbit

  • Bug Fixes
    • Improved consistency when displaying milestone lists and reviews. Updates to milestones are less likely to cause display issues.

Use milestone array indices as React keys in the milestone tab and milestone reviews panel, since milestone descriptions and amounts are not unique.

Preserve existing index-based milestone interactions and leave tutorial-card.tsx unchanged.
@almanax-ai

almanax-ai Bot commented Sep 26, 2026

Copy link
Copy Markdown

Plan expired

Your subscription has expired. Please renew your subscription to continue using CI/CD integration and other features.

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: fa24362e-63d6-463d-b558-5c8d83a24c7e

📥 Commits

Reviewing files that changed from the base of the PR and between 8b94f0a and c3e35b4.

📒 Files selected for processing (2)
  • apps/web/components/sections/projects/manage/escrow/tabs/milestones-tab.tsx
  • apps/web/components/sections/projects/manage/milestone-reviews/milestone-reviews-panel.tsx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

Both milestone renderers now use array indices as React keys instead of composite keys based on milestone details. The milestones tab no longer imports isSingleReleaseMilestone.

Changes

Milestone rendering

Layer / File(s) Summary
Use array indices for milestone keys
apps/web/components/sections/projects/manage/escrow/tabs/milestones-tab.tsx, apps/web/components/sections/projects/manage/milestone-reviews/milestone-reviews-panel.tsx
Milestone list items and cards now use their array index as the React key. The milestones tab removes the import used to construct its previous keys.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: bran18

Merge Risk: ⚪ Minimal · up to c3e35

Milestone additions append, and the changed entries do not retain item-specific state, so no user-visible regression from the key change is established. The PR appears mergeable after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: using milestone array indices as React keys where the index identifies the sibling item.
Linked Issues check ✅ Passed Consider the linked coding requirements satisfied. The PR updates both requested milestone renderers to use the existing array index as the React key. The summary states that index-based milestone int…
Out of Scope Changes check ✅ Passed The reported changes are limited to milestones-tab.tsx and milestone-reviews-panel.tsx. They replace composite or release-specific keys with array indices and remove the now-unused import. These c…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Milestone rows line up in a list
Their indices now mark each place
Cards follow the same simple rule
Old composite keys step aside
Two renderers share the change ✨

Comment @coderabbitai help to get the list of available commands.

@Adamsonoladipupo
Adamsonoladipupo deleted the fix/1031-milestone-index-keys branch September 26, 2026 16:38
@Adamsonoladipupo
Adamsonoladipupo restored the fix/1031-milestone-index-keys branch September 26, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant