Skip to content

fix(mobile): surface review service outages with their own localized state - #8100

Merged
iscekic merged 12 commits into
mainfrom
drain/pr-review-provider-failure-states
Oct 22, 2026
Merged

iscekic merged 12 commits into
mainfrom
drain/pr-review-provider-failure-states

Conversation

@iscekic

@iscekic iscekic commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

bot: ## Change

Opening a GitHub pull request in the mobile PR review screen could end in the
generic server-error state with a retry that never succeeded: when the review
read path's authorization layer is temporarily unavailable, the read fails with
BAD_GATEWAY, which previously joined the generic retryable bucket and rendered
as a GitHub-side failure.

The PR review error classifier now maps BAD_GATEWAY to its own
service-unavailable state with its own title and description. The overview,
files tab, discussion tab, checks section, file navigator, inbox, and entry
surfaces render the dedicated copy for it, keeping the retry affordance.
BAD_GATEWAY carries every retryable gateway-class failure — the authorization
layer in front of GitHub, a GitHub 5xx, and provider transport failures — so
those now show this state; the not-found, permission, and reconnect states are
unchanged. All 87 locale catalogs carry both new keys.

The hermetic local GitHub stub for PR-review E2E moves back under
apps/mobile/e2e/, and its GraphQL dispatcher now answers the PR review inbox
search with the fixture pull requests, so a local stack renders the entry
inbox without reaching GitHub.

End-to-end verification (Android emulator, local stack, stub GitHub)

  • Inbox loads; PR detail loads with overview, checks, review and merge
    sections; Files tab lists changed files; selecting a line opens the write
    bar; Comment opens the composer with context preview, body field and
    Comment now / Add to review.
  • A nonexistent pull request renders the localized not-found state with tabs
    disabled.
  • A revoked connection renders the reconnect state with a working
    check-connection flow on both the entry and detail surfaces.
  • With the authorization layer stopped, the inbox and the detail screen show
    the new "Review service unavailable" state with its own description (not
    the generic server error); Retry after recovery loads the data.

Unit tests: classifier, inbox and discussion view selectors, and the full
PR-review suites (144 files, 3009 tests) pass; catalog and plural checkers
pass for all 87 locales.

Proxy answers

The owner's proxy gave these answers in the owner's place.

  1. Question: The finding's core: BAD_GATEWAY (token service down) renders as the generic GitHub server error with a retry that cannot succeed. The plan adds a distinct localized 'review service unavailable' state for BAD_GATEWAY. Approve this as the fix's center?
    Answer: Dedicated state (Recommended)
    Confidence: 0.70
  2. Question: The local GitHub stub was moved out of the repo in Move the mobile E2E harness out to the kilo-workflow repo #4968 and its inbox GraphQL op was never implemented, so a fresh explorer stack fails on the PR-review inbox. Restore a minimal stub (server + start/seed script + inbox handler) under apps/mobile/e2e/?
    Answer: Restore with inbox (Recommended)
    Confidence: 0.60
  3. Question: Verification depth on the emulator: full matrix (load, not-found, revoked, service outage, composer) or happy path + new state only?
    Answer: Full matrix (Recommended)
    Confidence: 0.75
  4. Question: User-facing copy for the new BAD_GATEWAY state: what should it say?
    Answer: Review service (Recommended)
    Confidence: 0.70
  5. Question: Where the new state applies: all screens that use the shared classifier, or only the overview?
    Answer: Shared classifier (Recommended)
    Confidence: 0.88
  6. Question: Where the restored stub lives in the repo?
    Answer: apps/mobile/e2e (Recommended)
    Confidence: 0.75
  7. Question: Locale handling for the new state's strings?
    Answer: All locales (Recommended)
    Confidence: 0.93

…state

A BAD_GATEWAY from the PR review read paths now classifies as
service-unavailable instead of joining the generic retryable bucket, so
the overview, files, discussion, checks, navigator and inbox surfaces
name the unavailable review service rather than reporting a GitHub
failure. Every arm keeps its retry affordance. All 87 locale catalogs
carry the new key.

The hermetic local GitHub stub moves back under apps/mobile/e2e and its
GraphQL dispatcher now answers the PR review inbox search with the
fixture pull requests, so a local stack renders the entry inbox without
reaching GitHub.
@iscekic iscekic added drain Work item from the findings drain explorer:android Finding surfaced by the Android explorer labels Oct 19, 2026
@iscekic

iscekic commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

