ux: status bar severity color + what's-new notification#20
Merged
Conversation
Stacked on scan-workspace-v2 (#19). Two UX improvements from the post-v0.2.0 review. 1. Status bar severity color - pickBackgroundColor returns statusBarItem.errorBackground (red) when CRITICAL is present, statusBarItem.warningBackground (yellow) for HIGH-without-CRITICAL, undefined for MEDIUM/LOW/INFO. Same ThemeColor tokens ESLint and Error Lens use, so the visual language reads correctly across themes. - The default fg colour for medium/low/info keeps a "1 medium" workspace from shouting. 2. What's-new notification (src/whatsNew.ts) - First activation after a version bump shows a one-time toast. "See release notes" opens the matching GitHub release URL via vscode.env.openExternal. - isUpgrade compares the manifest version against the value stashed in globalState; strips a leading 'v' and any pre-release suffix (-rc.1) so a stable release after an rc doesn't re-trigger. - The seen-version persists BEFORE the notification fires, so a missed dismissal doesn't loop next launch. - composeMessage and isUpgrade are pure helpers; the test file pins every documented invariant. Also riding along (user-intentional edits already in the working tree) - package.json: dropped onStartupFinished from activationEvents — the activity-bar slot only appears in CI-relevant workspaces, matching the status bar's already-quieter visibility policy. - package.json: expanded untrustedWorkspaces.description to explain the machine-overridable scope on serverCommand/serverArgs. Better copy for the trust prompt VS Code shows on first open. - README.md: Socket supply-chain badge added. Tests - statusBar.test.ts: 5 new tests for pickBackgroundColor (critical / high-without-critical / medium-only / clean / mixed). Updated the inline vscode stub to expose ThemeColor. - whatsNew.test.ts (new): 17 tests across isUpgrade (first install, major/minor/patch upgrades, downgrade, equal, pre-release strip, leading-v strip, malformed prev), composeMessage (version interpolation, mentions every surface), and showWhatsNewIfUpgraded (shows on first install, skips on match, persists before showing, opens URL on click, doesn't open on dismiss, supports custom openExternal for tests). Total: 129 unit tests (was 107 on PR #19; +5 status bar, +17 whatsNew). Lint, compile, smoke all green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two UX improvements from the post-v0.2.0 review. Stacked on #19 (scan-workspace-v2) — base is
scan-workspace-v2, so the diff shows only this PR's work.1. Status bar severity color 🔴 🟡
A workspace with CRITICAL findings now tints the status bar to
statusBarItem.errorBackground(red); HIGH-without-CRITICAL tints tostatusBarItem.warningBackground(yellow); MEDIUM / LOW / INFO keep the default fg colour so a "1 medium" workspace doesn't shout. Same ThemeColor tokens ESLint and Error Lens use — the visual language reads correctly across themes.```
$(shield) 3C 1H ← red background (CRITICAL present)
$(shield) 4H 2M ← yellow background (HIGH, no CRITICAL)
$(shield) 5 ← default colour (medium/low only)
$(shield) clean ← default colour (zero findings)
```
2. What's-new notification on upgrade
First activation after a version bump shows a one-time toast — "Pipeline-Check 0.X.Y is here. The Findings panel, status bar item, inline CodeLens, and Alt+F8 navigation are new — see what changed?" — with a See release notes button that opens the matching GitHub release URL.
Persistence is write-before-show: the seen-version saves before the toast fires, so a missed dismissal (VS Code closes, user clicks elsewhere) doesn't loop next launch. A v0.1.x → v0.2.0 upgrade fires it once; subsequent launches stay silent.
Pre-release strip: `v0.2.0-rc.1` → `v0.2.0` won't re-trigger.
What user-edits ride along
Three intentional edits the user committed to the working tree are folded in:
package.jsondropped `onStartupFinished` from activationEvents — the activity-bar slot only appears in CI-relevant workspaces now, matching the status bar's already-quieter visibility policy.package.jsonexpanded `untrustedWorkspaces.description` to explain the `machine-overridable` scope on `serverCommand` / `serverArgs`. Better copy for the trust prompt VS Code surfaces on first open.README.mdadded a Socket supply-chain badge.Test plan
Notes for v0.3.0 release
When you cut v0.3.0 (or whatever the next release is), the what's-new notification will fire once on first activation for every existing user — that's the whole point. The Findings-panel / status bar / CodeLens / Alt+F8 mentions in the message are deliberate: those land/landed in the v0.2.x line.
🤖 Generated with Claude Code