Repository navigation
Native host fixes: Kitty identity, first-run studio, trails that draw and reload, distinct trail previews - #525
Draft
raiseCatError wants to merge 5 commits into
Conversation
… that draws, distinct trail previews - terminalProfile: a terminal-specific TERM (xterm-kitty, xterm-ghostty) wins over an inherited TERM_PROGRAM. Kitty passes the outer TERM_PROGRAM through (Kitty 0.49.2 started from Ghostty: TERM=xterm-kitty, KITTY_WINDOW_ID=1, TERM_PROGRAM=ghostty), so NMSh showed Ghostty's studio in Kitty. Cursor host facts and detectTerminalHost now use the same identity (tmux keeps the outer host's markers as before). - /cursor > Host native in Kitty 0.49+ opens the Kitty shader studio on first use too, instead of the older include setup; Kitty below 0.49 keeps the built-in cursor_trail setup. - A Kitty trail shader draws only while cursor_trail > 0. NMSh's own fragment now turns it on when it would be 0 (judged without NMSh's own line, so sync keeps it), refuses when a later line forces 0, and the review says so. Confirming a trail sets /cursor Motion Off -> Tail and Portable -> Auto (disclosed in the review); Motion Off later removes NMSh's trail like a Portable renderer. - Previews: Blaze, Lightning, Motion blur and Comet each draw their own shape. All trails shared one preview that differed only in color, so Lightning looked like Blaze. The emitted pipelines already referenced the right shipped shader (regression added).
…ead of a motionless cursor With Renderer = Host native in Ghostty or Kitty and nothing native set up yet, no GPU trail exists, but Portable was told to draw nothing, so the cursor looked frozen. Portable now draws until setup, labelled 'Portable fallback · <host> native is not set up yet', and the /cursor rows say 'Portable until <host> setup'. A host with no native effects at all keeps the existing 'Host native is not available' state.
…r say how Kitty watches only kitty.conf, not the files it includes. Switching Lightning to Blaze rewrites only NMSh's pipeline file, so Kitty kept drawing the previous effect until a manual reload; the guidance wrongly said Kitty reloads automatically. Observed in Kitty 0.49.2: Lightning written, Blaze still drawn; after SIGUSR1, Lightning drawn. After a confirmed write, a removal or a gate sync, NMSh now sends Kitty's documented reload signal (SIGUSR1) to KITTY_PID only when that process is one of NMSh's own parents and its program is kitty; otherwise it gives the reload keys. The review discloses this before anything is written.
…heck, tmux Kitty fallback order - Confirming a Kitty review refuses when the /cursor changes it showed are no longer the ones that would apply (Motion or renderer changed meanwhile); under Reduced Motion or Effects Off a trail is not written, so /cursor is left alone. - A second Enter on /cursor > Host native setup while Kitty's catalog is read does nothing. - detectTerminalHost: the tmux fallback (KITTY_WINDOW_ID without a profile) returns to its old place after the hosts TERM_PROGRAM names, so a stale KITTY_WINDOW_ID does not outrank Terminal.app.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #522 (
feature/appearance-integration-20261029). Refs #399.Fixes Kitty Host Native not working and Lightning looking the same as Blaze. Each root cause was reproduced in a real Kitty 0.49.2 window first.
Root causes and fixes
TERM_PROGRAMthrough unchanged: a Kitty started from a Ghostty shell hasTERM=xterm-kitty,KITTY_WINDOW_ID=1andTERM_PROGRAM=ghostty.terminalProfile()letTERM_PROGRAMwin, so/appearanceoffered Ghostty's studio inside Kitty. Now a terminal-specificTERMwins. Cursor facts anddetectTerminalHost()use the same identity, and tmux keeps its previous outer-host behavior./cursor› Host native opened the Kitty studio only when the older/cursorinclude already existed. Kitty 0.49+ now goes straight to the studio. Kitty below 0.49 keeps the built-incursor_trailsetup.cursor_trail> 0. With/cursorMotion Off (or Kitty's default) it is 0. NMSh's own fragment now setscursor_trail 3when needed. This is judged without NMSh's own line, so syncs keep it. A later line that forces 0 refuses. Confirming a trail sets Motion Off → Tail and Portable → Auto, and the review shows both changes.kitty.conf, not included files. Lightning → Blaze rewrites only NMSh's pipeline, so Kitty kept drawing Lightning, and the guidance wrongly said it reloads automatically. After a write, removal or gate sync, NMSh now sends Kitty's documented reload signal (SIGUSR1). It sends it only toKITTY_PID, and only when that process is one of NMSh's parents and is kitty. Otherwise it shows the reload keys. The review says this before anything is written.The emitted pipelines already referenced the correct shipped shader. A regression test pins this.
Verification
kitty.confbyte for byte.--config-filelaunches. Private-HOME tests cover them.docs/development/native-appearance-welcome/TEST_RESULTS.md.