Merge PR #5849: fix(tui): restore slash description wrapping (@roboomp)

This commit is contained in:
can1357
2026-07-18 20:12:45 +02:00
3 changed files with 9 additions and 11 deletions
+3
View File
@@ -19,6 +19,9 @@
- Fixed interactive sessions surviving terminal closure and entering a runaway render loop by stopping the TUI and raising SIGHUP when terminal input closes or output fails ([#5835](https://github.com/can1357/oh-my-pi/issues/5835)).
- Fixed native cmux SSH pane resizes inserting blank rows into terminal scrollback by routing remote-transport sessions through the in-place repaint path ([#5857](https://github.com/can1357/oh-my-pi/issues/5857)).
- Fixed the terminal flickering when leaving a fullscreen overlay (e.g. `/settings`) on terminals that re-report their size when the alternate screen buffer toggles: the alt-toggle SIGWINCH echo is height-only, so the resize fast path no longer borrows the alternate screen for it ([#5854](https://github.com/can1357/oh-my-pi/issues/5854)).
### Fixed
- Restored wrapped descriptions in the slash-command autocomplete picker so long skill descriptions remain readable at normal terminal widths ([#5848](https://github.com/can1357/oh-my-pi/issues/5848)).
## [17.0.2] - 2026-07-17
+1
View File
@@ -32,6 +32,7 @@ const AUTOCOMPLETE_SELECT_LIST_LAYOUT: SelectListLayoutOptions = {
const SLASH_COMMAND_SELECT_LIST_LAYOUT: SelectListLayoutOptions = {
minPrimaryColumnWidth: 12,
maxPrimaryColumnWidth: 32,
wrapDescription: true,
overflowSearch: false,
};
+5 -11
View File
@@ -320,17 +320,13 @@ describe("Editor component", () => {
expect(editor.render(80).some(line => line.includes(CURSOR_MARKER))).toBe(true);
});
it("renders slash-command suggestions as compact item rows", async () => {
it("wraps long slash-command descriptions instead of dropping the tail", async () => {
const editor = new Editor(defaultEditorTheme);
editor.setAutocompleteMaxVisible(10);
const longDescription =
"Plan and execute non-trivial architectural improvements to the codebase without turning each slash command into a multi-line block.";
"Plan and execute non-trivial architectural improvements to the codebase. Use this skill when you need to refactor existing systems.";
editor.setAutocompleteProvider(
new CombinedAutocompleteProvider(
Array.from({ length: 12 }, (_, i) => ({
name: `cmd${i}`,
description: longDescription,
})),
[{ name: "improve-codebase-architecture", description: longDescription }],
"/tmp",
),
);
@@ -342,10 +338,8 @@ describe("Editor component", () => {
await autocompleteUpdated;
const rendered = editor.render(80).map(line => stripVTControlCharacters(line));
for (let i = 0; i < 10; i += 1) {
expect(rendered.some(line => line.includes(`cmd${i}`))).toBe(true);
}
expect(rendered.some(line => line.includes("cmd10"))).toBe(false);
expect(rendered.some(line => line.includes("improve-codebase-architecture"))).toBe(true);
expect(rendered.join("\n")).toContain("refactor existing systems.");
});
it("triggers file-reference autocomplete when typing at-sign", async () => {