Skip to content

Add top-of-conversation autotest status indicator with jump-to-block behavior - #2

Merged
ShiosOS merged 4 commits into
mainfrom
copilot/add-autotest-status-indicator
Jun 4, 2026
Merged

Add top-of-conversation autotest status indicator with jump-to-block behavior#2
ShiosOS merged 4 commits into
mainfrom
copilot/add-autotest-status-indicator

Conversation

Copilot AI commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Long PR timelines make it costly to find autotest results after reversing comments. This change surfaces autotest state near the PR description area and provides a one-click jump to the underlying timeline entry.

  • Top-level autotest signal on Conversation pages

    • Adds a lightweight status button (#pr-reverse-comments-autotest-status) above the timeline container when an autotest timeline item is present.
    • Scopes rendering to PR conversation pages only (not commits/files/checks).
  • Status derivation and visual state

    • Parses autotest entry text to map state to concise labels/colors:
      • ✓ Autotest passing
      • ✗ Autotest failing
      • • Autotest running
      • fallback • Autotest status
    • Keeps styling intentionally minimal and GitHub-theme-friendly.
  • Navigation and lifecycle behavior

    • Clicking the indicator scrolls to the current autotest timeline item and briefly highlights it.
    • Integrates with existing soft-nav/rebind flow so the indicator is inserted, updated, or removed as DOM/routes change.
  • Docs

    • Updates README usage text to describe the new top-of-page autotest indicator and click-to-jump behavior.
const target = getAutotestTimelineItem();
const state = getAutotestState(target.textContent || "");
indicator.textContent = state.label;
indicator.style.border = `1px solid ${state.color}`;

indicator.addEventListener("click", () => {
  const freshTarget = getAutotestTimelineItem();
  if (!freshTarget) return;
  freshTarget.scrollIntoView({ behavior: "smooth", block: "center" });
});

Copilot AI linked an issue Jun 2, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add autotest status block or indicator at the top Add top-of-conversation autotest status indicator with jump-to-block behavior Jun 2, 2026
Copilot AI requested a review from ShiosOS June 2, 2026 17:21
ShiosOS and others added 2 commits June 4, 2026 00:20
The original implementation searched timeline items for the word "autotest"; verified against a real PR's DOM, that finds nothing because the checks live in the merge box (a sibling of the timeline), so the indicator never rendered. Replace it with checks.js, which locates the merge/checks box and aggregates the per-check aria-labels into one overall passing/failing/running state, and have the indicator scroll to that box. Also guards against a mutation-observer feedback loop by only writing to the DOM when the status key changes. Covered by 11 unit tests and validated against the captured DOM (17 checks -> running).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ShiosOS
ShiosOS marked this pull request as ready for review June 4, 2026 04:31
@ShiosOS
ShiosOS merged commit 53b0443 into main Jun 4, 2026
2 checks passed
@ShiosOS
ShiosOS deleted the copilot/add-autotest-status-indicator branch June 4, 2026 04:32
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.

Autotest status block or indicator near top

2 participants