Skip to content

feat(desktop): hide sidebar agent chips unless multiple agents are running - #5445

Merged
Kitenite merged 1 commit into
mainfrom
inline-agent-multi-displa
Jul 3, 2026
Merged

Kitenite merged 1 commit into
mainfrom
inline-agent-multi-displa

Conversation

@Kitenite

@Kitenite Kitenite commented Jul 3, 2026 •

Copy link
Copy Markdown
Member

Summary

  • The v2 sidebar activity strip now renders inline agent chips only when a workspace has more than one running agent; a lone agent is the norm and showing it added no signal.
  • The rule is expressed as named conditions (hasMultipleAgents, showAgentChips) in DashboardSidebarWorkspaceDetails and documented in the component JSDoc.
  • Port pills are unaffected: with chips hidden the existing logic already drops the agent-adjacent margin, and the strip still renders null when there are no ports and no visible agents.
  • Also syncs bun.lock with the 1.13.0 / host-service 0.8.23 version bumps from main.

Test Plan

  • Workspace with one running agent: no agent chip in the activity strip; port pills render as before
  • Workspace with two or more agents: chips appear and morph into labeled pills on hover
  • Workspace with one agent and no ports: no strip rendered
  • bunx biome check passes on the touched file

Open in Stage

Summary by cubic

Show agent chips in the sidebar only when a workspace has multiple running agents. This reduces noise; ports behave the same, and the strip hides when there are no ports and no visible agents.

  • New Features

    • Gate agent chips on multiple agents via hasMultipleAgents and showAgentChips in DashboardSidebarWorkspaceDetails.
    • Hide chip for a single agent; show chips for 2+ and morph to labeled pills on hover.
    • Keep existing port pill layout; strip returns null when empty.
  • Dependencies

    • Sync bun.lock with @superset/desktop@1.13.0 and @superset/host-service@0.8.23.

Written for commit f5c676f. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Workspace agent chips now appear only when the workspace agents row feature is enabled and there are multiple running agents.
    • A single running agent is now treated as the default and no longer shows chips, creating a cleaner workspace view.

@ghost

ghost commented Jul 3, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 2 individual chapters for you:

Title
1 Conditionally hide agent chips in sidebar
2 Other changes
Open in Stage

Chapters generated by Stage for commit f5c676f on Jul 3, 2026 9:13pm UTC.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4b7f0306-ac88-4bbe-a5ed-f63fbe839689

📥 Commits

Reviewing files that changed from the base of the PR and between 0aaf9fe and f5c676f.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarWorkspaceDetails/DashboardSidebarWorkspaceDetails.tsx

📝 Walkthrough

Walkthrough

The workspace details agent chips rendering logic was updated so chips display only when the workspace agents row feature is enabled and multiple agents are running, rather than for any single running agent. Inline documentation was updated to reflect this behavior.

Changes

Agent Chips Visibility

Layer / File(s) Summary
Agent chip visibility condition
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarWorkspaceDetails/DashboardSidebarWorkspaceDetails.tsx
Introduces hasMultipleAgents and showAgentChips to gate agent chip rendering on both feature flag and multiple running agents, with updated inline documentation.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

  • superset-sh/superset#5414: Introduced the running-agents row and feature-flag plumbing in DashboardSidebarWorkspaceDetails that this change directly refines.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: hiding sidebar agent chips unless multiple agents are running.
Description check ✅ Passed The description clearly explains the change and includes a concrete test plan, though some template sections like related issues are omitted.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch inline-agent-multi-displa

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.

@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR hides inline agent chips in the v2 sidebar activity strip when a workspace has only one running agent, on the grounds that a single agent is the norm and provides no disambiguation signal. bun.lock is also updated to track version bumps from main.

  • The new hasMultipleAgents / showAgentChips named conditions in DashboardSidebarWorkspaceDetails make the intent explicit; the existing early-return and port-pill margin logic (agents.length > 0) already respond correctly to agents being empty, so no other code needs to change.
  • bun.lock is a dependency lockfile sync with no logic changes.

Confidence Score: 5/5

Safe to merge — the change is a small, well-scoped display condition with no side effects on data fetching or port rendering.

Three lines changed in the component: a threshold check, a combined flag, and a conditional assignment. All downstream consumers of agents (early-return guard, port-pill margin, chip render loop) already handle an empty array correctly, so the change has no unintended ripple effects. The bun.lock update is purely mechanical.

No files require special attention.

Important Files Changed

Filename Overview
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarWorkspaceDetails/DashboardSidebarWorkspaceDetails.tsx Adds hasMultipleAgents / showAgentChips guards so agent chips are hidden unless two or more agents are running; JSDoc updated accordingly.
bun.lock Lockfile sync for bun 1.13.0 / host-service 0.8.23 version bumps from main; no logic changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[DashboardSidebarWorkspaceDetails] --> B{workspaceAgentsRowEnabled?}
    B -- No --> C[runningAgents = empty array]
    B -- Yes --> D[useDashboardSidebarWorkspaceRunningAgents]
    D --> E{runningAgents.length > 1?}
    E -- No / 0 or 1 agent --> F[agents = empty array]
    E -- Yes / 2+ agents --> G[agents = runningAgents]
    F --> H{ports.length === 0 AND agents.length === 0?}
    G --> H
    C --> H
    H -- Yes --> I[return null]
    H -- No --> J[Render activity strip]
    J --> K[Agent chips only if agents.length > 0]
    J --> L[Port count pill — ml-2 margin only if agents.length > 0]
    J --> M[Individual port pills on expand]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[DashboardSidebarWorkspaceDetails] --> B{workspaceAgentsRowEnabled?}
    B -- No --> C[runningAgents = empty array]
    B -- Yes --> D[useDashboardSidebarWorkspaceRunningAgents]
    D --> E{runningAgents.length > 1?}
    E -- No / 0 or 1 agent --> F[agents = empty array]
    E -- Yes / 2+ agents --> G[agents = runningAgents]
    F --> H{ports.length === 0 AND agents.length === 0?}
    G --> H
    C --> H
    H -- Yes --> I[return null]
    H -- No --> J[Render activity strip]
    J --> K[Agent chips only if agents.length > 0]
    J --> L[Port count pill — ml-2 margin only if agents.length > 0]
    J --> M[Individual port pills on expand]
Loading

Reviews (1): Last reviewed commit: "feat(desktop): hide sidebar agent chips ..." | Re-trigger Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

No issues found across 2 files

Architecture diagram
sequenceDiagram
    participant Client as React Renderer
    participant Comp as DashboardSidebarWorkspaceDetails
    participant Data as Workspace Data Store

    Note over Client,Data: PR: Agent chips only when multiple agents running

    Client->>Comp: Render with workspaceId, workspaceAgentsRowEnabled
    Comp->>Data: Get runningAgents (from store / real-time)
    Data-->>Comp: Array of running agent objects

    alt workspaceAgentsRowEnabled? (feature flag)
        alt runningAgents.length > 1
            Comp->>Comp: agents = runningAgents (show chips)
        else runningAgents.length <= 1
            Comp->>Comp: agents = [] (hide chips)
        end
    else feature flag off
        Comp->>Comp: agents = [] (always hide)
    end

    alt ports.length === 0 and agents.length === 0
        Comp-->>Client: render null (no strip)
    else
        Comp-->>Client: render port pills + (conditionally) agent chips
    end
Loading

Re-trigger cubic

@Kitenite
Kitenite merged commit 0b43484 into main Jul 3, 2026
11 checks passed
@github-actions

github-actions Bot commented Jul 3, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

🔗 Preview Links

Service Status Link
Neon Database (Neon) ✅ View Branch
Vercel API (Vercel) ✅ Open Preview
Vercel Web (Vercel) ✅ Open Preview
Vercel Marketing (Vercel) ✅ Open Preview
Vercel Admin (Vercel) ✅ Open Preview
Vercel Docs (Vercel) ✅ Open Preview

Preview updates automatically with new commits

This branch was previously deployed

1 inactive deployment
preview — f5c676f0 Deployed Jul 3, 2026 by Kitenite via Deploy Marketing #6146
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