Skip to content

Move settings to dedicated routes - #611

Merged
AnthonyRonning merged 1 commit into
masterfrom
codex-maple-settings-route-maple
Jul 11, 2026
Merged

Move settings to dedicated routes#611
AnthonyRonning merged 1 commit into
masterfrom
codex-maple-settings-route-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace nested settings dialogs with a full-page settings shell: persistent sidebar on desktop and a full-width animated drawer on compact portrait/short-landscape viewports.
  • Open the compact drawer as the initial destination picker, then slide it away after category selection so settings pages use the full screen; add a hamburger to reopen it.
  • Migrate account, preferences, security, billing, history, API credits/keys/proxy, and Team flows without changing capability.
  • Preserve legacy query callbacks, auth and deep-link return paths, Tauri OAuth, and in-progress chat state.
  • Block navigation during settings mutations and preserve exact internal redirect path/query/hash values across authentication.

Validation

  • nix develop .#ci -c ./scripts/ci/frontend.sh (Prettier, ESLint with 0 errors, TypeScript, 14/14 tests)
  • nix develop -c just build
  • macOS Tauri debug app build and original routed-settings manual coverage
  • Original settings flow coverage at desktop, 390x844 portrait, and 844x390 landscape with Free and Pro fixtures
  • Post-revision source audits for compact drawer state, short-landscape stacking/animation, auth hydration, focus/inert behavior, browser history, and callback routing

Test note

The local fixture manager provisions Free and Pro users only. Team-plan routes and behavior were source-parity audited because a live Team subscription requires Stripe.

The in-app browser backend was unavailable for the compact-drawer follow-up, so the new animation has build/type/static audit coverage but still needs preview-device visual confirmation.

Summary by CodeRabbit

  • New Features
    • Added a dedicated Settings area (About, Account, Billing, Security, Preferences, History, Team, API & credits, and Local proxy).
    • Added credit-success handling with a dedicated success route/page.
  • Bug Fixes
    • Hardened post-auth and post-verification redirects to only allow safe internal destinations.
    • Improved Apple sign-in and deep-link redirect sanitation and handling.
  • Changes
    • Replaced legacy in-page/account dialogs with Settings pages; simplified the account menu UI.
    • Seat-mismatch/team alerts now route directly to team settings.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6d9f6cd1-7532-43aa-844a-91265a579202

📥 Commits

Reviewing files that changed from the base of the PR and between a52d511 and f3128d2.

