mirror of
https://github.com/stablyai/orca.git
synced 2026-10-22 08:03:37 +00:00
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.
This commit is contained in:
@@ -828,7 +828,7 @@ function CheckRunDetails({
|
||||
>
|
||||
<RefreshCw className="size-3" />
|
||||
{translate(
|
||||
'auto.components.right.sidebar.checks.panel.content.retryCheckDetails',
|
||||
'auto.components.right.sidebar.checks.panel.content.dcb3c546fe',
|
||||
'Retry'
|
||||
)}
|
||||
</Button>
|
||||
@@ -1207,7 +1207,7 @@ export function ChecksList({
|
||||
err instanceof Error
|
||||
? err.message
|
||||
: translate(
|
||||
'auto.components.right.sidebar.checks.panel.content.checkDetailsLoadFailed',
|
||||
'auto.components.right.sidebar.checks.panel.content.e45324fbed',
|
||||
'Failed to load check details.'
|
||||
)
|
||||
if (resolvedWorktreeId) {
|
||||
|
||||
@@ -11130,7 +11130,7 @@
|
||||
"checksUnresolvedChip": "unresolved",
|
||||
"checksUnresolvedStripHint": "These checks finished without a pass or fail verdict.",
|
||||
"e15a8b77ef": "No inline details are available for this check.",
|
||||
"retryCheckDetails": "Retry",
|
||||
"dcb3c546fe": "Retry",
|
||||
"679bf2093c": "Copy log excerpt",
|
||||
"d713f500b2": "Log excerpt",
|
||||
"a916648574": "Open details",
|
||||
@@ -11197,7 +11197,7 @@
|
||||
"actionRequiredHint": "This check needs a manual action on GitHub (for example, approving the workflow run) before merging is unblocked.",
|
||||
"b3195cba33": "Unmark author as bot",
|
||||
"f588b46a6c": "Mark author as bot",
|
||||
"checkDetailsLoadFailed": "Failed to load check details."
|
||||
"e45324fbed": "Failed to load check details."
|
||||
},
|
||||
"empty": {
|
||||
"state": {
|
||||
|
||||
@@ -10760,7 +10760,7 @@
|
||||
"actionRequiredHint": "Este check requiere una acción manual en GitHub (por ejemplo, aprobar la ejecución del workflow) antes de que el merge quede desbloqueado.",
|
||||
"b3195cba33": "Desmarcar autor como bot",
|
||||
"f588b46a6c": "Marcar autor como bot",
|
||||
"checkDetailsLoadFailed": "No se pudieron cargar los detalles del check."
|
||||
"e45324fbed": "No se pudieron cargar los detalles del check."
|
||||
},
|
||||
"empty": {
|
||||
"state": {
|
||||
|
||||
@@ -10760,7 +10760,7 @@
|
||||
"actionRequiredHint": "マージのブロックが解除されるまでに、このチェックには GitHub 上での手動操作(例: ワークフロー実行の承認)が必要です。",
|
||||
"b3195cba33": "作成者のボット指定を解除",
|
||||
"f588b46a6c": "作成者をボットとして指定",
|
||||
"checkDetailsLoadFailed": "チェック詳細の読み込みに失敗しました。"
|
||||
"e45324fbed": "チェック詳細の読み込みに失敗しました。"
|
||||
},
|
||||
"empty": {
|
||||
"state": {
|
||||
|
||||
@@ -10760,7 +10760,7 @@
|
||||
"actionRequiredHint": "이 검사는 병합 차단이 해제되기 전에 GitHub에서 수동 작업(예: 워크플로 실행 승인)이 필요합니다.",
|
||||
"b3195cba33": "작성자의 봇 지정 해제",
|
||||
"f588b46a6c": "작성자를 봇으로 지정",
|
||||
"checkDetailsLoadFailed": "체크 세부 정보를 불러오지 못했습니다."
|
||||
"e45324fbed": "체크 세부 정보를 불러오지 못했습니다."
|
||||
},
|
||||
"empty": {
|
||||
"state": {
|
||||
|
||||
@@ -10780,7 +10780,7 @@
|
||||
"actionRequiredHint": "此检查需要在 GitHub 上执行手动操作(例如批准工作流运行)后才能解除合并阻止。",
|
||||
"b3195cba33": "取消将作者标记为机器人",
|
||||
"f588b46a6c": "将作者标记为机器人",
|
||||
"checkDetailsLoadFailed": "加载检查详细信息失败。"
|
||||
"e45324fbed": "加载检查详细信息失败。"
|
||||
},
|
||||
"empty": {
|
||||
"state": {
|
||||
|
||||
@@ -3112,12 +3112,13 @@ describe('createEditorSlice conflict status reconciliation', () => {
|
||||
})
|
||||
|
||||
it('stops loading when an open check-details tab loses its repository', async () => {
|
||||
const fetchPRCheckDetails = vi.fn()
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const store = createStore<any>()((...args: any[]) => ({
|
||||
activeWorktreeId: 'wt-1',
|
||||
repos: [],
|
||||
worktreesByRepo: {},
|
||||
fetchPRCheckDetails: vi.fn(),
|
||||
fetchPRCheckDetails,
|
||||
...createEditorSlice(...(args as Parameters<typeof createEditorSlice>))
|
||||
})) as unknown as StoreApi<AppState>
|
||||
const check = {
|
||||
@@ -3135,6 +3136,7 @@ describe('createEditorSlice conflict status reconciliation', () => {
|
||||
})
|
||||
await store.getState().reloadOpenCheckRunDetailsTab('wt-1::check-details::check-run:42')
|
||||
|
||||
expect(fetchPRCheckDetails).not.toHaveBeenCalled()
|
||||
expect(store.getState().openFiles).toContainEqual(
|
||||
expect.objectContaining({
|
||||
id: 'wt-1::check-details::check-run:42',
|
||||
|
||||
Reference in New Issue
Block a user