Skip to content

Commit 7f805ae

Browse files
author
GCWing
committed
fix: resolve workspace resource CI regressions
1 parent 3af6d1c commit 7f805ae

8 files changed

Lines changed: 17 additions & 12 deletions

File tree

‎src/crates/assembly/core/src/service/workspace/manager.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,7 @@ pub struct WorkspaceManagerStatistics {
14311431

14321432
#[cfg(test)]
14331433
mod tests {
1434-
use super::WorkspaceIdentity;
1434+
use super::{WorkspaceIdentity, WorkspaceIdentityRuntimeExt};
14351435

14361436
#[test]
14371437
fn workspace_identity_reads_optional_avatar_without_requiring_it() {

‎src/web-ui/src/app/scenes/browser/BrowserAddressField.presentation.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { describe, expect, it } from 'vitest';
55
const stylesheets = [
66
'./BrowserPanel.scss',
77
'./BrowserScene.scss',
8-
].map(path => readFileSync(fileURLToPath(new URL(path, import.meta.url)), 'utf8'));
8+
].map(path => readFileSync(fileURLToPath(new URL(path, import.meta.url)), 'utf8').replaceAll('\r\n', '\n'));
99

1010
function addressWrapperRule(stylesheet: string): string {
1111
const match = stylesheet.match(/&__address\s*\{([\s\S]*?)\n\s*}\n\n\s*&__address-field/);

‎src/web-ui/src/app/scenes/shell/hooks/useTerminalSessions.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const snapshots = new Map<string, SessionResponse[]>();
2828
export function useTerminalSessions(options: UseTerminalSessionsOptions) {
2929
const { workspacePath, isRemote, currentConnectionId, scope, workspaces, savedSessionIds } = options;
3030
const key = scope.key('workspace-terminals', currentConnectionId, workspacePath);
31-
const activation = useMemo(() => ({ key }), [key, scope]);
31+
const activation = useMemo(() => ({ key, scope }), [key, scope]);
3232
const currentActivation = useRef<typeof activation | null>(activation);
3333
currentActivation.current = activation;
3434
useEffect(() => {
@@ -39,7 +39,10 @@ export function useTerminalSessions(options: UseTerminalSessionsOptions) {
3939
const [snapshot, setSnapshot] = useState<SessionSnapshot>(() => ({
4040
key, sessions: snapshots.get(key) ?? [], loading: true, error: null,
4141
}));
42-
const sessions = snapshot.key === key ? snapshot.sessions : snapshots.get(key) ?? [];
42+
const sessions = useMemo(
43+
() => snapshot.key === key ? snapshot.sessions : snapshots.get(key) ?? [],
44+
[key, snapshot],
45+
);
4346
const sessionMap = useMemo(() => new Map(sessions.map(session => [session.id, session])), [sessions]);
4447
const target = useMemo<TerminalWorkspaceScope>(() => ({
4548
rootPath: workspacePath ?? '', isRemote, connectionId: currentConnectionId,

‎src/web-ui/src/app/scenes/workspace-resources/WorkspaceResourcePanel.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useCallback, useEffect, useId, useRef, useState, useSyncExternalStore } from 'react';
2-
import { FilePlus, FolderPlus, List, Plus, RotateCw } from 'lucide-react';
2+
import { FilePlus, FolderPlus, List, RotateCw } from 'lucide-react';
33
import {
44
Icon, IconButton, NavigationPanel, NavigationPanelBody, NavigationPanelContent,
55
NavigationPanelHeader, OverflowText, Tooltip,
@@ -171,7 +171,7 @@ function WorkspaceResourceContent({ resourceKey }: { resourceKey: string }) {
171171
<div className="openbitfun-file-viewer-nav__actions" data-openbitfun-component="file-viewer-nav" data-openbitfun-part="actions">
172172
<Tooltip content={t('nav.shell.actions.refresh')}><IconButton size="xs" aria-label={t('nav.shell.actions.refresh')} icon={<RotateCw />}
173173
disabled={busy || terminals.loading} onClick={() => run(terminals.refresh)} /></Tooltip>
174-
<Tooltip content={t('nav.shell.actions.newTerminal')}><IconButton size="xs" aria-label={t('nav.shell.actions.newTerminal')} icon={<Plus />}
174+
<Tooltip content={t('nav.shell.actions.newTerminal')}><IconButton size="xs" aria-label={t('nav.shell.actions.newTerminal')} icon={<Icon name="plus" size="xs" />}
175175
disabled={busy} onClick={() => createTerminal()} /></Tooltip>
176176
{!isRemote && shells.length > 1 && <IconButton size="xs" aria-label={t('nav.resources.chooseShell')} aria-haspopup="menu"
177177
icon={<Icon name="chevron-down" size="xs" />} disabled={busy}

‎src/web-ui/src/app/scenes/workspace-resources/WorkspaceTerminals.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Play, MoreHorizontal } from 'lucide-react';
1+
import { Play } from 'lucide-react';
22
import { Icon, IconButton, OverflowText, Tooltip } from '@openbitfun/ui';
33
import { useI18n } from '@/infrastructure/i18n';
44
import type { MenuItem } from '@/shared/context-menu-system/types/menu.types';
@@ -91,7 +91,7 @@ export default function WorkspaceTerminals({ terminals, busy, selectedId, onSele
9191
onClick={() => run(async () => { onSelect(await terminals.startEntry(entry)); })} />
9292
</Tooltip>
9393
)}
94-
<IconButton size="xs" aria-label={t('nav.resources.terminalActions')} icon={<MoreHorizontal size={12} />}
94+
<IconButton size="xs" aria-label={t('nav.resources.terminalActions')} icon={<Icon name="more" size="xs" />}
9595
aria-haspopup="menu" onClick={event => showResourceMenu(event, menuItems(entry))} />
9696
</div>
9797
</div>

‎src/web-ui/src/infrastructure/config/components/ModelServiceCollapse.presentation.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { describe, expect, it } from 'vitest';
55
const modelSettingsSource = readFileSync(
66
fileURLToPath(new URL('./ModelSettingsPage.tsx', import.meta.url)),
77
'utf8',
8-
);
8+
).replaceAll('\r\n', '\n');
99
const defaultModelSource = readFileSync(
1010
fileURLToPath(new URL('./DefaultModelConfig.tsx', import.meta.url)),
1111
'utf8',

‎src/web-ui/src/tools/editor/services/ModelIndentation.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ import type * as Monaco from 'monaco-editor';
44
import { applyModelIndentation, readModelIndentation, setModelIndentation } from './ModelIndentation';
55

66
let monaco: typeof Monaco;
7+
// Loading the real Monaco module graph can exceed 10 seconds on a cold Windows run.
8+
// Keep this setup allowance separate from the default timeout for each assertion.
79
beforeAll(async () => {
810
window.matchMedia ??= vi.fn().mockReturnValue({ matches: false, addEventListener() {}, removeEventListener() {} });
911
monaco = await import('monaco-editor/esm/vs/editor/editor.api');
10-
});
12+
}, 60_000);
1113

1214
const defaults = { tab_size: 4, insert_spaces: true, detect_indentation: true };
1315

‎src/web-ui/src/tools/terminal/components/ConnectedTerminal.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import React, { useEffect, useRef, useCallback, useState, memo } from 'react';
77
import { Button, Icon } from '@openbitfun/ui';
88
import { useI18n } from '@/infrastructure/i18n';
9-
import { AlertCircle, X } from 'lucide-react';
9+
import { AlertCircle } from 'lucide-react';
1010
import Terminal, { TerminalRef, type TerminalOptions } from './Terminal';
1111
import { useTerminal } from '../hooks/useTerminal';
1212
import { registerTerminalActions, unregisterTerminalActions } from '../services/TerminalActionManager';
@@ -520,7 +520,7 @@ const ConnectedTerminal: React.FC<ConnectedTerminalProps> = memo(({
520520
title={closeBehavior === 'detach' ? t('actions.closeView') : t('actions.stopTerminal')}
521521
data-testid="shell-panel-close"
522522
>
523-
{closeBehavior === 'detach' ? <X size={14} /> : <Icon name="delete" size="sm" />}
523+
{closeBehavior === 'detach' ? <Icon name="xmark" size="sm" /> : <Icon name="delete" size="sm" />}
524524
</button>
525525
</div>
526526
</div>

0 commit comments

Comments
 (0)