Repository navigation
fix(sidebar): empty groups show only their header - #30298
Conversation
Sidebar-Look: no visual change Agent-Session: https://cmux.com/deeplink/agent?id=aid-f310a9408dab5731f3da
Sidebar-Look: what do you feel about this placeholder situation? idk doesn’t that plceholder text seem a bit wack? Agent-Session: https://cmux.com/deeplink/agent?id=aid-f310a9408dab5731f3da
|
Review (subagent read-only): SHIP at fb8af65. No code blockers; fleet compile pending. The owner independently checked the source diff and preserved header creation and drop paths. |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by Default changesThis pull request changes 2 defaults at
Signed off on this commit by Merge receipt: merged as Regenerate the snapshot with Shipped in:
|
Sidebar-Look: no visual change Agent-Session: https://cmux.com/deeplink/agent?id=aid-f310a9408dab5731f3da
|
Review (subagent read-only): SHIP at dd4841a. Rechecked against merged base ff74759: the source/test delta is unchanged; only the sidebar design-log conflict needed resolution. No blocking findings. The original head app compile passed; merged-head compile is in flight. Design/sidebar.md update merged as leo-workspace#2164. |
There was a problem hiding this comment.
2 issues found and verified against the latest diff
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="Packages/macOS/CmuxNext/Tests/CmuxNextAppTests/SidebarEmptyGroupGalleryTests.swift">
<violation number="1" location="Packages/macOS/CmuxNext/Tests/CmuxNextAppTests/SidebarEmptyGroupGalleryTests.swift:77">
P3: This gallery writes `sidebar-empty-group-gallery/` and `sidebar-empty-group-gallery.tar` into `Packages/macOS/CmuxNext`, but `.gitignore` has no entries for them. Add `Packages/macOS/CmuxNext/sidebar-empty-group-gallery/` and `Packages/macOS/CmuxNext/sidebar-empty-group-gallery.tar` next to the other gallery entries.</violation>
</file>
<file name="Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Views/SidebarListView+PointerEnd.swift">
<violation number="1" location="Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Views/SidebarListView+PointerEnd.swift:127">
P2: The check uses the cached model members, so it misses groups made empty by the current drag's excluded workspace. Use the displayed header's filtered `childCount` so a one-member group still highlights when its member is being dragged out.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| func highlightsDropGroup(_ id: GroupID) -> Bool { | ||
| if drag?.target == .intoGroup(id) || external?.proposal == .intoGroup(id) { return true } | ||
| guard case let .position(position)? = drag?.target, position.group == id, | ||
| groups[id]?.members.isEmpty == true else { return false } |
There was a problem hiding this comment.
P2: The check uses the cached model members, so it misses groups made empty by the current drag's excluded workspace. Use the displayed header's filtered childCount so a one-member group still highlights when its member is being dragged out.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At Packages/macOS/CmuxNext/Sources/CmuxNextSidebar/Views/SidebarListView+PointerEnd.swift, line 127:
<comment>The check uses the cached model members, so it misses groups made empty by the current drag's excluded workspace. Use the displayed header's filtered `childCount` so a one-member group still highlights when its member is being dragged out.</comment>
<file context>
@@ -119,6 +119,15 @@ extension SidebarListViewComponents {
+ func highlightsDropGroup(_ id: GroupID) -> Bool {
+ if drag?.target == .intoGroup(id) || external?.proposal == .intoGroup(id) { return true }
+ guard case let .position(position)? = drag?.target, position.group == id,
+ groups[id]?.members.isEmpty == true else { return false }
+ return true
+ }
</file context>
| groups[id]?.members.isEmpty == true else { return false } | |
| displayed.row(for: .group(id))?.childCount == 0 else { return false } |
| @Test(.enabled(if: ProcessInfo.processInfo.environment["CMUX_TEST_REQUIRE_GUI"] == "1")) | ||
| func renderThreeVersions() throws { | ||
| let root = AANestedGroupsGalleryTests.packageRoot | ||
| let out = root.appending(path: "sidebar-empty-group-gallery") |
There was a problem hiding this comment.
P3: This gallery writes sidebar-empty-group-gallery/ and sidebar-empty-group-gallery.tar into Packages/macOS/CmuxNext, but .gitignore has no entries for them. Add Packages/macOS/CmuxNext/sidebar-empty-group-gallery/ and Packages/macOS/CmuxNext/sidebar-empty-group-gallery.tar next to the other gallery entries.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At Packages/macOS/CmuxNext/Tests/CmuxNextAppTests/SidebarEmptyGroupGalleryTests.swift, line 77:
<comment>This gallery writes `sidebar-empty-group-gallery/` and `sidebar-empty-group-gallery.tar` into `Packages/macOS/CmuxNext`, but `.gitignore` has no entries for them. Add `Packages/macOS/CmuxNext/sidebar-empty-group-gallery/` and `Packages/macOS/CmuxNext/sidebar-empty-group-gallery.tar` next to the other gallery entries.</comment>
<file context>
@@ -0,0 +1,100 @@
+ @Test(.enabled(if: ProcessInfo.processInfo.environment["CMUX_TEST_REQUIRE_GUI"] == "1"))
+ func renderThreeVersions() throws {
+ let root = AANestedGroupsGalleryTests.packageRoot
+ let out = root.appending(path: "sidebar-empty-group-gallery")
+ try FileManager.default.createDirectory(at: out, withIntermediateDirectories: true)
+ var html = "<meta charset='utf-8'><title>Empty group designs</title><style>body{font:16px system-ui}section{display:flex;gap:16px}img{width:280px;height:500px}figure{margin:0}</style><h1>Empty group designs</h1><p>Chosen: headerOnly. No extra row; + on hover; group highlight during a drop.</p>"
</file context>
|
Validation at dd4841a: fleet app compile passed (job bd27666713acc32241d7d7a8, 57 s). Static prepush gate passed. Independent exact-head SHIP is above. Current checks report no failures; this Swift-only change does not route the webview suites. Native gallery/test step 3c6c1125d06b39226723a3cc continues at the original head fb8af65 (source/test delta identical after the base merge); its artifact is follow-up evidence. |
|
Found 2 test failures on Blacksmith runners: Failures
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Empty workspace groups now show only their header at rest. The header's + stays reachable on hover, keyboard focus and accessibility actions; dragging a workspace into an empty group highlights that header. Full layout and fast fold no longer insert “No workspaces · drag one here”.
Leo, 2026-11-01: “what do you feel about this placeholder situation? idk doesn't that plceholder text seem a bit wack?”
The gallery compares three native versions: the previous placeholder row, header-only (chosen), and an always-visible header +. Each includes rest, hover and drop states in light and dark at 2x. Header-only avoids an extra row while keeping the existing creation and drop actions.
Validation: focused tests cover header-only geometry, fold/full-layout agreement, dropping on the empty header, transient drag highlight, and hover + creation. Test-only red reference:
86fa5cfa7461; implementation head follows it. Fleet compile/test evidence follows. Static prepush gate passes; the lane has no Swift compiler. Gallery artifacts are follow-up visual evidence, not a merge gate.Risk: limited to projecting an empty group and its drop highlight. Group persistence and last-workspace close behavior are handled separately in #30292. No new settings or defaults.
Design: leo-workspace
design/sidebar.md; recorded inplans/cmux-next/sidebar-owner.md. Replaces the old placeholder treatment, preserving its create/drop actions. Prior art checked: #7061, #23182, #24581, #25669 and #21835; none duplicates this presentation fix.Changelog: Empty sidebar groups keep a compact header with creation available on hover.
Agent session: agent session
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Empty sidebar groups now show only their header; the placeholder row is removed from both full layout and fast fold. The header’s + remains available on hover, keyboard focus, and accessibility actions, and highlights when a workspace is dragged into the group.
Written for commit dd4841a. Summary will update on new commits.