Skip to content

fix: suppress transient elevated Windows terminal titles - #2433

Open
Pimpmuckl wants to merge 3 commits into
herdrdev:masterfrom
Pimpmuckl:fix/normalize-elevated-terminal-titles
Open

fix: suppress transient elevated Windows terminal titles#2433
Pimpmuckl wants to merge 3 commits into
herdrdev:masterfrom
Pimpmuckl:fix/normalize-elevated-terminal-titles

Conversation

@Pimpmuckl

Copy link
Copy Markdown
Contributor

Problem

While dogfooding Herdr on native Windows, I noticed pane titles briefly flashing Administrator: ... whenever Codex ran a nested PowerShell tool process.

Windows temporarily rewrites the inherited console title from <current title> to Administrator: <current title> and restores it when the process exits. ConPTY emits both changes as title OSC events, and Herdr currently publishes the intermediate title immediately.

In 10 observed runs, the decoration appeared 51–78 ms after the stable title and disappeared 54–84 ms later.

Fix

On Windows, hold only the exact transition from <current title> to Administrator: <current title> for 200 ms.

  • if the title restores or changes before the deadline, never publish the transient title
  • if it remains, publish it normally after the delay
  • keep every other title change immediate

The Windows-specific classification stays in src/platform/windows.rs; the shared terminal state only handles the generic settle/cancel/promote behavior.

Scope

  • raw PTY output and agent detection are unchanged
  • non-Windows behavior is unchanged
  • intentionally persistent Administrator: titles still appear after 200 ms
  • no docs change: this restores stable title behavior and adds no setting or workflow

Validation

  • just check passes on native Windows after rebasing onto current master
  • 18 live API samples from 31–1090 ms during a nested PowerShell run contained zero Administrator: titles
  • a persistent candidate remained hidden at 15 ms, appeared by 320 ms, then restored normally
  • local 5.6-sol xhigh reviewers completed with no accepted findings remaining

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ai-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b2bc19fb-bb23-4e1d-8bdc-4f4f55dc2e3b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@Pimpmuckl
Pimpmuckl force-pushed the fix/normalize-elevated-terminal-titles branch from 8288a7b to c5a7303 Compare August 6, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant