Skip to content

v1.1.0

Choose a tag to compare

@github-actions github-actions released this 25 Jul 21:58
· 6 commits to main since this release
1687e81

What's Changed

New: Post-clone summary notification with stats and retry

  • Added showCloneSummary(stats, failures) in utils/notifications.ts that displays a pill notification after cloning completes
  • Added retryFailedItems(failures) to re-attempt failed items directly from the notification
  • Summary shows counts like 5 channels, 3 roles, 2 emojis and lists individual failures with context/name/error
  • Action buttons on failure: View Errors and Retry Failed

New: CloneModal UI enhancements

  • Added state variables targetChannelCount and targetRoleCount in components/CloneModal.tsx
  • Added useEffect to count target channels/roles when targetGuildId is selected
  • Guild icon now displayed in header via Discord CDN with fallback to first letter placeholder
  • Stats badges below title: # X channels, @ Y roles
  • Diff preview badges in overwrite mode: +N channels, -M channels, +N roles, -M roles
  • Diff preview badges in resume mode: +N channels to add, +N roles to add, or All items already exist
  • New CSS classes for header, icon, badges, and diff colors

New: Stats tracking in clone functions

  • core/cloneChannels.ts: New CloneChannelsResult interface with channelsCloned, categoriesCloned, channelsFailed, categoriesFailed
  • core/cloneRoles.ts: New CloneRolesResult and CloneEmojisResult interfaces; tracks counts; pushes failures to state.failedItems
  • core/cloneAssets.ts: cloneStickers and cloneSoundboard push failures to state.failedItems
  • core/clone.ts: cloneServer collects all stats into state.cloneStats and calls showCloneSummary() on completion or failure

New: Types and state

  • types.ts: Added CloneStats interface (channelsCloned, categoriesCloned, rolesCloned, emojisCloned, stickersCloned, soundboardCloned, onboardingCloned) and CloneFailure interface (context, name, error)
  • store.ts: Added cloneStats: CloneStats | null and failedItems: CloneFailure[]

Changed: escapeHtml optimization

  • utils/helpers.ts: Rewrote escapeHtml() from DOM-based (document.createElement("div")) to pure string replacement using .replace() chain for &, <, >, ", '
  • utils/__tests__/helpers.test.ts: Added escapeHtml test suite with 8 test cases

Changed: Version bump

  • constants.ts: PLUGIN_VERSION "1.0.0" -> "1.1.0"
  • package.json: version "1.0.0" -> "1.1.0"
  • package-lock.json: version "1.0.0" -> "1.1.0"

Removed

  • Nothing removed in this release

Commit: 1687e81feat: Implement clone summary notification and retry functionality for failed items