bot: End-to-end verification on the Android emulator against the local stack with the local GitHub stub.

  1. Inbox loaded from the stub, fixture pull requests listed.

Inbox with fixture pull requests

  1. Files tab lists changed files; a file expands into its diff.

Files tab with expanded diff

  1. Selecting a line opens the write bar; Comment opens the composer with the context preview, body field, and both submit actions.

Comment composer sheet

  1. A nonexistent pull request renders the localized not-found state with tabs disabled.

Pull request unavailable state

  1. With the review authorization layer stopped, the detail screen shows the new dedicated outage state instead of the generic server error; Retry after recovery loads the data.

Review service unavailable state

Inbox with fixture pull requests

Files tab with expanded diff

Comment composer sheet

Pull request unavailable state

Review service unavailable state

@kilo-code-bot

kilo-code-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental commit only extends pr-diff-file-list.test.tsx to pin the new service-unavailable copy and retry wiring against the extracted state component, and it matches the current implementation; earlier findings on the overview, discussion tab, classifier, and locale catalogs are verified fixed in the current HEAD.

Assumptions: [INFERENCE] none.

Files Reviewed (1 file)
  • apps/mobile/src/components/pr-review/diff/pr-diff-file-list.test.tsx
Previous Review Summaries (9 snapshots, latest commit e82aded)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit e82aded)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental commit extracts the diff file list's first-page error states into a dedicated component; the state dispatch, provider scoping, and retry wiring are preserved, and no new issues were found.

Files Reviewed (4 files)
  • apps/mobile/src/components/pr-review/diff/pr-diff-file-list-state.tsx
  • apps/mobile/src/components/pr-review/diff/pr-diff-file-list.tsx
  • apps/mobile/src/components/pr-review/diff/pr-diff-state-copy.ts
  • apps/mobile/src/lib/pr-review/classify-pr-review-query-state.ts

Previous review (commit 3135cd2)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The only incremental change is the Welsh outage description, which now correctly negates availability; the previously reported translation finding is resolved with no new issues.

Files Reviewed (1 file)
  • apps/mobile/src/i18n/locales/cy.json - prior WARNING resolved by 3135cd25; no new issues

Previous review (commit 4b6b2d5)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The Welsh outage description still tells users the review service is temporarily available; the Somali retry clause is now fixed.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/mobile/src/i18n/locales/cy.json 634 Mae'r gwasanaeth yn dros dro ar gael means "the service is temporarily available". The title above correctly reads Nid yw'r gwasanaeth ar gael, so Welsh readers get the opposite message during an outage. The existing inline thread marked this fixed, but the affirmative wording is still on the current HEAD.
Files Reviewed (2 files)
  • apps/mobile/src/i18n/locales/so.json - incremental diff, no issues (retry clause now uses Mar kale isku day)
  • apps/mobile/src/i18n/locales/cy.json - targeted re-check, 1 issue

Fix these issues in Kilo Cloud

Previous review (commit e9419ab)

Status: 2 Issues Found | Recommendation: Address before merge

Executive Summary

The Somali retry clause remains untranslated, and the Welsh description still tells users the review service is available during an outage.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
apps/mobile/src/i18n/locales/cy.json 634 Mae'r gwasanaeth yn dros dro ar gael is still affirmative ("the service is temporarily available"). The claimed fix is not present in commit e9419ab2, which does not touch this file.

SUGGESTION

File Line Issue
apps/mobile/src/i18n/locales/so.json 590 The fix replaced waakhtarran but left ku dhaqaf in the retry clause; the catalog uses Mar kale isku day everywhere else.
Files Reviewed (5 files)
  • apps/mobile/src/i18n/locales/et.json - no issues
  • apps/mobile/src/i18n/locales/is.json - no issues
  • apps/mobile/src/i18n/locales/om.json - no issues
  • apps/mobile/src/i18n/locales/so.json - 1 issue
  • apps/mobile/src/i18n/locales/cy.json (targeted re-check) - 1 issue

Fix these issues in Kilo Cloud

Previous review (commit 819f09a)

Status: 5 Issues Found | Recommendation: Address before merge

Executive Summary

The new description is wired correctly into all six surface components, but five of the newly added catalog strings are wrong, including a Welsh translation that tells users the service is available during an outage.

Fix these issues in Kilo Cloud

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 4
Issue Details (click to expand)

WARNING

File Line Issue
apps/mobile/src/i18n/locales/cy.json 634 Welsh description says the service is temporarily available, contradicting the title

