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:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user