File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
apps/web/src/lib/changelog/components Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -25,20 +25,17 @@ export function ChangelogNotification() {
2525 // localStorage unavailable
2626 }
2727
28- // First-time visitor: record the version silently, nothing to announce.
29- if ( storedVersion === null ) {
30- try {
31- localStorage . setItem ( STORAGE_KEY , latest . version ) ;
32- } catch {
33- // ignore
34- }
35- return ;
36- }
28+ const isOutdated =
29+ storedVersion === null ||
30+ storedVersion . localeCompare ( latest . version , undefined , {
31+ numeric : true ,
32+ } ) < 0 ;
3733
38- // Already seen this version.
39- if ( storedVersion === latest . version ) return ;
34+ // TODO(v0.4): revert to the standard "null = first-time visitor, record silently"
35+ // path. The null case intentionally shows the card for this release so existing
36+ // users who never had the key get the 0.3.0 announcement.
37+ if ( ! isOutdated ) return ;
4038
41- // New version since last visit: record it and show the notification.
4239 try {
4340 localStorage . setItem ( STORAGE_KEY , latest . version ) ;
4441 } catch {
You can’t perform that action at this time.
0 commit comments