Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Aug 21, 2025

Implements a persistent "NEW" badge over the version number on the welcome/hero screen when a new announcement triggers. Clicking the version opens the announcement modal and clears the badge. The badge persists across reloads until acknowledged.

Key changes:

Tests:

  • Webview UI suite passes (webview-ui).

Important

Adds a persistent "NEW" badge over the version indicator for new announcements, which persists across sessions until acknowledged by the user.

  • Behavior:
    • Adds a persistent "NEW" badge over the version indicator in VersionIndicator when a new announcement is available.
    • Clicking the version indicator opens the announcement modal and clears the badge.
    • Badge state persists across sessions until acknowledged.
  • UI Components:
    • VersionIndicator updated to show "NEW" badge when showBadge is true.
    • ChatView and App handle badge visibility and click events to update state and notify the extension.
  • State Management:
    • Uses lastAcknowledgedAnnouncementId in global-settings.ts to track badge state.
    • Updates in ClineProvider and webviewMessageHandler to manage cross-session badge persistence.

This description was created by Ellipsis for e402468. You can customize this summary. It will automatically update as commits are pushed.

@roomote roomote bot requested review from cte, jr and mrubens as code owners August 21, 2025 15:25
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Aug 21, 2025
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed my own code and found it surprisingly not terrible, which is suspicious.

aria-label={t("chat:versionIndicator.ariaLabel", { version: Package.version })}>
v{Package.version}
{showBadge && (
<span
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing aria-label for the badge. Screen reader users won't know what "NEW" refers to. Consider adding:

Suggested change
<span
<span
// The badge uses VS Code theme variables to blend with light/dark themes
aria-label="New announcement available"
className="absolute -top-1.5 -right-1.5 rounded-full bg-vscode-button-background text-vscode-button-foreground text-[10px] leading-none px-1.5 py-0.5 shadow ring-2 ring-vscode-editor-background select-none">

useEffect(() => {
// Only update if the extension indicates we should show the badge
// This allows local state to clear immediately after user clicks
if (shouldShowAnnouncementBadge) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intentional? The badge state syncs from extension state but could be overridden by local state changes. The comment suggests it's intentional to allow immediate local clearing, but this could create a race condition if the extension state updates at the same time. Consider using a more explicit state management pattern or documenting this behavior more clearly.

<span
// The badge uses VS Code theme variables to blend with light/dark themes
className="absolute -top-1.5 -right-1.5 rounded-full bg-vscode-button-background text-vscode-button-foreground text-[10px] leading-none px-1.5 py-0.5 shadow ring-2 ring-vscode-editor-background select-none">
NEW
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "NEW" text is hardcoded. Could this be made configurable or use i18n for localization? Something like t('common:badge.new') would make it more flexible for international users.

{showBadge && (
<span
// The badge uses VS Code theme variables to blend with light/dark themes
className="absolute -top-1.5 -right-1.5 rounded-full bg-vscode-button-background text-vscode-button-foreground text-[10px] leading-none px-1.5 py-0.5 shadow ring-2 ring-vscode-editor-background select-none">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider extracting these badge styles to a reusable component or at least a constant. This long className string could be:

const BADGE_STYLES = "absolute -top-1.5 -right-1.5 rounded-full bg-vscode-button-background text-vscode-button-foreground text-[10px] leading-none px-1.5 py-0.5 shadow ring-2 ring-vscode-editor-background select-none"

This would improve maintainability and reusability.

@dosubot dosubot bot added the UI/UX UI/UX related or focused label Aug 21, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Aug 21, 2025
@hannesrudolph
Copy link
Collaborator

@roomote-agent The little "new" is handy but the placement of the version indicator seems to have gotten buggered up

@roomote
Copy link
Contributor Author

roomote bot commented Aug 21, 2025

Hi @hannesrudolph, I see the issue with the version indicator placement. Let me investigate and fix this for you.

- Moved VersionIndicator to be a direct child of the main welcome screen container
- This ensures proper absolute positioning relative to the entire welcome area
- Fixes layout issue where the version indicator was misaligned due to nested container positioning
@roomote
Copy link
Contributor Author

roomote bot commented Aug 21, 2025

Hi @hannesrudolph, I've fixed the version indicator placement issue!

The problem was that the VersionIndicator was positioned inside a nested container with its own padding and layout constraints. I moved it to be a direct child of the main welcome screen container (the div with relative positioning) to ensure proper absolute positioning.

Changes made:

  • Moved VersionIndicator component from line 1833 to line 1818 in ChatView.tsx
  • This places it as a direct child of the main welcome screen container
  • The absolute positioning (top-2 right-3) now works correctly relative to the entire welcome area

The fix has been pushed to the PR branch and all tests are passing. CI checks are currently running and looking good so far. The version indicator should now be properly positioned in the top-right corner of the welcome screen.

@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Aug 22, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Aug 22, 2025
@daniel-lxs daniel-lxs marked this pull request as draft August 25, 2025 19:08
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Draft / In Progress] in Roo Code Roadmap Aug 25, 2025
@github-project-automation github-project-automation bot moved this from PR [Draft / In Progress] to Done in Roo Code Roadmap Sep 23, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR - Draft / In Progress size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants