feat(platform): Phase 549 guild-admin span metadata extend

Add channelCount on create, remainingChannelCount on delete, and
requestedCount/reorderedAll on channel.reorder span ends.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-24 13:39:03 -04:00
co-authored by Cursor
parent ae34b24de2
commit be2d463c86
2 changed files with 11 additions and 3 deletions
+2
View File
@@ -187,6 +187,8 @@ Expose a single `EventEmitter` API the UI drives over IPC (`apps/pearcord/index.
**v0.8.497 (Phase 534):** Role/permission spans extend — `role.create`/`update`/`delete`/`reorder` and `permission.overwrite*` end metadata (`spanKind`, `activeChannelId`, `customRoleCount`). UI roles panel compositor wrappers, role/overwrite `aria-current=location`, clipboard roles busy flags. Bundle: `npm run test:phase534-roles`. See [ROLES.md](../../docs/ROLES.md).
**v0.8.512 (Phase 549):** Guild-admin spans extend — `channel.create` `channelCount`, `channel.delete` `remainingChannelCount`, `channel.reorder` `requestedCount`/`reorderedAll`. UI split channel list chrome/rows + category panels; `.guild-admin-modal-live`; clipboard `guildAdminChannelModalBusy`. ui-flow composer focus after `rename-channel`/`create-category`. Bundle: `npm run test:phase549-guild-admin`. See [CHANNELS.md](../../docs/CHANNELS.md).
**v0.8.496 (Phase 533):** Guild-admin spans extend — `channel.create`/`delete`/`reorder` end metadata (`spanKind`, `activeChannelId`, `createdChannelId`). UI panel compositor wrappers, channel row `aria-current=location`, clipboard guild-admin busy flags. Bundle: `npm run test:phase533-guild-admin`. See [CHANNELS.md](../../docs/CHANNELS.md).
**v0.8.511 (Phase 548):** Invite spans extend — `guild.invite` (`maxUses`, `activeChannelId`), `invite.revoke` (`activeChannelId`). UI split hub buttons/banner + join/invite modal panels, `.invite-modal-live`, clipboard `invitesJoinModalBusy`/`invitesInviteModalBusy`. ui-flow composer focus after `create-invite`. Bundle: `npm run test:phase548-invites`. See [INVITES.md](../../docs/INVITES.md).
+9 -3
View File
@@ -12354,13 +12354,15 @@ class PearcordPlatform extends EventEmitter {
targetId: deletedId
})
this.emit('channel-delete', payload)
const remaining = await this.guild.listChannels()
span.end({
guildId,
channelId: deletedId,
wasActive,
channelType: prevCh?.type || payload?.type || null,
spanKind: 'channel.delete',
activeChannelId: this.activeChannelId
activeChannelId: this.activeChannelId,
remainingChannelCount: remaining.length
})
return payload
} catch (err) {
@@ -12400,6 +12402,7 @@ class PearcordPlatform extends EventEmitter {
targetId: channel.id
})
this.emit('channel', channel)
const channelCount = (await this.guild.listChannels()).length
span.end({
guildId,
channelId: channel.id,
@@ -12408,7 +12411,8 @@ class PearcordPlatform extends EventEmitter {
nameLen: String(name || '').trim().length,
spanKind: 'channel.create',
activeChannelId: this.activeChannelId,
createdChannelId: channel.id
createdChannelId: channel.id,
channelCount
})
return channel
} catch (err) {
@@ -12455,8 +12459,10 @@ class PearcordPlatform extends EventEmitter {
parentId: parentId || null,
updatedCount: updated.length,
channelCount: ids.length,
requestedCount: ids.length,
spanKind: 'channel.reorder',
activeChannelId: this.activeChannelId
activeChannelId: this.activeChannelId,
reorderedAll: updated.length === ids.length
})
return updated
} catch (err) {