Skip to content

fix: preserve pane title and close button when Agents, Activity, or Review is empty - #77

Merged
wolfiesch merged 1 commit into
mainfrom
codex/pane-empty-state-fix
Jul 19, 2026
Merged

fix: preserve pane title and close button when Agents, Activity, or Review is empty#77
wolfiesch merged 1 commit into
mainfrom
codex/pane-empty-state-fix

Conversation

@wolfiesch

@wolfiesch wolfiesch commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

What this changes

  • Empty pane headers wrapped: Updated AgentsPane, ActivityPane, and ReviewPane early empty checks to return a flex column structure containing <PaneHeading ... /> followed by the <FamilyEmpty ... /> view instead of returning the unadorned <FamilyEmpty ... /> wrapper directly.
  • No-store fallback header wrapped: Wrapped PaneContent's sessionId === null early check in the same header structure to ensure that the panel title and desktop close buttons are rendered.
  • FamilyEmpty sizing: Updated the child FamilyEmpty view to use min-h-0 flex-1 rather than forcing h-full internally to prevent column scroll overflows inside the h-full wrapper.
  • Regression Test: Created a new test file apps/web/test/pane-empty-states.test.tsx containing isolated stores via createInspectorStore to verify that PaneHeading titles and the custom close buttons are rendered in all four empty state cases.

Why

  • Fixes a bug where empty pane states (such as an empty Agents, Activity, or Review pane) would lack titles and desktop close buttons, leaving the pane undismissable.

How you verified it

  • Added pane-empty-states.test.tsx and ran it successfully: all 4 test cases verified the presence of pane labels and close button markup.
  • Verified full suite typecheck and checks pass via pnpm check.
  • Verified all 995 unit/integration tests pass via pnpm --filter @t4-code/web test.

Checklist

  • Verified build passes
  • Verified tests pass
  • Verified visual layout for empty states

Copilot AI review requested due to automatic review settings July 19, 2026 13:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes empty-state pane rendering so pane headers (title + trailing close control) remain visible even when Agents/Activity/Review panes (or the PaneContent store) are empty, preventing undismissable panes.

Changes:

  • Wrap empty-state early returns in AgentsPane, ActivityPane, and ReviewPane with a PaneHeading + FamilyEmpty column layout.
  • Update PaneContent’s sessionId === null || store === null fallback to render the same header structure.
  • Make FamilyEmpty accept an optional className so empty states can participate correctly in flex layouts; add a regression test covering the four empty cases.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
apps/web/test/pane-empty-states.test.tsx Adds regression tests asserting headers + close control render in all targeted empty states.
apps/web/src/features/panes/ReviewPane.tsx Ensures Review empty state still renders PaneHeading (incl. trailing close).
apps/web/src/features/panes/PaneContent.tsx Ensures no-store/no-session fallback renders PaneHeading + empty content.
apps/web/src/features/panes/FamilyEmpty.tsx Adds className support to allow flexible sizing (min-h-0 flex-1) when wrapped.
apps/web/src/features/panes/AgentsPane.tsx Ensures Agents empty state still renders PaneHeading (incl. trailing close).
apps/web/src/features/panes/ActivityPane.tsx Ensures Activity empty state still renders PaneHeading (incl. trailing close).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +85 to +88
<div className="flex h-full min-h-0 flex-col">
<PaneHeading family={family} trailing={trailing} />
<FamilyEmpty className="min-h-0 flex-1" family={family} />
</div>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The outer container uses h-full min-h-0 to fill the panel, while FamilyEmpty is adjusted to min-h-0 flex-1 to sit within the flex structure without causing column scroll/height overflow.

@wolfiesch
wolfiesch merged commit f773b4f into main Jul 19, 2026
5 checks passed
@wolfiesch
wolfiesch deleted the codex/pane-empty-state-fix branch July 19, 2026 13:41
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.

2 participants