[codex] Keep post-auth routing compatible with React lint#319
Draft
404kidwiz wants to merge 1 commit into
Draft
Conversation
Move pending MCP redirect parsing out of JSX construction so the route component keeps rendering pure while preserving the same fallback behavior. Constraint: React lint forbids constructing JSX inside try/catch because render errors are not caught that way. Rejected: Suppress the eslint rule | The helper is smaller and keeps the rule useful. Confidence: high Scope-risk: narrow Directive: Preserve the one-shot sessionStorage consume behavior for interrupted MCP OAuth redirects. Tested: pnpm --filter @memwal/app lint; pnpm --filter @memwal/app build; cargo test in services/server; cargo test in services/indexer Not-tested: Live OAuth MCP redirect flow in browser
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.
Summary
Moves pending MCP redirect parsing out of JSX construction so the app route component satisfies React lint while preserving the existing one-shot sessionStorage redirect behavior.
Why
React lint flags JSX construction inside
try/catchbecause render errors are not caught by that pattern. The new helper keeps parsing/fallback behavior separate from rendering without changing the redirect target or dashboard fallback.Verified
pnpm --filter @memwal/app lintpnpm --filter @memwal/app buildcargo testinservices/server->299 passedcargo testinservices/indexer->9 passedNot tested