Fix Textual 6.x CSS compatibility: add missing $panel variable#97
Merged
CJFWeatherhead merged 2 commits intomainfrom Nov 3, 2025
Merged
Fix Textual 6.x CSS compatibility: add missing $panel variable#97CJFWeatherhead merged 2 commits intomainfrom
CJFWeatherhead merged 2 commits intomainfrom
Conversation
Co-authored-by: CJFWeatherhead <6923098+CJFWeatherhead@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix error in stylesheet for classic theme
Fix Textual 6.x CSS compatibility: add missing $panel variable
Nov 3, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a compatibility issue with Textual 6.x that was causing a stylesheet error when starting the TUI with classic or turbo themes. The fix adds a missing CSS variable mapping.
Key changes:
- Added
$panelCSS variable mapping to both TUI implementations for Textual 6.x compatibility - Updated CHANGELOG.md to document the fix
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| chatrixcd/tui_turbo.py | Added panel CSS variable mapping to surface theme color in get_css_variables() |
| chatrixcd/tui.py | Added panel CSS variable mapping to surface theme color in get_css_variables() |
| CHANGELOG.md | Documented the TUI compatibility fix for Textual 6.x |
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.
Textual 6.x's default stylesheet references
$panel, causing TUI startup to fail with "reference to undefined variable '$panel'".Changes
'panel': theme['surface']toChatrixTUI.get_css_variables()'panel': theme['surface']toChatrixTurboTUI.get_css_variables()Maps
$panelto existingsurfacecolor for consistency across all themes (default, midnight, grayscale, windows31, msdos).Resolves startup failures with
-t classicand-t turboflags.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
semaphore.example.testpython3 -m unittest discover tests/ -v(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.