fix(settings): route in-app CTAs through the settings manifest - #1037
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
📝 WalkthroughWalkthroughThe change adds manifest-based settings route resolution, updates ChangesSettings routing
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/desktop/src/renderer/components/app/StoragePressureIndicator.test.tsx (1)
8-8: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep 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
settingsRouteForand 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
📒 Files selected for processing (24)
apps/desktop/src/renderer/components/account/AccountPage.tsxapps/desktop/src/renderer/components/app/IntegrationBannerHost.tsxapps/desktop/src/renderer/components/app/LinearQuickViewButton.tsxapps/desktop/src/renderer/components/app/ProjectRecoveryScreen.test.tsxapps/desktop/src/renderer/components/app/ProjectRecoveryScreen.tsxapps/desktop/src/renderer/components/app/SettingsPage.test.tsxapps/desktop/src/renderer/components/app/SettingsPage.tsxapps/desktop/src/renderer/components/app/StoragePressureIndicator.test.tsxapps/desktop/src/renderer/components/app/StoragePressureIndicator.tsxapps/desktop/src/renderer/components/app/TopBar.test.tsxapps/desktop/src/renderer/components/app/TopBar.tsxapps/desktop/src/renderer/components/automations/builder/TriggerCard.tsxapps/desktop/src/renderer/components/chat/AgentChatComposer.tsxapps/desktop/src/renderer/components/chat/AgentChatPane.tsxapps/desktop/src/renderer/components/cto/useCtoModelOptions.tsapps/desktop/src/renderer/components/lanes/LanesPage.tsxapps/desktop/src/renderer/components/prs/tabs/GitHubTab.tsxapps/desktop/src/renderer/components/settings/AiFeaturesSection.test.tsxapps/desktop/src/renderer/components/settings/settingsManifest.test.tsapps/desktop/src/renderer/components/settings/settingsManifest.tsapps/desktop/src/renderer/components/shared/useOpenProviderSignIn.tsapps/desktop/src/renderer/components/terminals/SessionListPane.tsxapps/desktop/src/renderer/components/terminals/WorkSidebar.tsxapps/desktop/src/renderer/lib/githubIntegrationStatus.ts
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.#hashnow 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 (setSearchParamsdid).Tests
SettingsPage.test.tsx— a?tab=disagreeing with the#hashfollows 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.settingsRouteFor(...), so they follow a card that moves tabs.Verification:
tsc --noEmitclean, 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
Summary by CodeRabbit