Skip to content

ref(projects): Convert deprecated project redirect to hooks#115249

Open
scttcper wants to merge 2 commits intomasterfrom
scttcper/project-route-hooks
Open

ref(projects): Convert deprecated project redirect to hooks#115249
scttcper wants to merge 2 commits intomasterfrom
scttcper/project-route-hooks

Conversation

@scttcper
Copy link
Copy Markdown
Member

@scttcper scttcper commented May 8, 2026

The deprecated project redirect route still had a class wrapper doing its own API request. This switches it over to useDetailedProject so it shares the detailed project query cache and keeps collapse=organization behavior in one place.

Adds coverage for the successful redirect path and the project 404 state.

The legacy redirect route still used a class wrapper and api.requestPromise. Use the shared detailed project query so it shares cache behavior and keeps the collapse option in one place.

Adds tests for the redirect and 404 cases.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 8, 2026
Avoid casting the query error just to check for a 404. RequestError is a real class, so use instanceof and let TypeScript narrow it.

Co-Authored-By: Codex GPT-5 <noreply@openai.com>
@scttcper scttcper marked this pull request as ready for review May 8, 2026 23:39
@scttcper scttcper requested a review from a team May 8, 2026 23:39
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.46%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant