Add opt-in background tab title updates#32
Closed
carlosorch wants to merge 1 commit into
Closed
Conversation
Adds an opt-in PI_WEB_BACKGROUND_TAB_TITLE mode for pi_web_set_tab_title. By default, the tool keeps the existing synchronous behavior. When PI_WEB_BACKGROUND_TAB_TITLE is set to 1, true, or yes, title updates are queued in the background and the tool returns immediately. Queued updates are guarded against stale sessions and cancelled on session shutdown/reload. This avoids blocking the agent turn on cosmetic terminal/session title updates while preserving backwards-compatible default behavior.
ffd4c32 to
c3ff3f2
Compare
Contributor
|
I will close this PR as I am working on it and plan to setup via the setting page. |
6 tasks
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.
Add opt-in background tab title updates
Summary
This adds an opt-in background mode for
pi_web_set_tab_title.Nothing changes by default. The tool still updates the title synchronously and returns the same response shape as before. If
PI_WEB_BACKGROUND_TAB_TITLE=1is set, the tool queues the title updateand returns immediately.
Why
Title updates are cosmetic, so users may not want them to block the current agent turn.
Behavior
Default:
With PI_WEB_BACKGROUND_TAB_TITLE=1:
Queued updates check that the session has not changed before applying the title, and pending updates are cancelled on session shutdown/reload.