Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 141471c174
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const updatedGroups = (course.groups ?? []).map((group) => { | ||
| const plainGroup = | ||
| typeof (group as any).toObject === "function" | ||
| ? (group as any).toObject() | ||
| : { ...group }; | ||
|
|
||
| return { | ||
| ...plainGroup, | ||
| rank: rankByGroupId.get(group.id) ?? group.rank, |
There was a problem hiding this comment.
Persist the reordered group list, not just new ranks
This only changes each group's rank; it leaves the groups array itself in the original order. Existing readers such as packages/page-blocks/src/blocks/content/widget.tsx still render course.groups exactly as GraphQL returns them, so a successful reorder here will not change the section order in that widget (and any similar unsorted consumer) until they are separately updated. Either persist the array in the new order or sort by rank in the shared course formatter so the mutation is observable everywhere.
Useful? React with 👍 / 👎.
No description provided.