T61: the terminal logs each caret the input method asks for and each move of the caret; on the owner's Windows PC, WeType put the candidate box at the caret in 23 compositions, so the owner closed the jump a user found unreproduced

This commit is contained in:
ZacharyZhang-NY committed 2026-10-19 18:51:41 -04:00
1 parent 690d24f943
commit 0aee06dc27
6 files changed
+17 -2

No files matched your search

+1
View File
@@ -118,3 +118,4 @@ ELYTerminal. A terminal on GPUI and Ely components. `PRD.md` says what it does;
- 2026-10-19: a plain click on the line the shell reads moves its cursor there, which a user asked for after 0.1.6, as Ghostty's `cursor-click-to-move`: a press with no modifier, one click, let go in its own cell with no selection, while OSC 133 says the shell reads a line, B since the last A or C, and the program tracks no mouse at the release. A shell whose prompt start says `click_events=1` or `2`, as fish from 4.1 says on its own, hears a click past the prompt's last cell before the cursor, or, where no prompt cell of its own line comes before the input, as under fish's empty prompt, from the first cell of the newest line typed, known by its number, not its place, since a prompt drawn at the screen's top leaves older lines below it, down to that line's last row or the cursor's, and never on a prompt cell, itself, a left press in SGR, its row the screen's or counted from the prompt's first, as kitty and Ghostty send it, and moves its own cursor, combining marks and its own redraws included: fish moves by code point, and its redraws drop the wrap flags a count would follow. Any other shell gets Left or Right arrows, one per cell, each pressed and let go as the keyboard would, through the key encoder, so DECCKM, kitty's flags and win32-input-mode shape them; the count runs only on the cursor's line, soft wraps joined, past the prompt's cells, which the prompt's link marks, so bash 3.2, which sends no C, moves nothing once its command left the prompt's line. Cells after the last character typed count only up to the cursor, so a click past the end goes to the end; a wide character takes one arrow. Never on the alternate screen. One line only, as Ghostty's `cl=line`. A right prompt or an autosuggestion past the typed text counts as text, as in Ghostty, so a click on it may take the suggestion. The first click of a double click moves the cursor before the word selects, as in Ghostty.
- 2026-10-19: files dropped on the terminal type their paths, which a user asked for after 0.1.6, as macOS Terminal does: each path followed by a space, the paths of one drop in its order, sent as a paste, bracketed when the program asked, and kept literal for the shell the session started, which its name says, as the integration reads it: for sh, bash, zsh, fish and any other, each character Ghostty escapes gets a backslash, and `^` and `~` too, which zsh's `extendedglob` reads; for pwsh and powershell, the default on Windows, single quotes, each single quote inside doubled, PowerShell's curly ones too, since PowerShell reads a backslash as a plain character and expands `$` inside double quotes; for cmd, double quotes, which keep `&`, `|`, `<`, `>` and `^` inert, the backslashes ending a path doubled, since a program's parser reads `\"` as a quote, as `C:\` ends, and a path holding `%`, or `!`, which cmd expands inside them under `/v:on`, stops the drop. Windows Terminal's quotes around a path with a space alone leave `$(...)` and `;` live in PowerShell. A program run inside the session, `cmd` under PowerShell among them, gets the session's own quoting. A path not in UTF-8, or holding a control character, which would act as it is typed, stops the drop, logged. gpui hands a drop to the hitbox under the pointer only while the last input was not the keyboard, and a file drag counts as no input of its own: after typing, a drop with no pointer move over the window since does nothing, and nothing in ELYTerminal sees it, which the owner chose to leave so. `shot`'s `drop@x,y` plays a drop through `Window::dispatch_event`, so AppKit's drag session itself goes untested.
- 2026-10-19: fallback fonts, which a user asked for after 0.1.6, since the Chinese and Latin fonts people like seldom come as one: `font_fallbacks` in the settings lists installed families, tried in order for a character Font family lacks, through gpui's `Font::fallbacks`, which CoreText's cascade list, DirectWrite's fallback builder and cosmic-text's chain each honor; the system's own fallback follows the last. On Linux gpui's cosmic-text path keeps the fallback the last character took while it covers the next, so shaping clusters stay whole: with two fallbacks, a character only the second covers carries the next one, which the first covers too, into the second; macOS and Windows choose per character. The owner chose to leave that so. Each family must load as the terminal draws it, as Font family must, so a family gpui would pass over without a word stops the start or the save, the error naming `font_fallbacks`; an empty name is refused. The field is new beside `font_family`, so a settings file from before loads as it was. Settings › Appearance lists them under Family: each an Ely `FontPicker` whose pick replaces it and a button that removes it, then Add fallback, which opens an empty picker whose pick adds one, its button closing it; a refused pick shows the saved family again, as Family's does. Each row keeps an input of its own, and a removal drops the removed row's input and takes the focus away, since Ely's combobox keeps a focused input's text, and an input kept by place would show, and on Enter save, the family removed. Each picker's id is its input's entity, not its place: Ely's combobox keeps its state by id and listens to the input it first met, so a picker keyed by place, after a removal moved the inputs, wrote another row's family into its new input at the next blur. Ligatures and the bundled Nerd Font for private-use icons stand as before; the cursor preview keeps the family alone.
- 2026-10-19: a user found the IME's candidate box jumping on Windows after 0.1.6. gpui places it, through `ImmSetCompositionWindow` and `ImmSetCandidateWindow`, only when a composition starts, at the caret the terminal reports, the grid cursor's cell from the last frame, hidden or not. On the owner's PC, WeType under powershell.exe and under a status line redrawn every 100 ms put the box at the caret in 23 compositions out of 23, so the owner closed it unreproduced. The terminal logs each caret the input method asks for, at debug, and each move of the caret, at trace, so the next report carries where the box was told to go.
+1 -1
View File
@@ -155,7 +155,7 @@ Progress truth. Top to bottom, one at a time. A task is ticked only after its co
- [x] T59 A plain click on the line typed at the shell prompt moves the cursor there, which a user asked for after 0.1.6, as Ghostty's `cursor-click-to-move`: while the shell's OSC 133 marks say it reads a line, a click that does not drag sends Left or Right arrows, one per character, to the clicked cell of the cursor's line, soft wraps joined; never on the alternate screen, under mouse tracking, with a selection, or before the prompt's end.
- [x] T66 Files dropped on the terminal type their paths, which a user asked for after 0.1.6, as macOS Terminal does: each path quoted for the shell, joined by spaces, sent as a paste, on macOS, Windows and Linux.
- [x] T60 Fallback fonts, which a user asked for after 0.1.6: `font_fallbacks` in the settings, a list of installed families tried in order for a character Font family lacks, CJK among them; Settings › Appearance lists them under Font family, each an Ely `FontPicker` with a remove button, and an Add button; each saves only when gpui loads it.
- [ ] T61 On Windows the IME's candidate window stays at the cursor, which a user found jumping after 0.1.6: find why it moves, fix the cause, and log what the input handler tells the IME.
- [x] T61 On Windows the IME's candidate window stays at the cursor, which a user found jumping after 0.1.6: find why it moves, fix the cause, and log what the input handler tells the IME. Not reproduced on the owner's PC, so the owner closed it; the caret the IME is told is logged.
- [ ] T62 Ely's body runs on below the edge she holds, which a user asked for after 0.1.6, where a hop lifted her off the window and left a gap under her collar: her shirt continues down, hidden behind the edge, so a hop shows more of her and never a gap.
- [ ] T63 A double-click on a session's title renames it, which a user asked for after 0.1.6: the row's title turns into a field, Enter keeps the name, Escape drops it; the name shows in the row, the terminal's header and the window's title over the program's own until renamed again, and an empty name gives the title back to the program; it lives as long as the session.
- [ ] T65 Dragging the window on Windows 10 with Background blur on follows the pointer, which a user found lagging seconds behind in issue #3 after 0.1.5: find where the lag comes from in gpui's acrylic path, fix the cause on Windows 10 alone, log what changes, and reply on the issue.
+5
View File
@@ -355,6 +355,11 @@ impl EntityInputHandler for TerminalView {
_: &mut Window,
_: &mut Context<Self>,
) -> Option<Bounds<Pixels>> {
log::debug!(
"terminal {}: the input method asks for the caret, {:?}",
self.pty.pid,
self.caret
);
Some(self.caret)
}
+5 -1
View File
@@ -54,7 +54,11 @@ pub fn grid(
if let Some((row, column)) = at {
let corner =
origin + point(cell.width * column as f32, cell.height * row as f32);
view.caret = Bounds::new(corner, cell);
let caret = Bounds::new(corner, cell);
if caret != view.caret {
log::trace!("terminal {}: the caret moves to {caret:?}", view.pty.pid);
view.caret = caret;
}
}
if view.fit(columns, lines, cx) {
cx.notify();
+1
View File
@@ -72,6 +72,7 @@ What no check reached: no real KWin drew the blur; of Wayland desktops, only Hyp
| OSC 8 and plain links on Cmd-press, Ctrl-press off macOS; inside herdr, herdr opens them whole | T09, T45 | `term::links` tests; on macOS with real herdr 0.9.5 and a stand-in `open` on its PATH, Cmd-press on a URL herdr wraps, on its wrapped tail, on an OSC 8 link and on a URL over three rows opened the whole URL and the OSC 8 target, where before the app opened `.../ELYTermin` and nothing; Cmd-hover underlined the long URL across its rows; outside herdr the app opened the URL itself; an OSC 8 link whose label holds `file:///etc/hosts` and whose target is a web page opened the page through herdr, which keeps the target from the terminal while it takes the mouse; Shift-Cmd-press on a plain `file:///etc/hosts` inside herdr the app opened itself, caught by an `NSWorkspace` stand-in | Pass |
| Focus reporting, title, scrollback limit, find | T10 | `term::find` tests; round 3 failed at the cap, its fix stands on a red-green test | Pass |
| A scrollbar over the history: a drag on its thumb scrolls, whatever the program does with the wheel | T58 | `term::scrollbar` test: the thumb's share and place follow the history and the view's offset, and a place past either end of the track holds at it; under Xorg's dummy screen, after `seq 1 500`, the thumb stood at the bottom right, a drag to the top showed the first prompt and lines 1 to 39, and one back down lines 220 to 259; with mouse tracking on, the wheel went to the program as reports and did not scroll, while a drag on the thumb showed lines 245 to 284 | Pass |
| IME on Windows: the candidate box at the caret | T61 | on the owner's Windows 11 PC at 150%, WeType under powershell.exe: 23 compositions, on one line, on lines below, begun again at once after a commit, and under a status line redrawn every 100 ms, each logged `the input method asks for the caret` at the cursor's cell and drew the box under it; the user's jump did not reproduce and the owner closed it | Closed |
| Drop: files dropped on the terminal type their paths at the cursor, kept literal for the session's shell, each followed by a space | T66 | `term::drop` tests: a POSIX path escapes what a shell reads specially, spaces, quotes, parentheses, `&`, `$`, `^`, `~` and `#` among them, CJK kept, each path followed by a space; a PowerShell path is single-quoted with its quotes doubled, curly ones too; a cmd path is double-quoted, and one holding `%` types nothing; a path with a control character types nothing; `term::shell` test: zsh, fish and other shells take POSIX quoting, pwsh and powershell PowerShell's, cmd cmd's; round 1 of T66's review found Windows' quotes around a spaced path alone leaving `$(...)` and `;` live in PowerShell, and `^` unescaped under zsh's `extendedglob`: the formatter, extracted, typed 22 hard names that zsh with and without `extendedglob`, bash with `extglob`, fish and PowerShell each read back exactly, `it's`, `$HOME`, `$(1+1)`, `a;Write-Output(42)` and curly quotes among them, and cmd on the owner's PC echoed `&`, `|`, `<`, `>` and `^` inside its quotes back as text while it expanded `%PATH%`; round 2 found cmd's `/v:on` expanding `!` inside quotes, and `"C:\"` read by a program as one argument with the next: a `!` now stops a cmd drop, and the backslashes ending a path are doubled, so node, run from a cmd batch line on the owner's PC, received `C:\`, `D:\clip.mp4`, `C:\My Files\a&b^c.txt`, `C:\x|y<z>(1).txt`, `C:\dir with space\` and `C:\tmp\a;b,c=d.txt` exactly; on macOS `shot` dropped `/tmp/my file.png`, `/Users/x/it's (1).txt` and `/a/中文 b` on zsh after a pointer move, and the log read `3 paths dropped` and `pastes 53 characters, bracketed`; without the move, after typing, gpui passed the drop by, as AGENTS records | Pass |
| Click to move: a plain click on the line the shell reads, past its prompt, moves its cursor there, the press itself to a shell that takes clicks, else arrows | T59 | `term::marks` test: A's `click_events=1` and `2` read as a press at the screen's row or counted from the prompt; `term::click` tests: a shell that takes clicks hears an SGR left press at the clicked cell, a row below the prompt too, none before the prompt, in the history or on the alternate screen; B reads the line its prompt started; a click on the typed line counts the characters to it, left or right, past the end means the end, a wide character takes one arrow, soft-wrapped rows are one line, trailing spaces count up to the cursor, and a click on the prompt, another line, a line no prompt shows, output without marks or the alternate screen moves nothing; on macOS `shot` ran zsh with a marked prompt: after `echo hello` a click on the `h` logged `moves the cursor -5`, and `X` typed then ran `echo Xhello`; a drag sent nothing, and clicks on the prompt and on output logged `off the input`; round 1 of T59's review found fish 4.9 a code point per Left, so a count put `X` inside `é`, and its redraw dropped the wrap flag a count followed: with fish's own `click_events=1` the press goes to fish, which then typed `echo Xéabc`, and a second click on the redrawn wrapped line put `Y` at row 2, column 3; zsh still counted 4 arrows; a press let go in another cell and one whose program turned on tracking before the release sent nothing; round 2 found a click on fish's `$` sent to fish, which moved its cursor to the start: a press now goes only past the prompt's last cell before the cursor and never on a prompt cell, so clicks on `$` and its space logged `off the input` and `X` still ended `echo helloX`; round 3 found that a prompt whose only cells lie after the cursor, fish's empty left prompt beside a marked right one, crashed the press: with no prompt cell before the cursor the input starts at the prompt's first row, and a click on `o` there put `X` at `echXo`; round 3 found that a prompt that prints nothing left no cells to find the input by, so clicks on fish's typed line did nothing: B now stamps the typed line with a link of its own, numbered by the commands ended, so fish's empty prompt gave `abcXdef`, with a plain or no right prompt too, a click on the output above moved nothing, and fish's right prompt drawn again at each key kept the typed line's number, `echXo`; `term::prompts` test: input carries the commands ended before it, through a prompt drawn again; `term::click` tests: a prompt that prints nothing starts the input at its first typed cell, the output and the line run before refused; round 4 found the newest typed line taken by its place: after `printf '\e[H'` fish drew its prompt at the top over older lines, and a click on its typed line did nothing; the newest line is now the one of the highest number, and a press goes no lower than its last row or the cursor's, so that click gave `abcXdef`, the reviewer's scene sent `ESC[<0;6;1M`, and a click on the older text below moved nothing, where fish had moved its cursor | Pass |
| A bell makes no sound; the row marks it | T10, T12 | T12 review | Pass |
+4
View File
@@ -308,3 +308,7 @@ Each task gets at most three codex rounds. Each round: the commit, the verdict,
- Round 1, cb32f00: FAIL. On macOS the order, bold, italic, ligatures, icons, old files, refusals, add, change and cancel all held; but removing the row whose input held the focus left the removed family in it, and Enter saved it over the next family; and on Linux gpui's cosmic-text path carries the fallback a character took into the next while it covers it, so `क中` drew 中 in the second fallback. Fixed in 5f8ea89: a removal drops that row's input and the focus; the Linux path is gpui's, kept for its shaping clusters, and the owner chose to record it.
- Round 2, 5f8ea89: FAIL. Round 1's removal case and removals first, middle, last, in sequence, then adds and cancels held, and the Linux record was true; but the pickers were keyed by place, so after a removal moved the inputs, the picker state of the second row, listening to the input now first, wrote PingFang SC into it at a blur, and Enter saved `[PingFang SC, PingFang SC]`. Fixed in 5d131e5: each picker is keyed by its input's entity.
- Round 3, 5d131e5: PASS. Each picker keyed by its input kept round 2's case at `[Songti SC, PingFang SC]` through a removal, a focus cycle and Enter; drafts blurred after removals first, middle, last and among duplicates came back to the right family; a sequence of removals and adds through five focus cycles, and a cancel, re-add and removal through three, saved what the screen showed; a refused pick restored the saved list; check.sh passed with 262 tests. Windows and Linux windows went unexercised.
## T61
- No review: the owner closed it once it did not reproduce. On the owner's Windows 11 PC (26H2, 150%), with WeType and powershell.exe, 23 compositions put the candidate box at the caret: three on one line, then one on each of three lines below, fifteen committed and begun again at once, the caret stepping 4 cells each time, and eight under a status line redrawn every 100 ms with the cursor hidden; each caret the IME asked for matched the cursor. Microsoft Pinyin went untested.