Skip to content

feat(notifications): add upgrade nudge for legacy extension users (version < 7)#4316

Open
markijbema wants to merge 6 commits into
mainfrom
mark/legacy-upgrade-notification
Open

feat(notifications): add upgrade nudge for legacy extension users (version < 7)#4316
markijbema wants to merge 6 commits into
mainfrom
mark/legacy-upgrade-notification

Conversation

@markijbema

@markijbema markijbema commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new extensionVersionBelow field to KiloNotification to enable version-gated server-side filtering of notifications by extension major version.
  • Updates the /api/users/notifications route to extract the client's extension version from X-KiloCode-Version / User-Agent headers and passes it to generateUserNotifications.
  • Adds a new legacy-upgrade-june-2026 notification 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

  • Install an older (version < 7) kilocode-legacy extension build and call /api/users/notifications — the legacy-upgrade-june-2026 notification should appear with the EOL messaging and link to the GitHub notice.
  • Call the endpoint with a current kilocode extension (version ≥ 7) or with no version headers — the notification should not appear.

Visual Changes

N/A

Reviewer Notes

  • Filtering is server-side: the route extracts the version and passes it into generateUserNotifications; the extension does not need to understand the new field.
  • extensionVersionBelow: 7 means 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.
  • When version headers are absent the notification is hidden (conservative, avoids showing it to non-extension clients).
  • Notification title and message are consistent with the Legacy IDE Extensions End of Life section in the kilocode-legacy README (EOL date: July 31, 2026).

Built for Mark IJbema by Kilo for Slack

…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>
@markijbema markijbema self-assigned this Jun 30, 2026
@kilo-code-bot

kilo-code-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The 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

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/web/src/lib/notifications.ts 57 Notification copy claims the legacy extension is version "5.x", but the gate (isLegacyKiloExtensionUserAgent) only checks for an axios User-Agent, not any specific version number
Files Reviewed (1 file)
  • apps/web/src/lib/notifications.ts - 1 issue

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 Summary

The 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)
  • apps/web/src/app/api/users/notifications/route.ts
  • apps/web/src/lib/notifications.ts
  • apps/web/src/lib/notifications.test.ts
  • apps/web/src/lib/userAgent.ts
  • apps/web/src/lib/userAgent.test.ts

Previous review (commit 42ae8c9)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • apps/web/src/lib/notifications.ts

Previous review (commit e101508)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • apps/web/src/app/api/users/notifications/route.ts

Previous review (commit 58f60fa)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • apps/web/src/app/api/users/notifications/route.ts
  • apps/web/src/lib/notifications.ts

Reviewed by claude-sonnet-5-20260630 · Input: 24 · Output: 9.1K · Cached: 601.7K

Review guidance: REVIEW.md from base branch main

markijbema and others added 2 commits June 30, 2026 08:44
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>
@markijbema

Copy link
Copy Markdown
Contributor Author

This doesnt work, the legacy extension doesnt send the header this pr expect

@markijbema markijbema closed this Jul 2, 2026
@markijbema markijbema reopened this Jul 6, 2026
@markijbema

Copy link
Copy Markdown
Contributor Author

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',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant