hermes-agent/apps/desktop/src/app/session/hooks
xxxigm 7e2db0a140 fix(desktop): stop refText crash on undefined composer attachment holes
A session switch or draft restore can leave undefined/null holes in the
composer attachments array. AttachmentList was guarded against this in
#49624, but the sibling submit path was not: submitPromptText maps the
same array through attachmentDisplayText/optimisticAttachmentRef and
buildContextText (a.kind / a.label / a.refText), so a hole threw
"Cannot read properties of undefined (reading 'refText')" — an uncaught
renderer error that blanks the chat pane and shows "Desktop app link
offline".

Close the whole bug class:
- attachmentDisplayText / optimisticAttachmentRef no-op on a falsy
  attachment (shared chokepoint, also protects thread.tsx drop handler).
- submitPromptText filters falsy entries from the source array, and
  buildContextText filters its (possibly post-sync) input before reading
  fields.
2026-06-24 18:22:01 -07:00
..
use-context-suggestions.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
use-cwd-actions.ts Refactor desktop i18n field copy into nested structures 2026-06-06 07:51:44 -07:00
use-hermes-config.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
use-message-stream.ts feat(desktop): floating pet, pop-out overlay + Cmd+K picker 2026-06-20 14:18:40 -05:00
use-model-controls.test.tsx refactor(desktop): make composer model picker sticky session state 2026-06-16 09:50:07 -05:00
use-model-controls.ts refactor(desktop): make composer model picker sticky session state 2026-06-16 09:50:07 -05:00
use-preview-routing.test.tsx fix(desktop): stop auto-opening tool previews 2026-06-22 19:21:20 -05:00
use-preview-routing.ts fix(desktop): stop auto-opening tool previews 2026-06-22 19:21:20 -05:00
use-prompt-actions.test.tsx fix(desktop): handle slash exec dispatch payloads (#49358) 2026-06-19 21:11:16 -05:00
use-prompt-actions.ts fix(desktop): stop refText crash on undefined composer attachment holes 2026-06-24 18:22:01 -07:00
use-route-resume.test.tsx fix(desktop): recover stranded session windows when resume fails (#47655) 2026-06-17 17:33:53 -04:00
use-route-resume.ts fix(desktop): recover stranded session windows when resume fails (#47655) 2026-06-17 17:33:53 -04:00
use-session-actions.test.tsx fix(desktop): recover stranded session windows when resume fails (#47655) 2026-06-17 17:33:53 -04:00
use-session-actions.ts fix(desktop): recover stranded session windows when resume fails (#47655) 2026-06-17 17:33:53 -04:00
use-session-state-cache.test.tsx fix(desktop): stop a failed turn leaking into every other thread 2026-06-17 05:07:48 -07:00
use-session-state-cache.ts fix(desktop): let the session watchdog heal a stuck "looping" turn 2026-06-24 18:36:17 -05:00