Skip to content

The agent that grows with you

fmt(js): `npm run fix` on merge (#76404)

hermes-seaeye[bot]c5be6e7792c7
diff --git a/apps/desktop/electron/bootstrap-repair-guard.ts b/apps/desktop/electron/bootstrap-repair-guard.ts
index 96f383770ed..f971bcccfe2 100644
--- a/apps/desktop/electron/bootstrap-repair-guard.ts
+++ b/apps/desktop/electron/bootstrap-repair-guard.ts
@@ -104,8 +104,7 @@ export function decideBootstrapRepair(input: RepairDecisionInput): RepairDecisio
hardReinstall: true,
attempt,
reason:
- `repair attempt ${attempt} exceeds soft-restart budget ` +
- `(${maxSoftAttempts}); escalating to hard reinstall`
+ `repair attempt ${attempt} exceeds soft-restart budget ` + `(${maxSoftAttempts}); escalating to hard reinstall`
}
}
diff --git a/apps/desktop/electron/connection-config.test.ts b/apps/desktop/electron/connection-config.test.ts
index 68c1d28e629..748ff9ef8dd 100644
--- a/apps/desktop/electron/connection-config.test.ts
+++ b/apps/desktop/electron/connection-config.test.ts
@@ -363,7 +363,6 @@ test('normalizeRemoteBaseUrl still rejects explicit non-http(s) schemes after sc
assert.throws(() => normalizeRemoteBaseUrl('ftp://host:21'), /http:\/\/ or https:\/\//)
})
-
// --- buildGatewayWsUrl (token) ---
test('buildGatewayWsUrl uses wss for https and bakes the token', () => {
diff --git a/apps/desktop/electron/updater-process.test.ts b/apps/desktop/electron/updater-process.test.ts
index 70174b26f1f..96f48eb9ff0 100644
--- a/apps/desktop/electron/updater-process.test.ts
+++ b/apps/desktop/electron/updater-process.test.ts
@@ -68,7 +68,7 @@ test('resolveStagedUpdaterBinary hands Windows the staged installer it finds', (
const probed: string[] = []
const resolved = resolveStagedUpdaterBinary(home, {
- fileExists: (candidate) => {
+ fileExists: candidate => {
probed.push(candidate)
return candidate === staged
diff --git a/apps/desktop/src/app/profiles/index.tsx b/apps/desktop/src/app/profiles/index.tsx
index d8e596f3ea1..0ec99934410 100644
--- a/apps/desktop/src/app/profiles/index.tsx
+++ b/apps/desktop/src/app/profiles/index.tsx
@@ -259,7 +259,10 @@ function ProfileDetail({ profile }: { profile: ProfileInfo }) {
{profile.is_default && <PanelPill tone="good">{p.defaultBadge}</PanelPill>}
{profile.has_env && <PanelPill tone="muted">.env</PanelPill>}
</div>
- <p className="mt-1 truncate font-mono text-[0.66rem] text-muted-foreground/55" title={displayPath(profile.path)}>
+ <p
+ className="mt-1 truncate font-mono text-[0.66rem] text-muted-foreground/55"
+ title={displayPath(profile.path)}
+ >
{displayPath(profile.path)}
</p>
</div>
diff --git a/apps/desktop/src/app/right-sidebar/terminal/clipboard.ts b/apps/desktop/src/app/right-sidebar/terminal/clipboard.ts
index 6d1103b6be9..3e306ca2778 100644
--- a/apps/desktop/src/app/right-sidebar/terminal/clipboard.ts
+++ b/apps/desktop/src/app/right-sidebar/terminal/clipboard.ts
@@ -77,8 +77,8 @@ export function mirrorSelection(host: HTMLElement, text: string) {
}
const live = window.getSelection()
- const foreign =
- live && !live.isCollapsed && live.anchorNode != null && !host.contains(live.anchorNode)
+
+ const foreign = live && !live.isCollapsed && live.anchorNode != null && !host.contains(live.anchorNode)
if (foreign) {
return
diff --git a/apps/desktop/src/app/right-sidebar/terminal/rail.test.tsx b/apps/desktop/src/app/right-sidebar/terminal/rail.test.tsx
index baf5874bb3e..8db59ca9fa1 100644
--- a/apps/desktop/src/app/right-sidebar/terminal/rail.test.tsx
+++ b/apps/desktop/src/app/right-sidebar/terminal/rail.test.tsx
@@ -35,10 +35,7 @@ describe('TerminalRail', () => {
})
it('⌘-click closes the tab; a plain click selects it', () => {
- $terminals.set([
- ...$terminals.get(),
- { auto: true, cwd: 'C:\\repo', id: 'term-2', kind: 'user', title: 'zsh' }
- ])
+ $terminals.set([...$terminals.get(), { auto: true, cwd: 'C:\\repo', id: 'term-2', kind: 'user', title: 'zsh' }])
render(<TerminalRail />)
diff --git a/apps/desktop/src/app/session/hooks/use-message-stream/index.ts b/apps/desktop/src/app/session/hooks/use-message-stream/index.ts
index 61469c0df9c..29051cc3656 100644
--- a/apps/desktop/src/app/session/hooks/use-message-stream/index.ts
+++ b/apps/desktop/src/app/session/hooks/use-message-stream/index.ts
@@ -606,6 +606,7 @@ export function useMessageStream({
// failure signals — never on a healthy reply that happens to say
// "disk full".
const diskFullSignal = failure?.error || (failure ? text : '')
+
if (diskFullSignal && isDiskFullErrorMessage(diskFullSignal)) {
notifyError(new Error(diskFullSignal), translateNow('notifications.errors.diskFull'))
}
diff --git a/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx b/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx
index c78a5ebca5e..a4081e9ac77 100644
--- a/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx
+++ b/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx
@@ -139,14 +139,13 @@ export function useStatusbarItems({
// bail-out key on its own.
const focusedUsage = useStoreSelector($focusedSessionState, state => state?.usage ?? null)
const focusedStateCwd = useStoreSelector($focusedSessionState, state => state?.cwd?.trim() || '')
+
// Runtime slices carry the stored id they were bound for. During a primary
// tab switch the runtime id can lag a frame behind the new selection — the
// slice still describes the PREVIOUS chat. Gate live cwd on ownership so we
// never paint session A's workspace while the tab already shows session B.
- const focusedStateStoredId = useStoreSelector(
- $focusedSessionState,
- state => state?.storedSessionId?.trim() || null
- )
+ const focusedStateStoredId = useStoreSelector($focusedSessionState, state => state?.storedSessionId?.trim() || null)
+
const selectedStoredSessionId = useStore($selectedStoredSessionId)
const primaryFocused = !focusedStoredSessionId || focusedStoredSessionId === selectedStoredSessionId
@@ -168,6 +167,7 @@ export function useStatusbarItems({
? (sessions.find(s => sessionMatchesStoredId(s, focusedStoredSessionId))?.started_at ?? null)
: null
)
+
const focusedRowCwd = useStoreSelector($sessions, sessions => {
if (!focusedStoredSessionId) {
return ''
@@ -195,12 +195,14 @@ export function useStatusbarItems({
return idsShareLineage(focusedStoredSessionId, focusedStateStoredId, sessions)
})
+
const liveCwdBelongsToFocus =
Boolean(focusedStateCwd) &&
(!focusedStoredSessionId ||
!focusedStateStoredId ||
focusedStateStoredId === focusedStoredSessionId ||
liveCwdSharesFocusLineage)
+
const currentCwd = (
(liveCwdBelongsToFocus ? focusedStateCwd : '') ||
focusedRowCwd ||
diff --git a/apps/desktop/src/components/assistant-ui/thread/status-tail-only.test.tsx b/apps/desktop/src/components/assistant-ui/thread/status-tail-only.test.tsx
index 92c914148c2..d48ff5a095e 100644
--- a/apps/desktop/src/components/assistant-ui/thread/status-tail-only.test.tsx
+++ b/apps/desktop/src/components/assistant-ui/thread/status-tail-only.test.tsx
@@ -24,6 +24,7 @@ vi.stubGlobal('cancelAnimationFrame', (id: number) => window.clearTimeout(id))
vi.stubGlobal('CSS', { escape: (str: string) => str })
Element.prototype.scrollTo = function scrollTo() {}
+
// Enter animation fires for running messages; jsdom has no WAAPI.
Element.prototype.animate = function animate() {
return { cancel() {}, finished: Promise.resolve() } as unknown as Animation
diff --git a/apps/desktop/src/components/pane-shell/tree/renderer/tree-split.tsx b/apps/desktop/src/components/pane-shell/tree/renderer/tree-split.tsx
index d4ae9abd9e7..21ca5ecd0a4 100644
--- a/apps/desktop/src/components/pane-shell/tree/renderer/tree-split.tsx
+++ b/apps/desktop/src/components/pane-shell/tree/renderer/tree-split.tsx
@@ -509,6 +509,7 @@ export function TreeSplit({ node, root, rootRow }: { node: SplitNode; root?: boo
const growable = tracks.map((_, i) => i).filter(i => !tracks[i].collapsed && !tracks[i].minimized)
const allFixed = growable.length > 0 && growable.every(i => tracks[i].track !== null)
+
// Only an uncapped fixed track may absorb leftover. A maxWidth/maxHeight
// sidebar (review, files, sessions) must keep that clamp — otherwise ⌘G
// balloons the rail and sash-remembered sizes become a flex-basis that
diff --git a/apps/desktop/src/components/ui/fade-scroll.test.ts b/apps/desktop/src/components/ui/fade-scroll.test.ts
index 0ee82affe71..78d6ae242f7 100644
--- a/apps/desktop/src/components/ui/fade-scroll.test.ts
+++ b/apps/desktop/src/components/ui/fade-scroll.test.ts
@@ -39,7 +39,9 @@ describe('edgeMask', () => {
})
it('leaves the last row fully opaque once the bottom is reached', () => {
- expect(edgeMask({ above: true, below: false })).toBe('linear-gradient(to bottom, transparent, black 1.25rem, black)')
+ expect(edgeMask({ above: true, below: false })).toBe(
+ 'linear-gradient(to bottom, transparent, black 1.25rem, black)'
+ )
})
it('fades both edges mid-scroll', () => {
diff --git a/apps/desktop/src/store/projects.test.ts b/apps/desktop/src/store/projects.test.ts
index 18fab07eae3..8ab7d165ee5 100644
--- a/apps/desktop/src/store/projects.test.ts
+++ b/apps/desktop/src/store/projects.test.ts
@@ -4,12 +4,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { NO_PROJECT_ID, type SidebarProjectTree } from '@/app/chat/sidebar/projects/workspace-groups'
import { $sidebarAgentsGrouped } from '@/store/layout'
import { $activeGatewayProfile } from '@/store/profile'
-import {
- $currentCwd,
- $selectedStoredSessionId,
- $sessions,
- applyConfiguredDefaultProjectDir
-} from '@/store/session'
+import { $currentCwd, $selectedStoredSessionId, $sessions, applyConfiguredDefaultProjectDir } from '@/store/session'
import {
$activeProjectId,