fix(FR-2586): clearer error when app launch fails due to access key mismatch#7409
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
Improves the app-launch UX by translating a common manager-side “session not found” (404) failure into a more actionable, user-facing message that explains the likely access-key mismatch and recovery steps.
Changes:
- Added a
isSessionNotFoundError(err)classifier inuseBackendAIAppLauncherand throws a friendlierAppLaunchErrorfor that case. - Added a new i18n string key
session.appLauncher.SessionNotAccessibleacross locale JSON files.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| react/src/hooks/useBackendAIAppLauncher.tsx | Detects 404 “session not found” errors during app launch and replaces them with a clearer, localized message. |
| resources/i18n/en.json | Adds English string for session.appLauncher.SessionNotAccessible. |
| resources/i18n/de.json | Adds German translation for SessionNotAccessible. |
| resources/i18n/el.json | Adds SessionNotAccessible (currently English text in Greek locale). |
| resources/i18n/es.json | Adds Spanish translation for SessionNotAccessible. |
| resources/i18n/fi.json | Adds SessionNotAccessible (currently English text in Finnish locale). |
| resources/i18n/fr.json | Adds French translation for SessionNotAccessible. |
| resources/i18n/id.json | Adds SessionNotAccessible (currently English text in Indonesian locale). |
| resources/i18n/it.json | Adds Italian translation for SessionNotAccessible. |
| resources/i18n/ja.json | Adds Japanese translation for SessionNotAccessible. |
| resources/i18n/ko.json | Adds Korean translation for SessionNotAccessible. |
| resources/i18n/mn.json | Adds SessionNotAccessible (currently English text in Mongolian locale). |
| resources/i18n/ms.json | Adds SessionNotAccessible (currently English text in Malay locale). |
| resources/i18n/pl.json | Adds SessionNotAccessible (currently English text in Polish locale). |
| resources/i18n/pt-BR.json | Adds Portuguese (Brazil) translation for SessionNotAccessible. |
| resources/i18n/pt.json | Adds Portuguese translation for SessionNotAccessible. |
| resources/i18n/ru.json | Adds Russian translation for SessionNotAccessible. |
| resources/i18n/th.json | Adds SessionNotAccessible (currently English text in Thai locale). |
| resources/i18n/tr.json | Adds SessionNotAccessible (currently English text in Turkish locale). |
| resources/i18n/vi.json | Adds SessionNotAccessible (currently English text in Vietnamese locale). |
| resources/i18n/zh-CN.json | Adds Simplified Chinese translation for SessionNotAccessible. |
| resources/i18n/zh-TW.json | Adds Traditional Chinese translation for SessionNotAccessible. |
a65b8fc to
c7f53b0
Compare
Merge activity
|
…ismatch (#7409) Resolves #6732 (FR-2586)  ## Summary When an app launch fails because the manager cannot find the session (HTTP 404 / "session not found"), the most common root cause is an access key mismatch — the session was created under a different access key than the one currently in use. Previously the WebUI surfaced the raw manager error, which read as a generic "session not found" and gave the user no idea what to do. This change detects the 404 + "session ... not found" response coming back from `startService` in `useBackendAIAppLauncher` and replaces it with a user-friendly message that explains the likely cause and the two recovery paths: - Switch back to the original access key, or - Create a new session under the current access key. ## Implementation - `react/src/hooks/useBackendAIAppLauncher.tsx`: added `isSessionNotFoundError(err)` helper that matches `statusCode === 404` plus a substring match on the error's `title` field only (containing "session" and "not found"), and gated a friendlier `AppLaunchError` on it in the `_resolveV2ProxyUri` catch block. - `resources/i18n/*.json`: added `session.appLauncher.SessionNotAccessible`. All 22 locales populated with native translations. The message is intentionally phrased as "likely" rather than asserting AK mismatch, because a 404 from `startService` could in rare cases also surface for a session that was genuinely removed between session-list render and app-launch click. Either way, the suggested recovery steps are valid. ## Test Plan - [ ] Switch to a session created under a different access key, click an app — friendly error appears in the notification. - [ ] Launch an app on a normal session — no behavior change, app launches as before. - [ ] Trigger a non-404 launch failure (e.g. proxy down) — original error message still surfaces unchanged.
c7f53b0 to
7956c51
Compare

Resolves #6732 (FR-2586)
Summary
When an app launch fails because the manager cannot find the session (HTTP 404 / "session not found"), the most common root cause is an access key mismatch — the session was created under a different access key than the one currently in use. Previously the WebUI surfaced the raw manager error, which read as a generic "session not found" and gave the user no idea what to do.
This change detects the 404 + "session ... not found" response coming back from
startServiceinuseBackendAIAppLauncherand replaces it with a user-friendly message that explains the likely cause and the two recovery paths:Implementation
react/src/hooks/useBackendAIAppLauncher.tsx: addedisSessionNotFoundError(err)helper that matchesstatusCode === 404plus a substring match on the error'stitlefield only (containing "session" and "not found"), and gated a friendlierAppLaunchErroron it in the_resolveV2ProxyUricatch block.resources/i18n/*.json: addedsession.appLauncher.SessionNotAccessible. All 22 locales populated with native translations.The message is intentionally phrased as "likely" rather than asserting AK mismatch, because a 404 from
startServicecould in rare cases also surface for a session that was genuinely removed between session-list render and app-launch click. Either way, the suggested recovery steps are valid.Test Plan