Skip to content

Commit d2addfb

Browse files
committed
fix(FR-1778): fix terminal guide dialog logic to properly open terminal (#4825)
Resolves #4801 ([FR-1778](https://lablup.atlassian.net/browse/FR-1778)) ## Summary - Fixed terminal guide dialog logic in `runTerminal()` to not early return after showing the guide dialog - Simplified `_openTerminalGuideDialog()` to always show the dialog when called - This ensures the terminal actually opens when user clicks 'Launch Terminal App' button in the session detail panel ## Test plan - [ ] Open session detail panel - [ ] Click 'Launch Terminal App' button - [ ] Verify terminal opens properly (with or without guide dialog depending on settings) [FR-1778]: https://lablup.atlassian.net/browse/FR-1778?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 6968722 commit d2addfb

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/components/backend-ai-app-launcher.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,12 +1525,10 @@ export default class BackendAiAppLauncher extends BackendAIPage {
15251525
async runTerminal(sessionUuid: string) {
15261526
const isVisible = localStorage.getItem('backendaiwebui.terminalguide');
15271527
if (
1528-
(!globalThis.backendaiclient.supports('copy-on-terminal') &&
1529-
!isVisible) ||
1530-
isVisible === 'true'
1528+
!globalThis.backendaiclient.supports('copy-on-terminal') &&
1529+
(!isVisible || isVisible === 'true')
15311530
) {
15321531
this._openTerminalGuideDialog();
1533-
return;
15341532
}
15351533
if (
15361534
globalThis.backendaiwsproxy == undefined ||
@@ -1740,9 +1738,7 @@ export default class BackendAiAppLauncher extends BackendAIPage {
17401738
* Open a guide for terminal
17411739
*/
17421740
_openTerminalGuideDialog() {
1743-
if (!globalThis.backendaiclient.supports('copy-on-terminal')) {
1744-
this.terminalGuideDialog.show();
1745-
}
1741+
this.terminalGuideDialog.show();
17461742
}
17471743

17481744
/**

0 commit comments

Comments
 (0)