Skip to content

feat: disable Circom for client-side ZK framework#291

Merged
rutefig merged 1 commit into
mainfrom
rutefig/reg-640-frontend-block-circom-for-client-side-zk-framework-on
Jan 17, 2026
Merged

feat: disable Circom for client-side ZK framework#291
rutefig merged 1 commit into
mainfrom
rutefig/reg-640-frontend-block-circom-for-client-side-zk-framework-on

Conversation

@rutefig

@rutefig rutefig commented Jan 16, 2026

Copy link
Copy Markdown
Member

Summary

Disable Circom as an option for client-side ZK framework, defaulting to Noir instead. Fixes the empty dropdown bug where the default value didn't match any available options.

Type of Change

  • Bug fix (hotfix)
  • New feature
  • Refactor
  • Documentation
  • Other (please describe)

Target Branch

  • dev - New feature or non-urgent fix
  • staging - Ready for QA validation
  • main - Hotfix for production issue

Changes Made

  • Default clientZkFramework changed from Circom to Noir in store initial state
  • Removed assignPreferredZkFramework() SDK calls that could override user selections
  • Cleaned up client framework dropdown options and TODO comments
  • Fixed local proving check from serverZkFramework to clientZkFramework
  • Updated fallback messages to be framework-agnostic ("Local proving is not available for this blueprint")

Breaking Changes

None. Existing blueprints with clientZkFramework: Circom retain their stored value. Download code still supports Circom for legacy blueprints.

Testing

  • Tested locally
  • Added/updated tests
  • Verified in development environment

Manual testing completed:

  • New blueprint defaults to Noir in dropdown (not empty)
  • Loading existing blueprint preserves saved framework values

Checklist

  • Code follows the project's style guidelines
  • Self-review completed
  • Comments added for complex code sections
  • Documentation updated if needed
  • No new warnings generated

Screenshots/Recordings

Screenshot 2026-01-16 at 18 56 45

Related Issues

Fixes REG-640

Additional Notes

  • Server-side Circom support remains intact
  • Circom client-side download code preserved for legacy blueprints and future re-enablement
  • To re-enable Circom: uncomment the option in EmailDetails.tsx dropdown

Summary by CodeRabbit

Release Notes

  • Updates
    • Local Proving guidance message updated for clarity.
    • Circom removed from Client ZK Framework options; Noir is now the only available choice.
    • Default Client ZK Framework changed to Noir.
    • Framework selection now requires manual configuration through the UI.

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

- Default clientZkFramework to Noir instead of Circom
- Remove assignPreferredZkFramework SDK calls that override user selections
- Clean up client framework dropdown to only show Noir option
- Update local proving messages to be framework-agnostic
@rutefig rutefig requested review from BornPsych and wryonik January 16, 2026 18:58
@rutefig rutefig self-assigned this Jan 16, 2026
@zkemailverify zkemailverify temporarily deployed to rutefig/reg-640-frontend-block-circom-for-client-side-zk-framework-on - registry PR #291 January 16, 2026 18:59 — with Render Destroyed
@coderabbitai

coderabbitai Bot commented Jan 16, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The pull request updates Local Proving availability messaging and changes how ZK frameworks are selected during blueprint creation. The default Client ZK Framework is switched from Circom to Noir, and automatic framework inference logic is removed in favor of explicit user selection through the UI.

Changes

Cohort / File(s) Summary
Local Proving Guidance Updates
src/app/[id]/AddInputs.tsx, src/app/[id]/SelectEmails.tsx
Updated Local Proving guidance text from "Local proving only works for blueprints compiled with Circom" to "Local proving is not available for this blueprint". In SelectEmails.tsx, the conditional check for availability changes from serverZkFramework to clientZkFramework.
ZK Framework Selection Simplification
src/app/create/[id]/createBlueprintSteps/EmailDetails.tsx, src/app/create/[id]/store.ts
Removed Circom from Client ZK Framework options (commented as TODO), leaving only Noir. Eliminated automatic framework inference logic that previously assigned frameworks based on email content; framework selection now relies on user-driven UI choices and simplified defaults.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • wryonik
  • BornPsych

Poem

🐰 A rabbit hops through frameworks new,
Noir now chosen, Circom bid adieu,
No more guessing from email sight,
Users pick their proving light,
Local ways now crystal-bright! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: disabling Circom as a client-side ZK framework option, which aligns with all file changes across the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 4a07f20 and 6c8d0f3.

