Conversation
Signed-off-by: danipiza <dpizarrogallego@gmail.com>
f8c94f1 to
9504de1
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves terminal UX output and expands terminal emulator support by adding a Terminator-specific adapter for hiding scrollbars during a console session.
Changes:
- Fixes the rendered “Success Criteria” label in plan string formatting output.
- Refactors GNOME Terminal gsettings helper into
GnomeTerminalAdapterand adds a newTerminatorTerminalAdapterthat switches profiles viaremotinator. - Extends
TerminalSessionConfigand default adapter list to include Terminator behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/vulcanai/core/plan_types.py |
Corrects the printed “Success Criteria” label in plan visualization output. |
src/vulcanai/console/terminal_session.py |
Adds Terminator support (profile switching + config manipulation) and updates session defaults/adapters. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| + f"<{color_value}>{node.timeout_ms} ms</{color_value}>" | ||
| ) | ||
| if node.success_criteria: | ||
| # Succes Criteria: <node.success_criteria> |
There was a problem hiding this comment.
The inline comment still contains a typo: "Succes Criteria" should be "Success Criteria" to match the rendered label and avoid confusing output/log search.
| # Succes Criteria: <node.success_criteria> | |
| # Success Criteria: <node.success_criteria> |
| return (terminal_uuid, self._config.terminator_profile_base) | ||
|
|
There was a problem hiding this comment.
TerminatorTerminalAdapter.apply() always restores to terminator_profile_base from config, not the profile that was active before switching. This can leave users on the wrong profile after the session. Consider querying the current profile via remotinator (or otherwise capturing the actual active profile) and storing that in the returned state so restore() can reliably revert to the pre-session profile.
There was a problem hiding this comment.
This is True. We restore to the default profile always. If it does not exist we could fail and right now we do not provide any way of modifying TerminalSessionConfig
| if changed: | ||
| try: | ||
| config_path.write_text("".join(lines), encoding="utf-8") | ||
| except Exception: | ||
| return False |
There was a problem hiding this comment.
_ensure_hidden_profile() can permanently modify the user's Terminator config (e.g., creating a new profile or overwriting an existing profile's scrollbar_position) and there is no restoration/rollback in restore(). This has user-facing operational impact. Consider tracking whether the file/profile was changed and reverting it on session end, or only creating/modifying a uniquely-named VulcanAI profile when it doesn't already exist (without overwriting user-defined profiles).
cferreiragonz
left a comment
There was a problem hiding this comment.
We are permanently modifying the configuration profile of the user by adding a new profile. Maybe we should delete it when VulcanAI is closed?
| profiles_end = len(lines) | ||
| for index in range(profiles_start + 1, len(lines)): | ||
| if cls._TOP_LEVEL_SECTION_RE.match(lines[index]) and lines[index].strip() != "[profiles]": | ||
| profiles_end = index | ||
| break | ||
|
|
||
| profile_headers: list[tuple[str, int, str]] = [] | ||
| for index in range(profiles_start + 1, profiles_end): | ||
| header_match = cls._PROFILE_HEADER_RE.match(lines[index].rstrip("\r\n")) | ||
| if header_match: | ||
| profile_headers.append((header_match.group(2).strip(), index, header_match.group(1))) |
There was a problem hiding this comment.
Why not fusion both for loops into one and just check cls._TOP_LEVEL_SECTION_RE.match(lines[index]) and lines[index].strip() != "[profiles]" before breaking
| profiles_end = len(lines) | |
| for index in range(profiles_start + 1, len(lines)): | |
| if cls._TOP_LEVEL_SECTION_RE.match(lines[index]) and lines[index].strip() != "[profiles]": | |
| profiles_end = index | |
| break | |
| profile_headers: list[tuple[str, int, str]] = [] | |
| for index in range(profiles_start + 1, profiles_end): | |
| header_match = cls._PROFILE_HEADER_RE.match(lines[index].rstrip("\r\n")) | |
| if header_match: | |
| profile_headers.append((header_match.group(2).strip(), index, header_match.group(1))) | |
| profiles_end = len(lines) | |
| profile_headers: list[tuple[str, int, str]] = [] | |
| for index in range(profiles_start + 1, len(lines)): | |
| if cls._TOP_LEVEL_SECTION_RE.match(lines[index]) and lines[index].strip() != "[profiles]": | |
| profiles_end = index | |
| break | |
| header_match = cls._PROFILE_HEADER_RE.match(lines[index].rstrip("\r\n")) | |
| if header_match: | |
| profile_headers.append((header_match.group(2).strip(), index, header_match.group(1))) |
There was a problem hiding this comment.
Yeah I had it separated for a cleaner logic. But this is more efficient.
36d989e to
9504de1
Compare
…MINATOR_PROFILE' Signed-off-by: danipiza <dpizarrogallego@gmail.com>
6d4a7f7 to
c97003a
Compare
This PR adds Terminator support to TerminalSession so scrollbars are hidden during VulcanAI execution and restored afterward, matching the existing GNOME behavior pattern.