Skip to content

Make failed check details readable and easy to retry - #28702

Merged
AmethystLiang merged 47 commits into
mainfrom
ci-details-ui
Oct 16, 2026
Merged

AmethystLiang merged 47 commits into
mainfrom
ci-details-ui

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2314 $\color{#cf222e}{\Huge{\mathbf{−}}}$​11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2303
Prod 22 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1495 $\color{#cf222e}{\Huge{\mathbf{−}}}$​319 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1176

Restacked with the original UI scope preserved. Retrieval recovery is #29180; ingestion remains #28694. The parent PRs must merge into main before this PR is retargeted and merged.

ELI5

Failed checks put the failed job and its log excerpt first, open near the diagnostic, and explain how to retry logs that could not be loaded.

What Changed

Previously, successful steps and annotations could hide the useful failure text, the excerpt opened near a generic exit message, and Refresh removed the viewer while loading. The sidebar also called its bounded details view “View full logs.”

Failed job names, failed steps and expanded Log excerpt now appear before collapsed successful/skipped steps. Meaningful provider output and external links remain available. A small diagnostic rule and rendered text coordinates position wrapped failure text and its nearby stack together. The existing tab cache and accepted-request guards preserve reading positions through Refresh, tab activity and unrelated updates.

The sidebar action is View full details. Partial log errors retain metadata and direct users to that tab's existing header Refresh. Empty, not-requested, running and older-host unknown states have distinct, truthful messages. Display and Copy use the normalized payload directly.

Why

The existing bounded excerpt retains this failure's diagnostic and stack. Reusing the combined details request, existing Refresh action and numeric reading-position cache keeps acquisition and cancellation in their current owners. Measuring rendered text handles wrapping, and retaining the mounted viewer prevents an unchanged refresh from stealing the reading position.

This PR retains the original presentation/retry scope and targets ci-log-ingestion. Retrieval recovery #29180 has landed on main. Ingestion #28694 now targets main directly. Merge ingestion first. Finally retarget this PR to main, run the full PR workflow, and merge it. Never merge this PR into an already-landed parent branch.

The recovery resolves current editor-cache/test conflicts and uses the generated replacement for the removed JSON test fixture. Acquisition remains in the retrieval PR and response normalization remains in the ingestion PR.

Linked Issue

Reported check: test / tests node 24 2/5. No new issue was created.

Visual Proof

Full hidden-renderer screenshots of the captured diagnostic. The before view opens at a benign logger; the after view shows the diagnostic and complete nearby stack in a 480-pixel editor pane.

Before After
Before: benign initial target After: diagnostic and complete frame

The required actual-ingress retry path and older-host normalization also passed:

Cached sidebar error Header Refresh success Older-host normalized Copy
Cached sidebar error Refresh success Legacy normalized Copy

The small captured fixture and full 13,236-byte bounded excerpt both fit the wide/narrow reading clips. Surrounding review metadata is synthetic; request mocks use the existing main IPC seam and real renderer loaders. Media lives in attachment storage, outside this PR's diff. Full raw logs are excluded.

Testing

  • Current post-retrieval stack: 49 affected tests, full pnpm tc, and changed-files quality gate passed.
  • Required hidden-renderer cached-error → View full details → header Refresh → success, already-open variant, and normalized older-host Copy passed through the actual ingress loader. Five combined details requests, zero pending and three exact intercepted Copies; cached opening, Copy and real tab switching added no requests.
  • Automated regression coverage added for diagnostic selection, wrapped coordinates, request epochs, mounted Refresh content, reading intent/ownership, shared-cache pressure and live close cleanup.
  • Captured small/full excerpt geometry and literal Copy checked in hidden macOS Electron renderers; existing GitLab details E2E passed.

Latest affected tests: 49 passed in three suites; changed-files quality and scoped formatting passed. Earlier 205 scoped tests, captured small/full wide/480-pixel geometry and GitLab E2E passed. Full pnpm tc and final changed-files quality passed on this source stack; final independent review 3 passed with no blocking UI findings; no additional app or geometry rerun is planned when production blobs remain unchanged. Actual desktop validation is macOS arm64. Other host routing and mixed-version transport evidence comes from the dependency tests; no live Windows, Linux or SSH desktop run is claimed.

Review

Two independent design reviews converged after one fix pass. Code reviews have corrected narrow-path clipping, generic provider headings and a later diagnostic being mistaken for an earlier logger's frame. The two code reviews found three corrections, all implemented and regression-tested. Independent final review 3 found no substantive blocking UI findings. The UI scope is complete; final shared-text review and measured performance limitations are recorded in #28671.

Agent skill upstream boundary

  • Not applicable: no upstream skill-installer source or registry material is copied or translated.

Notes

The final affected shared-text run passed all 332 cases after correcting the near-cap escape-stripping timeout. The earlier 14 failures remain in the historical artifact. No UI blocker remains; merging is a separate action.

The diagnostic rule is a bounded heuristic; an excerpt can omit relevant output or match benign text. The provider link remains the escape hatch. The five-job request limit, 16 KiB excerpts, existing deadlines and acquisition lifecycle remain unchanged. No full-log viewer, step parser, polling lifecycle or AI line-budget change is included.

Checklist

  • The change is focused on failure details and their existing reading/retry flow.
  • User before/after, mechanism and rationale are explained.
  • Before/after visual proof attached.
  • Final UI independent review and required checks complete.
  • Provider, mixed-version, folder workspace and SSH behavior considered.
  • Required UI tests, full typecheck, changed quality and hidden dev-build validation recorded; packaging builds were not run.

Final dependency verification

Before the latest dependency restack, the synchronized stack passed 205 affected tests in nine suites, full ORCA_BACKGROUND_LAUNCH=1 pnpm tc, and the changed-code quality gate with zero new findings across 106 files. The final shared-text affected run passed all 332 selected cases; the earlier failed 1,004-case run remains separately recorded. Large synthetic logs still have a material processing cost: about 84 ms at 8 MiB and 579 ms at 63 MiB versus 39 ms and 293 ms before. The actual captured job measured about 4 ms. This is a disclosed correctness tradeoff, not a large-log stall fix or a zero-regression claim.

Merge recovery validation

The integrated recovery on current main passed full typecheck, changed-code quality, and 622 affected tests in 40 files. A hidden Electron app downloaded the exact newly reported job through real IPC and rendered its timeout diagnostic in the full details tab. Fresh UI-only tests and full CI run on this restacked head. Uncommitted work in the original worktrees is excluded and preserved.

Exact reported job after recovery

The real IPC request downloaded job 116134352883 without a mock. The hidden full-details tab rendered its timeout diagnostic and source location from the available 13,865-character excerpt. The recovered UI code is unchanged by the split; the restack also incorporates current main and the retrieval cleanup-test correction.

Reported before Hidden recovery app after
Before: no log details After: timeout diagnostic and source location

UI-only package-runner validation: 187 tests passed in 10 files.

Final restacked application validation against landed main: 402 tests passed in 18 affected files, full pnpm tc, and changed-code quality with zero new findings. Fresh PR CI is running on the updated heads.

The wall-clock performance suites run about 1k child workloads up to 63 MiB, so they were sharing runners with unit tests and could fail on noise. They now run only in their own `check_log_performance` job, opted in with `ORCA_CHECK_LOG_PERF=1`.

- Remove the pinned-baseline checkout and `ORCA_CHECK_LOG_BASELINE_DIR`. The baseline comparison is now a manual step that reads the pinned ref from local Git history.
- Run the current-implementation checks with `compareBaseline: false`, which skips baseline builds and audits.
- Replace the captured failure-log JSON with a synthetic log built by `createCheckLogFixture()`, so no scraped job output or provenance metadata is kept in the repo.
- Remove the `check_log_performance` CI job. The log performance suites now run only when `ORCA_CHECK_LOG_PERF=1` is set, as a manual benchmark.
- Update the benchmark scripts and tests to use the new fixture helper and drop the `fixturePath` parameter.
@AmethystLiang
AmethystLiang marked this pull request as draft October 15, 2026 16:56
@AmethystLiang
AmethystLiang changed the base branch from ci-log-ingestion to main October 16, 2026 07:19
@AmethystLiang
AmethystLiang marked this pull request as ready for review October 16, 2026 07:19
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

Check-detail panels now show all jobs in the editor and failed jobs when failures exist in the sidebar. Log views display messages based on log state and job outcome, support copying available excerpts, and manage reading positions across refreshes and tab changes. Store actions reconcile reading caches for accepted updates and remove caches when check-details tabs close. The panels also show delayed refresh progress, order sections by check outcome, and use “View full details.” Tests and translations cover these changes.

Priority: ⚪ Not assessed

Merge Risk: ⚪ Minimal · up to 7ad3b

Failed-check details now list failed jobs first and keep the reading position during Refresh. No current behavior defect blocks merging. One test assertion could be made more distinctive so it reliably confirms that startup-failure jobs appear in the failed list.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 2.17% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 46 functions across 27 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly summarizes the primary change: improving failed check details and retry behavior.
Description check Passed The description is detailed and covers the required explanation, changes, rationale, testing, visual proof, review notes, and checklist. The Linked Issue section does not link an actual issue, and pac…
Full details: Description check

Explanation

The description is detailed and covers the required explanation, changes, rationale, testing, visual proof, review notes, and checklist. The Linked Issue section does not link an actual issue, and packaging builds were not run, but the description is otherwise substantially complete.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b8e8628d-186f-49b9-8b94-012f663f2d3d
📥 Commits

Reviewing files that changed from the base of the PR and between 723c258 and a7c5372.

📒 Files selected for processing: 33
  • src/renderer/src/components/editor/CheckRunDetailsPanel.captured-failure.test.tsx
  • src/renderer/src/components/editor/CheckRunDetailsPanel.copy.test.tsx
  • src/renderer/src/components/editor/CheckRunDetailsPanel.log-outcomes.test.tsx
  • src/renderer/src/components/editor/CheckRunDetailsPanel.tsx
  • src/renderer/src/components/editor/CheckRunJobs.tsx
  • src/renderer/src/components/editor/EditorContent.tsx
  • src/renderer/src/components/editor/check-details-reading-cache.ts
  • src/renderer/src/components/editor/check-details-reading-fixture.ts
  • src/renderer/src/components/editor/check-details-reading-owner.ts
  • src/renderer/src/components/editor/check-details-reading-viewport.test.ts
  • src/renderer/src/components/editor/check-details-reading-viewport.ts
  • src/renderer/src/components/editor/closed-check-details-cache-lifetime.test.ts
  • src/renderer/src/components/editor/closed-editor-tab-controller.ts
  • src/renderer/src/components/editor/closed-editor-tab-disposal.ts
  • src/renderer/src/components/editor/use-check-details-reading-position.ts
  • src/renderer/src/components/right-sidebar/check-job-log-captured-fixture.ts
  • src/renderer/src/components/right-sidebar/check-job-log-tail.outcomes.test.tsx
  • src/renderer/src/components/right-sidebar/check-job-log-tail.tsx
  • src/renderer/src/components/right-sidebar/check-log-initial-diagnostic-position.test.ts
  • src/renderer/src/components/right-sidebar/check-log-initial-diagnostic-position.ts
  • src/renderer/src/components/right-sidebar/checks-list-expanded-details.test.tsx
  • src/renderer/src/components/right-sidebar/checks-panel-content.test.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/check-run-details.tsx
  • src/renderer/src/components/right-sidebar/use-check-log-reading-position.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/store/slices/editor-check-details-reading.test.ts
  • src/renderer/src/store/slices/editor/actions/check-run-details-actions.ts
  • tests/e2e/repro-7732-gitlab-checks-job-details.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@AmethystLiang
AmethystLiang marked this pull request as draft October 16, 2026 07:36
@AmethystLiang
AmethystLiang marked this pull request as ready for review October 16, 2026 07:36
@AmethystLiang AmethystLiang reopened this Oct 16, 2026
# Conflicts:
#	src/renderer/src/components/editor/closed-editor-tab-disposal.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments: 1
src/renderer/src/components/right-sidebar/checks-list-expanded-details.test.tsx: 1

190-204: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Use a job name that cannot match other rendered text.

The assertion expect(text).toContain('startup') is meant to prove that the startup_failure job appears in the "Failed jobs" list. The check-level conclusion is also startup_failure. The status row renders getCheckStatusLabel(detailsStatusCheck) for that conclusion. If the label contains the lowercase substring startup, the assertion passes even when the sidebar filter drops the job. That is the regression from the earlier isFailureState review. The ordering assertion at Line 205 still catches the section-order regression. The job-inclusion assertion may not catch the filter regression.

Give the job a distinctive name and assert that name.

Proposed fix
           {
             ...checkDetails.jobs[0]!,
             id: 2,
-            name: 'startup',
+            name: 'boot-shard',
             conclusion: 'startup_failure',
             logTail: null
           }
@@
     const text = container.textContent ?? ''
     expect(text).toContain('Failed jobs')
-    expect(text).toContain('startup')
+    expect(text).toContain('boot-shard')
     expect(text.indexOf('Failed jobs')).toBeLessThan(text.indexOf('Verify failed'))

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 35ad9f30-fa3d-433d-ab60-482379a24f4e
📥 Commits

Reviewing files that changed from the base of the PR and between a7c5372 and 7ad3b78.

📒 Files selected for processing: 4
  • src/renderer/src/components/editor/closed-editor-tab-controller.ts
  • src/renderer/src/components/editor/closed-editor-tab-disposal.ts
  • src/renderer/src/components/right-sidebar/checks-list-expanded-details.test.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/check-run-details.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@AmethystLiang
AmethystLiang merged commit e5b7c56 into main Oct 16, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant