[task/add] fix missing projects in task form dropdown#35
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughAdds a ChangesFull project list loading
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
frontend/src/lib/api/projects.ts (1)
10-25: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low valueConsider a safety cap on pagination loop.
If the backend ever returns an inconsistent
total(e.g., stays aboveoffsetwhile items shrink/duplicate), the loop has no upper bound and could spin many iterations. The existing empty-page break mitigates most cases, but a max-iterations guard would be a cheap safeguard against a misbehaving/buggy API response.🤖 Prompt for 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. In `@frontend/src/lib/api/projects.ts` around lines 10 - 25, The pagination loop in listAllProjects can still run too long if listProjects returns an inconsistent total, so add a hard upper bound on iterations as a safety guard. Update listAllProjects to track the number of pages fetched and stop after a reasonable maximum, while keeping the existing offset/page.items.length logic and empty-page break. Use the listAllProjects and listProjects symbols to locate the loop and make the cap easy to adjust.
🤖 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.
Nitpick comments:
In `@frontend/src/lib/api/projects.ts`:
- Around line 10-25: The pagination loop in listAllProjects can still run too
long if listProjects returns an inconsistent total, so add a hard upper bound on
iterations as a safety guard. Update listAllProjects to track the number of
pages fetched and stop after a reasonable maximum, while keeping the existing
offset/page.items.length logic and empty-page break. Use the listAllProjects and
listProjects symbols to locate the loop and make the cap easy to adjust.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fe68e77d-ace2-49b4-8592-433713a4baa4
📒 Files selected for processing (3)
frontend/src/lib/api/projects.tsfrontend/src/lib/pages/task-edit.sveltefrontend/src/lib/pages/task-new.svelte
🤖 Pull request artifacts
|
32ae545 to
a9c1c45
Compare
capcom6
left a comment
There was a problem hiding this comment.
- Объедините коммиты
- В сообщении к коммиту в квадратных скобках указывайте имя модуля приложения, почти всегда совпадающее с каталогом в который вносили правки. В Вашем случае это
[frontend].
a9c1c45 to
db9c850
Compare
|
А что изменилось? |
db9c850 to
939ca3a
Compare
Summary by CodeRabbit