Skip to content

fix: DAQ passthrough#5126

Merged
tdejager merged 4 commits intoprefix-dev:mainfrom
TheSkyentist:main
Dec 15, 2025
Merged

fix: DAQ passthrough#5126
tdejager merged 4 commits intoprefix-dev:mainfrom
TheSkyentist:main

Conversation

@TheSkyentist
Copy link
Contributor

Description

This fixes #4846 where pixi shell is slow to spawn a fish shell because as of fish 4.1 it waits for primary device attribute queries to the terminal. This fixes passes them through on the creation of the PTY session

How Has This Been Tested?

I have run the recommended tests:

pixi run build-debug
pixi run lint
pixi run test-all-fast

and they have passed.

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: {e.g., Claude, Codex, GitHub Copilot, ChatGPT, etc.}
GitHub Copilot was used with Gemini 3 Pro. I don't have the original prompt, but the gist was to pass through the DAQ to the terminal and the context was the entire repo, the relevant file was identified.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

Copy link
Contributor

@tdejager tdejager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not extremely familiar with this code, but do we flush periodically here, that's why the query sometimes gets through?

@TheSkyentist
Copy link
Contributor Author

TheSkyentist commented Dec 15, 2025

I believe the following was happening before:

  1. Fish starts up and sends a DAQ query
  2. pixi stores that in the rolling buffer and waits for the activation string.
  3. Fish waits for the response.
  4. pixi times out after 3 seconds (which explains the duration we were seeing):

// Check if we have waited long enough for the pattern
if pattern_start.elapsed() > pattern_timeout && !write_stdout {
io::stdout().write_all(
format!(
"WARNING: Did not detect successful shell initialization within {} second(s).\n\r Please check on https://pixi.sh/latest/advanced/pixi_shell/#issues-with-pixi-shell for more tips.\n\r",
pattern_timeout.as_secs()
)
.as_bytes(),
)?;
io::stdout().write_all(&self.rolling_buffer)?;
io::stdout().flush()?;
write_stdout = true;
}

  1. pixi flushes the buffer, which sends the DAQ query, which causes the fish shell to spawn, writing over the initialization error message. (You can actually see this message if mash enough keys during the slow activation)

The old query only made it through before after timeout, the new strategy is to take specific sequences and write them to the terminal immediately and then remove them from the buffer.

Copy link
Contributor

Makes sense!

@tdejager
Copy link
Contributor

Checked this out locally and seemed to work for me, good spelunking by Gemini and good sterwarding by @TheSkyentist :)

@tdejager
Copy link
Contributor

One final thing and then I'd merge it

@TheSkyentist
Copy link
Contributor Author

Happy to help out! Big fan of pixi

@tdejager tdejager enabled auto-merge (squash) December 15, 2025 12:30
@tdejager tdejager merged commit e6277b2 into prefix-dev:main Dec 15, 2025
37 checks passed
@tdejager
Copy link
Contributor

Always excited to hear that! Thanks for the contribution.

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.

perf(shell): pixi shell is slow with fish

2 participants