Skip to content

Fix collapsed group spacing for empty groups#495

Merged
jeffscottward merged 8 commits intoRunMaestro:mainfrom
jeffscottward:group-css-fix
Mar 25, 2026
Merged

Fix collapsed group spacing for empty groups#495
jeffscottward merged 8 commits intoRunMaestro:mainfrom
jeffscottward:group-css-fix

Conversation

@jeffscottward
Copy link
Copy Markdown
Contributor

@jeffscottward jeffscottward commented Mar 1, 2026

Description

  • Hide collapsed group palette rendering when a collapsed group has no top-level agents.
  • Remove extra vertical spacing below empty collapsed groups in the left session sidebar.

Closes #494

Summary by CodeRabbit

  • Bug Fixes

    • Collapsed session groups now show a compact pill-style view and avoid rendering empty collapsed blocks.
  • Tests

    • Added test coverage for collapsed-group palette rendering behavior.
  • Documentation

    • Reflowed and reorganized release notes content for clarity and consistency.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 1, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Updates SessionList rendering so collapsed groups show compact session "pills" and collapsed groups with no child sessions render no collapsed container; adds a test for that behavior and reformats release notes in docs/releases.md.

Changes

Cohort / File(s) Summary
Release notes
docs/releases.md
Reflowed and reordered release-note content across version sections (formatting and line moves only; no semantic changes).
Session list rendering
src/renderer/components/SessionList/SessionList.tsx
Adds groupCollapsedPills (filters child sessions without parentSessionId) and changes collapsed-group rendering to display CollapsedSessionPills when pills exist; returns null for collapsed groups with no pills to avoid rendering empty collapsed containers.
Tests
src/__tests__/renderer/components/SessionList.test.tsx
Adds test asserting a collapsed group with no top-level sessions does not render the collapsed palette container element.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix collapsed group spacing for empty groups' directly summarizes the main change: preventing empty collapsed groups from rendering unnecessary spacing.
Linked Issues check ✅ Passed Changes implement the required fix: collapsed groups with no top-level sessions now render null instead of empty placeholder blocks, eliminating extra vertical spacing as specified in issue #494.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing empty collapsed group spacing: documentation reorganization, test addition for the fix, and conditional rendering logic are all within the stated objectives.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Mar 1, 2026

Greptile Summary

This PR fixes a UI spacing bug where collapsing a group that contains no top-level agents (i.e., groupCollapsedPills.length === 0) would still render the empty pill container div — including its mt-1 mb-2 vertical margin — producing unwanted whitespace in the left sidebar.

Changes made:

  • Introduces a pre-computed groupCollapsedPills variable at the top of the sortedGroups.map callback, filtering groupSessions to only top-level sessions (!session.parentSessionId). This is a clean refactor that avoids the repeated inline .filter() call that existed before.
  • Converts the else branch for the collapsed group pill container into a guarded ternary: the pill div is rendered only when groupCollapsedPills.length > 0, and null is returned otherwise — correctly suppressing both the container and its spacing.

The fix is minimal, targeted, and logically correct. No side effects are introduced for the expanded-group path or for groups that do have top-level sessions.

Confidence Score: 5/5

  • This PR is safe to merge — it is a minimal, targeted UI fix with no logic regressions.
  • The change is small (one new variable + one ternary guard), touches only the render path for collapsed groups in the sidebar, and the fix directly matches the described bug. The pre-computed groupCollapsedPills filter is equivalent to the existing inline filter, so no behavioral change is introduced for groups that do have top-level sessions.
  • No files require special attention.

Important Files Changed

Filename Overview
src/renderer/components/SessionList.tsx Adds groupCollapsedPills pre-filter and changes the collapsed-state branch from an unconditional else to a guarded ternary that renders null when no top-level sessions exist, eliminating the empty pill container and its vertical spacing.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Render Group] --> B{group.collapsed?}
    B -- No --> C[Render expanded session list\nwith border-l]
    B -- Yes --> D{groupCollapsedPills\n.length > 0?}
    D -- Yes --> E[Render collapsed pill container\nml-8 mr-3 mt-1 mb-2]
    D -- No --> F[Render null\nno spacing / no container]
