fix(gui): proactively apply min-w-0 fix across the whole Lump toolbar family
Some checks failed
Main Branch Build / republish-pr-artifacts (Linux) (push) Has been cancelled
Main Branch Build / republish-pr-artifacts (macOS) (push) Has been cancelled
PR Checks / track-rerun (push) Has been cancelled
PR Checks / prettier-check (push) Has been cancelled
PR Checks / core-checks (push) Has been cancelled
PR Checks / gui-checks (push) Has been cancelled
PR Checks / binary-checks (push) Has been cancelled
PR Checks / vscode-checks (push) Has been cancelled
PR Checks / get-packages-matrix (push) Has been cancelled
PR Checks / vscode-get-test-file-matrix (push) Has been cancelled
PR Checks / vscode-package-extension-linux (push) Has been cancelled
PR Checks / jetbrains-tests (push) Has been cancelled
Submit Gradle Dependency Graph For Dependabot / dependency-submission (push) Has been cancelled
PR Checks / packages-checks (push) Has been cancelled
PR Checks / unknown () (push) Has been cancelled
PR Checks / require-all-checks-to-pass (push) Has been cancelled

Third report of the same overflow class after fixing InputToolbar and
BlockSettingsTopToolbar -- this time PendingApplyStatesToolbar (the
filename + Accept/Reject row shown while a diff is pending). Rather
than keep fixing these one report at a time, audited every sibling in
LumpToolbar's mutually-exclusive render states (StreamingToolbar,
EditToolbar, EditOutcomeToolbar, IsApplyingToolbar,
PendingToolCallToolbar) -- all shared the identical missing-min-w-0
pattern on a justify-between row with one growable/truncating side and
one fixed-content side (buttons/shortcuts). Fixed all of them: min-w-0
on the truncating side (needed even with flex-1, since flex-basis:0
does not override the default min-width:auto), flex-shrink-0 +
whitespace-nowrap on the fixed side so it's what stays fully visible
if anything has to give.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
krustophski 2026-09-25 05:30:14 +03:00
parent 31505f737e
commit 0583f91bea
7 changed files with 14 additions and 14 deletions

View file

