fmt(js): npm run fix on merge (#66010)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
nousbot-eng 2026-07-16 20:51:29 -04:00 committed by GitHub
parent 3f199f5c51
commit 36bf3c2673
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 8 deletions

View file

@ -6965,6 +6965,7 @@ async function startHermes() {
}
const message = error instanceof Error ? error.message : String(error)
// Only latch LOCAL boot failures. A remote failure (lapsed session / mint
// timeout / host briefly unreachable across sleep) is transient and has no
// child 'exit' handler to clear the cache — latching it would wedge the app
@ -6973,6 +6974,7 @@ async function startHermes() {
if (shouldLatchBackendStartFailure({ attemptedRemote })) {
backendStartFailure = error instanceof Error ? error : new Error(message)
}
updateBootProgress(
{
error: message,

View file

@ -106,7 +106,9 @@ function Harness({
activeSessionId?: null | string
createBackendSessionForSend?: () => Promise<null | string>
}) {
const localActiveSessionIdRef = useRef<string | null>(activeSessionId === undefined ? RUNTIME_SESSION_ID : activeSessionId)
const localActiveSessionIdRef = useRef<string | null>(
activeSessionId === undefined ? RUNTIME_SESSION_ID : activeSessionId
)
const activeSessionIdRef = activeSessionIdRefProp ?? localActiveSessionIdRef
const selectedStoredSessionIdRef: MutableRefObject<string | null> = selectedStoredSessionIdRefProp ?? {
@ -162,7 +164,14 @@ function Harness({
submitText: (...args: Parameters<typeof actions.submitText>) =>
act(async () => actions.submitText(...args)) as Promise<boolean>
})
}, [actions.cancelRun, actions.restoreToMessage, actions.steerPrompt, actions.submitText, activeSessionIdRef, onReady])
}, [
actions.cancelRun,
actions.restoreToMessage,
actions.steerPrompt,
actions.submitText,
activeSessionIdRef,
onReady
])
return null
}
@ -553,7 +562,8 @@ describe('usePromptActions submit / queue drain semantics', () => {
it('a fromQueue drain sends to its queued session even after the active session changes', async () => {
$busy.set(false)
const updates: { sessionId: string; state: Record<string, unknown>; storedSessionId: null | string | undefined }[] = []
const updates: { sessionId: string; state: Record<string, unknown>; storedSessionId: null | string | undefined }[] =
[]
const requestGateway = vi.fn(async () => ({}) as never)
let handle: HarnessHandle | null = null
@ -1224,7 +1234,10 @@ describe('usePromptActions sleep/wake session recovery', () => {
expect(ok).toBe(true)
expect(calls.map(c => c.method)).toEqual(['prompt.submit', 'session.resume', 'prompt.submit'])
expect(calls[0]?.params).toEqual({ session_id: 'rt-background-stale', text: 'queued background message after wake' })
expect(calls[0]?.params).toEqual({
session_id: 'rt-background-stale',
text: 'queued background message after wake'
})
expect(calls[1]?.params).toEqual({ session_id: STORED_SESSION_ID, source: 'desktop' })
expect(calls[2]?.params).toEqual({
session_id: RECOVERED_SESSION_ID,

View file

@ -462,10 +462,7 @@ export function useSubmitPrompt(deps: SubmitPromptDeps) {
} catch (firstErr) {
const recoverStoredSessionId = targetStoredSessionId ?? selectedStoredSessionIdRef.current
if (
(isSessionNotFoundError(firstErr) || isGatewayTimeoutError(firstErr)) &&
recoverStoredSessionId
) {
if ((isSessionNotFoundError(firstErr) || isGatewayTimeoutError(firstErr)) && recoverStoredSessionId) {
// Re-register the session in the gateway and get a fresh live ID.
// Timeouts recover the same way as "session not found": a starved
// backend loop (#55578 symptom d) rejects the submit even though