Skip to content

Conversation

@harshtandiya
Copy link
Collaborator

@harshtandiya harshtandiya commented Jan 10, 2026

closes #18

Summary by CodeRabbit

  • Bug Fixes
    • Improved form field processing during save to ensure proper field ordering and validation.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 10, 2026

📝 Walkthrough

Walkthrough

The save path in the edit form store now assigns a sequential 1-based index to each field in the document before validation, storing the index in a new idx property on each field object.

Changes

Cohort / File(s) Summary
Form Store Index Assignment
frontend/src/stores/editForm.ts
Added field indexing in save path: forEach now includes index parameter, assigns field.idx = index + 1 before fieldname validation; preserves existing fieldname sanitization logic

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

Hop, hop! Each field finds its place,
Indexed with one-based grace,
The save path now numbers them bright,
Sequential order, oh what a sight! 🐰✨

🚥 Pre-merge checks | ✅ 2 | ❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: ensure proper field indexing when form is saved' directly and specifically describes the main change: adding field index assignment during form save operations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d74d822 and ab039ef.

📒 Files selected for processing (1)
  • frontend/src/stores/editForm.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Server
🔇 Additional comments (1)
frontend/src/stores/editForm.ts (1)

95-102: Please provide the review comment that needs to be rewritten. I need the content within <review_comment> tags to proceed with the verification and rewriting task.


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

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

@harshtandiya harshtandiya merged commit 1cdd957 into develop Jan 10, 2026
4 checks passed
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.

bug: field reordering not working through edit form page in SPA

2 participants