feat(ui-flow): composer focus after delete/reorder channel (Phase 533)

Emit composer-focus-channel when guild mode retains an active channel after
delete-channel or reorder-channels IPC.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-24 12:09:15 -04:00
co-authored by Cursor
parent beaca656c0
commit 8c5927a8c0
2 changed files with 14 additions and 0 deletions
+2
View File
@@ -2,6 +2,8 @@
Pearcord desktop UI IPC dispatch and automated flow scenarios for Bare smokes. Mirrors `apps/pearcord` pear-pipe message handling.
**v0.8.496 (Phase 533):** `delete-channel` and `reorder-channels` emit `composer-focus-channel` when `platform.mode === 'guild'` and `activeChannelId` is set. Bundle: `npm run test:phase533-guild-admin` (app repo).
**v0.8.495 (Phase 532):** `join-invite` emits `composer-focus-channel` when `platform.mode === 'guild'` and `activeChannelId` is set. Bundle: `npm run test:phase532-invites` (app repo).
**v0.8.490 (Phase 527):** `play-soundboard` emits `composer-focus-channel` in guild mode. Bundle: `npm run test:phase527-soundboard` (app repo).
+12
View File
@@ -1112,6 +1112,12 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
parentId: msg.parentId ?? null,
channelIds: msg.channelIds || []
})
if (platform.mode === 'guild' && platform.activeChannelId) {
send({
type: 'composer-focus-channel',
channelId: platform.activeChannelId
})
}
pushState()
return true
}
@@ -1130,6 +1136,12 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
}
if (t === 'delete-channel') {
await platform.deleteChannel(msg.channelId)
if (platform.mode === 'guild' && platform.activeChannelId) {
send({
type: 'composer-focus-channel',
channelId: platform.activeChannelId
})
}
pushState()
return true
}