feat(platform): extend settings span metadata for Phase 568 (v0.8.531)

Add activeChannelId and guildCount on settings.prefs and notifications.prefs;
activeChannelId and spanKind on guild.update end.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-24 15:04:20 -04:00
co-authored by Cursor
parent 51438b3a01
commit d7dc87a6f8
2 changed files with 9 additions and 1 deletions
+2
View File
@@ -185,6 +185,8 @@ Expose a single `EventEmitter` API the UI drives over IPC (`apps/pearcord/index.
**v0.8.474 (Phase 511):** Onboarding spans — `identity.register` (`usernameLen`, `displayNameLen`, `hadGuilds`), `guild.create` (`channelCount`, `isFirstGuild`, `listOnDiscovery`), `invite.join` (`inviteLen`, `guildId`) + matching error logs. UI `syncOnboardingPanelsDuringGuildLoading`, `#composer-onboarding-hint`, dev-log onboarding-errors + clipboard meta. Bundle: `npm run test:phase511-onboarding`. See [ONBOARDING.md](../../docs/ONBOARDING.md). **v0.8.474 (Phase 511):** Onboarding spans — `identity.register` (`usernameLen`, `displayNameLen`, `hadGuilds`), `guild.create` (`channelCount`, `isFirstGuild`, `listOnDiscovery`), `invite.join` (`inviteLen`, `guildId`) + matching error logs. UI `syncOnboardingPanelsDuringGuildLoading`, `#composer-onboarding-hint`, dev-log onboarding-errors + clipboard meta. Bundle: `npm run test:phase511-onboarding`. See [ONBOARDING.md](../../docs/ONBOARDING.md).
**v0.8.531 (Phase 568):** Settings spans extend — `settings.prefs`/`notifications.prefs`/`guild.update` `activeChannelId` + `guildCount`; UI `#settings-panel-live` + `syncSettingsLivePanelDuringGuildLoading`; **settings-errors** excludes onboarding/invite bleed; clipboard `settingsPanelLiveBusy`/`settingsNavChromeBusy`/`channelSettingsGuildCount`. Bundle: `npm run test:phase568-settings`. See [SETTINGS.md](../../docs/SETTINGS.md).
**v0.8.475 (Phase 512):** Settings spans — `settings.prefs` (`patchKeyCount`, `themeChanged`), `notifications.prefs`, `guild.update` / `settings.guild` (`nameChanged`, `iconChanged`, `nsfwGateChanged`). UI `syncSettingsPanelsDuringGuildLoading`, `#composer-settings-hint`, dev-log settings-errors + clipboard meta. Bundle: `npm run test:phase512-settings`. See [SETTINGS.md](../../docs/SETTINGS.md). **v0.8.475 (Phase 512):** Settings spans — `settings.prefs` (`patchKeyCount`, `themeChanged`), `notifications.prefs`, `guild.update` / `settings.guild` (`nameChanged`, `iconChanged`, `nsfwGateChanged`). UI `syncSettingsPanelsDuringGuildLoading`, `#composer-settings-hint`, dev-log settings-errors + clipboard meta. Bundle: `npm run test:phase512-settings`. See [SETTINGS.md](../../docs/SETTINGS.md).
**v0.8.476 (Phase 513):** Guild-admin spans — `channel.create` (`nameLen`, `hadParent`), `channel.delete` (`wasActive`, `channelType`), `channel.reorder` (`updatedCount`, `channelCount`). UI `syncGuildAdminPanelsDuringGuildLoading`, `#composer-guild-admin-hint`, dev-log guild-admin-errors + clipboard meta. Bundle: `npm run test:phase513-guild-admin`. See [CHANNELS.md](../../docs/CHANNELS.md). **v0.8.476 (Phase 513):** Guild-admin spans — `channel.create` (`nameLen`, `hadParent`), `channel.delete` (`wasActive`, `channelType`), `channel.reorder` (`updatedCount`, `channelCount`). UI `syncGuildAdminPanelsDuringGuildLoading`, `#composer-guild-admin-hint`, dev-log guild-admin-errors + clipboard meta. Bundle: `npm run test:phase513-guild-admin`. See [CHANNELS.md](../../docs/CHANNELS.md).
+7 -1
View File
@@ -3803,6 +3803,8 @@ class PearcordPlatform extends EventEmitter {
desktopEnabled: prefs?.desktopEnabled !== false, desktopEnabled: prefs?.desktopEnabled !== false,
notifyOnMention: prefs?.notifyOnMention !== false, notifyOnMention: prefs?.notifyOnMention !== false,
notifyOnDM: prefs?.notifyOnDM !== false, notifyOnDM: prefs?.notifyOnDM !== false,
activeChannelId: this.activeChannelId || null,
guildCount: (this.guilds || []).length,
spanKind: 'notifications.prefs' spanKind: 'notifications.prefs'
}) })
return prefs return prefs
@@ -3830,6 +3832,8 @@ class PearcordPlatform extends EventEmitter {
density: prefs?.density || null, density: prefs?.density || null,
themeChanged: patch.theme !== undefined, themeChanged: patch.theme !== undefined,
densityChanged: patch.density !== undefined, densityChanged: patch.density !== undefined,
activeChannelId: this.activeChannelId || null,
guildCount: (this.guilds || []).length,
spanKind: 'settings.prefs' spanKind: 'settings.prefs'
}) })
return prefs return prefs
@@ -5257,7 +5261,9 @@ class PearcordPlatform extends EventEmitter {
iconChanged: iconHash !== undefined && guild.iconHash !== prev?.iconHash, iconChanged: iconHash !== undefined && guild.iconHash !== prev?.iconHash,
nsfwGateChanged: nsfwGateChanged:
nsfwGateEnabled !== undefined && nsfwGateEnabled !== undefined &&
(guild.nsfwGateEnabled !== false) !== (prev?.nsfwGateEnabled !== false) (guild.nsfwGateEnabled !== false) !== (prev?.nsfwGateEnabled !== false),
activeChannelId: this.activeChannelId || null,
spanKind: 'settings.guild'
}) })
return guild return guild
} catch (err) { } catch (err) {