Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions apps/desktop/electron/bootstrap-runner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,7 @@ test('fresh bootstrap args prefer the durable commit over a stale packaged branc
activeRoot: '/tmp/hermes-agent',
hermesHome: '/tmp/hermes'
}),
[
'--dir',
'/tmp/hermes-agent',
'--hermes-home',
'/tmp/hermes',
'--commit',
installStamp.commit
]
['--dir', '/tmp/hermes-agent', '--hermes-home', '/tmp/hermes', '--commit', installStamp.commit]
)
})

Expand All @@ -112,14 +105,7 @@ test('fresh bootstrap args fall back to a packaged branch when no commit is avai
activeRoot: '/tmp/hermes-agent',
hermesHome: '/tmp/hermes'
}),
[
'--dir',
'/tmp/hermes-agent',
'--hermes-home',
'/tmp/hermes',
'--branch',
'release-branch'
]
['--dir', '/tmp/hermes-agent', '--hermes-home', '/tmp/hermes', '--branch', 'release-branch']
)
})

Expand Down
1 change: 1 addition & 0 deletions apps/desktop/electron/bootstrap-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ function installRefForStamp(installStamp) {

const hasFallbackCommit =
installStamp && typeof installStamp.commit === 'string' && FALLBACK_COMMIT_RE.test(installStamp.commit)

const hasLegacyBranchOnlyStamp =
installStamp && installStamp.commit == null && typeof installStamp.branch === 'string' && installStamp.branch

Expand Down
1 change: 1 addition & 0 deletions apps/desktop/src/app/agents/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ function SubagentTree({ tree }: { tree: SubagentNode[] }) {
const [nowMs, setNowMs] = useState(() => Date.now())

const active = flat.filter(n => n.status === 'running' || n.status === 'queued').length

const failed = flat.filter(
n => n.status === 'error' || n.status === 'failed' || n.status === 'interrupted' || n.status === 'timeout'
).length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ describe('createBackendSessionForSend profile routing', () => {
setCurrentFastMode(false)

let createParams: Record<string, unknown> | undefined

const requestGateway = vi.fn(async (method: string, params?: Record<string, unknown>) => {
if (method === 'session.create') {
createParams = params
Expand Down Expand Up @@ -537,6 +538,7 @@ describe('createBackendSessionForSend profile routing', () => {

it('does not carry fast mode from a previous session into a fresh GPT draft', async () => {
let createParams: Record<string, unknown> | undefined

const requestGateway = vi.fn(async (method: string, params?: Record<string, unknown>) => {
if (method === 'session.create') {
createParams = params
Expand All @@ -553,6 +555,7 @@ describe('createBackendSessionForSend profile routing', () => {
// startFreshSessionDraft is not exposed through the shared harness, so use
// the full hook harness inline.
const ref = <T,>(value: T): MutableRefObject<T> => ({ current: value })

function FullHarness({ onReady }: { onReady: (next: ReturnType<typeof useSessionActions>) => void }) {
const next = useSessionActions({
activeSessionId: null,
Expand Down
3 changes: 1 addition & 2 deletions apps/desktop/src/app/settings/config-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ export function ConfigField({
}

const isPrimitiveList =
schema.type === 'list' &&
(!Array.isArray(value) || value.every(item => item === null || typeof item !== 'object'))
schema.type === 'list' && (!Array.isArray(value) || value.every(item => item === null || typeof item !== 'object'))

if (isPrimitiveList) {
return row(
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/src/app/shell/model-edit-submenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ export function ModelEditSubmenu({
} else if (activeSessionId) {
sessionTileDelegate()?.updateSession(activeSessionId, state => ({ ...state, fast: !enabled }))
}

notifyError(err, copy.fastFailed)
}
})()
Expand Down
2 changes: 2 additions & 0 deletions apps/desktop/src/json-rpc-gateway.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ describe('JsonRpcGatewayClient', () => {
it('close() immediately transitions closed and rejects pending requests', async () => {
vi.stubGlobal('WebSocket', FakeWebSocket)
const socket = new FakeWebSocket()

const client = new JsonRpcGatewayClient({
closedErrorMessage: 'closed for test',
socketFactory: () => socket as unknown as WebSocket
})

const states: string[] = []
client.onState(state => states.push(state))

Expand Down
3 changes: 2 additions & 1 deletion apps/desktop/src/store/subagents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ export function buildSubagentTree(items: readonly SubagentProgress[]): SubagentN
export const activeSubagentCount = (items: readonly SubagentProgress[]) =>
items.filter(item => item.status === 'queued' || item.status === 'running').length

export const failedSubagentCount = (items: readonly SubagentProgress[]) => items.filter(item => FAILED.has(item.status)).length
export const failedSubagentCount = (items: readonly SubagentProgress[]) =>
items.filter(item => FAILED.has(item.status)).length

/** Flatten every session's subagents — the scope the Spawn-tree panel and the
* status-bar indicator must agree on. */
Expand Down
5 changes: 1 addition & 4 deletions ui-tui/src/__tests__/weatherApp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ describe('weather reference app (async contract)', () => {
it('launches into loading, lands the fetch via updateWidget', async () => {
const fetchMock = vi.fn(async () => ({ json: async () => wttrReply('113'), ok: true }))

vi.stubGlobal(
'fetch',
fetchMock
)
vi.stubGlobal('fetch', fetchMock)

expect(launchWidget('weather', 'Austin')).toBeNull()
expect(activeState()?.phase.kind).toBe('loading')
Expand Down
4 changes: 1 addition & 3 deletions ui-tui/src/sdk/userWidgets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ export async function loadUserWidgets(dir = widgetsDir()): Promise<UserWidgetLoa
}

try {
const mod = (await import(
`${pathToFileURL(join(dir, file)).href}?t=${Date.now()}-${++widgetImportVersion}`
)) as {
const mod = (await import(`${pathToFileURL(join(dir, file)).href}?t=${Date.now()}-${++widgetImportVersion}`)) as {
default?: (sdk: WidgetSdk) => void
}

Expand Down
Loading