feat(platform): extend invite span metadata for Phase 532 (v0.8.495)
guild.invite uses spanKind guild.invite with hasShareCode; invite.join adds activeChannelId and guildCount; invite.revoke adds spanKind on span end. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -159,6 +159,8 @@ Expose a single `EventEmitter` API the UI drives over IPC (`apps/pearcord/index.
|
||||
|
||||
**v0.8.478 (Phase 515):** DM spans — `dm.open` (`spanKind`, `reusedChannel`, `peerDisplayNameLen`), `dm.send` (when `guildId === dm`), `dm.group.create` (`participantCount`, `nameLen`). UI `syncDmsPanelsDuringGuildLoading`, tightened **dm-errors**, clipboard DM meta. Bundle: `npm run test:phase515-dms`. See [DM.md](../../docs/DM.md).
|
||||
|
||||
**v0.8.495 (Phase 532):** Invite spans extend — `guild.invite` (`spanKind`, `hasShareCode`), `invite.join` (`activeChannelId`, `guildCount`, `spanKind`), `invite.revoke` (`spanKind`). UI split compositor (`syncInvitesHubPanelDuringGuildLoading`, `syncInvitesJoinPanelDuringGuildLoading`, `syncInvitesInvitePanelDuringGuildLoading`), invite code `aria-current=location`, clipboard `invitesHubBusy`/`invitesHubButtonsBusy`/`inviteCopyBusy`. Bundle: `npm run test:phase532-invites`. See [INVITES.md](../../docs/INVITES.md).
|
||||
|
||||
**v0.8.477 (Phase 514):** Invite spans — `guild.invite` (`shareCodeLen`, `channelCount`), `invite.join` (`inviteGuildId`, `portable`), `invite.revoke` (`revoked`). UI `syncInvitesPanelsDuringGuildLoading`, `#composer-invite-hint`, dev-log invite-errors + clipboard meta. Bundle: `npm run test:phase514-invites`. See [INVITES.md](../../docs/INVITES.md).
|
||||
|
||||
### Messaging & channels
|
||||
|
||||
@@ -7151,10 +7151,13 @@ class PearcordPlatform extends EventEmitter {
|
||||
await this._maybeArchiveHealthRefreshOnFocus()
|
||||
this._restartArchiveHealthRefreshTimer()
|
||||
span.end({
|
||||
spanKind: 'invite.join',
|
||||
guildId: guild?.id || null,
|
||||
joined: !!guild,
|
||||
inviteGuildId: invite?.guildId || null,
|
||||
channelCount: invite?.channels?.length || 0
|
||||
channelCount: invite?.channels?.length || 0,
|
||||
activeChannelId: this.activeChannelId || null,
|
||||
guildCount: (this.guilds || []).length
|
||||
})
|
||||
return guild
|
||||
} catch (err) {
|
||||
@@ -7182,6 +7185,7 @@ class PearcordPlatform extends EventEmitter {
|
||||
}
|
||||
const result = await this.invite.revoke({ code: raw })
|
||||
span.end({
|
||||
spanKind: 'invite.revoke',
|
||||
guildId,
|
||||
code: result?.code || null,
|
||||
revoked: !!result?.revoked
|
||||
@@ -7202,7 +7206,7 @@ class PearcordPlatform extends EventEmitter {
|
||||
const guildId = this.guild?.guild?.id || null
|
||||
const span = this.log.time('guild.invite', {
|
||||
guildId,
|
||||
spanKind: 'invites.create'
|
||||
spanKind: 'guild.invite'
|
||||
})
|
||||
try {
|
||||
const g = this.guild?.guild
|
||||
@@ -7215,11 +7219,13 @@ class PearcordPlatform extends EventEmitter {
|
||||
channels
|
||||
})
|
||||
span.end({
|
||||
spanKind: 'guild.invite',
|
||||
guildId: g.id,
|
||||
code: inv?.code || null,
|
||||
shareCodeLen: (inv?.shareCode || '').length,
|
||||
channelCount: channels?.length || 0,
|
||||
expiresAt: inv?.expiresAt || null
|
||||
expiresAt: inv?.expiresAt || null,
|
||||
hasShareCode: !!(inv?.shareCode || inv?.code)
|
||||
})
|
||||
return inv
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user