Skip to content

fix(desktop): always show branch subtitle for non-local workspace rows - #1530

Closed
ascrazy wants to merge 2 commits into
ParadevAI:mainfrom
ascrazy:codex/fix-sidebar-branch-subtitle
Closed

ascrazy wants to merge 2 commits into
ParadevAI:mainfrom
ascrazy:codex/fix-sidebar-branch-subtitle

Conversation

@ascrazy

@ascrazy ascrazy commented Feb 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes a sidebar regression where branch names were not shown in the subtitle row for some non-local workspaces.

Updated /Users/alexs/Dev/superset/apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceListItem/WorkspaceListItem.tsx so:

  • non-local (worktree) workspace rows always show the branch subtitle
  • the local/main workspace entry keeps the conditional subtitle behavior (name !== branch)

Related Issues

N/A

Type of Change

  • Bug fix
  • [-] New feature
  • [-] Documentation
  • [-] Refactor
  • [-] Other (please describe):

Testing

  • cd apps/desktop && SUPERSET_WORKSPACE_NAME=dev SKIP_ENV_VALIDATION=1 bun run dev
  • check workspace list items in the sidebar

Screenshots (if applicable)

Before After
Screenshot 2026-02-16 at 21 33 44 Screenshot 2026-02-16 at 21 32 38

Additional Notes

This branch contains two commits, but the net diff vs origin/main is a single-line logic change in the file above.

Summary by CodeRabbit

Bug Fixes

  • Fixed incorrect visibility logic for workspace branch subtitle in the sidebar, ensuring workspace information displays correctly based on workspace type and naming.

@coderabbitai

coderabbitai Bot commented Feb 16, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

A conditional logic expression in the WorkspaceListItem component was inverted, changing when the branch subtitle is displayed. The subtitle now shows under a different condition without modifying other component behavior or structure.

Changes

Cohort / File(s) Summary
Branch Subtitle Display Logic
apps/desktop/src/renderer/screens/main/components/WorkspaceSidebar/WorkspaceListItem/WorkspaceListItem.tsx
Inverted conditional for showBranchSubtitle to alter when the branch subtitle renders in the workspace list item.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 A hop through the conditions, a flip of the gate,
Where branches now show at a different rate.
One line, one change, the subtitle's dance,
A logic inversion—a subtle branch prance! 🌿

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: fixing a regression where branch subtitles were not shown for non-local workspace rows. It directly aligns with the changeset's core objective.
Description check ✅ Passed The description comprehensively covers all required template sections: clear description of the fix, related issues, type of change (bug fix), testing steps, screenshots showing before/after, and additional context. All critical information is present and well-organized.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@ascrazy

ascrazy commented Feb 16, 2026

Copy link
Copy Markdown
Contributor Author

Hey @AviPeltz, I believe it was supposed to

  • always show branch name for type=workspace menu items
  • only show branch name for type=branch menu item if it differs from the menu item name

@ascrazy

ascrazy commented Feb 16, 2026

Copy link
Copy Markdown
Contributor Author

Though because type=branch now never shows menu item name but rather always hidden behind static "local" label, I would argue we need to drop all conditions and make showBranchSubtitle always true

Screenshot 2026-02-16 at 21 38 56

@AviPeltz WDYT?

@ascrazy
ascrazy marked this pull request as ready for review February 16, 2026 20:39
@Kitenite

Copy link
Copy Markdown
Member

This logic deduplicates if the branch and name is exactly the same (when there's no custom name). I think this PR would regress that behavior

@Kitenite

Copy link
Copy Markdown
Member

Closing — this is intended behavior. When the workspace name matches the branch name, we intentionally hide the branch subtitle to declutter the sidebar. Showing it redundantly doesn't add useful information.

@Kitenite Kitenite closed this Feb 17, 2026

@AviPeltz AviPeltz left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

sorry ai said this

AviPeltz

This comment was marked as outdated.

@ascrazy

ascrazy commented Feb 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Hey @AviPeltz, @Kitenite,

I totally get the idea of sidebar de-cluttering, though IMO just hiding the branch name doesn't make things any better and in fact making it worse because we suddenly get wide range of different states for WorkspaceListItem that don't look good shown next to each other

Screenshot 2026-02-17 at 16 44 16
  1. if workspace item doesn't have a PR yet - WorkspaceListItem gets collapsed into smaller height item (see test-branch on the screenshot)
  2. if workspace item has branch matching it's name and it already has a PR - we get a weird empty space below it, and also icon gets aligned inconsistently with other items (see fix-web-search-slack on the screenshot)

I believe this change (not showing branch if it matches workspace name) was released just a couple of days ago and IMO it definitely made visual quality of the sidebar worse.

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.

3 participants