Skip to content

fix(settings): route in-app CTAs through the settings manifest - #1037

Merged
arul28 merged 1 commit into
mainfrom
ade/4bcc2922
Aug 5, 2026
Merged

fix(settings): route in-app CTAs through the settings manifest#1037
arul28 merged 1 commit into
mainfrom
ade/4bcc2922

Conversation

@arul28

@arul28 arul28 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

What

The GitHub App banner's Authorize button navigated to /settings?tab=general#github-connection. GitHub settings moved to the Integrations tab, but the hand-written tab in that literal never moved with it — the settings shell honors ?tab=, and only scrolls to a hash whose card lives on the active tab. So the button dumped you on General and scrolled nowhere. Nine other CTAs had the same stale-literal drift (Linear ×5, voice input, background jobs).

How

  • settingsRouteFor(entryId) derives tab and anchor from the settings manifest. Every hand-written settings route across banners, callouts, empty states, the top bar, chat, lanes, PRs, account, and automations now goes through it, so a setting can't move out from under a CTA again.
  • A #hash now outranks a disagreeing ?tab= — the hash names one exact card, so links already saved by users or shipped in tour steps self-heal. The URL-canonicalizing effect also no longer drops the hash (setSearchParams did).
  • Copy: banner CTA "Authorize" → "Set up ADE GitHub App". The expired-token case stays "Re-authorize" — different action.

Tests

  • SettingsPage.test.tsx — a ?tab= disagreeing with the #hash follows the hash's tab and canonicalizes the URL with the hash intact (fails on pre-fix behavior).
  • settingsManifest.test.ts — every manifest id the app's CTAs link to resolves to a live route; unknown ids fall back to /settings.
  • Four existing route assertions rebound from stale literals to settingsRouteFor(...), so they follow a card that moves tabs.

Verification: tsc --noEmit clean, eslint 0 errors, 520 tests green across the touched folders, shard 3/8 green (1130 passed).

Windows parity: unaffected — renderer-side URL string construction and React Router state only; no paths, processes, IPC, or native modules.

🤖 Generated with Claude Code

ADE   Open in ADE  ·  ade/4bcc2922 branch  ·  PR #1037

Summary by CodeRabbit

  • Improvements
    • Settings links throughout the app now open the correct tab and section consistently.
    • Updated navigation for GitHub, Linear, AI providers, storage, dictation, lane templates, and related setup actions.
    • Settings links now remain aligned with the current URL when navigating between tabs.
    • Updated the GitHub App action label to “Set up ADE GitHub App.”
  • Bug Fixes
    • Resolved conflicts between URL tabs and section-specific links by prioritizing the relevant settings section.

The GitHub App banner's Authorize button navigated to
`/settings?tab=general#github-connection`. GitHub settings moved to the
Integrations tab, but the hand-written tab in that literal never moved with
it: the shell honors `?tab=`, and only scrolls to a hash whose card lives on
the active tab, so the button landed on General and scrolled nowhere. Nine
other CTAs had the same stale-literal drift (Linear, voice input,
background jobs).

- `settingsRouteFor(entryId)` derives tab and anchor from the manifest, so a
  setting can no longer move out from under a CTA. Every hand-written
  settings route across banners, callouts, empty states, the top bar, chat,
  lanes, PRs, account, and automations now goes through it.
- A `#hash` now outranks a disagreeing `?tab=`: the hash names one exact
  card, so older links already saved or shipped in tour steps self-heal. The
  URL-canonicalizing effect no longer drops the hash (`setSearchParams`
  did).
- Banner CTA copy: "Authorize" -> "Set up ADE GitHub App".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Aug 5, 2026 6:27pm

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds manifest-based settings route resolution, updates SettingsPage URL handling, and replaces hard-coded settings destinations across desktop navigation flows. Tests now verify generated routes and hash-priority canonicalization.

Changes

Settings routing

