Skip to content

fix(toolbar): fix scrollable file list overflow in ToolbarChangesPanel#1303

Merged
YoungY620 merged 3 commits intomainfrom
fix/toolbar-overlap
Mar 3, 2026
Merged

fix(toolbar): fix scrollable file list overflow in ToolbarChangesPanel#1303
YoungY620 merged 3 commits intomainfrom
fix/toolbar-overlap

Conversation

@YoungY620
Copy link
Collaborator

@YoungY620 YoungY620 commented Mar 2, 2026

Related Issue

N/A

Description

The ToolbarChangesPanel had two layout bugs:

  1. The workDir footer used sticky bottom-0, which caused it to overlap the file list inside the scrollable parent container.
  2. The scrollable file list div was missing min-h-0, so overflow-y-auto didn't work in Firefox and other spec-strict browsers — the panel would grow beyond the max-h-32 (128px) limit.

Changes:

  • index.tsx: Move max-h-32 overflow-y-auto py-1 px-0.5 out of the shared panel wrapper; apply them only for non-changes tabs. The changes tab now manages its own scroll container.
  • toolbar-changes.tsx: Wrap content in a flex flex-col max-h-32 container. The scrollable file list gets flex-1 min-h-0 so overflow-y works correctly cross-browser. The workDir footer uses flex-shrink-0 instead of sticky bottom-0 to stay pinned at the bottom.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue, if any.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have run make gen-changelog to update the changelog.
  • I have run make gen-docs to update the user documentation.

Open with Devin

- Replace sticky bottom-0 footer with flex column layout + flex-shrink-0
  to prevent workDir bar from overlapping the file list
- Add flex-1 min-h-0 to scrollable file list div so overflow-y-auto
  works correctly in Firefox and other strict spec browsers
- Move max-h-32 / overflow / padding handling into ToolbarChangesPanel
  itself; parent container exempts the changes tab from these classes

Entire-Checkpoint: 635c578dec40
- Add toolbar scrollable file list overflow fix to CHANGELOG.md
- Sync English changelog from root CHANGELOG.md
- Update kimi-web.md (zh+en): add todo list in prompt toolbar,
  Cmd/Ctrl+Click on new-session buttons, and URL action parameters
  section for external integrations

Entire-Checkpoint: b0621742aaa7
Copilot AI review requested due to automatic review settings March 2, 2026 08:22
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Signed-off-by: Young E <49367723+YoungY620@users.noreply.github.com>
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

Fixes layout/scroll behavior in the prompt toolbar’s “changes” panel so the file list scrolls correctly within the 128px max height and the workDir footer no longer overlaps content.

Changes:

  • Refactors ToolbarChangesPanel into a flex column with a dedicated scroll container (flex-1 min-h-0) and replaces sticky bottom-0 with flex-shrink-0 for the footer.
  • Adjusts the shared expanded-panel wrapper so max-h-32 overflow-y-auto py-1 px-0.5 apply only to non-changes tabs.
  • Updates changelogs and reference docs to reflect the UI improvements.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
web/src/features/chat/components/prompt-toolbar/toolbar-changes.tsx Introduces a dedicated flex layout + scroll container and changes footer positioning strategy.
web/src/features/chat/components/prompt-toolbar/index.tsx Makes the expanded panel wrapper conditional so the changes tab manages its own scrolling.
docs/zh/release-notes/changelog.md Adds an unreleased entry for the toolbar changes panel overflow fix.
docs/zh/reference/kimi-web.md Updates Web UI docs with new toolbar capabilities and URL action params section.
docs/en/release-notes/changelog.md Adds an unreleased entry for the toolbar changes panel overflow fix.
docs/en/reference/kimi-web.md Updates Web UI docs with new toolbar capabilities and URL action params section.
CHANGELOG.md Adds an unreleased entry for the toolbar changes panel overflow fix.

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

Comment on lines +48 to +50
<span className="truncate text-muted-foreground" title={file.path}>
{file.path}
</span>
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

truncate inside a flex row typically won’t actually truncate unless the truncating element is allowed to shrink (e.g., min-w-0 and often flex-1). As written, long file.path values can still force horizontal overflow rather than ellipsize. Consider adding min-w-0 (and flex-1 if you want it to take remaining space) to this span so paths reliably truncate.

Copilot uses AI. Check for mistakes.
Comment on lines 61 to 63
<FolderOpenIcon className="size-3 flex-shrink-0 text-muted-foreground/70" />
<span className="truncate text-muted-foreground/70">{workDir}</span>
<div className="flex-shrink-0 hidden lg:block opacity-0 group-hover/folder:opacity-100 transition-opacity duration-150">
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

Same truncation issue as above: this truncate span is in a flex container, but without min-w-0 it may not shrink, so long workDir values can overflow the panel horizontally. Add min-w-0 (and/or make it flex-1) to ensure ellipsis works consistently.

Copilot uses AI. Check for mistakes.
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