Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/tui/src/overlays/composer-shape-preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export function renderComposerShapePreview(
width: number,
status?: ComposerPreviewStatusSource,
): readonly string[] {
const previewWidth = Math.max(24, Math.min(width, 96));
// Use the full overlay width: the old 96-column cap truncated the status
// bar to a stub while the live editor spans the terminal (issue #12500).
const previewWidth = Math.max(24, width);
const style = getComposerStyle(shape);
const paddingX = style.defaultPaddingX(undefined);
const chromeWidth = style.sideChromeWidth(paddingX);
Expand Down
24 changes: 24 additions & 0 deletions packages/tui/test/composer-shape-preview.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,30 @@ describe("composer shape preview", () => {
expect(rendered[rendered.length - 2]).toBe(""); // spacer row before the bar
}
});
it("renders the status bar at the full overlay width instead of a 96-column stub (issue #12500)", async () => {
await setTheme("dark");
const seenWidths: number[] = [];
const status = {
getTopBorder: (width: number) => {
seenWidths.push(width);
return { content: `TOPBAR ${width}`, width };
},
getStandaloneTopBorder: (width: number) => {
seenWidths.push(width);
return { content: `CHIP ${width}`, width };
},
getBandTopBorder: (width: number) => {
seenWidths.push(width);
return { content: `BAND ${width}`, width };
},
renderBottomBar: (width: number) => {
seenWidths.push(width);
return `BOTTOM ${width}`;
},
};
renderComposerShapePreview("box", 160, status);
expect(Math.max(...seenWidths)).toBeGreaterThan(96);
});

it("installs extension shapes into both selectors and live rendering", async () => {
await setTheme("dark");
Expand Down