Skip to content

feat(frontend): Handle moved and split features#1826

Merged
jcscottiii merged 2 commits intomainfrom
jcscottiii/v3-frontend-changes
Sep 16, 2025
Merged

feat(frontend): Handle moved and split features#1826
jcscottiii merged 2 commits intomainfrom
jcscottiii/v3-frontend-changes

Conversation

@jcscottiii
Copy link
Collaborator

@jcscottiii jcscottiii commented Sep 16, 2025

This commit introduces the frontend implementation to handle API responses for features that have been moved (301) or split (410). This builds upon previous backend changes that enabled the API to return these status codes.

On the client side:

  • For a 301 response, the feature page now performs a client-side redirect. It catches a FeatureMovedError, updates its state with the new feature's data from the response body, and uses history.pushState to update the URL. This provides a smooth user experience without a full page reload. A notice is also displayed to inform the user of the redirect.

  • For a 410 response, the feature page redirects to a dedicated "Feature Gone" page, which explains that the feature was split and provides the user with links to the new features.

As this is a Single Page Application (SPA), the client-side fetch determines whether a redirect or a "gone" page is necessary. This approach is a trade-off for better UX within the SPA architecture.

Unit and end-to-end tests have been added to cover these new scenarios.

This commit introduces the frontend implementation to handle API responses for features that have been moved (301) or split (410). This builds upon previous backend changes that enabled the API to return these status codes.

On the client side:
- For a 301 response, the feature page now performs a client-side redirect. It catches a `FeatureMovedError`, updates its state with the new feature's data from the response body, and uses `history.pushState` to update the URL. This provides a smooth user experience without a full page reload. A notice is also displayed to inform the user of the redirect.

- For a 410 response, the feature page redirects to a dedicated "Feature Gone" page, which explains that the feature was split and provides the user with links to the new features.

As this is a Single Page Application (SPA), the client-side fetch determines whether a redirect or a "gone" page is necessary. This approach is a trade-off for better UX within the SPA architecture.

Unit and end-to-end tests have been added to cover these new scenarios.
@jcscottiii jcscottiii force-pushed the jcscottiii/v3-frontend-changes branch from f804fb0 to e77ae2a Compare September 16, 2025 01:08
@jcscottiii jcscottiii requested a review from jrobbins September 16, 2025 01:23
@jcscottiii jcscottiii added this pull request to the merge queue Sep 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 16, 2025
@jcscottiii jcscottiii added this pull request to the merge queue Sep 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 16, 2025
@jcscottiii jcscottiii added this pull request to the merge queue Sep 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 16, 2025
@jcscottiii jcscottiii added this pull request to the merge queue Sep 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 16, 2025
@jcscottiii jcscottiii added this pull request to the merge queue Sep 16, 2025
Merged via the queue into main with commit 0bccb66 Sep 16, 2025
7 checks passed
@jcscottiii jcscottiii deleted the jcscottiii/v3-frontend-changes branch September 16, 2025 14:31
@jcscottiii jcscottiii mentioned this pull request Sep 18, 2025
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.

2 participants