diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts index e0dd2c4fb54..517121c2061 100644 --- a/apps/desktop/electron/main.ts +++ b/apps/desktop/electron/main.ts @@ -7608,6 +7608,14 @@ function createWindow() { } }) + // Under Playright testing, instantly show the window. + // `ready-to-show` doesn't fire in some testing envs. + if (process.env.TEST_WORKER_INDEX !== undefined) { + if (mainWindow && !mainWindow.isDestroyed() && !mainWindow.isVisible()) { + mainWindow.show() + } + } + mainWindow.on('will-enter-full-screen', () => sendWindowStateChanged(true)) mainWindow.on('enter-full-screen', () => sendWindowStateChanged(true)) mainWindow.on('will-leave-full-screen', () => sendWindowStateChanged(false)) diff --git a/apps/desktop/src/store/session.ts b/apps/desktop/src/store/session.ts index dbfd7dbc799..9d596a3b822 100644 --- a/apps/desktop/src/store/session.ts +++ b/apps/desktop/src/store/session.ts @@ -1,3 +1,4 @@ +import type { ConnectionState } from '@hermes/shared' import { atom, computed } from 'nanostores' import { lastVisibleMessageIsUser } from '@/app/chat/thread-loading' @@ -213,7 +214,7 @@ export function mergeSessionPage( } export const $connection = atom(null) -export const $gatewayState = atom('idle') +export const $gatewayState = atom('idle') export const $sessions = atom([]) export const $sessionsTotal = atom(0) // Cron-job sessions (source === 'cron') are fetched as their own list so the @@ -319,7 +320,7 @@ export const $modelPickerOpen = atom(false) export const $sessionPickerOpen = atom(false) export const setConnection = (next: Updater) => updateAtom($connection, next) -export const setGatewayState = (next: Updater) => updateAtom($gatewayState, next) +export const setGatewayState = (next: Updater) => updateAtom($gatewayState, next) export const setSessions = (next: Updater) => updateAtom($sessions, next) export const setSessionsTotal = (next: Updater) => updateAtom($sessionsTotal, next) export const setCronSessions = (next: Updater) => updateAtom($cronSessions, next) diff --git a/apps/desktop/tsconfig.json b/apps/desktop/tsconfig.json index 8af5d47ffb2..a00bad75fb0 100644 --- a/apps/desktop/tsconfig.json +++ b/apps/desktop/tsconfig.json @@ -23,5 +23,6 @@ } }, "include": ["src", "../shared/src"], + "exclude": ["e2e", "electron", "playwright.config.ts"], "references": [{ "path": "./tsconfig.electron.json" }] } diff --git a/nix/devShell.nix b/nix/devShell.nix index e93e10ef056..c5dfa6cf1f6 100644 --- a/nix/devShell.nix +++ b/nix/devShell.nix @@ -43,6 +43,9 @@ ${combinedNonNpm} ${hermesNpmLib.mkNpmDevShellHook npmPackageJsonPaths} + # Force Node to use Nix's playwright-test binary instead of node_modules/.bin + export PATH="${pkgs.playwright-test}/bin:$PATH" + # for the devshell to pick up the src export HERMES_PYTHON_SRC_ROOT=$(git rev-parse --show-toplevel) echo "Hermes Agent dev shell in $HERMES_PYTHON_SRC_ROOT"