📒 Files selected for processing (73)
  • frontend/src-tauri/src/lib.rs
  • frontend/src/app.tsx
  • frontend/src/components/AccountDialog.tsx
  • frontend/src/components/AccountMenu.tsx
  • frontend/src/components/AppleAuthProvider.tsx
  • frontend/src/components/AuthenticatedHomeContent.tsx
  • frontend/src/components/ChangePasswordDialog.tsx
  • frontend/src/components/DeepLinkHandler.tsx
  • frontend/src/components/DeleteAccountDialog.tsx
  • frontend/src/components/PreferencesDialog.tsx
  • frontend/src/components/UpgradePromptDialog.tsx
  • frontend/src/components/VerificationModal.tsx
  • frontend/src/components/apikeys/ApiKeyDashboard.tsx
  • frontend/src/components/apikeys/ApiKeyManagementDialog.tsx
  • frontend/src/components/apikeys/ApiKeysList.tsx
  • frontend/src/components/apikeys/CreateApiKeyDialog.tsx
  • frontend/src/components/settings/AboutSettings.tsx
  • frontend/src/components/settings/AccountSettings.tsx
  • frontend/src/components/settings/BillingSettings.tsx
  • frontend/src/components/settings/DeleteAccountSettings.tsx
  • frontend/src/components/settings/HistorySettings.tsx
  • frontend/src/components/settings/PreferencesSettings.tsx
  • frontend/src/components/settings/SecuritySettings.tsx
  • frontend/src/components/settings/SettingsLayout.tsx
  • frontend/src/components/settings/SettingsNavigationLockProvider.tsx
  • frontend/src/components/settings/SettingsPage.tsx
  • frontend/src/components/settings/api/ApiCreditsSettings.tsx
  • frontend/src/components/settings/api/ApiKeysSettings.tsx
  • frontend/src/components/settings/api/ApiSettingsLayout.tsx
  • frontend/src/components/settings/api/CreateApiKeySettings.tsx
  • frontend/src/components/settings/api/LocalProxySettings.tsx
  • frontend/src/components/settings/api/useApiKeys.ts
  • frontend/src/components/settings/team/TeamInviteSettings.tsx
  • frontend/src/components/settings/team/TeamMembersSettings.tsx
  • frontend/src/components/settings/team/TeamSettings.tsx
  • frontend/src/components/settings/useCompactSettingsLayout.ts
  • frontend/src/components/team/TeamDashboard.tsx
  • frontend/src/components/team/TeamInviteDialog.tsx
  • frontend/src/components/team/TeamManagementDialog.tsx
  • frontend/src/components/team/TeamMembersList.tsx
  • frontend/src/components/team/TeamSeatMismatchAlert.tsx
  • frontend/src/components/team/TeamSetupDialog.tsx
  • frontend/src/contexts/PersistentHomeNavigationContext.ts
  • frontend/src/contexts/SettingsNavigationLockContext.ts
  • frontend/src/routeTree.gen.ts
  • frontend/src/routes/__root.tsx
  • frontend/src/routes/auth.$provider.callback.tsx
  • frontend/src/routes/desktop-auth.tsx
  • frontend/src/routes/index.tsx
  • frontend/src/routes/login.tsx
  • frontend/src/routes/payment-success-credits.tsx
  • frontend/src/routes/settings.about.tsx
  • frontend/src/routes/settings.account.tsx
  • frontend/src/routes/settings.api.index.tsx
  • frontend/src/routes/settings.api.keys.index.tsx
  • frontend/src/routes/settings.api.keys.new.tsx
  • frontend/src/routes/settings.api.keys.tsx
  • frontend/src/routes/settings.api.proxy.tsx
  • frontend/src/routes/settings.api.tsx
  • frontend/src/routes/settings.billing.tsx
  • frontend/src/routes/settings.delete-account.tsx
  • frontend/src/routes/settings.history.tsx
  • frontend/src/routes/settings.index.tsx
  • frontend/src/routes/settings.preferences.tsx
  • frontend/src/routes/settings.security.tsx
  • frontend/src/routes/settings.team.index.tsx
  • frontend/src/routes/settings.team.invite.tsx
  • frontend/src/routes/settings.team.tsx
  • frontend/src/routes/settings.tsx
  • frontend/src/routes/signup.tsx
  • frontend/src/routes/verify.$code.tsx
  • frontend/src/utils/internalRedirect.test.ts
  • frontend/src/utils/internalRedirect.ts
💤 Files with no reviewable changes (14)
  • frontend/src/components/AccountDialog.tsx
  • frontend/src/components/team/TeamSetupDialog.tsx
  • frontend/src/components/apikeys/ApiKeyManagementDialog.tsx
  • frontend/src/components/team/TeamDashboard.tsx
  • frontend/src/components/team/TeamManagementDialog.tsx
  • frontend/src/components/ChangePasswordDialog.tsx
  • frontend/src/components/apikeys/CreateApiKeyDialog.tsx
  • frontend/src/components/team/TeamInviteDialog.tsx
  • frontend/src/components/team/TeamMembersList.tsx
  • frontend/src/app.tsx
  • frontend/src/components/DeleteAccountDialog.tsx
  • frontend/src/components/PreferencesDialog.tsx
  • frontend/src/components/apikeys/ApiKeysList.tsx
  • frontend/src/components/apikeys/ApiKeyDashboard.tsx
