Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

fix(svelte): Make /cody/dashboard work with the new web app#64295

Merged
fkling merged 1 commit intomainfrom
fkling-srch-765-fix-codydashboard-which-is-broken-on-s2
Aug 6, 2024
Merged

fix(svelte): Make /cody/dashboard work with the new web app#64295
fkling merged 1 commit intomainfrom
fkling-srch-765-fix-codydashboard-which-is-broken-on-s2

Conversation

@fkling
Copy link
Contributor

@fkling fkling commented Aug 6, 2024

Fixes srch-765

When navigating to /cody/dashboard and the new web app is enabled, the user gets a "Not found" error. This doesn't happen in the React app.

The page doesn't exist in the new web app, hence the server should fall back to the old web app but that doesn't happen.

Why? Because the server doesn't know about /cody/dashboard either. It only exists in the React app.
Instead the server interprets this path as a (non-existing) repository page. When the new web app is enabled, repository pages are handled by the new web app, but since neither the repo nor the page exist in the new web app, the aforementioned error is thrown.

Configuring this route on the server makes it so that the React app is served instead.

Test plan

Manual testing. Going to https://sourcegraph.test:3443/cody/dashboard loads the React app.

When navigating to `/cody/dashboard` and the new web app is enabled, the
user gets a "Not found" error. This doesn't happen in the React app.

The page doesn't exist in the new web app, hence the server should fall
back to the old web app but that doesn't happen.

Why? Because the server doesn't know about `/cody/dashboard` either.
It only exists in the React app.
Instead the server interprets this path as a (non-existing) repository
page. When the new web app is enabled, repository pages are handled by
the new web app, but since neither the repo nor the page exist in the
new web app, the aforementioned error is thrown.

Configuring this route on the server makes it so that the React app is
served instead.
@cla-bot cla-bot bot added the cla-signed label Aug 6, 2024
@fkling fkling requested a review from a team August 6, 2024 13:01
@fkling fkling marked this pull request as ready for review August 6, 2024 13:01
@camdencheek
Copy link
Member

It only exists in the React app.

Well that's not great 😄

@fkling fkling merged commit 0959fbd into main Aug 6, 2024
@fkling fkling deleted the fkling-srch-765-fix-codydashboard-which-is-broken-on-s2 branch August 6, 2024 13:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants