Skip to content

Add collapsible header control to the active plan container#1073

Open
anghelmatei wants to merge 4 commits intopingdotgg:mainfrom
anghelmatei:fix/collapsible-header-active-plan-1029
Open

Add collapsible header control to the active plan container#1073
anghelmatei wants to merge 4 commits intopingdotgg:mainfrom
anghelmatei:fix/collapsible-header-active-plan-1029

Conversation

@anghelmatei
Copy link

@anghelmatei anghelmatei commented Mar 14, 2026

Closes #1029

What Changed

  • added a compact expand/collapse control to the active plan header
  • collapsed state reduces the active plan container to a single row that keeps Plan and Updated ... visible
  • kept the active plan as a single pinned card that updates in place instead of rendering as a new timeline row
  • adjusted the active plan container alignment so it lines up with adjacent timeline content
  • kept the blur effect clipped to the rounded plan container so it does not bleed outside the card
  • added browser coverage for collapsing and expanding the active plan card

Why

The active plan container could take up too much vertical space once a plan was generated, and there was no quick way to collapse it while still keeping plan status visible. It also sat slightly out of alignment with nearby timeline sections, which made the layout feel off.

This approach keeps the change narrowly scoped to the active plan container, preserves the existing pinned/in-place update behavior, and stores collapse state above the card so it survives normal rerenders.

UI Changes

Before:

  • active plan always stayed expanded
  • the plan container appeared slightly misaligned relative to adjacent timeline content
  • blur styling could extend beyond the visible plan container
t3code collapse plan btn add

After:

  • the active plan can be collapsed to a single header row
  • the header keeps Plan and Updated ... visible while collapsed
  • the container alignment matches nearby timeline rows
  • the blur stays visually clipped to the plan card

Expanded
uncollapsed

Collapsed
collapsed

Video:

2026-03-14.14-33-30.mp4

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Add collapsible ActivePlanCard to the active plan container in ChatView

  • Adds a new ActivePlanCard component that renders a sticky plan card above the message timeline, showing a 'Plan' badge, last-updated timestamp, optional explanation, and step list with status badges.
  • ChatView tracks collapse state per plan key (preferring turnId, falling back to createdAt) so each plan's expanded/collapsed state is remembered independently within a session.
  • MessagesTimeline's hasMessages prop is now true when an active plan is present, even if there are no timeline entries.
  • A browser test in ChatView.browser.tsx verifies that clicking the collapse/expand button hides and restores plan step text.

Macroscope summarized 9004ff7.

Copilot AI review requested due to automatic review settings March 14, 2026 12:44
@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 27d8e93f-510d-4845-9e73-80110e47c612

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 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.

Tip

Migrating from UI to YAML configuration.

Use the @coderabbitai configuration command in a PR comment to get a dump of all your UI settings in YAML format. You can then edit this YAML file and upload it to the root of your repository to configure CodeRabbit programmatically.

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 14, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a collapsible, sticky “Active Plan” card at the top of the chat timeline so users can reduce vertical space while keeping plan status visible, and adds browser coverage to verify the collapse/expand behavior.

Changes:

  • Introduces ActivePlanCard with a header-only collapsed state and an accessible toggle control.
  • Pins the active plan above the timeline and tracks collapsed state in ChatView so it survives rerenders.
  • Adds a browser test snapshot + interaction test for collapsing/expanding the active plan card.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
apps/web/src/components/chat/ActivePlanCard.tsx New UI component for displaying active plan header + (optional) body with steps and collapse toggle.
apps/web/src/components/ChatView.tsx Renders the sticky active plan card and stores collapse state keyed above the card.
apps/web/src/components/ChatView.browser.tsx Adds a dedicated snapshot and browser test validating collapse/expand behavior and header visibility.

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

You can also share your feedback on Copilot code review. Take the survey.

() => deriveActivePlanState(threadActivities, activeLatestTurn?.turnId ?? undefined),
[activeLatestTurn?.turnId, threadActivities],
);
const activePlanCollapseKey = activePlan ? (activePlan.turnId ?? activePlan.createdAt) : null;
timestampFormat,
onToggleCollapsed,
}: ActivePlanCardProps) {
const keyedSteps = buildKeyedSteps(activePlan.steps);
Comment on lines +3297 to +3302
onToggleCollapsed={() => {
if (activePlanCollapseKey) {
onToggleActivePlanCollapsed(activePlanCollapseKey);
}
}}
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add collapsible header control to the active plan container and align it with timeline content

2 participants