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

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
hermes-seaeye[bot]
2026-08-09 09:51:41 +00:00
committed by GitHub
parent c8318460e4
commit 8295d24736
9 changed files with 48 additions and 13 deletions

View File

@@ -17,7 +17,13 @@ function write(home: string, body: any) {
test('consumes and returns a fresh failure result', () => {
const home = tempHome()
write(home, { ok: false, exit_code: 6, message: 'rebuild failed', branch: 'main', finished_at: Math.floor(Date.now() / 1000) })
write(home, {
ok: false,
exit_code: 6,
message: 'rebuild failed',
branch: 'main',
finished_at: Math.floor(Date.now() / 1000)
})
const result = readAndConsumeHandoffResult(home)
@@ -38,7 +44,13 @@ test('reports each result at most once', () => {
test('discards stale results but still consumes the file', () => {
const home = tempHome()
write(home, { ok: false, exit_code: 5, message: 'old', branch: 'main', finished_at: Math.floor(Date.now() / 1000) - 3600 })
write(home, {
ok: false,
exit_code: 5,
message: 'old',
branch: 'main',
finished_at: Math.floor(Date.now() / 1000) - 3600
})
assert.equal(readAndConsumeHandoffResult(home), null)
assert.equal(fs.existsSync(handoffResultPath(home)), false)

View File

@@ -92,7 +92,10 @@ describe('parseHyprlandClients', () => {
it('keeps everything when it cannot find our own window', () => {
const parsed = parseHyprlandClients(
payload(client({ class: 'a', pid: 2, workspace: { id: 1 } }), client({ class: 'b', pid: 3, workspace: { id: 7 } })),
payload(
client({ class: 'a', pid: 2, workspace: { id: 1 } }),
client({ class: 'b', pid: 3, workspace: { id: 7 } })
),
SELF_PID
)

View File

@@ -204,6 +204,7 @@ test('resolveUpdateScriptHandoff is Windows-only (POSIX updates in place)', () =
test('wrapHandoffForDetachedConsole routes through cmd start with own console', () => {
const root = String.raw`C:\Users\hermes\AppData\Local\hermes\hermes-agent`
const expected = path.join(root, 'scripts', 'desktop-update.ps1')
const handoff = resolveUpdateScriptHandoff(root, {
isWindows: true,
fileExists: candidate => candidate === expected
@@ -214,8 +215,21 @@ test('wrapHandoffForDetachedConsole routes through cmd start with own console',
assert.equal(wrapped.command, 'cmd.exe')
assert.deepEqual(wrapped.args, [
'/d', '/s', '/c', 'start', '', '/min',
'powershell', '-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', expected,
'-InstallRoot', root, '-Branch', 'main'
'/d',
'/s',
'/c',
'start',
'',
'/min',
'powershell',
'-NoProfile',
'-ExecutionPolicy',
'Bypass',
'-File',
expected,
'-InstallRoot',
root,
'-Branch',
'main'
])
})

View File

@@ -81,7 +81,10 @@ export function resolveUpdateScriptHandoff(
* callers must not use it as a marker owner (the script claims the marker
* itself with its own $PID).
*/
export function wrapHandoffForDetachedConsole(handoff: UpdateScriptHandoff, extraArgs: string[]): {
export function wrapHandoffForDetachedConsole(
handoff: UpdateScriptHandoff,
extraArgs: string[]
): {
command: string
args: string[]
} {

View File

@@ -127,6 +127,7 @@ export function SessionStatusDot({ storedSessionId, session, branchStem, classNa
const dotState = useStoreSelector($sessionDotStateById, states =>
storedSessionId ? (states[storedSessionId] ?? 'idle') : 'draft'
)
const variant = DOT_VARIANTS[dotState]
return (

View File

@@ -596,8 +596,7 @@ export const watchSessionTiles = paneMirror<SessionTile>({
),
// Until the first turn lists a row there is no title to register, so the tab
// takes its name from the composer instead — live, without re-registering.
tabTitle: storedSessionId =>
tileStoredRow(storedSessionId) ? null : <SessionDraftTitle scope={storedSessionId} />,
tabTitle: storedSessionId => (tileStoredRow(storedSessionId) ? null : <SessionDraftTitle scope={storedSessionId} />),
render: storedSessionId => <SessionTilePane storedSessionId={storedSessionId} />,
tabWrap: (storedSessionId, tab) => (
<SessionTabMenu

View File

@@ -266,7 +266,7 @@ export function useGatewayBoot({
const override = windowProfileOverride()
try {
const profileKey = override ?? ((await desktop.profile?.get?.())?.profile ?? '')
const profileKey = override ?? (await desktop.profile?.get?.())?.profile ?? ''
const key = normalizeProfileKey(profileKey)
$activeGatewayProfile.set(key)
setPrimaryGateway(gateway, key)

View File

@@ -314,8 +314,7 @@ export function TreeGroup({
const closeableTab = (paneId: string) => !paneChrome(paneFor(paneId)).uncloseable || panesWithCloser.has(paneId)
// A pane's own live label when it has one, else its registered string.
const tabLabel = (paneId: string) =>
paneChrome(paneFor(paneId)).tabTitle?.() ?? paneFor(paneId)?.title ?? paneId
const tabLabel = (paneId: string) => paneChrome(paneFor(paneId)).tabTitle?.() ?? paneFor(paneId)?.title ?? paneId
// Collapse/restore a tool panel (or plain minimize elsewhere) — the header
// chevron + tap gesture, routed so ⌃`/the titlebar toggle stay truthful.

View File

@@ -16,7 +16,11 @@ const MAX_DRAFT_TITLE_CHARS = 48
* rather than showing a title that says less than the placeholder.
*/
export function deriveDraftTitle(text: string): string {
const line = text.split('\n').find(candidate => candidate.trim())?.trim() ?? ''
const line =
text
.split('\n')
.find(candidate => candidate.trim())
?.trim() ?? ''
if (!line) {
return ''