feat: add What's New dialog with unread release badge#637
feat: add What's New dialog with unread release badge#637breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom feat/whats-new-dialogbreaking-brake/cc-wf-studio:feat/whats-new-dialogCopy head branch name to clipboard
Conversation
- Parse CHANGELOG.md and display latest 5 versions in Radix UI dialog - Show unread release count badge on More button and menu item - Track read state via globalState with version comparison - Add toggle switch to enable/disable unread badge - Support 5 languages (en, ja, ko, zh-CN, zh-TW) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughThis PR introduces a "What's New" feature that displays changelog entries to users via a modal dialog. The system parses CHANGELOG.md, tracks unread release versions, displays an optional badge in the toolbar, and allows users to view and dismiss updates. Message handlers connect the extension backend to the webview frontend, with persistent state management for the badge visibility and last-viewed version. Changes
Sequence DiagramsequenceDiagram
participant User
participant Webview as Webview Frontend
participant Bridge as VSCode Bridge
participant Extension as Extension Backend
participant FS as File System
User->>Webview: Open editor
Webview->>Bridge: WEBVIEW_READY
Bridge->>Extension: WEBVIEW_READY received
Extension->>FS: Read CHANGELOG.md
FS-->>Extension: Changelog content
Extension->>Extension: Parse & count unread versions
Extension-->>Bridge: INITIAL_STATE (unreadCount, showBadge)
Bridge-->>Webview: INITIAL_STATE received
Webview->>Webview: Initialize state (unreadCount, showBadge)
Webview->>Webview: Render Toolbar with badge
User->>Webview: Click What's New menu item
Webview->>Bridge: GET_CHANGELOG
Bridge->>Extension: GET_CHANGELOG received
Extension->>FS: Read & parse CHANGELOG.md
FS-->>Extension: Changelog content
Extension->>Extension: Extract entries & current version
Extension-->>Bridge: GET_CHANGELOG_RESULT (entries, unreadCount)
Bridge-->>Webview: GET_CHANGELOG_RESULT
Webview->>Webview: Display WhatsNewDialog with entries
User->>Webview: Toggle badge visibility in dialog
Webview->>Bridge: SET_WHATS_NEW_BADGE
Bridge->>Extension: Update showWhatsNewBadge in state
Extension-->>Bridge: State updated
User->>Webview: Close What's New dialog
Webview->>Bridge: MARK_CHANGELOG_READ
Bridge->>Extension: Update lastViewedVersion in state
Extension-->>Bridge: State updated
Webview->>Webview: Refresh badge (unreadCount = 0)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Comment |
|
🎉 This PR is included in version 3.27.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
Add a "What's New" feature to the More submenu that parses CHANGELOG.md and displays the latest 5 releases in a Radix UI dialog, with unread release count badges.
Motivation
Users have no way to discover what changed between extension updates. This feature surfaces recent changes directly in the UI, improving awareness of new features and bug fixes.
Changes
New Files:
src/extension/utils/changelog-parser.ts- Regex-based CHANGELOG.md parser (no external deps)src/webview/src/components/dialogs/WhatsNewDialog.tsx- Radix UI dialog displaying changelog entriesModified Files:
src/shared/types/messages.ts- Added ChangelogEntry types, message definitions, InitialStatePayload extensionssrc/extension/commands/open-editor.ts- Handlers for GET_CHANGELOG, MARK_CHANGELOG_READ, SET_WHATS_NEW_BADGE; unread count in INITIAL_STATEsrc/webview/src/services/vscode-bridge.ts- Bridge functions: getChangelog(), markChangelogRead(), setWhatsNewBadge()src/webview/src/components/toolbar/MoreActionsDropdown.tsx- What's New menu item with badge, More button badgesrc/webview/src/components/Toolbar.tsx- Dialog state management, unread count trackingsrc/webview/src/App.tsx- Pass unreadReleaseCount and showWhatsNewBadge from INITIAL_STATEsrc/webview/src/i18n/translation-keys.ts- New translation keyssrc/webview/src/i18n/translations/{en,ja,ko,zh-CN,zh-TW}.ts- Translations for 5 languagesTesting
npm run format && npm run lint && npm run check && npm run buildpassed🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes