Merge PR #8658: fix(tui): preserve welcome columns for long model names (@roboomp)
This commit is contained in:
@@ -51,6 +51,9 @@
|
||||
### Fixed
|
||||
|
||||
- Reclaimed abandoned daemon runtime directories under `~/.omp/run/daemons/`: each broker now prunes sibling scopes with a dead/absent `broker.pid`, no live client presence, and past a short stale grace on startup, removing the leftover Chromium profiles and broker state that grew unbounded from short-lived project directories ([#8674](https://github.com/can1357/oh-my-pi/issues/8674)).
|
||||
### Fixed
|
||||
|
||||
- Kept the welcome screen's Tips, LSP Servers, and Recent sessions visible when a long model name still leaves enough terminal width for both columns ([#8657](https://github.com/can1357/oh-my-pi/issues/8657)).
|
||||
|
||||
## [17.3.4] - 2026-08-14
|
||||
|
||||
|
||||
@@ -248,7 +248,10 @@ export class WelcomeComponent implements Component {
|
||||
visibleWidth(this.modelName),
|
||||
visibleWidth(this.providerName),
|
||||
);
|
||||
const desiredLeftCol = Math.min(preferredLeftCol, Math.max(minLeftCol, Math.floor(dualContentWidth * 0.35)));
|
||||
const desiredLeftCol = Math.max(
|
||||
Math.min(preferredLeftCol, Math.max(minLeftCol, Math.floor(dualContentWidth * 0.35))),
|
||||
leftMinContentWidth,
|
||||
);
|
||||
const dualLeftCol =
|
||||
dualContentWidth >= minRightCol + 1
|
||||
? Math.min(desiredLeftCol, dualContentWidth - minRightCol)
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Settings } from "@oh-my-pi/pi-coding-agent/config/settings";
|
||||
import { pickWeightedTip, WelcomeComponent } from "@oh-my-pi/pi-coding-agent/modes/components/welcome";
|
||||
import { initTheme, theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
||||
|
||||
describe("WelcomeComponent tips", () => {
|
||||
describe("WelcomeComponent", () => {
|
||||
beforeAll(async () => {
|
||||
await Settings.init({ inMemory: true });
|
||||
await initTheme(false);
|
||||
@@ -61,4 +61,12 @@ describe("WelcomeComponent tips", () => {
|
||||
expect(newMax).toBeGreaterThan(ordinaryMax);
|
||||
expect(pickWeightedTip([], 0.5)).toBe("");
|
||||
});
|
||||
|
||||
it("keeps the right column visible when a long model name fits", () => {
|
||||
const modelName = "DeepSeek V4 Flash (2x usage)";
|
||||
const output = new WelcomeComponent("17.3.4", modelName, "opencode-go").render(55).join("\n");
|
||||
|
||||
expect(output).toContain(modelName);
|
||||
expect(output).toContain("Recent sessions");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user