Skip to content

[#24193] Fix host terminal background color behavior#14

Merged
cferreiragonz merged 5 commits intomainfrom
fix/gnome-terminal
Mar 4, 2026
Merged

[#24193] Fix host terminal background color behavior#14
cferreiragonz merged 5 commits intomainfrom
fix/gnome-terminal

Conversation

@Danipiza
Copy link
Contributor

@Danipiza Danipiza commented Feb 19, 2026

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

Screenshot from 2026-02-19 07-44-59

With this PR fix

Screenshot from 2026-02-26 12-07-17

Signed-off-by: danipiza <dpizarrogallego@gmail.com>
@Danipiza Danipiza changed the title [#24193] [#24193] Fix host terminal background color behavior Feb 19, 2026
Signed-off-by: danipiza <dpizarrogallego@gmail.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

@cferreiragonz cferreiragonz left a comment

Choose a reason for hiding this comment

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

I left the Copilot comments which I found useful.

Also, as talked internally, lets move this into its own Class to improve scalability.

Signed-off-by: danipiza <dpizarrogallego@gmail.com>
Signed-off-by: danipiza <dpizarrogallego@gmail.com>
Copy link
Contributor

@cferreiragonz cferreiragonz left a comment

Choose a reason for hiding this comment

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

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>
@Danipiza Danipiza requested a review from cferreiragonz March 3, 2026 06:53
Copy link
Contributor

@cferreiragonz cferreiragonz left a comment

Choose a reason for hiding this comment

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

LGTM

@cferreiragonz cferreiragonz merged commit c37d129 into main Mar 4, 2026
4 checks passed
@cferreiragonz cferreiragonz deleted the fix/gnome-terminal branch March 4, 2026 11:35
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.

3 participants