Skip to content

feat(task-detail): show custom base image badge on cloud tasks#3492

Merged
trunk-io[bot] merged 1 commit into
mainfrom
posthog-code/custom-image-task-badge
Jul 16, 2026
Merged

feat(task-detail): show custom base image badge on cloud tasks#3492
trunk-io[bot] merged 1 commit into
mainfrom
posthog-code/custom-image-task-badge

Conversation

@tatoalo

@tatoalo tatoalo commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Problem

When a cloud task runs on a custom base image, nothing on the task view says so.

Changes

  • New CustomImageBadge in the task detail header, next to the workspace mode badge: a Custom VM · <image name> chip shown for cloud tasks whose latest run picked a custom image per run (state.custom_image_id) or inherited one from its sandbox environment
  • Clicking the chip opens Settings → Cloud environments, where custom images are managed

@trunk-io

trunk-io Bot commented Jul 16, 2026

Copy link
Copy Markdown

😎 Merged successfully - details.

@tatoalo tatoalo self-assigned this Jul 16, 2026
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit e6a56c9.

@tatoalo
tatoalo marked this pull request as ready for review July 16, 2026 09:29
@tatoalo tatoalo added the Stamphog This will request an autostamp by stamphog on small changes label Jul 16, 2026
github-actions[bot]
github-actions Bot previously approved these changes Jul 16, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Purely additive UI component: adds a badge for cloud tasks using a custom base image. Hooks are correctly placed in the child component to avoid conditional-hook violations, type guards are defensive, the feature-flag gate in useSandboxCustomImages prevents unnecessary fetches, and openSettings is a plain function called correctly in an onClick handler. The memo dependency widening from task.title to task is the right fix given the new dependency on the full task object.

@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "chore(task-detail): trim comments in cus..." | Re-trigger Greptile

Comment thread packages/ui/src/features/task-detail/components/TaskDetail.tsx
Cloud tasks that run on a custom base image (picked per run or inherited from the sandbox environment) now show a "Custom VM · <image name>" chip next to the workspace mode badge in the task header. Clicking it opens the cloud environments settings where custom images are managed. The badge renders independently of workspace-mode resolution so it isn't hidden while the workspace loads.
@tatoalo
tatoalo force-pushed the posthog-code/custom-image-task-badge branch from 128536c to e6a56c9 Compare July 16, 2026 09:38
@github-actions
github-actions Bot dismissed their stale review July 16, 2026 09:39

New commits pushed (delta classified non_linear_history) — stamphog approval dismissed; re-review running automatically.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Purely additive UI badge component with no business logic changes; the resolved inline concern about workspace-loading hiding the badge was correctly fixed by making the leafIcon span unconditional.

@tatoalo
tatoalo enabled auto-merge (squash) July 16, 2026 09:48
@trunk-io
trunk-io Bot merged commit dfc8418 into main Jul 16, 2026
32 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/custom-image-task-badge branch July 16, 2026 10:05
Gilbert09 added a commit that referenced this pull request Jul 16, 2026
…3492)

Ports the desktop custom base image badge to the React Native app. The task
detail header now shows a violet "cube" badge with the custom sandbox base
image name when a cloud run used a custom image (directly via custom_image_id
or indirectly via its sandbox environment).

The sandbox image and environment lists are fetched through the mobile app's
authed-query pattern, and only when the latest run is a cloud run that carries
a custom_image_id or sandbox_environment_id, so ordinary tasks add no extra
network calls. The badge renders nothing when custom images are disabled or the
image can't be resolved.

Generated-By: PostHog Code
Task-Id: 1230821c-af71-4788-b81f-dcaeb6442e2d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant