Skip to content

feat(web): show remote environment on command palette project rows#4429

Draft
Noojuno wants to merge 4 commits into
pingdotgg:mainfrom
Noojuno:feat/command-palette-remote-environment-badge
Draft

feat(web): show remote environment on command palette project rows#4429
Noojuno wants to merge 4 commits into
pingdotgg:mainfrom
Noojuno:feat/command-palette-remote-environment-badge

Conversation

@Noojuno

@Noojuno Noojuno commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What

Project rows in the command palette — both the New thread in… submenu and project search results — now show which remote T3 Code environment a project lives on. Each row gets a small trailing badge: a cloud icon (or a container icon for a desktop-local sandbox such as WSL) plus the environment label, with a tooltip reading Remote environment: <label> (or Local sandbox: <label>).

Local (this-device) projects have no remote, so nothing is rendered for them.

Why

When projects span multiple connected environments, the palette gave no indication of which remote a given project came from — you had to recognise it by path alone.

How

  • CommandPalette.logic.ts: buildProjectActionItems gains an optional titleTrailingContent(project) callback that maps onto the row's existing titleTrailingContent slot.
  • CommandPalette.tsx: adds a renderProjectRemoteBadge helper wired into both projectSearchItems and projectThreadItems, looking up each project's group via the existing projectGroupByTargetKey map.

This deliberately mirrors the sidebar's existing project-header treatment (Sidebar.tsx), reusing the group's remoteEnvironmentLabels / allRemoteMembersAreDesktopLocal data so wording and iconography stay consistent across the app. The badge renders through the row component's existing titleTrailingContent slot, so no changes to CommandPaletteResults.tsx were needed.

Note: the sidebar only badges remote-only projects, whereas this shows the badge whenever a project has any remote member (i.e. also "mixed" projects that exist both locally and on a remote), since the intent is to surface which remote a project is from.

Testing

  • pnpm typecheck passes.
  • CommandPalette unit tests pass.
  • Verified manually in the browser with a project on a genuinely remote (second) T3 Code environment — the cloud badge + environment label render as expected on each project row.

🤖 Generated with Claude Code

Note

Show remote environment badge on command palette project rows

  • Adds a renderProjectRemoteBadge function in CommandPalette.tsx that renders a small icon and tooltip indicating whether a project runs in a remote environment or local sandbox.
  • Extends buildProjectActionItems in CommandPalette.logic.ts to accept an optional titleTrailingContent callback, which is spread into each action item when provided.
  • The badge uses CloudIcon for remote environments and ContainerIcon for local sandboxes, with labels truncated and joined from remoteEnvironmentLabels.
📊 Macroscope summarized a34d896. 1 file reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted

🗂️ Filtered Issues

No issues evaluated.

Project rows in the command palette ("New thread in..." and project
search) now show which remote T3 Code environment a project lives on,
via a cloud/container badge plus the environment label. This mirrors the
sidebar's existing project-header treatment, reusing the group's
remoteEnvironmentLabels / allRemoteMembersAreDesktopLocal data. Local
(this-device) projects have no remote, so nothing is rendered for them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c0b092f0-8b7d-416c-8306-7f72c7753526

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jul 24, 2026
Switch the project-row remote badge from the v1 sidebar's cloud/container
icons to SidebarV2's ServerIcon, dropping the desktop-local sandbox
distinction, so it matches the sidebar that will become the default.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
// icon plus the environment label(s), matching SidebarV2's environment
// treatment. Local (this-device) projects have no remote, so nothing is
// rendered for them.
function renderProjectRemoteBadge(group: SidebarProjectSnapshot | undefined): ReactNode {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Low components/CommandPalette.tsx:167

renderProjectRemoteBadge always renders ServerIcon with a "Remote environment:" tooltip when remoteEnvironmentLabels is non-empty, ignoring group.allRemoteMembersAreDesktopLocal. For WSL/desktop-local groups, allRemoteMembersAreDesktopLocal is true because the members are local sandboxes rather than genuine remotes, but the badge still displays the cloud/server icon and "Remote environment" wording — mislabeling the row. Consider branching on allRemoteMembersAreDesktopLocal to render the sandbox icon and "Local sandbox" text for those groups, matching the sidebar's treatment.

🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/CommandPalette.tsx around line 167:

`renderProjectRemoteBadge` always renders `ServerIcon` with a "Remote environment:" tooltip when `remoteEnvironmentLabels` is non-empty, ignoring `group.allRemoteMembersAreDesktopLocal`. For WSL/desktop-local groups, `allRemoteMembersAreDesktopLocal` is `true` because the members are local sandboxes rather than genuine remotes, but the badge still displays the cloud/server icon and "Remote environment" wording — mislabeling the row. Consider branching on `allRemoteMembersAreDesktopLocal` to render the sandbox icon and "Local sandbox" text for those groups, matching the sidebar's treatment.

Noojuno and others added 2 commits July 24, 2026 18:45
Replace the CloudIcon remote-environment indicator with ServerIcon across
the branch toolbar, environment selector, sidebar, and thread status
indicators, matching SidebarV2 (soon the default) and the command palette
badge. The desktop-local sandbox ContainerIcon distinction is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Restrict the remote-environment badge to projects that live purely on a
remote environment. When a project is also present locally (this device),
it needs no "from" hint, so mixed and local-only projects render nothing.
This matches the sidebar's remote-only badge behaviour.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant