Skip to content

fix(sidebar): remove redundant host badges in every grouping - #31744

Merged
nwparker merged 4 commits into
mainfrom
nwparker/redudant-labels
Oct 22, 2026
Merged

nwparker merged 4 commits into
mainfrom
nwparker/redudant-labels

Conversation

@nwparker

@nwparker nwparker commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​167 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​166
Prod 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​329 $\color{#cf222e}{\Huge{\mathbf{−}}}$​308 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​21

ELI5

A machine's name appears once in its sidebar header instead of repeating on every card below it.

What Changed

When host sections are rendered, the shared host-section builder clears redundant host labels from workspace cards and imported/external-worktree notices. This applies to Status, Project, PR, and None grouping, including pinned occurrences. Mixed-host lists without host headers keep their badges.

The source rows remain intact, so switching views restores labels wherever they are needed. Desktop and the mobile sidebar feed use the same rule. Mobile health badges remain visible as health-only badges under host headers, including disconnected SSH hosts.

Why

Follow-up to #31233, which reduced machine labels on project headers. Card badges still repeated the enclosing host header, including “Local Mac” in Status grouping.

Linked Issue

User-reported sidebar clutter; related PRs: #31233 and #28250.

Visual Proof

Actual hidden Electron renderer on macOS, with seeded local and SSH workspace data in Status grouping.

Before:

Repeated machine badges

After:

Machine names shown once in host headers

Testing

  • Manually tested in this worktree's hidden Electron app through Playwright CDP: all four grouping options, host collapse/expand, and switching back to a mixed-host list. Inspected screenshots directly.
  • Added desktop and mobile regression coverage for all grouping modes, pinned duplicates, notices, and preserving mixed-host labels.
  • 141 desktop/shared tests and 63 mobile feed/component/health tests passed.
  • pnpm tc:web, mobile typecheck, pnpm run check:code-quality:changed, pnpm run verify:localization-catalogs, and git diff --check passed.
  • The broad mobile test typecheck reports existing failures; neither changed mobile test file has diagnostics. The mobile test-typecheck baseline gate passed (1,100 test files covered; no new failing files).
  • Rendered validation used macOS dark mode and seeded remote data. Live SSH, Linux, Windows, and a mobile device were not exercised.

Review

Self-reviewed row ownership, collapsed sections, folder workspace handling, and source-row immutability. No IPC/schema, platform-specific, provider-specific, or filesystem behavior changes.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer material copied or translated.

Notes

The shared mobile feed inherits the presentation fix. Host health controls remain available.

Updated both host-section golden fixtures for the intended badge removal (300 rows; no other snapshot changes). Fixed an existing queued-message editor test mock to retain the translation module exports needed by its dependencies; this was an unrelated full-suite failure. Also retired one unused Portuguese localization entry left by #30393, which otherwise failed the catalog gate on the current main branch.

Checklist

  • Small, focused change with before/after behavior explained
  • Before/after screenshots attached
  • Self-reviewed correctness, security, performance, remote compatibility, and cross-platform impact
  • Full lint, typecheck, test, and build gates pass: PR Checks, including the “PR checks passed” aggregate gate on d45dbe68d1cecd666321e72c67e6642955980956.

@nwparker
nwparker force-pushed the nwparker/redudant-labels branch from 702b96f to d7c33f3 Compare October 22, 2026 00:49
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4d147553-603b-4e47-b31c-536ed850640c
📥 Commits

Reviewing files that changed from the base of the PR and between d7c33f3 and c4cefea.

📒 Files selected for processing: 4
  • mobile/src/components/WorktreeListRow.test.ts
  • mobile/src/components/WorktreeListRow.tsx
  • mobile/src/host-screen/host-sidebar-feed-sections.test.ts
  • mobile/src/host-screen/host-sidebar-feed-sections.ts
🚧 Files skipped from review as they are similar to previous changes: 1
  • mobile/src/host-screen/host-sidebar-feed-sections.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

📝 Walkthrough

Host sections clear row-level host context labels for rows that match the section host. Tests cover host headers, row labels, notices, and pinned rows across supported grouping modes. They also verify that unfiltered rows retain their host labels. On mobile, the host badge can show a health label without a host context label or separator.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to c4cef

Host sections omit repeated host names while preserving labels in unfiltered views and health-only badges. No concrete merge-blocking risk remains beyond normal checks.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description covers the change, rationale, visual proof, testing, review notes, compatibility considerations, and checklist. However, the required Linked Issue section does not contain an actual is… Add the actual issue reference or link addressed by this pull request in the Linked Issue section. If the author is a maintainer and no new issue is needed, reference the applicable pre-existing issue instead of leaving the section incomple…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: removing redundant host badges across sidebar groupings.
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.
Full details: Description check

Explanation

The description covers the change, rationale, visual proof, testing, review notes, compatibility considerations, and checklist. However, the required Linked Issue section does not contain an actual issue link or issue reference. It lists related pull requests and leaves “Fixes #” empty.

Resolution

Add the actual issue reference or link addressed by this pull request in the Linked Issue section. If the author is a maintainer and no new issue is needed, reference the applicable pre-existing issue instead of leaving the section incomplete.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d426c151-dd69-48ab-94e9-f115a9ff1f02
📥 Commits

Reviewing files that changed from the base of the PR and between ad0bf9a and 702b96f36524e80d598f650fe2c6c017f2e2c01f.

📒 Files selected for processing: 3
  • mobile/src/host-screen/host-sidebar-feed-sections.test.ts
  • src/renderer/src/components/sidebar/host-section-context-labels.test.ts
  • src/shared/sidebar-list/host-section-rows.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

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