feat(notifications): add upgrade nudge for legacy extension users (version < 7)#4316
feat(notifications): add upgrade nudge for legacy extension users (version < 7)#4316markijbema wants to merge 6 commits into
Conversation
…tension users Add extensionVersionBelow field to KiloNotification to allow targeting users by extension major version. Update the notifications API route to extract the client version from X-KiloCode-Version / User-Agent headers and pass it into generateUserNotifications for server-side filtering. Add a new notification that shows only to kilocode-legacy users (version < 7), directing them to upgrade to the latest Kilo Code extension. Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe legacy-extension EOL notification's title and message now assert a specific "5.x" version that the underlying axios User-Agent detection does not verify. Overview
Issue Details (click to expand)WARNING
Files Reviewed (1 file)
Fix these issues in Kilo Cloud Previous Review Summaries (4 snapshots, latest commit fa43440)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit fa43440)Status: No Issues Found | Recommendation: Merge Executive SummaryThe legacy-extension detection was refactored from a version-number header check to an axios User-Agent heuristic, and the change is applied consistently across the route, notification config, and gate helper with no leftover references to the old approach. Files Reviewed (5 files)
Previous review (commit 42ae8c9)Status: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Previous review (commit e101508)Status: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Previous review (commit 58f60fa)Status: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by claude-sonnet-5-20260630 · Input: 24 · Output: 9.1K · Cached: 601.7K Review guidance: REVIEW.md from base branch |
Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
…aging and correct URL Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
|
This doesnt work, the legacy extension doesnt send the header this pr expect |
|
I'll add headers to the new extension, and then send to old agents without headers |
…se opencode UA The legacy extension's notification fetch sends only Authorization + Content-Type, so it has no version header. The prior logic hid version-gated notifications when the version was unknown and only parsed X-KiloCode-Version / Kilo-Code UA, neither of which the current extension sends. Result: legacy users (the target) never saw the EOL nudge, and the current extension (opencode-kilo-provider/<version>) also resolved to undefined. Now parse the opencode-kilo-provider User-Agent so >=7 clients are correctly excluded, and treat an unknown version as an old/pre-versioning client that IS shown the notification.
The legacy extension calls the notifications endpoint with axios, sending User-Agent: axios/<version>, while the current extension/CLI use the shared Kilo gateway headers (opencode-kilo-provider/...). Detecting the axios UA is a precise, positive signal for the legacy extension, replacing the version-gating heuristic that treated absent version data as old.
…place Both the old and new extension are the same Kilo Code marketplace extension, so reference the 5.x versions and tell users to upgrade to the latest version rather than switch to a different extension.
| //if you just want a simple straightforward global message, add it here. | ||
| { | ||
| id: 'legacy-upgrade-june-2026', | ||
| title: 'Kilo Code 5.x: End of Life July 31, 2026', |
There was a problem hiding this comment.
WARNING: Notification copy claims a specific version ("5.x") that the gating logic doesn't verify
This notification is now gated purely on showOnlyOnLegacyExtension / isLegacyKiloExtensionUserAgent, which matches any client whose User-Agent starts with axios/ (see apps/web/src/lib/userAgent.ts). It no longer checks a numeric extension version at all — the previous extensionVersionBelow: 7 check (which covered any legacy major version 0–6) was removed in favor of this UA-based check.
Asserting "Kilo Code 5.x" / "Version 5.x of the Kilo Code extension" in the title and message implies the legacy extension is specifically version 5.x, but nothing in this code confirms that — any axios-based legacy client is matched regardless of its actual version. If some legacy users are on a different major version (e.g. 4.x or 6.x), this copy will show them inaccurate version information.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Summary
extensionVersionBelowfield toKiloNotificationto enable version-gated server-side filtering of notifications by extension major version./api/users/notificationsroute to extract the client's extension version fromX-KiloCode-Version/User-Agentheaders and passes it togenerateUserNotifications.legacy-upgrade-june-2026notification targeting users on extension version < 7 (kilocode-legacy users), informing them that the legacy extension reaches end of life on July 31, 2026 and directing them to the end-of-life notice. Current kilocode users (version ≥ 7) never see this notification.Verification
/api/users/notifications— thelegacy-upgrade-june-2026notification should appear with the EOL messaging and link to the GitHub notice.Visual Changes
N/A
Reviewer Notes
generateUserNotifications; the extension does not need to understand the new field.extensionVersionBelow: 7means any encoded float < 7.0 (i.e. major version 0–6); since minor/1000 + patch/1_000_000 < 1, this is safe for all realistic version strings.Built for Mark IJbema by Kilo for Slack