feat(platform): Phase 551 moderation span metadata (v0.8.514)
Extend kick.member, timeout.member, and automod.setConfig span ends with memberCount, activeTimeoutCount, and keywordCount for dev-log diagnostics. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -183,6 +183,8 @@ Expose a single `EventEmitter` API the UI drives over IPC (`apps/pearcord/index.
|
|||||||
|
|
||||||
**v0.8.499 (Phase 536):** Compliance/audit spans extend — `audit.append`/`audit.export`/`compliance.snapshot` end metadata (`spanKind`, `activeChannelId`). UI compliance panel compositor wrappers, audit row `lastAuditRowId` + roving `tabindex`, clipboard compliance busy flags. Bundle: `npm run test:phase536-compliance`. See [COMPLIANCE.md](../../docs/COMPLIANCE.md), [AUDIT_LOG.md](../../docs/AUDIT_LOG.md).
|
**v0.8.499 (Phase 536):** Compliance/audit spans extend — `audit.append`/`audit.export`/`compliance.snapshot` end metadata (`spanKind`, `activeChannelId`). UI compliance panel compositor wrappers, audit row `lastAuditRowId` + roving `tabindex`, clipboard compliance busy flags. Bundle: `npm run test:phase536-compliance`. See [COMPLIANCE.md](../../docs/COMPLIANCE.md), [AUDIT_LOG.md](../../docs/AUDIT_LOG.md).
|
||||||
|
|
||||||
|
**v0.8.514 (Phase 551):** Moderation spans extend — `kick.member` `memberCount`, `timeout.member` `activeTimeoutCount`, `automod.setConfig` `keywordCount`/`blockInvites`. UI split automod/ban/member panels; `.moderation-panel-live`/`.moderation-modal-live`; clipboard `moderationAutomodTogglesBusy`/`moderationTimeoutModalBusy`. Bundle: `npm run test:phase551-moderation`. See [MODERATION.md](../../docs/MODERATION.md).
|
||||||
|
|
||||||
**v0.8.498 (Phase 535):** Moderation/automod spans extend — `ban.member`/`kick.member`/`timeout.member`/`automod.*` end metadata (`spanKind`, `activeChannelId`). UI moderation panel compositor wrappers, ban/audit `aria-current=location`, clipboard moderation busy flags. Bundle: `npm run test:phase535-moderation`. See [MODERATION.md](../../docs/MODERATION.md).
|
**v0.8.498 (Phase 535):** Moderation/automod spans extend — `ban.member`/`kick.member`/`timeout.member`/`automod.*` end metadata (`spanKind`, `activeChannelId`). UI moderation panel compositor wrappers, ban/audit `aria-current=location`, clipboard moderation busy flags. Bundle: `npm run test:phase535-moderation`. See [MODERATION.md](../../docs/MODERATION.md).
|
||||||
|
|
||||||
**v0.8.513 (Phase 550):** Role/permission spans extend — `customRoleCount` on update/delete, `channelOverwriteCount`/`remainingOverwriteCount`. UI split role list + channel perm panels; `.roles-panel-live`/`.roles-modal-live`; clipboard `rolesListChromeBusy`/`rolesChannelPermControlsBusy`. ui-flow composer focus after delete/reorder role. Bundle: `npm run test:phase550-roles`. See [ROLES.md](../../docs/ROLES.md).
|
**v0.8.513 (Phase 550):** Role/permission spans extend — `customRoleCount` on update/delete, `channelOverwriteCount`/`remainingOverwriteCount`. UI split role list + channel perm panels; `.roles-panel-live`/`.roles-modal-live`; clipboard `rolesListChromeBusy`/`rolesChannelPermControlsBusy`. ui-flow composer focus after delete/reorder role. Bundle: `npm run test:phase550-roles`. See [ROLES.md](../../docs/ROLES.md).
|
||||||
|
|||||||
@@ -8415,6 +8415,7 @@ class PearcordPlatform extends EventEmitter {
|
|||||||
await this._audit('member.timeout', { guildId: this.guild.guild.id, targetId: userId })
|
await this._audit('member.timeout', { guildId: this.guild.guild.id, targetId: userId })
|
||||||
this.guild.gossipTimeout(row)
|
this.guild.gossipTimeout(row)
|
||||||
this.emit('timeout', row)
|
this.emit('timeout', row)
|
||||||
|
const activeTimeouts = await this.moderation.listForGuild(this.guild.guild.id)
|
||||||
span.end({
|
span.end({
|
||||||
userId,
|
userId,
|
||||||
guildId,
|
guildId,
|
||||||
@@ -8424,7 +8425,8 @@ class PearcordPlatform extends EventEmitter {
|
|||||||
until: row?.until || null,
|
until: row?.until || null,
|
||||||
durationMs: Number(durationMinutes) > 0 ? Number(durationMinutes) * 60000 : 0,
|
durationMs: Number(durationMinutes) > 0 ? Number(durationMinutes) * 60000 : 0,
|
||||||
spanKind: 'timeout.member',
|
spanKind: 'timeout.member',
|
||||||
activeChannelId: this.activeChannelId
|
activeChannelId: this.activeChannelId,
|
||||||
|
activeTimeoutCount: activeTimeouts.length
|
||||||
})
|
})
|
||||||
return row
|
return row
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -10040,6 +10042,9 @@ class PearcordPlatform extends EventEmitter {
|
|||||||
enabled: !!config.enabled,
|
enabled: !!config.enabled,
|
||||||
enabledChanged: partial.enabled !== undefined,
|
enabledChanged: partial.enabled !== undefined,
|
||||||
partialKeys: Object.keys(partial || {}).length,
|
partialKeys: Object.keys(partial || {}).length,
|
||||||
|
keywordCount: (config.blockedKeywords || []).length,
|
||||||
|
blockInvites: config.blockInvites !== false,
|
||||||
|
maxMentions: config.maxMentions ?? null,
|
||||||
spanKind: 'automod.setConfig',
|
spanKind: 'automod.setConfig',
|
||||||
activeChannelId: this.activeChannelId
|
activeChannelId: this.activeChannelId
|
||||||
})
|
})
|
||||||
@@ -12697,6 +12702,7 @@ class PearcordPlatform extends EventEmitter {
|
|||||||
await this._audit('member.kick', { guildId: payload.guildId, targetId: userId })
|
await this._audit('member.kick', { guildId: payload.guildId, targetId: userId })
|
||||||
this.guild.gossipKick(payload)
|
this.guild.gossipKick(payload)
|
||||||
this.emit('kick', payload)
|
this.emit('kick', payload)
|
||||||
|
const memberCount = (await this.guild.listMembers()).length
|
||||||
span.end({
|
span.end({
|
||||||
userId,
|
userId,
|
||||||
guildId,
|
guildId,
|
||||||
@@ -12704,7 +12710,8 @@ class PearcordPlatform extends EventEmitter {
|
|||||||
reasonLen: String(reason || '').trim().length,
|
reasonLen: String(reason || '').trim().length,
|
||||||
removedMember: true,
|
removedMember: true,
|
||||||
spanKind: 'kick.member',
|
spanKind: 'kick.member',
|
||||||
activeChannelId: this.activeChannelId
|
activeChannelId: this.activeChannelId,
|
||||||
|
memberCount
|
||||||
})
|
})
|
||||||
return payload
|
return payload
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user