Repository navigation
Conversation
|
Tick the box to add this pull request to the merge queue (same as
|
Pull request changelogAppAddedChangedDeprecatedRemovedFixedSecurityWebsiteAddedChangedDeprecatedRemovedFixedSecurityHostingAddedChangedDeprecatedRemovedFixedSecurity |
Confidence Score: 4/5
[Medium impact] The changes affect the project-moderation workflow and its internal queue requests. The PR appears safe to merge, with non-blocking fixes recommended for paged queue loading and clearing unavailable skipped work.
|
| const { projects, total } = await this.queryQueue({ ...selection, limit: 200, offset }) | ||
| for (const project of projects) ids.add(project.id) | ||
| offset += projects.length | ||
| onProgress?.(ids.size, total) | ||
| if (offset >= total) return [...ids] |
There was a problem hiding this comment.
Queue loading can miss projects
getAllQueueProjectIds can miss matching projects while other moderators work through the queue. After the first 200 projects load, removing an earlier project shifts every later position. The next request still uses offset 200, so it skips a project that still needs review. Deduplicating IDs does not recover missing entries. Use a fixed list of IDs or paging that stays stable when earlier projects leave.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/api-client/src/modules/labrinth/moderation/internal.ts
Line: 86-90
Comment:
**Queue loading can miss projects**
`getAllQueueProjectIds` can miss matching projects while other moderators work through the queue. After the first 200 projects load, removing an earlier project shifts every later position. The next request still uses offset 200, so it skips a project that still needs review. Deduplicating IDs does not recover missing entries. Use a fixed list of IDs or paging that stays stable when earlier projects leave.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| const next = await findNextEligibleQueueProject(client, moderationQueue, candidates, true) | ||
| if (!next) return null |
There was a problem hiding this comment.
Finished skipped work stays visible
When every skipped project has already been reviewed, reviewSkippedQueue returns without removing any of those IDs. The banner keeps showing them as skipped and offering a review that cannot start. The previous flow removed unavailable IDs after checking them. Clear the unavailable candidates when next is null, while preserving the completed history.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/frontend/src/pages/moderation/index.vue
Line: 543-544
Comment:
**Finished skipped work stays visible**
When every skipped project has already been reviewed, `reviewSkippedQueue` returns without removing any of those IDs. The banner keeps showing them as skipped and offering a review that cannot start. The previous flow removed unavailable IDs after checking them. Clear the unavailable candidates when `next` is null, while preserving the completed history.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Frontend previewsLast deployed commit is 35bada4778b183a9142d9c59aca6e970775e6ca2 Persistent
Latest commit
|
No description provided.