Loading

Last reviewed commit: 5002a82

@pedramamini
Copy link
Copy Markdown
Collaborator

This looks safe, but on the fact chance that it causes some regression or is going to hold off on 0.15.0 ... first merge after i publish that version.

jeffscottward pushed a commit to jeffscottward/Maestro that referenced this pull request Mar 3, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@prompt.XXXXXX.txt`:
- Around line 1-17: Delete the generated artifact file "prompt.XXXXXX.txt" from
the branch (remove it from the PR changes) so it is no longer tracked or part of
the commit set; locate the file by name in the diff/commit and remove it (git rm
/ delete and commit/push) and ensure it is not reintroduced (optionally add the
filename pattern to .gitignore) so lint/format and tests no longer fail due to
this non-product file.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5002a82 and 051a29d.

📒 Files selected for processing (2)
  • payload.XXXXXX.json
  • prompt.XXXXXX.txt
✅ Files skipped from review due to trivial changes (1)
  • payload.XXXXXX.json

Comment thread prompt.XXXXXX.txt Outdated
jeffscottward pushed a commit to jeffscottward/Maestro that referenced this pull request Mar 3, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/releases.md`:
- Line 35: Fix typos and grammar in the release notes by replacing the incorrect
tokens: change "FIle" to "File" in the sentence that begins "🗄️ Document
Graphs. Launch from file preview...", change "built in" to "built-in", change
"You will received" to "You will receive", and change "Github" to "GitHub" so
the release notes read with correct spelling and hyphenation.
- Line 41: Update the subsection headings in the releases document to use
consistent third-level headings (###) under each release's second-level heading
(## vX.Y.x) and fix the typo in the release title "Smaller Changes in 014.x" to
"Smaller Changes in 0.14.x"; specifically replace any stray top-level (#) or
second-level (##) headings within release sections (e.g., the "Smaller Changes
in 014.x" heading and the other subsections currently using `#/`##) with ### so
the document hierarchy and generated TOC remain correct.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 051a29d and d0637e0.

📒 Files selected for processing (4)
  • docs/releases.md
  • payload.XXXXXX.json
  • src/renderer/components/FilePreview.tsx
  • src/renderer/hooks/batch/useBatchProcessor.ts
✅ Files skipped from review due to trivial changes (1)
  • src/renderer/hooks/batch/useBatchProcessor.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • payload.XXXXXX.json

Comment thread docs/releases.md
Comment thread docs/releases.md Outdated
@pedramamini
Copy link
Copy Markdown
Collaborator

@jeffscottward would you address the conflicts? ready to merge this in.

@jeffscottward
Copy link
Copy Markdown
Contributor Author

@reachraza these are the exact files i was choking on before can you take a look at what is supposed to be correct?

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/releases.md`:
- Line 22: Replace the three compound modifiers that should be hyphenated:
change the phrase "open source" to "open-source", change "cross context" to
"cross-context", and change "built in" to "built-in" in docs/releases.md so the
compound adjectives preceding nouns are properly hyphenated; search for these
exact phrases to locate and update them.
- Line 201: Update the capitalization of the brand name in the release note:
change the phrase "Github Worktree support was added." (the line that begins
"Github Worktree support") to "GitHub Worktree support was added." so that
"GitHub" uses the correct capital "H" in the releases.md text.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9e28e5d3-d779-4f14-a33b-c6f77c13ecef

📥 Commits

Reviewing files that changed from the base of the PR and between 1a1daf8 and f1e2a34.

📒 Files selected for processing (1)
  • docs/releases.md

Comment thread docs/releases.md Outdated
Comment thread docs/releases.md Outdated
@jeffscottward jeffscottward merged commit bfe3c36 into RunMaestro:main Mar 25, 2026
3 checks passed
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.

Minor CSS Fix extra spacing for collapsed empty groups in left sidebar

2 participants