Skip to content

[codex] Keep post-auth routing compatible with React lint#319

Draft
404kidwiz wants to merge 1 commit into
MystenLabs:devfrom
404kidwiz:codex/post-auth-routing-lint
Draft

[codex] Keep post-auth routing compatible with React lint#319
404kidwiz wants to merge 1 commit into
MystenLabs:devfrom
404kidwiz:codex/post-auth-routing-lint

Conversation

@404kidwiz

Copy link
Copy Markdown

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/catch because 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 lint
  • pnpm --filter @memwal/app build
  • cargo test in services/server -> 299 passed
  • cargo test in services/indexer -> 9 passed

Not tested

  • Live browser OAuth MCP redirect flow.

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
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