hermes-agent/apps
teknium1 78c06525e8 fix(desktop): keep optional action handlers optional through the latest-actions adapters
The adapters wrapped every field in an arrow function, including the
optional ones. That makes an absent handler unconditionally truthy, and
several children gate on a handler's PRESENCE rather than just calling
it:

  - onDismissError    -> assistant-message.tsx renders the dismiss button
                         only when defined
  - onRestoreToMessage -> thread/index.tsx gates the restore-confirm flow
  - onTranscribeAudio  -> use-voice-recorder / use-voice-conversation gate
                         recording on it
  - onLoadMoreMessaging / onLoadMoreProfileSessions -> sidebar paging

So the adapter would paint a dead dismiss button and let voice recording
proceed into a no-op transcription path even when the controller had
deliberately left those handlers off.

Wrap an optional field only when it is currently present, and re-read the
latest value inside the wrapper so the stale-closure fix still applies.
Presence is stable for a given actions object (the controller mutates
fields in place rather than toggling a handler between defined and
undefined), while the closure is what churns — which is exactly what the
indirection re-reads.

Adds two regression tests: absent optional handlers stay undefined, and a
present optional handler still late-binds to the latest closure. The
first was verified to fail against the unconditional-wrapper form.
2026-07-25 13:01:14 -07:00
..
bootstrap-installer ci(js-tests): split check into parallel matrix shards per workspace (#70252) 2026-07-23 18:45:16 -04:00
desktop fix(desktop): keep optional action handlers optional through the latest-actions adapters 2026-07-25 13:01:14 -07:00
shared ci(js-tests): split check into parallel matrix shards per workspace (#70252) 2026-07-23 18:45:16 -04:00