SUGGESTION

File Line Issue
apps/mobile/src/i18n/locales/et.json 590 saavamatu is not a standard Estonian form for "unavailable"
apps/mobile/src/i18n/locales/is.json 590 ó tiltæk is a misspelling of ótiltæk
apps/mobile/src/i18n/locales/om.json 590 kuufamaan means "stored", not "temporarily"
apps/mobile/src/i18n/locales/so.json 590 Non-Somali words make the sentence unreadable
Files Reviewed (93 files)
  • apps/mobile/src/components/pr-review/diff/pr-diff-file-list.tsx - no issues
  • apps/mobile/src/components/pr-review/pr-review-checks-section.tsx - no issues
  • apps/mobile/src/components/pr-review/pr-review-discussion-tab.tsx - no issues
  • apps/mobile/src/components/pr-review/pr-review-file-navigator-screen.tsx - no issues
  • apps/mobile/src/components/pr-review/pr-review-inbox-list.tsx - no issues
  • apps/mobile/src/components/pr-review/pr-review-overview.tsx - no issues
  • apps/mobile/src/i18n/locales/*.json (87 catalogs) - 5 translation issues

Previous review (commit 2d39f8f)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental change fixes the previously reported overview regression: service-unavailable now joins retryable in the cached-data carve-out, so a failed background refetch keeps the loaded pull request on screen, and the accompanying comment matches the guard.

Files Reviewed (1 file)
  • apps/mobile/src/components/pr-review/pr-review-overview.tsx - prior cached-overview warning resolved by 2d39f8f; no new issues

Incremental scope: ce615ec829bd62202df65307d1d8837da53495d3..2d39f8ffad5cb714514026fe05f85f5ca4bcbdc4 (1 commit, 10 changed lines). The earlier discussion-tab retained-content fix remains unchanged and verified.

Previous review (commit ce615ec)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The discussion-tab retained-content fix landed, but the overview's cached-data carve-out still excludes service-unavailable, so a transient background refetch still blanks a loaded PR.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/mobile/src/components/pr-review/pr-review-overview.tsx 202 The new comment claims cached data keeps rendering, but the line-118 guard (`!pr.data
Files Reviewed (2 files)
  • apps/mobile/src/components/pr-review/pr-review-overview.tsx - 1 warning
  • apps/mobile/src/components/pr-review/pr-review-discussion-tab.tsx - prior retained-content warning resolved by ce615ec; no new issues

Incremental scope: 870e94243ac3550b435726f5290078eca2638588..ce615ec829bd62202df65307d1d8837da53495d3 (10 changed lines). Only one commit was added, and it does not touch the overview guard.

Fix these issues in Kilo Cloud

Previous review (commit 870e942)

Status: 2 Issues Found | Recommendation: Address before merge

Executive Summary

The follow-up commits only broaden comments and flatten the overview title ternary; the two cached-content regressions from the new service-unavailable state remain unaddressed.

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/mobile/src/components/pr-review/pr-review-overview.tsx 118 service-unavailable fails the state.kind !== 'retryable' cached-data guard, so a background refetch 502 replaces an already-loaded overview.
apps/mobile/src/components/pr-review/pr-review-discussion-tab.tsx 478 The new branch bypasses retainedContentError (which only suppresses retryable), hiding retained conversation comments during a transient outage.
Files Reviewed (4 files)
  • apps/mobile/src/components/pr-review/pr-review-overview.tsx - 1 warning (re-verified)
  • apps/mobile/src/components/pr-review/pr-review-discussion-tab.tsx - 1 warning (targeted re-check)
  • apps/mobile/src/lib/pr-review/classify-pr-review-query-state.ts - comment scope corrected in 870e942; prior suggestion resolved
  • apps/mobile/src/lib/pr-review/classify-pr-review-query-state.test.ts - test name updated, behavior unchanged

Incremental scope: git diff 6f97930dc1f9cf197992b8d2f13af29a999e761f..870e94243ac3550b435726f5290078eca2638588 changed comments, a test name, and an equivalent let-based title selection. No new findings.

Fix these issues in Kilo Cloud

Previous review (commit 6f97930)

Status: 3 Issues Found | Recommendation: Address before merge

Executive Summary

The latest commit only flattens the overview error-title ternary; the new service-unavailable state still bypasses both cached-content carve-outs, so a transient 502 replaces already-loaded overview and discussion content.

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
apps/mobile/src/components/pr-review/pr-review-overview.tsx 118 service-unavailable fails the state.kind !== 'retryable' cached-data guard, so a background refetch 502 replaces the loaded overview.
apps/mobile/src/components/pr-review/pr-review-discussion-tab.tsx 478 The new branch bypasses retainedContentError (which only suppresses retryable), hiding retained conversation comments during a transient outage.

SUGGESTION

File Line Issue
apps/mobile/src/lib/pr-review/classify-pr-review-query-state.ts 75 BAD_GATEWAY is also emitted for GitHub 5xx, non-HTTP failures, unknown GraphQL errors, and retryable GitLab/Bitbucket failures, so the "not a GitHub failure" comment and the claimed scope are inaccurate.
Files Reviewed (3 files)
  • apps/mobile/src/components/pr-review/pr-review-overview.tsx - 1 warning (previously reported, unchanged behavior)
  • apps/mobile/src/components/pr-review/pr-review-discussion-tab.tsx - 1 warning (previously reported, re-verified)
  • apps/mobile/src/lib/pr-review/classify-pr-review-query-state.ts - 1 suggestion (previously reported, re-verified)

Incremental scope: git diff 6f97930dc1f9cf197992b8d2f13af29a999e761f..532feaa9f128574be387e959356b2ae121a5e167 changed only the overview title selection, which is behaviorally equivalent to the prior nested ternary and introduced no new findings.

Fix these issues in Kilo Cloud


Reviewed by deepseek-flash-latest · Input: 53.7K · Output: 4.1K · Cached: 638.5K

Review guidance: REVIEW.md from base branch main

Splits the nested ternary into statements so the linter passes.
BAD_GATEWAY also carries GitHub 5xx and provider transport failures, so
the classifier and overview comments describe all three sources instead
of only the authorization layer.
…lure

The discussion tab's retained-content guard now covers the
service-unavailable state alongside retryable, so already-loaded threads
render through the later-page retry footer instead of a tab-level blank.
…h failure

The overview's cached-data carve-out now covers service-unavailable
alongside retryable, mirroring the discussion tab: a failed background
refetch of an already-loaded pull request no longer blanks the screen.
The new state renders its own body line instead of the generic
server-error description. All 87 locale catalogs carry the key, and
every surface that renders the state passes it as the message.
@iscekic iscekic added merge:human Substantive functional risk requires human review. and removed merge:human Substantive functional risk requires human review. labels Oct 19, 2026
Comment thread apps/mobile/src/i18n/locales/cy.json Resolved
Comment thread apps/mobile/src/i18n/locales/et.json Resolved
Comment thread apps/mobile/src/i18n/locales/is.json Resolved
Comment thread apps/mobile/src/i18n/locales/om.json Resolved
Comment thread apps/mobile/src/i18n/locales/so.json Resolved
@iscekic

iscekic commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

bot: Follow-up verification after the description was added to the outage state, plus recovery proofs.

  1. Entry screen with the review authorization layer stopped: the new state shows its own description ("The review service is temporarily unavailable. Try again shortly.") instead of the generic server-error line.

Review service unavailable with its own description

  1. The detail screen shows the same dedicated state, tabs disabled.

Detail screen with service unavailable state

  1. After recovery, the same pull request loads end to end again.

Detail screen recovered

Review service unavailable with its own description

Detail screen with service unavailable state

Detail screen recovered

Fixes the Welsh polarity, the Somali and Oromo wording, the Estonian
word form, and the Icelandic compounding flagged in review.
Comment thread apps/mobile/src/i18n/locales/so.json Resolved
@iscekic iscekic added merge:human Substantive functional risk requires human review. merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. and removed merge:human Substantive functional risk requires human review. labels Oct 20, 2026
@iscekic
iscekic added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
@iscekic
iscekic enabled auto-merge October 21, 2026 17:00
…der-failure-states

# Conflicts:
#	apps/mobile/src/i18n/locales/hu.json
@iscekic
iscekic disabled auto-merge October 22, 2026 02:11
@iscekic iscekic added merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. and removed merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. labels Oct 22, 2026
The list module keeps its layout and pagination wiring; the terminal and
recoverable first-page states render from their own component.
@iscekic iscekic removed the merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. label Oct 22, 2026
The gateway-failure body renders the outage copy rather than the server
default, and both retryable bodies reach the query refetch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

drain Work item from the findings drain explorer:android Finding surfaced by the Android explorer merge:bot Bot-owned review; merge when ready once readiness passes and a review approves.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants