feat(platform): extend role.create/reorder/member span metadata for Phase 571
Add guildCount to role.create/delete/reorder ends; role.member end now includes spanKind, activeChannelId, assignedRoleCount, and customRoleCount. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -181,6 +181,8 @@ Expose a single `EventEmitter` API the UI drives over IPC (`apps/pearcord/index.
|
||||
|
||||
**v0.8.419 (Phase 456):** `session.startup` span ends with `guildCount` + `guildId`; `session.startup error` log. `identity.register` span + `identity.register error`. `guild.open` span end includes `guildId`. `loadGuild` / `createGuild` bust search cache and clear `_lastSearchFromCache`. Bundle: `npm run test:phase456-onboarding-session`. See [SESSION.md](../../docs/SESSION.md).
|
||||
|
||||
**v0.8.534 (Phase 571):** Role spans extend — `guildCount` on `role.create`/`role.delete`/`role.reorder`; `role.member` `spanKind`/`activeChannelId`/`assignedRoleCount`/`customRoleCount`. UI `#roles-hub-panel-live` + `syncRolesHubLivePanelDuringGuildLoading`; **role-errors** excludes permission bleed; clipboard `rolesHubPanelLiveBusy`/`rolesReorderChromeBusy`/`channelCustomRoleCount`. Bundle: `npm run test:phase571-roles`. See [ROLES.md](../../docs/ROLES.md).
|
||||
|
||||
**v0.8.533 (Phase 570):** Permission spans extend — `role.update`/`permission.overwrite`/`permission.eval` `guildCount`; `permission.eval` `spanKind`/`activeChannelId`. UI `#permissions-panel-live` + `syncPermissionsLivePanelDuringGuildLoading`; **permission-errors**/**role-errors** exclude session/settings/invite bleed; clipboard `permissionsPanelLiveBusy`/`permissionsRoleChromeBusy`/`channelPermissionOverwriteCount`. Bundle: `npm run test:phase570-permissions`. See [PERMISSIONS.md](../../docs/PERMISSIONS.md).
|
||||
|
||||
**v0.8.532 (Phase 569):** Session spans extend — `session.startup` `spanKind`/`activeChannelId`; `guild.open` `memberCount`/`guildCount`/`channelCount`/`spanKind`. UI `#session-panel-live` + `syncSessionLivePanelDuringGuildLoading`; **session-errors** excludes settings/invite bleed; clipboard `sessionPanelLiveBusy`/`sessionBootChromeBusy`/`channelSessionGuildCount`. Bundle: `npm run test:phase569-session`. See [SESSION.md](../../docs/SESSION.md).
|
||||
|
||||
@@ -5404,7 +5404,8 @@ class PearcordPlatform extends EventEmitter {
|
||||
nameLen: String(name || '').trim().length,
|
||||
spanKind: 'role.create',
|
||||
activeChannelId: this.activeChannelId,
|
||||
customRoleCount: customRoles.length
|
||||
customRoleCount: customRoles.length,
|
||||
guildCount: (this.guilds || []).length
|
||||
})
|
||||
return row
|
||||
} catch (err) {
|
||||
@@ -5486,7 +5487,8 @@ class PearcordPlatform extends EventEmitter {
|
||||
existed: !!prev,
|
||||
spanKind: 'role.delete',
|
||||
activeChannelId: this.activeChannelId,
|
||||
customRoleCount: customRoles.length
|
||||
customRoleCount: customRoles.length,
|
||||
guildCount: (this.guilds || []).length
|
||||
})
|
||||
return prev
|
||||
} catch (err) {
|
||||
@@ -5514,13 +5516,16 @@ class PearcordPlatform extends EventEmitter {
|
||||
if (row.updatedAt) this.guild.gossipRoleUpsert(row)
|
||||
}
|
||||
this.emit('guild-role-reorder', { guildId: this.guild.guild.id, roleIds })
|
||||
const customRoles = await this.guildRoles.listRoles(this.guild.guild.id)
|
||||
span.end({
|
||||
count: rows.length,
|
||||
guildId,
|
||||
requested: (roleIds || []).length,
|
||||
spanKind: 'role.reorder',
|
||||
activeChannelId: this.activeChannelId,
|
||||
reorderedAll: rows.length === (roleIds || []).length
|
||||
reorderedAll: rows.length === (roleIds || []).length,
|
||||
customRoleCount: customRoles.length,
|
||||
guildCount: (this.guilds || []).length
|
||||
})
|
||||
return rows
|
||||
} catch (err) {
|
||||
@@ -5558,7 +5563,17 @@ class PearcordPlatform extends EventEmitter {
|
||||
guildId: this.guild.guild.id,
|
||||
userId
|
||||
}))
|
||||
span.end({ userId, guildId, roleCount: (roleIds || []).length })
|
||||
const customRoles = await this.guildRoles.listRoles(this.guild.guild.id)
|
||||
span.end({
|
||||
userId,
|
||||
guildId,
|
||||
roleCount: (roleIds || []).length,
|
||||
assignedRoleCount: (roleIds || []).length,
|
||||
spanKind: 'role.member',
|
||||
activeChannelId: this.activeChannelId || null,
|
||||
customRoleCount: customRoles.length,
|
||||
guildCount: (this.guilds || []).length
|
||||
})
|
||||
return link
|
||||
} catch (err) {
|
||||
this.log.error('role.member error', {
|
||||
|
||||
Reference in New Issue
Block a user