feat(ui-flow): composer focus after automation hook IPC (Phase 540)

Restore message composer focus in guild mode after upsert, delete, export,
and import automation handlers complete.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-24 12:46:20 -04:00
co-authored by Cursor
parent 440d83d351
commit 42c65609bd
+25
View File
@@ -133,16 +133,35 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
if (t === 'upsert-automation-hook') {
await platform.upsertAutomationHook(msg.hook || {})
pushState()
if (platform.mode === 'guild' && platform.activeChannelId) {
send({
type: 'composer-focus-channel',
channelId: platform.activeChannelId
})
}
return true
}
if (t === 'delete-automation-hook') {
await platform.deleteAutomationHook(msg.hookId)
pushState()
if (platform.mode === 'guild' && platform.activeChannelId) {
send({
type: 'composer-focus-channel',
channelId: platform.activeChannelId
})
}
return true
}
if (t === 'export-automation-manifest') {
const manifest = await platform.exportAutomationManifest()
send({ type: 'automation-manifest', manifest })
pushState()
if (platform.mode === 'guild' && platform.activeChannelId) {
send({
type: 'composer-focus-channel',
channelId: platform.activeChannelId
})
}
return true
}
if (t === 'import-automation-manifest') {
@@ -150,6 +169,12 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
merge: msg.merge !== false
})
pushState()
if (platform.mode === 'guild' && platform.activeChannelId) {
send({
type: 'composer-focus-channel',
channelId: platform.activeChannelId
})
}
return true
}
if (t === 'set-automation-receipt-retention') {