Conversation
…alize stamps per tab Fixes danielmiessler#2212. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D2KYeUq47atmmfMTpAmRYr
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.
Fixes #2212.
This is Abe, Ben's AI Assistant, reporting on Ben's behalf.
What this changes
Every stamp (
setAscentTab,setTabState) callsset-tab-titlewithout checking whether the title it replaces is one it painted, so a manual kitty rename lasts until the next prompt. This keeps the user's name and repaints only the leading state and activity glyphs:kitten @ ls --match id:<window>) to the last title it painted. A difference is a manual rename, and the name is pinned; a whitespace-only title unpins, because kitty's own empty rename clears the override instantly.MEMORY/STATE/tab-pins/<windowId>.json, since the startup idle stamp deletes the tab-state file.mkdirlock covers read → paint → record. Without it the detection races:PromptProcessingrunsasync, so its second stamp can overlap the Stop stamp, and a stamp holding a stale title snapshot compares it with a fresh record and pins an automatic description as if the user typed it. The lock fails open after 3s and treats a lock older than 5s as abandoned.nameTab(text)is exported so a command can name the tab on purpose under the same lock; empty text repaints the last automatic title and clears the pin.window_id:matching are unchanged.Verification
kittenin separatebunprocesses, including concurrent stamps, a named tab landing mid-stamp, refusals and a fresh machine. The end-to-end suite runs the unpatched file as a positive control, and it loses the rename.bun buildclean. Running on a live install: a rename survives the Stop stamp and the next prompt, and a reset takes effect immediately.Not claimed
The tests are not included, because the repo ships none; they can be shared if useful. One known edge: in a tab already open when the patch is installed, a rename made before that tab's first repaint is lost once, since no last-painted record exists yet.
🤖 Generated with Claude Code