Skip to content

fix: fix coderabbit corrections#124

Merged
Benjtalkshow merged 1 commit intoboundlessfi:mainfrom
Benjtalkshow:feat/submission-draft-system
Feb 26, 2026
Merged

fix: fix coderabbit corrections#124
Benjtalkshow merged 1 commit intoboundlessfi:mainfrom
Benjtalkshow:feat/submission-draft-system

Conversation

@Benjtalkshow
Copy link
Contributor

@Benjtalkshow Benjtalkshow commented Feb 26, 2026

Fixed Pr #119

Summary by CodeRabbit

  • Bug Fixes
    • Improved draft auto-save reliability by fixing hydration timing issues.
    • Prevented unintended page reloads when submitting forms.

@vercel
Copy link

vercel bot commented Feb 26, 2026

@Benjtalkshow is attempting to deploy a commit to the Threadflow Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 94fbe90 and 2c45d5e.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • components/bounty-detail/bounty-detail-submissions-card.tsx
  • docs/SUBMISSION_DRAFTS_EXAMPLE.tsx
  • hooks/__tests__/use-submission-draft.test.ts
  • hooks/use-submission-draft.ts

📝 Walkthrough

Walkthrough

Updates auto-save and hydration handling in submission draft functionality. Introduces hydration state flag to gate auto-save effects, modifies auto-save behavior to always save on timeout, and adds explicit form submission prevention. Updates related tests and documentation examples.

Changes

Cohort / File(s) Summary
Auto-save & Hydration Logic
components/bounty-detail/bounty-detail-submissions-card.tsx, hooks/use-submission-draft.ts
Introduces isHydrated state flag to gate auto-save effects post-hydration; updates auto-save to always save on timeout (previously conditional); updates dependency arrays and minor formatting adjustments.
Test Updates
hooks/__tests__/use-submission-draft.test.ts
Refactors "auto-save after delay" test to use fake timers with manual time advancement instead of async waitFor, enabling synchronous verification of auto-save behavior.
Documentation & Examples
docs/SUBMISSION_DRAFTS_EXAMPLE.tsx
Adds form event handling with preventDefault() to explicit handleSubmit handler; binds form onSubmit to handler, preventing full page reload on submission.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • 0xdevcollins

Poem

A hydrated hop through draft-save lanes,
No more timing's twisted pains,
Forms submit with grace and care,
Tests now tick with timers fair,
Drafts persist with whisker-snare! 🐰✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

@Benjtalkshow Benjtalkshow merged commit 3aad250 into boundlessfi:main Feb 26, 2026
1 of 3 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.

1 participant