Layer / File(s) Summary
Manifest route resolver
apps/desktop/src/renderer/components/settings/settingsManifest.ts, apps/desktop/src/renderer/components/settings/settingsManifest.test.ts
Added settingsRouteFor for canonical manifest routes, with fallback behavior for unknown IDs.
SettingsPage URL resolution
apps/desktop/src/renderer/components/app/SettingsPage.tsx, apps/desktop/src/renderer/components/app/SettingsPage.test.tsx
Hash-owned settings now take priority over conflicting tabs. Legacy tab canonicalization preserves the current hash.
Desktop navigation migration
apps/desktop/src/renderer/components/{account,app,automations,chat,cto,lanes,prs,shared,terminals}/..., apps/desktop/src/renderer/lib/githubIntegrationStatus.ts
Updated GitHub, Linear, AI, storage, lane, dictation, and provider settings actions to use manifest-derived routes. Updated related tests and the GitHub action label.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • arul28/ADE#276: Both changes modify SettingsPage.tsx settings-tab URL resolution and canonicalization.

Suggested labels: desktop

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 29.41% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 clearly and concisely describes routing in-app CTAs through the settings manifest, which is the primary change.
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 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ade/4bcc2922

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/desktop/src/renderer/components/app/StoragePressureIndicator.test.tsx (1)

8-8: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keep an independent route oracle in this test.

The component and the expectation both call settingsRouteFor("storage.usage"). If the resolver returns an incorrect route, this test can still pass.

Assert the canonical hash from an independent fixture or literal. Alternatively, mock settingsRouteFor and verify the "storage.usage" argument.

Also applies to: 93-93

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/desktop/src/renderer/components/app/StoragePressureIndicator.test.tsx`
at line 8, Update the StoragePressureIndicator test to avoid using
settingsRouteFor as both the component dependency and expected value. Assert the
canonical storage settings hash from an independent fixture or literal, or mock
settingsRouteFor and verify it receives "storage.usage", covering both
occurrences of the resolver usage.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@apps/desktop/src/renderer/components/app/StoragePressureIndicator.test.tsx`:
- Line 8: Update the StoragePressureIndicator test to avoid using
settingsRouteFor as both the component dependency and expected value. Assert the
canonical storage settings hash from an independent fixture or literal, or mock
settingsRouteFor and verify it receives "storage.usage", covering both
occurrences of the resolver usage.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d933c454-cee7-4def-8bcb-0f1853d6a06b

📥 Commits

Reviewing files that changed from the base of the PR and between d59b20b and 31a7c94.

📒 Files selected for processing (24)
  • apps/desktop/src/renderer/components/account/AccountPage.tsx
  • apps/desktop/src/renderer/components/app/IntegrationBannerHost.tsx
  • apps/desktop/src/renderer/components/app/LinearQuickViewButton.tsx
  • apps/desktop/src/renderer/components/app/ProjectRecoveryScreen.test.tsx
  • apps/desktop/src/renderer/components/app/ProjectRecoveryScreen.tsx
  • apps/desktop/src/renderer/components/app/SettingsPage.test.tsx
  • apps/desktop/src/renderer/components/app/SettingsPage.tsx
  • apps/desktop/src/renderer/components/app/StoragePressureIndicator.test.tsx
  • apps/desktop/src/renderer/components/app/StoragePressureIndicator.tsx
  • apps/desktop/src/renderer/components/app/TopBar.test.tsx
  • apps/desktop/src/renderer/components/app/TopBar.tsx
  • apps/desktop/src/renderer/components/automations/builder/TriggerCard.tsx
  • apps/desktop/src/renderer/components/chat/AgentChatComposer.tsx
  • apps/desktop/src/renderer/components/chat/AgentChatPane.tsx
  • apps/desktop/src/renderer/components/cto/useCtoModelOptions.ts
  • apps/desktop/src/renderer/components/lanes/LanesPage.tsx
  • apps/desktop/src/renderer/components/prs/tabs/GitHubTab.tsx
  • apps/desktop/src/renderer/components/settings/AiFeaturesSection.test.tsx
  • apps/desktop/src/renderer/components/settings/settingsManifest.test.ts
  • apps/desktop/src/renderer/components/settings/settingsManifest.ts
  • apps/desktop/src/renderer/components/shared/useOpenProviderSignIn.ts
  • apps/desktop/src/renderer/components/terminals/SessionListPane.tsx
  • apps/desktop/src/renderer/components/terminals/WorkSidebar.tsx
  • apps/desktop/src/renderer/lib/githubIntegrationStatus.ts

@arul28
arul28 merged commit c21dba2 into main Aug 5, 2026
66 of 68 checks passed
@arul28
arul28 deleted the ade/4bcc2922 branch August 5, 2026 18:42
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