[#24193] Fix host terminal background color behavior#14
Conversation
Signed-off-by: danipiza <dpizarrogallego@gmail.com>
Signed-off-by: danipiza <dpizarrogallego@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes visual artifacts in the VulcanAI terminal interface by manipulating the host terminal's background color and scrollbar visibility. The Textual terminal widget was displaying with visible gaps at the bottom and right edges due to the host terminal's default background showing through. The solution involves setting the host terminal's background to match VulcanAI's dark theme (#121212), hiding scrollbars via terminal escape sequences and GNOME-specific gsettings commands, and adding CSS overflow controls.
Changes:
- Added terminal control sequence utilities to set/reset background color and scrollbar visibility
- Implemented GNOME Terminal-specific scrollbar backup/restore via gsettings
- Modified CSS to set consistent background colors and hide internal scrollbars
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| src/vulcanai/console/utils.py | Added terminal configuration utilities: escape sequence writer, GNOME Terminal detection, gsettings wrapper, and scrollbar disable/restore functions |
| src/vulcanai/console/console.py | Modified CSS to set background colors and hide scrollbars; wrapped run() call with terminal state setup/teardown to apply/restore host terminal settings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: danipiza <dpizarrogallego@gmail.com>
0b5248b to
76212d9
Compare
Signed-off-by: danipiza <dpizarrogallego@gmail.com>
0701f1f to
7538d81
Compare
There was a problem hiding this comment.
Let's apply the adapters default argument comment.
As we are not using _vulcanai_bg_color anymore, we could also remove TerminalSessionConfig import and initialize a default TerminalSessionConfig in the TerminalSession constructor. Same logic we applied with the GnomeTerminalAdapter.
Signed-off-by: danipiza <dpizarrogallego@gmail.com>
Description
The textual terminal is attach above the host terminal, and is visible with some stray lines at the bottom and the right (scroll bar) side of the terminal. To solve this “error” the host terminal color is changed during the execution of VulcanAI. And for gnome terminal, the scrollbar is disabled.
Previous terminal
With this PR fix