Skip to content

refactor: clean up ReportTaskLogs and fix bar expand/collapse#1918

Open
oliverb123 wants to merge 4 commits intomainfrom
refactor/report-task-logs-collapse
Open

refactor: clean up ReportTaskLogs and fix bar expand/collapse#1918
oliverb123 wants to merge 4 commits intomainfrom
refactor/report-task-logs-collapse

Conversation

@oliverb123
Copy link
Copy Markdown
Contributor

Summary

  • Refactors ReportTaskLogs in the inbox report detail panel: pulls BarRow and buildBars out of the inline render, drives ordering from a single BAR_ORDER constant (top-to-bottom), and removes the dead DISPLAYED_RELATIONSHIPS sort that contradicted the actual push order.
  • Renders every interactive bar as a uniform <div role="button"> (instead of conditionally toggling between <button> and <div role="button"> depending on whether a run-action button is present). This makes the click-to-toggle behavior consistent across all states — clicking the same bar in the expanded state now reliably collapses it, and clicking research expands cleanly even when the implementation task is also present.
  • Tightens types (BarRelationship excludes repo_selection) and renames the open state (isOpen, collapse, toggle) so the JSX reads cleanly.

No behavioral change to the sliding card, scrim, or PR/run-action buttons.

Test plan

  • Open a report with both a research task and a completed implementation task → click the research bar → research expands
  • Click the research bar again (now expanded) → it collapses
  • Click the implementation bar → impl expands; click it again → collapses
  • With research expanded, click the implementation bar → switches to impl
  • Click the scrim outside the card → collapses
  • In a pending_input report, the "Provide input for PR" run button still works and doesn't collapse the bar
  • PR-link badge still opens in a new tab without toggling

Generated-By: PostHog Code
Task-Id: 6b2b677f-e9c9-4028-b37e-d92158107040

Extract BarRow + buildBars out of the inline render, drive bar order
from a single BAR_ORDER constant, and use a uniform <div role="button">
for every interactive bar so clicking the same bar in the expanded
state reliably collapses it — and so research expands cleanly when an
implementation task is also present.

Generated-By: PostHog Code
Task-Id: 6b2b677f-e9c9-4028-b37e-d92158107040
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 28, 2026

Reviews (1): Last reviewed commit: "refactor: clean up ReportTaskLogs and fi..." | Re-trigger Greptile

The card had `pointer-events-none` with `pointer-events-auto` re-enabled
on the bars container. That click-through dance was unnecessary (the
card has no empty area — bars + TaskLogsPanel fill it) and was what
was preventing clicks from reliably reaching the bar in the expanded
state. Removed it on the card, the bars container, and the expanded
body, leaving everything inside the card with default pointer-events.

Adds a focused unit test that asserts: same-bar click collapses, the
research bar expands when a completed implementation task is also
present, and clicking a different bar while one is expanded switches.

Generated-By: PostHog Code
Task-Id: 6b2b677f-e9c9-4028-b37e-d92158107040
…ested

A native <button> is the most reliable click target across Chromium —
falls back to <div role="button"> only when a run-action button has to
be nested inside (HTML disallows nested <button>s).

Generated-By: PostHog Code
Task-Id: 6b2b677f-e9c9-4028-b37e-d92158107040
…-index

Belt-and-suspenders against any absolute child of SessionView that might
escape its container and end up over the bars. Adds an opaque background
to the bar container so nothing visually peeks through either.

Generated-By: PostHog Code
Task-Id: 6b2b677f-e9c9-4028-b37e-d92158107040
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