Skip to content

fix(theme): skip host palette queries under wsl - #2852

Merged
ogulcancelik merged 1 commit into
masterfrom
issue/2440-pace-host-palette-queries
Aug 15, 2026
Merged

fix(theme): skip host palette queries under wsl#2852
ogulcancelik merged 1 commit into
masterfrom
issue/2440-pace-host-palette-queries

Conversation

@ogulcancelik

Copy link
Copy Markdown
Collaborator

Summary

  • skip the 256-entry OSC 4 host palette query burst when Herdr detects WSL
  • keep OSC 10/11 default-color discovery under WSL
  • preserve full host palette discovery on native Linux and macOS

Verification

  • reproduced corrupted palette reply fragments with the baseline build in Alacritty → ConPTY → WSL
  • verified the patched build shows no fragments while attached or after detach in the same environment
  • just check

Refs #2440

@kangal-bot kangal-bot added the ai-review Trigger automated AI reviews for pull requests admitted by the PR gate label Aug 15, 2026
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9a4c59e7-474b-43bf-889c-fbd8d533d9ff

📥 Commits

Reviewing files that changed from the base of the PR and between 9166e07 and d55edd5.

📒 Files selected for processing (8)
  • docs/next/CHANGELOG.md
  • src/app/theme_sync.rs
  • src/client/mod.rs
  • src/platform/fallback.rs
  • src/platform/linux.rs
  • src/platform/macos.rs
  • src/platform/windows.rs
  • src/terminal_theme.rs

📝 Walkthrough

Walkthrough

The host terminal theme query now receives a platform-specific palette setting. Default color queries remain enabled, while the 256-color palette queries are omitted on WSL, Windows, and unsupported platforms.

Changes

Platform-aware terminal palette queries

Layer / File(s) Summary
Platform palette capability
src/platform/*.rs
Platform helpers report whether host terminal palette queries should run. Linux disables them in WSL, while macOS enables them. Windows and fallback platforms disable them.
Conditional query generation
src/terminal_theme.rs
host_terminal_theme_query_sequence accepts include_palette and conditionally adds the 256 palette queries. Tests cover both query modes.
Query call-site wiring
src/app/theme_sync.rs, src/client/mod.rs, docs/next/CHANGELOG.md
Theme query call sites pass the platform setting. The changelog records the WSL ConPTY reply leakage fix.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to d55ed

The PR makes a localized WSL-specific palette-query behavior change while preserving existing behavior elsewhere, and no actionable merge-blocking risk remains beyond normal checks and review.

Possibly related PRs

  • herdrdev/herdr#2417: Both changes modify host terminal theme querying in the same application and client modules, but they address different query behavior.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: skipping host palette queries under WSL.
Description check ✅ Passed The description directly explains the WSL palette-query fix, preserved behavior, verification steps, and issue reference.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue/2440-pace-host-palette-queries

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@ogulcancelik
ogulcancelik merged commit 2b4b384 into master Aug 15, 2026
7 checks passed
@kangal-bot kangal-bot removed the ai-review Trigger automated AI reviews for pull requests admitted by the PR gate label Aug 15, 2026
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.

2 participants