Skip to content

feat(ui): show workspace mode badge in task header#2953

Merged
MattPua merged 4 commits into
mainfrom
posthog-code/task-workspace-mode-badge
Jun 26, 2026
Merged

feat(ui): show workspace mode badge in task header#2953
MattPua merged 4 commits into
mainfrom
posthog-code/task-workspace-mode-badge

Conversation

@MattPua

@MattPua MattPua commented Jun 26, 2026

Copy link
Copy Markdown
Member

Problem:

When running different tasks, some on local, on cloud, worktrees, its hard to tell which one is running where.

Solution

Adds a small icon before the task title showing where a task runs: local, worktree, or cloud. The mode was already

known (useWorkspace().mode) but nothing showed it.

CleanShot 2026-06-26 at 14 25 25@2x CleanShot 2026-06-26 at 14 25 36@2x CleanShot 2026-06-26 at 14 25 45@2x
Mode Icon
Local HardDrives (gray)
Worktree GitFork (teal)
Cloud Cloud (accent)

Hover for a tooltip. Shows in both the plain and channel (# channel / title) headers.

MattPua added 2 commits June 26, 2026 12:41
Add a small icon before the task title in the task detail header that
distinguishes where a task runs: local working copy, isolated git
worktree, or cloud.

The workspace mode was already available via useWorkspace(taskId).mode
but nothing surfaced it. Cloud uses the same Cloud/accent glyph as the
sidebar TaskIcon; worktree uses GitFork/teal to avoid clashing with the
sidebar's amber GitBranch ("has changes"); local uses HardDrives/gray.

Generated-By: PostHog Code
Task-Id: aca01a55-925e-4c51-bbd2-2bd957cf3b53
"Cloud — runs in the cloud" was redundant. Describe where it runs
instead: "runs on a remote machine".

Generated-By: PostHog Code
Task-Id: aca01a55-925e-4c51-bbd2-2bd957cf3b53
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 1c06017.

@greptile-apps

greptile-apps Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff (1)

  1. packages/ui/src/features/task-detail/components/TaskDetail.tsx, line 128-134 (link)

    P2 Badge absent from the channel path

    When channelName is set, ChannelBreadcrumb is rendered instead of the new Flex block, so tasks opened inside a channel never show the workspace mode badge. Is this intentional? If so, a brief comment here would help future readers understand the omission.

Reviews (1): Last reviewed commit: "fix(ui): reword cloud workspace mode too..." | Re-trigger Greptile

Comment thread packages/ui/src/features/task-detail/components/WorkspaceModeBadge.tsx Outdated
- Drop the unused `size` prop from WorkspaceModeBadge; hard-code 13.
- Show the badge in the channel breadcrumb path too (via leafIcon), so
  tasks opened inside a channel also surface the workspace mode. Gated on
  workspaceMode so the breadcrumb's icon slot stays empty until known.

Generated-By: PostHog Code
Task-Id: aca01a55-925e-4c51-bbd2-2bd957cf3b53
@MattPua MattPua marked this pull request as ready for review June 26, 2026 18:26
@MattPua MattPua requested a review from a team June 26, 2026 18:27
@greptile-apps

greptile-apps Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "refactor(ui): address review feedback on..." | Re-trigger Greptile

Generated-By: PostHog Code
Task-Id: aca01a55-925e-4c51-bbd2-2bd957cf3b53
@MattPua MattPua merged commit edd5f41 into main Jun 26, 2026
23 checks passed
@MattPua MattPua deleted the posthog-code/task-workspace-mode-badge branch June 26, 2026 19:44
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.

2 participants