feat(sidebar): show PR state for cloud runs with a provenance badge#3245
Draft
gantoine wants to merge 1 commit into
Draft
feat(sidebar): show PR state for cloud runs with a provenance badge#3245gantoine wants to merge 1 commit into
gantoine wants to merge 1 commit into
Conversation
Cloud runs never surfaced their branch lifecycle (draft/open/merged/closed PR) in the sidebar: the terminal-cloud branch of TaskIcon's waterfall won before the PR-state branch, so a completed cloud run always showed the green cloud icon even when its PR state was already resolved via the run's pr_url. Now a cloud run that finished cleanly and has a known PR state renders the same PR-state glyphs as local runs (merged purple, open green, draft gray, closed red), with a small filled cloud — or the origin-product icon (Slack, Signals, …) — stacked on the glyph's bottom-right corner so cloud provenance stays visible at a glance. A radial-gradient mask punches a hole in the PR glyph under the badge, keeping both shapes legible on any row background without hardcoding a cutout ring color. Origin-branded tasks keep their clickable thread link on the stacked icon. Failed/cancelled cloud runs keep the red cloud icon: the failure remains the actionable signal there. Queued/running runs and completed runs without a PR are unchanged. Applies to every TaskIcon consumer (sidebar, tabs, command palette, command center). Generated-By: PostHog Code Task-Id: 3c36b344-ed49-424a-9218-703049ad89db
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found 1 issue in 1 file · 1 warning. 1 warning
Reviewed by React Doctor for commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Cloud runs never surfaced their branch lifecycle (draft / open / merged / closed PR) in the sidebar the way local runs do — a finished cloud run always showed the green/red cloud icon, so you couldn't tell at a glance which cloud runs had landed and which still had a PR waiting on review.
The PR-state data was already there:
useTaskPrStatusresolves the live GitHub state whenever a cloud run's output carries apr_url, and everyTaskIconconsumer already passes it in. The blocker was icon priority —TaskIcon's waterfall checked "terminal cloud run" before "PR state", so the PR branch was unreachable for cloud tasks.UX
The PR-state glyph becomes the primary icon (identical to local runs: merged purple, open green, draft gray, closed red), with a small provenance badge stacked on the bottom-right corner — a filled cloud, or the origin-product icon (Slack, Signals, …) for branded tasks. Once a run has finished, the branch lifecycle is what you scan for; where it ran is static context, so it takes the badge slot. This also makes the whole sidebar read in one visual language regardless of local vs cloud.
Details:
TaskIconconsumer: sidebar rows, task tabs, command palette, command center.Notes
pr_url; runs that never published keep the plain cloud icon (nothing to show).Generated-By: PostHog Code
Task-Id: 3c36b344-ed49-424a-9218-703049ad89db
Created with PostHog Code