@oh-my-pi/pi-tui 15.7.5 → 15.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/package.json +3 -3
- package/src/autocomplete.ts +3 -1
- package/src/tui.ts +24 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [15.7.6] - 2026-06-01
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed native Windows + Windows Terminal freezing the editor on the wrap keystroke, on `/plan`/`/resume`/model-switch/status-line toggles, and on any other offscreen structural mutation until the next prompt submit. The `15.7.5` `#1635` fix routed every viewport-saturating pure-append and structural mutation through `deferredMutation` (a literal no-op) whenever `isNativeViewportAtBottom()` returned `undefined` — which it always does under `WT_SESSION` because the kernel32 probe can't see WT host scrollback. The deferral was only ever meant for the *confirmed-scrolled* case; an unknown viewport now falls back to a non-destructive `viewportRepaint` instead, so the live UI keeps updating without emitting `\x1b[3J` and without yanking a possibly-scrolled reader. Confirmed-scrolled frames (probe returns `false`) still defer.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Removed the hard-coded 20-result cap on `@`-prefixed fuzzy file completion in `CombinedAutocompleteProvider.#getFuzzyFileSuggestions`. The dropdown now honors the existing `maxResults: 100` ceiling already configured for `fuzzyFind`, so projects with many files sharing a common stem (e.g. `@controller`, `@test`) surface all relevant matches instead of being silently truncated. ([#1652](https://github.com/can1357/oh-my-pi/issues/1652))
|
|
14
|
+
|
|
5
15
|
## [15.7.5] - 2026-06-01
|
|
6
16
|
|
|
7
17
|
### Fixed
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-tui",
|
|
4
|
-
"version": "15.7.
|
|
4
|
+
"version": "15.7.6",
|
|
5
5
|
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"fmt": "biome format --write ."
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@oh-my-pi/pi-natives": "15.7.
|
|
41
|
-
"@oh-my-pi/pi-utils": "15.7.
|
|
40
|
+
"@oh-my-pi/pi-natives": "15.7.6",
|
|
41
|
+
"@oh-my-pi/pi-utils": "15.7.6",
|
|
42
42
|
"lru-cache": "11.5.1",
|
|
43
43
|
"marked": "^18.0.4"
|
|
44
44
|
},
|
package/src/autocomplete.ts
CHANGED
|
@@ -736,7 +736,9 @@ export class CombinedAutocompleteProvider implements AutocompleteProvider {
|
|
|
736
736
|
}
|
|
737
737
|
return lowerQuery.length === 0 || fuzzyMatch(lowerQuery, normalized.toLowerCase());
|
|
738
738
|
});
|
|
739
|
-
|
|
739
|
+
// `fuzzyFind` is already capped via `maxResults` in
|
|
740
|
+
// `buildAutocompleteFuzzyDiscoveryProfile`; no extra slice here.
|
|
741
|
+
const topEntries = filteredMatches;
|
|
740
742
|
const suggestions: AutocompleteItem[] = [];
|
|
741
743
|
for (const { path: entryPath, isDirectory } of topEntries) {
|
|
742
744
|
const pathWithoutSlash = isDirectory ? entryPath.slice(0, -1) : entryPath;
|
package/src/tui.ts
CHANGED
|
@@ -1439,14 +1439,32 @@ export class TUI extends Container {
|
|
|
1439
1439
|
const nativeViewportAtBottom = this.#readNativeViewportAtBottom();
|
|
1440
1440
|
if (this.#nativeViewportIsScrolled(nativeViewportAtBottom, allowUnknownViewportMutation)) {
|
|
1441
1441
|
this.#markNativeScrollbackDirty();
|
|
1442
|
-
|
|
1442
|
+
// Confirmed scrolled (probe returned `false`): the reader is parked in
|
|
1443
|
+
// scrollback and writing the live frame is wasted bytes — defer until
|
|
1444
|
+
// the next checkpoint reconciles. Unknown viewport (e.g. native Windows
|
|
1445
|
+
// Terminal where the probe cannot see WT host scrollback) is a
|
|
1446
|
+
// different case: a no-op there freezes the editor on the keystroke
|
|
1447
|
+
// that grows `lines.length` past the viewport (the wrap keystroke).
|
|
1448
|
+
// Fall through to a non-destructive viewport repaint instead so the
|
|
1449
|
+
// live UI keeps updating without yanking a possibly-scrolled reader.
|
|
1450
|
+
if (this.#nativeViewportIsKnownScrolled(nativeViewportAtBottom)) {
|
|
1451
|
+
return { kind: "deferredMutation" };
|
|
1452
|
+
}
|
|
1453
|
+
return { kind: "viewportRepaint" };
|
|
1443
1454
|
}
|
|
1444
1455
|
}
|
|
1445
1456
|
if (!pureAppend && structuralMutation && !isMultiplexerSession()) {
|
|
1446
1457
|
const nativeViewportAtBottom = this.#readNativeViewportAtBottom();
|
|
1447
1458
|
if (this.#nativeViewportIsScrolled(nativeViewportAtBottom, allowUnknownViewportMutation)) {
|
|
1448
1459
|
this.#markNativeScrollbackDirty();
|
|
1449
|
-
|
|
1460
|
+
// See the matching comment on the pure-append branch above: confirmed
|
|
1461
|
+
// scrolled stays a no-op; unknown viewport repaints the visible window
|
|
1462
|
+
// so slash-command transitions and offscreen chrome edits paint on the
|
|
1463
|
+
// same frame instead of stalling until the next prompt submit.
|
|
1464
|
+
if (this.#nativeViewportIsKnownScrolled(nativeViewportAtBottom)) {
|
|
1465
|
+
return { kind: "deferredMutation" };
|
|
1466
|
+
}
|
|
1467
|
+
return { kind: "viewportRepaint" };
|
|
1450
1468
|
}
|
|
1451
1469
|
// The append-tail path can only scroll a clean pure-tail append over an
|
|
1452
1470
|
// offscreen edit into history: the rows it pushes must equal the net
|
|
@@ -1621,6 +1639,10 @@ export class TUI extends Container {
|
|
|
1621
1639
|
);
|
|
1622
1640
|
}
|
|
1623
1641
|
|
|
1642
|
+
#nativeViewportIsKnownScrolled(nativeViewportAtBottom: boolean | undefined): boolean {
|
|
1643
|
+
return nativeViewportAtBottom === false;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1624
1646
|
#nativeViewportIsAtBottom(nativeViewportAtBottom: boolean | undefined): boolean {
|
|
1625
1647
|
return nativeViewportAtBottom === true;
|
|
1626
1648
|
}
|