✅ Files skipped from review due to trivial changes (9)
  • frontend/src/routes/settings.preferences.tsx
  • frontend/src/routes/settings.api.tsx
  • frontend/src/routes/settings.api.keys.index.tsx
  • frontend/src/routes/settings.security.tsx
  • frontend/src/routes/settings.about.tsx
  • frontend/src/routes/settings.delete-account.tsx
  • frontend/src/routes/settings.api.keys.new.tsx
  • frontend/src/routes/settings.account.tsx
  • frontend/src/routeTree.gen.ts
🚧 Files skipped from review as they are similar to previous changes (47)
  • frontend/src/components/UpgradePromptDialog.tsx
  • frontend/src/components/settings/SettingsNavigationLockProvider.tsx
  • frontend/src/routes/settings.index.tsx
  • frontend/src/routes/payment-success-credits.tsx
  • frontend/src/routes/settings.api.proxy.tsx
  • frontend/src/components/settings/useCompactSettingsLayout.ts
  • frontend/src/contexts/PersistentHomeNavigationContext.ts
  • frontend/src/components/settings/api/ApiCreditsSettings.tsx
  • frontend/src/routes/settings.team.invite.tsx
  • frontend/src/routes/settings.team.index.tsx
  • frontend/src/routes/settings.tsx
  • frontend/src/routes/settings.api.keys.tsx
  • frontend/src/components/settings/api/LocalProxySettings.tsx
  • frontend/src/components/settings/api/useApiKeys.ts
  • frontend/src/routes/settings.history.tsx
  • frontend/src/components/settings/SettingsPage.tsx
  • frontend/src/components/settings/BillingSettings.tsx
  • frontend/src/utils/internalRedirect.test.ts
  • frontend/src/routes/settings.api.index.tsx
  • frontend/src/contexts/SettingsNavigationLockContext.ts
  • frontend/src/routes/settings.team.tsx
  • frontend/src/components/settings/AboutSettings.tsx
  • frontend/src/components/team/TeamSeatMismatchAlert.tsx
  • frontend/src/components/settings/SecuritySettings.tsx
  • frontend/src/components/settings/api/ApiKeysSettings.tsx
  • frontend/src/components/settings/api/CreateApiKeySettings.tsx
  • frontend/src/routes/settings.billing.tsx
  • frontend/src/routes/auth.$provider.callback.tsx
  • frontend/src/routes/verify.$code.tsx
  • frontend/src/components/settings/team/TeamMembersSettings.tsx
  • frontend/src/components/AppleAuthProvider.tsx
  • frontend/src/routes/desktop-auth.tsx
  • frontend/src/routes/__root.tsx
  • frontend/src/components/settings/HistorySettings.tsx
  • frontend/src/components/settings/api/ApiSettingsLayout.tsx
  • frontend/src/components/VerificationModal.tsx
  • frontend/src/components/settings/AccountSettings.tsx
  • frontend/src/components/settings/team/TeamInviteSettings.tsx
  • frontend/src-tauri/src/lib.rs
  • frontend/src/components/AuthenticatedHomeContent.tsx
  • frontend/src/components/AccountMenu.tsx
  • frontend/src/components/settings/SettingsLayout.tsx
  • frontend/src/components/settings/team/TeamSettings.tsx
  • frontend/src/routes/login.tsx
  • frontend/src/components/settings/PreferencesSettings.tsx
  • frontend/src/routes/index.tsx
  • frontend/src/routes/signup.tsx

📝 Walkthrough

Walkthrough

The PR migrates account, team, billing, API, and history workflows from dialogs into routed settings pages, preserves authenticated home navigation, centralizes internal redirect sanitization, and updates OAuth, payment, deep-link, and route handling.

Changes

Settings migration and navigation