📒 Files selected for processing (4)
  • src/app/[id]/AddInputs.tsx
  • src/app/[id]/SelectEmails.tsx
  • src/app/create/[id]/createBlueprintSteps/EmailDetails.tsx
  • src/app/create/[id]/store.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: test
🔇 Additional comments (5)
src/app/[id]/AddInputs.tsx (1)

137-146: LGTM!

The updated messaging is now framework-agnostic, correctly indicating that local proving is unavailable without referencing a specific framework. The condition logic properly checks clientZkFramework rather than serverZkFramework.

src/app/create/[id]/createBlueprintSteps/EmailDetails.tsx (1)

258-262: LGTM!

Good approach to disable Circom by commenting it out with a TODO rather than deleting. This preserves the option for easy re-enablement once client-side Circom proving is fixed, while achieving the immediate goal of blocking Circom selection.

src/app/create/[id]/store.ts (2)

66-67: LGTM!

The default client framework is correctly updated to Noir while preserving Circom for server-side use. This aligns with the PR objective, and existing blueprints will retain their stored values through the Zustand persist middleware.


203-205: LGTM!

Good documentation clarifying that framework selection is now user-driven via UI dropdowns. Removing the automatic assignPreferredZkFramework() inference simplifies the flow and prevents unexpected overrides of user selections.

src/app/[id]/SelectEmails.tsx (1)

502-511: LGTM on the framework check and messaging update.

Correctly uses clientZkFramework (not serverZkFramework) to determine local proving availability, and the message is now framework-agnostic, consistent with the changes in AddInputs.tsx.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/app/[id]/SelectEmails.tsx (1)

478-481: Click handler missing framework check present in the disabled styling.

The disabled state at lines 470-475 includes the clientZkFramework check, but the click handler at line 479 only guards against selectedEmail === null || !!isCreateProofLoading. If clientZkFramework is None, the card appears disabled (via CSS) but clicking it will still invoke handleStartProofGeneration(true).

Proposed fix
 onClick={() => {
-  if (selectedEmail === null || !!isCreateProofLoading) return;
+  if (
+    selectedEmail === null ||
+    !!isCreateProofLoading ||
+    !blueprint?.props.clientZkFramework ||
+    // `@ts-ignore` ZkFramework can be None
+    blueprint?.props.clientZkFramework === ZkFramework.None
+  ) return;
   handleStartProofGeneration(true);
 }}
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4a07f20 and 6c8d0f3.

📒 Files selected for processing (4)
  • src/app/[id]/AddInputs.tsx
  • src/app/[id]/SelectEmails.tsx
  • src/app/create/[id]/createBlueprintSteps/EmailDetails.tsx
  • src/app/create/[id]/store.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: test
🔇 Additional comments (5)
src/app/[id]/AddInputs.tsx (1)

137-146: LGTM!

The updated messaging is now framework-agnostic, correctly indicating that local proving is unavailable without referencing a specific framework. The condition logic properly checks clientZkFramework rather than serverZkFramework.

src/app/create/[id]/createBlueprintSteps/EmailDetails.tsx (1)

258-262: LGTM!

Good approach to disable Circom by commenting it out with a TODO rather than deleting. This preserves the option for easy re-enablement once client-side Circom proving is fixed, while achieving the immediate goal of blocking Circom selection.

src/app/create/[id]/store.ts (2)

66-67: LGTM!

The default client framework is correctly updated to Noir while preserving Circom for server-side use. This aligns with the PR objective, and existing blueprints will retain their stored values through the Zustand persist middleware.


203-205: LGTM!

Good documentation clarifying that framework selection is now user-driven via UI dropdowns. Removing the automatic assignPreferredZkFramework() inference simplifies the flow and prevents unexpected overrides of user selections.

src/app/[id]/SelectEmails.tsx (1)

502-511: LGTM on the framework check and messaging update.

Correctly uses clientZkFramework (not serverZkFramework) to determine local proving availability, and the message is now framework-agnostic, consistent with the changes in AddInputs.tsx.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@BornPsych BornPsych left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rutefig rutefig merged commit 36a456d into main Jan 17, 2026
2 of 3 checks passed
@rutefig rutefig deleted the rutefig/reg-640-frontend-block-circom-for-client-side-zk-framework-on branch January 17, 2026 08:59
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.

3 participants