From f1b210b1b7ead946c0869ff8982e20c6f1afc069 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Sun, 24 May 2026 12:35:32 -0400 Subject: [PATCH] feat(platform): slash spanKind metadata for Phase 538 Add spanKind and activeChannelId to slash.register, slash.delete, and slash.invoke span ends for integrations observability. Co-authored-by: Cursor --- README.md | 2 ++ index.js | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b638394..430f32c 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,8 @@ Expose a single `EventEmitter` API the UI drives over IPC (`apps/pearcord/index. **v0.8.452 (Phase 489):** `slash.register` `customCount`; `slash.delete` `deleted`; `slash.invoke` `replyLen`/`commandFound`. UI slash compositor + hints. Bundle: `npm run test:phase489-slash`. See [SLASH_COMMANDS.md](../../docs/SLASH_COMMANDS.md). +**v0.8.501 (Phase 538):** Slash spans extend — `slash.register`/`slash.delete`/`slash.invoke` end metadata (`spanKind`, `activeChannelId`). UI slash panel compositor wrappers, slash row `lastSlashRowId` + roving `tabindex`, clipboard slash busy flags. Bundle: `npm run test:phase538-slash`. See [SLASH_COMMANDS.md](../../docs/SLASH_COMMANDS.md). + **v0.8.500 (Phase 537):** Webhook spans extend — `webhook.create`/`webhook.delete`/`webhook.execute` end metadata (`spanKind`, `activeChannelId`). UI webhook panel compositor wrappers, webhook row `lastWebhookRowId` + roving `tabindex`, clipboard webhook busy flags. Bundle: `npm run test:phase537-webhooks`. See [WEBHOOKS.md](../../docs/WEBHOOKS.md). **v0.8.451 (Phase 488):** `webhook.create` `channelType`/`hasAvatar`; `webhook.execute` `messageSent`. UI webhook compositor split + hints. Bundle: `npm run test:phase488-webhooks`. See [WEBHOOKS.md](../../docs/WEBHOOKS.md). diff --git a/index.js b/index.js index 0709a8a..55c13eb 100644 --- a/index.js +++ b/index.js @@ -8607,7 +8607,9 @@ class PearcordPlatform extends EventEmitter { registered: rows.length, guildId, firstName: rows[0]?.name || null, - customCount: rows.filter((r) => !r.builtin).length + customCount: rows.filter((r) => !r.builtin).length, + spanKind: 'slash.register', + activeChannelId: this.activeChannelId }) return rows } catch (err) { @@ -8643,7 +8645,13 @@ class PearcordPlatform extends EventEmitter { meta: { name: removed.name } }) this.emit('slash-command') - span.end({ name: removed.name, guildId, deleted: !!removed }) + span.end({ + name: removed.name, + guildId, + deleted: !!removed, + spanKind: 'slash.delete', + activeChannelId: this.activeChannelId + }) return removed } catch (err) { this.log.error('slash.delete error', { @@ -11092,7 +11100,9 @@ class PearcordPlatform extends EventEmitter { ephemeral: !!opts.ephemeral, builtin: !!result.command?.builtin, replyLen: reply.length, - commandFound: !!result.command + commandFound: !!result.command, + spanKind: 'slash.invoke', + activeChannelId: this.activeChannelId }) return msg } catch (err) {