mirror of
https://github.com/stablyai/orca.git
synced 2026-10-23 08:03:39 +00:00
* Fix static analysis page stuck in loading state - Bound check-details requests with 30s timeout, matching remote RPC budget - Track request IDs to discard stale responses when context changes - Propagate githubRepository through store and components for proper routing - Add retry button for failed check-details loads - Improve accessibility with ARIA labels for loading and error states * Fix static analysis page stuck in loading state When an open check-details tab's repository is removed, the loading state would continue indefinitely because the fetch was still being triggered. Prevent the fetch call in this scenario to unblock the UI. Also migrates translation keys to obfuscated identifiers. * Fix static analysis page stuck in loading state Add deadline-based timeouts and request ID tracking to prevent stale responses from freezing the checks panel. Include abort signal propagation throughout the request chain and provide retry UI for failed check details loads. * fix(checks): prevent loading state from getting stuck on retry - Consolidate mount checks into a helper function - Details now clear when a new request begins - Add i18n strings for retry status
33 lines
927 B
TypeScript
33 lines
927 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { hostedReviewInfoFromGitHubPRInfo } from './hosted-review-github'
|
|
import type { PRInfo } from './types'
|
|
|
|
const pr: PRInfo = {
|
|
number: 12,
|
|
title: 'Add queue badges',
|
|
state: 'open',
|
|
url: 'https://github.com/acme/orca/pull/12',
|
|
checksStatus: 'pending',
|
|
updatedAt: '2026-05-12T00:00:00.000Z',
|
|
mergeable: 'MERGEABLE',
|
|
headSha: 'abc123'
|
|
}
|
|
|
|
describe('hostedReviewInfoFromGitHubPRInfo', () => {
|
|
it('maps PRInfo into sidebar hosted review metadata', () => {
|
|
const githubRepository = { owner: 'upstream', repo: 'orca' }
|
|
const review = hostedReviewInfoFromGitHubPRInfo({ ...pr, prRepo: githubRepository })
|
|
|
|
expect(review).toMatchObject({
|
|
provider: 'github',
|
|
number: 12,
|
|
title: 'Add queue badges',
|
|
state: 'open',
|
|
status: 'pending',
|
|
mergeable: 'MERGEABLE',
|
|
headSha: 'abc123',
|
|
githubRepository
|
|
})
|
|
})
|
|
})
|