@ -55,7 +55,7 @@ export default function AcceptRejectAllButtons({
return ( return (
<div <div
className="flex flex-row items-center justify-evenly gap-3 px-3" className="flex flex-shrink-0 flex-row items-center justify-evenly gap-3 px-3"
data-testid="accept-reject-all-buttons" data-testid="accept-reject-all-buttons"
> >
<ToolTip content={`Reject All (${rejectShortcut})`}> <ToolTip content={`Reject All (${rejectShortcut})`}>

View file

@ -14,8 +14,8 @@ export function EditOutcomeToolbar() {
const ideMessenger = useContext(IdeMessengerContext); const ideMessenger = useContext(IdeMessengerContext);
return ( return (
<div className="text-description-muted flex items-center justify-between py-0.5 text-xs"> <div className="text-description-muted flex min-w-0 items-center justify-between py-0.5 text-xs">
<div className="bg-badge rounded px-1.5"> <div className="bg-badge flex-shrink-0 rounded px-1.5">
<span>{`${editApplyState.numDiffs} diff${editApplyState.numDiffs !== 1 ? "s" : ""}`}</span> <span>{`${editApplyState.numDiffs} diff${editApplyState.numDiffs !== 1 ? "s" : ""}`}</span>
</div> </div>
<AcceptRejectDiffButtons <AcceptRejectDiffButtons

View file

@ -19,15 +19,15 @@ export function EditToolbar() {
}; };
return ( return (
<div className="text-description-muted flex items-center justify-between gap-3 text-xs"> <div className="text-description-muted flex min-w-0 items-center justify-between gap-3 text-xs">
<span <span
className="flex cursor-pointer items-center whitespace-nowrap hover:brightness-125" className="flex flex-shrink-0 cursor-pointer items-center whitespace-nowrap hover:brightness-125"
onClick={handleBackClick} onClick={handleBackClick}
> >
<ArrowLeftIcon className="mr-1 h-2.5 w-2.5" /> <ArrowLeftIcon className="mr-1 h-2.5 w-2.5" />
Back to {mode.charAt(0).toUpperCase() + mode.slice(1)} Back to {mode.charAt(0).toUpperCase() + mode.slice(1)}
</span> </span>
<span className="truncate"> <span className="min-w-0 truncate">
Editing:{" "} Editing:{" "}
<span className="italic"> <span className="italic">
{getEditFilenameAndRangeText(codeToEdit)} {getEditFilenameAndRangeText(codeToEdit)}

View file

@ -11,11 +11,11 @@ export const IsApplyingToolbar = () => {
const jetbrains = window.location.protocol === "jb-api:"; const jetbrains = window.location.protocol === "jb-api:";
return ( return (
<div className="flex w-full items-center justify-between"> <div className="flex w-full min-w-0 items-center justify-between">
<GeneratingIndicator text="Applying" testId={"notch-applying-text"} /> <GeneratingIndicator text="Applying" testId={"notch-applying-text"} />
<div <div
data-testid="notch-applying-cancel-button" data-testid="notch-applying-cancel-button"
className="text-description text-2xs cursor-pointer p-0.5 pr-1 hover:brightness-125" className="text-description text-2xs flex-shrink-0 cursor-pointer whitespace-nowrap p-0.5 pr-1 hover:brightness-125"
onClick={() => { onClick={() => {
// Note that this will NOT stop generation but once apply is cancelled will show the Generating/cancel option // Note that this will NOT stop generation but once apply is cancelled will show the Generating/cancel option
// Apply is prioritized because it can be more catastrophic // Apply is prioritized because it can be more catastrophic

View file

@ -26,9 +26,9 @@ export function PendingApplyStatesToolbar({
return ( return (
<div className="flex flex-col gap-2"> <div className="flex flex-col gap-2">
{Object.entries(applyStatesByFilepath).map(([filepath, states]) => ( {Object.entries(applyStatesByFilepath).map(([filepath, states]) => (
<div key={filepath} className="flex justify-between gap-3"> <div key={filepath} className="flex min-w-0 justify-between gap-3">
{filepath && ( {filepath && (
<span className="bg-badge flex min-w-0 max-w-[75%] items-center gap-1 truncate rounded pr-1 text-xs"> <span className="bg-badge flex min-w-0 max-w-[75%] flex-shrink items-center gap-1 truncate rounded pr-1 text-xs">
<FileIcon filename={filepath} height="18px" width="18px" /> <FileIcon filename={filepath} height="18px" width="18px" />
<span className="truncate">{getUriPathBasename(filepath)}</span> <span className="truncate">{getUriPathBasename(filepath)}</span>
</span> </span>

View file

@ -42,11 +42,11 @@ export function PendingToolCallToolbar() {
key={toolCall.toolCallId} key={toolCall.toolCallId}
className="border-input bg-input flex items-center gap-2 rounded border" className="border-input bg-input flex items-center gap-2 rounded border"
> >
<span className="text-description flex-1 truncate text-xs italic"> <span className="text-description min-w-0 flex-1 truncate text-xs italic">
{toolCall.tool?.displayTitle ?? toolCall.toolCall.function.name} {toolCall.tool?.displayTitle ?? toolCall.toolCall.function.name}
</span> </span>
<div className="flex items-center gap-1"> <div className="flex flex-shrink-0 items-center gap-1">
<Button <Button
variant="ghost" variant="ghost"
size="sm" size="sm"

View file

@ -13,11 +13,11 @@ export function StreamingToolbar({
const jetbrains = isJetBrains(); const jetbrains = isJetBrains();
return ( return (
<div className="flex w-full items-center justify-between"> <div className="flex w-full min-w-0 items-center justify-between">
<GeneratingIndicator /> <GeneratingIndicator />
<div <div
onClick={onStop} onClick={onStop}
className="text-2xs cursor-pointer px-1.5 py-0.5 hover:brightness-125" className="text-2xs flex-shrink-0 cursor-pointer whitespace-nowrap px-1.5 py-0.5 hover:brightness-125"
> >
<span className="text-description">{displayText}</span> <span className="text-description">{displayText}</span>
{/* JetBrains overrides cmd+backspace, so we have to use another shortcut */} {/* JetBrains overrides cmd+backspace, so we have to use another shortcut */}