Skip to content

Conversation

@transphorm
Copy link
Member

@transphorm transphorm commented Jan 19, 2026

Motivation

  • Simplify the settings UX by removing the redundant skipDocumentSelectorIfSingle toggle and making routing deterministic when there is exactly one valid document.

Description

  • Removed the Skip when only one document toggle and related divider from app/src/screens/account/settings/ProofSettingsScreen.tsx and also removed the now-unused informational text and style.
  • Dropped the skipDocumentSelectorIfSingle state and its setter from app/src/stores/settingStore.ts so the setting store only exposes skipDocumentSelector and setSkipDocumentSelector.
  • Updated app/src/screens/verification/ProvingScreenRouter.tsx to compute shouldSkip as skipDocumentSelector || validCount === 1, automatically skipping the selector when there is one valid document and removing references to the removed store property.

Testing

  • No automated tests were run for these changes.

Codex Task


Note

Simplifies proving flow and settings by removing the per-single-document skip toggle and making single-document routing deterministic.

  • Remove Skip when only one document UI (and info text/divider) from ProofSettingsScreen.tsx; keep only skipDocumentSelector toggle
  • Drop skipDocumentSelectorIfSingle and its setter from settingStore.ts
  • Update ProvingScreenRouter.tsx to skip selector when skipDocumentSelector is true or validCount === 1; remove references to deleted setting
  • Adjust tests in ProvingScreenRouter.test.tsx to cover multi-document path when skipping is disabled

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

Summary by CodeRabbit

  • Refactor

    • Removed the "Skip when only one document" setting from account settings; a single toggle now controls document selection skipping.
    • Routing and settings simplified so document selection is automatically skipped when only one valid document exists.
  • Tests

    • Updated verification routing test to cover behavior with multiple documents.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

📝 Walkthrough

Walkthrough

Removed the skipDocumentSelectorIfSingle persisted setting and its UI; routing now auto-skips the document selector when validCount === 1 or when skipDocumentSelector is enabled.

Changes

Cohort / File(s) Summary
Store Configuration
app/src/stores/settingStore.ts
Removed skipDocumentSelectorIfSingle boolean and its setter from PersistedSettingsState and initial store wiring.
UI Layer
app/src/screens/account/settings/ProofSettingsScreen.tsx
Removed destructuring and UI for skipDocumentSelectorIfSingle (divider, toggle row, description, italic info); retained primary skipDocumentSelector toggle and removed related styles.
Routing Logic & Tests
app/src/screens/verification/ProvingScreenRouter.tsx, app/tests/src/screens/verification/ProvingScreenRouter.test.tsx
Eliminated use of skipDocumentSelectorIfSingle; simplified skip decision to `shouldSkip = skipDocumentSelector

Sequence Diagram(s)

(omitted — changes are limited and do not introduce multi-component control flow requiring visualization)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • remicolin

Poem

🗂️ One toggle gone, the flow made tight,
Paths converge now — one clear light,
Fewer forks to find,
Cleaner state and mind,
Code rests easy in the night. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing the redundant toggle and making single-document routing automatic, which aligns with all file modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description covers all required sections: motivation, implementation details, and testing status. It clearly explains the changes made across multiple files and the rationale for simplification.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@transphorm transphorm merged commit 04f67ed into dev Jan 20, 2026
25 checks passed
@transphorm transphorm deleted the codex/remove-automatic-document-selection-option branch January 20, 2026 21:11
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