Skip to content

Commit c980768

Browse files
committed
fix(terminal): refresh process info on tab bar hover/focus and fix tests
Refresh process info when the tab bar is hovered or gains focus, and when a terminal is activated. Update integration tests to use the exported _refreshAllProcesses instead of the removed mouseenter trigger. Bump tab bar expand threshold to 840px. Improve tab text visibility with larger font and better contrast.
1 parent f037b49 commit c980768

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

src/extensionsIntegrated/Terminal/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ define(function (require, exports, module) {
179179
return false;
180180
});
181181

182+
// Refresh process info when the tab bar gains focus or mouse enters
183+
$panel.find(".terminal-tab-bar").on("mouseenter", _refreshAllProcesses);
184+
$panel.find(".terminal-tab-bar").on("focusin", _refreshAllProcesses);
185+
182186
// Listen for panel resize
183187
WorkspaceManager.on("workspaceUpdateLayout", _handleResize);
184188

@@ -365,6 +369,7 @@ define(function (require, exports, module) {
365369
}
366370

367371
_updateFlyout();
372+
_refreshAllProcesses();
368373
}
369374

370375
/**
@@ -873,6 +878,7 @@ define(function (require, exports, module) {
873878

874879
if (Phoenix.isTestWindow) {
875880
exports._getActiveTerminal = _getActiveTerminal;
881+
exports._refreshAllProcesses = _refreshAllProcesses;
876882

877883
/**
878884
* Write data to the active terminal's PTY. Test-only helper.

test/spec/Terminal-integ-test.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,14 @@ define(function (require, exports, module) {
138138
}
139139

140140
/**
141-
* Trigger a flyout process refresh so tab titles
141+
* Trigger a process refresh so tab titles
142142
* reflect the current foreground process.
143143
*/
144144
function triggerFlyoutRefresh() {
145-
testWindow.$(".terminal-tab-flyout")
146-
.trigger("mouseenter");
145+
const termModule = testWindow.brackets.getModule(
146+
"extensionsIntegrated/Terminal/main"
147+
);
148+
termModule._refreshAllProcesses();
147149
}
148150

149151
/**

0 commit comments

Comments
 (0)