Layer / File(s) Summary
Secure redirects and authentication
frontend/src/utils/*, frontend/src/routes/login.tsx, frontend/src/routes/signup.tsx, frontend/src/routes/auth.$provider.callback.tsx, frontend/src/components/AppleAuthProvider.tsx, frontend/src/components/DeepLinkHandler.tsx
Centralizes safe internal redirect validation and applies it to web, Tauri, Apple, verification, and deep-link flows. Credit-payment deep links route through API settings.
Settings shell and account workflows
frontend/src/components/settings/*, frontend/src/routes/settings*.tsx
Adds routed settings layout, navigation locking, account, billing, security, preferences, history, deletion, and about pages.
API and team settings
frontend/src/components/settings/api/*, frontend/src/components/settings/team/*, frontend/src/routes/settings.api*.tsx, frontend/src/routes/settings.team*.tsx
Adds billing-gated API, API-key, local-proxy, team, invitation, membership, and subscription settings workflows.
Home and route integration
frontend/src/routes/__root.tsx, frontend/src/routes/index.tsx, frontend/src/components/AuthenticatedHomeContent.tsx, frontend/src/routeTree.gen.ts
Keeps authenticated home content mounted during settings navigation, redirects legacy query parameters to settings routes, and registers settings and payment routes.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related issues

Possibly related PRs

Poem

A rabbit hopped through settings bright,
With keys and teams arranged just right.
Safe redirects danced in a row,
While home stayed warm beneath the glow.
“New routes!” cried Bun, and twitched his nose.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: moving settings UI into dedicated routes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex-maple-settings-route-maple

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 10, 2026

Copy link
Copy Markdown

Deploying maple with  Cloudflare Pages  Cloudflare Pages

Latest commit: f3128d2
Status: ✅  Deploy successful!
Preview URL: https://c4fdb83e.maple-ca8.pages.dev
Branch Preview URL: https://codex-maple-settings-route-m.maple-ca8.pages.dev

View logs

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@AnthonyRonning

Copy link
Copy Markdown
Contributor Author

Follow-up pushed in cc81b88:

  • compact settings now open as a full-width animated drawer, close after selection, and reopen from a hamburger while the page uses the full viewport
  • portrait and short-landscape state, focus/inert handling, Escape dismissal, back/forward behavior, and desktop canonical routing were audited
  • dynamic internal redirects now use sanitized router-history navigation so path, query, and hash survive login/signup/OAuth/email verification flows
  • addressed the valid History deletion, Security resubmission, iOS product-fetch retry, payment cancellation, and stale OAuth session findings

Validation: frontend CI passes with 0 lint errors, TypeScript clean, 14/14 tests, production build green, and git diff --check clean.

@AnthonyRonning

Copy link
Copy Markdown
Contributor Author

Follow-up independent audit completed and pushed in a52d5115.

Applied the two validated high-impact fixes plus one tiny responsive consistency improvement:

  • reuse Maple’s compatibility-safe media-query hooks for older WebKit
  • align compact settings behavior with the existing <768px mobile breakpoint
  • stop logging raw native auth callback URLs and process arguments

Revalidation passed: frontend formatting/lint/typecheck, 14 frontend tests, production build, Rust formatting/check, and 9 Rust tests. The focused post-fix re-audits found no new high/critical issues.

@AnthonyRonning
AnthonyRonning force-pushed the codex-maple-settings-route-maple branch from a52d511 to f3128d2 Compare July 11, 2026 06:19
@AnthonyRonning

Copy link
Copy Markdown
Contributor Author

Rebased onto current master and force-pushed as a single commit: f3128d24.

The Agent Mode core remains byte-identical to master; the routed settings replacements now preserve Agent-safe auth transition, logout, history deletion, account deletion, proxy credential reset, and shared API-access gating.

Validation passed: Prettier, TypeScript, production build, 65 frontend tests, Rust formatting/check, and all 60 Rust tests.

@AnthonyRonning
AnthonyRonning merged commit e892ddb into master Jul 11, 2026
17 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-maple-settings-route-maple branch July 11, 2026 06:31
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