Skip to content

Conversation

@dillchen
Copy link
Contributor

@dillchen dillchen commented Dec 26, 2025

Summary

  • prevent CommentEditor from instantiating its own Turnstile widget and accept tokens from parent instead
  • forward StickyInput turnstile state into CommentEditor so the submit button no longer stays disabled when verification is complete

Testing

  • not run (not requested)

Codex Task


Note

Decouples Turnstile from CommentEditor and centralizes verification in StickyInput for reliable submit gating.

  • Removes internal Turnstile hook from CommentEditor; adds props: isTurnstileEnabled, turnstileToken, resetTurnstile, TurnstileWidget
  • Uses TurnstileWidgetComponent fallback and renders widget when enabled; guards resetTurnstile calls with optional chaining
  • Submission flow in CommentEditor now validates turnstileToken, passes it to handleSubmitComment, and re-enables reset on errors
  • Disables "Post" until verified when Turnstile is enabled
  • StickyInput retains Turnstile via useTurnstile(...) and forwards turnstileToken/resetTurnstile/TurnstileWidget/isTurnstileEnabled to CommentEditor; also gates quick-submit/send button on token

Written by Cursor Bugbot for commit c0afc55. This will update automatically on new commits. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants