fix(runtime): make the connector Connect button a real navigation - #30
Merged
Conversation
Kumo's LinkProvider routes every Kumo link through RouterLink, which rendered a TanStack <Link to> for every href. The Connections dialog's "Connect" button (and SourceDoc's file/external links) point at server routes under /api/, so clicking them did a client-side SPA navigation to a route with no client component — the router fell through to $appId's notFoundComponent and showed "App not found". The browser never reached the handler that 302s to the OAuth provider. The multi-app migration surfaced it: $appId (and its "App not found" notFoundComponent) is what now renders for the unmatched client route. RouterLink now renders a plain <a href> for destinations that aren't client routes — server endpoints under /api/ and external URLs — so they do a real browser navigation. In-app paths still use the router.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Clicking Connect in the Connections dialog landed on
App not found / Available apps: …instead of starting the OAuth flow:Root cause
Kumo's
LinkProviderroutes every Kumo link throughRouterLink, which rendered a TanStack<Link to>for every href. The "Connect"LinkButton(andSourceDoc's file/external links) point at server routes under/api/. A<Link>does a client-side SPA navigation, so clicking Connect navigated the router to/api/connectors/.../auth/start— a route with no client component. The router fell through to$appId'snotFoundComponent("App not found"), and the browser never reached the server handler that 302s to the OAuth provider.The bug is latent (
RouterLinkhas been this way since the start), but the multi-app migration is what surfaced this message: the$appIdroute — and its "App not found / Available apps"notFoundComponent— is what now renders for the unmatched client route.Fix
RouterLinknow renders a plain<a href>(a real browser navigation) for destinations that aren't client routes — server endpoints under/api/and external URLs — while in-app paths keep using the router. This is the single seam every Kumo link passes through, so it also fixesSourceDoc's/api/filedownload button and external source links, which had the same latent break.Verification
Driven in a real browser against the example workspace:
/api/connectors/whoop/auth/start?app=health, page shows "App not found / Available apps: finance, health, …".Added
test/routerLink.test.tsxto lock the behavior (a/api/href and an external URL must render real anchors).pnpm typecheck/test(383 passing) /lintall green.