Skip to content

An open source, self-hosted, real-time port monitoring and discovery tool.

Feature/autoxpose enhance (#81)

Mostafa Wahied6e497c8ecdbc
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0f8a618..1ada94b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,9 +5,9 @@ All notable changes to portracker will be documented in this file.
## [1.3.0] - 2026-02-02
**Highlights**
-- Service-Centric View — Ports organized by service with expandable cards (now default)
-- API Key Authentication — Secure peer-to-peer communication between instances
-- Autoxpose Integration — See publicly exposed services directly in your dashboard
+- Service-Centric View - Ports organized by service with expandable cards (now default)
+- API Key Authentication - Secure peer-to-peer communication between instances
+- autoxpose Integration - See publicly exposed services directly in your dashboard
---
@@ -21,7 +21,7 @@ All notable changes to portracker will be documented in this file.
### Integrations
-- **Autoxpose Integration**: See which services are publicly exposed by connecting to your autoxpose instance from Settings
+- **autoxpose Integration**: See which services are publicly exposed by connecting to your autoxpose instance from Settings
- **[sub]** Public URLs displayed alongside internal ports with SSL status indicators
- **[sub]** Clickable links open your public endpoints directly
diff --git a/README.md b/README.md
index 2612120..095e1ea 100644
--- a/README.md
+++ b/README.md
@@ -290,7 +290,7 @@ Future development is focused on improving the application based on community fe
- ~~Adding user authentication~~ ✅ **Added in v1.2.0** (optional authentication with setup wizard)
- ~~Adding API key authentication for peer-to-peer communication~~ ✅ **Added in v1.3.0**
-- ~~Autoxpose integration for public URL visibility~~ ✅ **Added in v1.3.0**
+- ~~autoxpose integration for public URL visibility~~ ✅ **Added in v1.3.0**
- Expanding the library of platform-specific collectors for other host systems
- Addressing bugs and incorporating requested changes from the community
diff --git a/backend/index.js b/backend/index.js
index fa103c0..328dac6 100644
--- a/backend/index.js
+++ b/backend/index.js
@@ -1,11 +1,3 @@
-/**
- * PORTS TRACKER - BACKEND SERVER
- *
- * Production-ready backend server for the port tracker application.
- * Provides RESTful API endpoints for server management, port scanning,
- * and system monitoring across multiple deployment platforms.
- */
-
require('dotenv').config({ path: __dirname + '/.env' });
const express = require('express');
diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx
index 4a4c9f2..83b538e 100644
--- a/frontend/src/App.jsx
+++ b/frontend/src/App.jsx
@@ -32,6 +32,7 @@ import { useWhatsNew } from "./lib/hooks/useWhatsNew";
import { saveCustomServiceName, deleteCustomServiceName, getCustomServiceNames, batchCustomServiceNames } from "./lib/api/customServiceNames";
import { batchNotes, saveNote } from "./lib/api/notes";
import { getAutoxposeStatus, connectAutoxpose, disconnectAutoxpose, setAutoxposeDisplayMode, setAutoxposeUrlStyle, getAutoxposeServices, getAutoxposeDomain } from "./lib/api/autoxpose";
+import { AutoxposeNudge } from "./components/autoxpose";
import { generatePortKey } from "./lib/utils/portUtils";
import { formatUptime } from "@/lib/utils";
import { useAuth } from "./contexts/AuthContext";
@@ -2077,6 +2078,11 @@ export default function App() {
</div>
</div>
)}
+ <AutoxposeNudge
+ servers={groups}
+ autoxposeConnected={autoxposeStatus?.connected}
+ onOpenSettings={() => setSettingsModalOpen(true)}
+ />
{healthToast && (
<div
className={`fixed top-20 right-6 z-50 px-4 py-2.5 rounded-lg shadow-lg border backdrop-blur-sm animate-in fade-in-0 slide-in-from-top-2 duration-200 ${
@@ -2222,6 +2228,7 @@ export default function App() {
<WhatsNewModal
{...getWhatsNewModalProps()}
+ onOpenSettings={() => setSettingsModalOpen(true)}
/>
<ServiceRenameModal
diff --git a/frontend/src/components/autoxpose/AutoxposeNudge.jsx b/frontend/src/components/autoxpose/AutoxposeNudge.jsx
new file mode 100644
index 0000000..a5c0f5b
--- /dev/null
+++ b/frontend/src/components/autoxpose/AutoxposeNudge.jsx
@@ -0,0 +1,112 @@
+import React, { useState, useEffect, useCallback } from 'react';
+import { Globe, X } from 'lucide-react';
+import { Button } from '@/components/ui/button';
+import { shouldShowNudge, markNudgeDismissed, findEligibleService } from '@/lib/autoxpose-nudge';
+
+const AUTOXPOSE_REPO = 'https://github.com/mostafa-wahied/autoxpose';
+const SHOW_DELAY_MS = 2500;
+const AUTO_DISMISS_MS = 30000;
+
+export function AutoxposeNudge({
+ servers,
+ autoxposeConnected,
+ onOpenSettings
+}) {
+ const [visible, setVisible] = useState(false);
+ const [service, setService] = useState(null);
+ const [dismissed, setDismissed] = useState(false);
+
+ const handleDismiss = useCallback(() => {
+ setDismissed(true);
+ markNudgeDismissed();
+ setTimeout(() => setVisible(false), 200);
+ }, []);
+
+ const handleConnect = useCallback(() => {
+ handleDismiss();
+ onOpenSettings?.();
+ }, [handleDismiss, onOpenSettings]);
+
+ useEffect(() => {
+ if (autoxposeConnected || dismissed) return;
+ if (!shouldShowNudge()) return;
+
+ const eligible = findEligibleService(servers);
+ if (!eligible) return;
+
+ const showTimer = setTimeout(() => {
+ setService(eligible);
+ setVisible(true);
+ }, SHOW_DELAY_MS);
+
+ return () => clearTimeout(showTimer);
+ }, [servers, autoxposeConnected, dismissed]);
+
+ useEffect(() => {
+ if (!visible) return;
+
+ const dismissTimer = setTimeout(handleDismiss, AUTO_DISMISS_MS);
+ return () => clearTimeout(dismissTimer);
+ }, [visible, handleDismiss]);
+
+ if (!visible || !service) return null;
+
+ return (
+ <div
+ className={`fixed bottom-6 right-6 z-50 max-w-sm rounded-lg shadow-lg border backdrop-blur-sm
+ bg-white/95 dark:bg-slate-800/95 border-slate-200 dark:border-slate-700
+ animate-in fade-in-0 slide-in-from-bottom-4 duration-300
+ ${dismissed ? 'animate-out fade-out-0 slide-out-to-bottom-4' : ''}`}
+ >
+ <div className="p-4">
+ <div className="flex items-start gap-3">
+ <div className="flex-shrink-0 p-2 rounded-full bg-indigo-100 dark:bg-indigo-900/50">
+ <Globe className="h-5 w-5 text-indigo-600 dark:text-indigo-400" />
+ </div>
+ <div className="flex-1 min-w-0">
+ <p className="text-sm font-medium text-slate-900 dark:text-slate-100">
+ Running {service.displayName}?
+ </p>
+ <p className="mt-1 text-sm text-slate-600 dark:text-slate-400">
+ See if it&apos;s publicly exposed with{' '}
+ <a
+ href={AUTOXPOSE_REPO}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="font-medium text-indigo-600 dark:text-indigo-400 hover:underline"
+ >
+ autoxpose
+ </a>
+ </p>
+ <div className="mt-3 flex items-center gap-2">
+ <Button
+ size="sm"
+ variant="default"
+ onClick={handleConnect}
+ className="h-7 px-3 text-xs"
+ >
+ Connect
+ </Button>
+ <Button
+ size="sm"
+ variant="ghost"
+ onClick={handleDismiss}
+ className="h-7 px-2 text-xs text-slate-500"
+ >
+ Maybe later
+ </Button>
+ </div>
+ </div>
+ <button
+ onClick={handleDismiss}
+ className="flex-shrink-0 p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-700 transition-colors"
+ >
+ <X className="h-4 w-4 text-slate-400" />
+ </button>
+ </div>
+ </div>
+ </div>
+ );
+}
+
+export default AutoxposeNudge;
diff --git a/frontend/src/components/autoxpose/index.js b/frontend/src/components/autoxpose/index.js
index 7957f24..46bde14 100644
--- a/frontend/src/components/autoxpose/index.js
+++ b/frontend/src/components/autoxpose/index.js
@@ -2,3 +2,4 @@ export { GlobeIconBadge } from "./GlobeIconBadge";
export { ExternalUrlChip } from "./ExternalUrlChip";
export { SslIcon, getSslTooltip } from "./SslIcon";
export { AutoxposeLogo } from "./AutoxposeLogo";
+export { AutoxposeNudge } from "./AutoxposeNudge";
diff --git a/frontend/src/components/server/AggregatedHealthDot.jsx b/frontend/src/components/server/AggregatedHealthDot.jsx
index 20e555d..62a293a 100644
--- a/frontend/src/components/server/AggregatedHealthDot.jsx
+++ b/frontend/src/components/server/AggregatedHealthDot.jsx
@@ -72,13 +72,14 @@ export function AggregatedHealthDot({
return {
portKey: `${port.host_ip}:${port.host_port}`,
color: data.color || "gray",
- hasWebUI: data.hasWebUI !== false
+ hasWebUI: data.hasWebUI !== false,
+ isInternal: port.internal || false
};
}
- return { portKey: `${port.host_ip}:${port.host_port}`, color: "red", hasWebUI: true };
+ return { portKey: `${port.host_ip}:${port.host_port}`, color: "red", hasWebUI: true, isInternal: port.internal || false };
} catch {
if (signal.aborted) return null;
- return { portKey: `${port.host_ip}:${port.host_port}`, color: "red", hasWebUI: true };
+ return { portKey: `${port.host_ip}:${port.host_port}`, color: "red", hasWebUI: true, isInternal: port.internal || false };
}
};
@@ -89,7 +90,7 @@ export function AggregatedHealthDot({
const statuses = {};
results.forEach((result) => {
if (result) {
- statuses[result.portKey] = { color: result.color, hasWebUI: result.hasWebUI };
+ statuses[result.portKey] = { color: result.color, hasWebUI: result.hasWebUI, isInternal: result.isInternal };
}
});
setPortStatuses(statuses);
@@ -113,14 +114,15 @@ export function AggregatedHealthDot({
}
const statuses = Object.values(portStatuses);
- const colors = statuses.map(s => s.color);
- const hasRed = colors.includes("red");
- const hasYellow = colors.includes("yellow");
- const allGreen = colors.every((c) => c === "green");
+ const externalStatuses = statuses.filter(s => !s.isInternal);
+ const externalColors = externalStatuses.map(s => s.color);
+ const hasRed = externalColors.includes("red");
+ const hasYellow = externalColors.includes("yellow");
+ const allGreen = externalColors.length > 0 && externalColors.every((c) => c === "green");
const hasNoWebUI = statuses.some(s => !s.hasWebUI);
if (hasRed) {
- const redCount = colors.filter((c) => c === "red").length;
+ const redCount = externalColors.filter((c) => c === "red").length;
return {
color: "bg-red-500",
title: `${redCount} port${redCount !== 1 ? "s" : ""} unreachable`,
@@ -129,7 +131,7 @@ export function AggregatedHealthDot({
}
if (hasYellow) {
- const yellowCount = colors.filter((c) => c === "yellow").length;
+ const yellowCount = externalColors.filter((c) => c === "yellow").length;
return {
color: "bg-yellow-500",
title: `${yellowCount} port${yellowCount !== 1 ? "s" : ""} with issues`,
@@ -140,11 +142,19 @@ export function AggregatedHealthDot({
if (allGreen) {
return {
color: "bg-green-500",
- title: `All ${colors.length} port${colors.length !== 1 ? "s" : ""} healthy`,
+ title: `All ${externalColors.length} port${externalColors.length !== 1 ? "s" : ""} healthy`,
hasNoWebUI,
};
}
+ if (externalColors.length === 0 && statuses.length > 0) {
+ return {
+ color: "bg-gray-400",
+ title: "Internal ports only",
+ hasNoWebUI: false,
+ };
+ }
+
return {
color: "bg-gray-400",
title: "Status unknown",
diff --git a/frontend/src/components/server/ServerSection.jsx b/frontend/src/components/server/ServerSection.jsx
index 77fe212..b559e50 100644
--- a/frontend/src/components/server/ServerSection.jsx
+++ b/frontend/src/components/server/ServerSection.jsx
@@ -315,6 +315,9 @@ function ServerSectionComponent({
const portsToDisplay =
isExpanded || portLayout === "grid" ? sortedPorts : sortedPorts.slice(0, 8);
+ const servicesToDisplay =
+ isExpanded || portLayout === "grid" ? groupedServices : groupedServices.slice(0, 8);
+
const hasSystemInfo = systemInfo && Object.keys(systemInfo).length > 0;
const hasVMs = vms && vms.length > 0;
const isTrueNAS = platformName?.toLowerCase().includes("truenas");
@@ -813,7 +816,7 @@ function ServerSectionComponent({
</Tooltip>
</TooltipProvider>
- {sortedPorts.length > 8 && portLayout !== "grid" && (
+ {((groupingMode === "services" ? groupedServices.length : sortedPorts.length) > 8) && portLayout !== "grid" && (
<button
onClick={onToggleExpanded}
className="inline-flex items-center px-2 sm:px-3 py-2 border border-slate-300 dark:border-slate-700 rounded-lg text-sm font-medium text-slate-700 dark:text-slate-300 bg-white dark:bg-slate-800 hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors"
@@ -826,7 +829,7 @@ function ServerSectionComponent({
<span className="hidden sm:inline">
{isExpanded
? "Show Less"
- : `Show All (${sortedPorts.length})`}
+ : `Show All (${groupingMode === "services" ? groupedServices.length : sortedPorts.length})`}
</span>
<span className="sm:hidden">
{isExpanded ? "Less" : "All"}
@@ -841,7 +844,7 @@ function ServerSectionComponent({
<div className={selectionMode ? "pb-20" : ""}>
{groupingMode === "services" && portLayout === "list" && (
<div className="space-y-3 p-4">
- {groupedServices.map((service) => (
+ {servicesToDisplay.map((service) => (
<ServiceCard
key={service.key}
serviceName={service.name}
@@ -873,7 +876,7 @@ function ServerSectionComponent({
)}
{groupingMode === "services" && portLayout === "grid" && (
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 p-4">
- {groupedServices.map((service) => (
+ {servicesToDisplay.map((service) => (
<ServiceCard
key={service.key}
serviceName={service.name}
@@ -949,7 +952,7 @@ function ServerSectionComponent({
</tr>
</thead>
<tbody className="divide-y divide-slate-100 dark:divide-slate-800 bg-white dark:bg-slate-900">
- {groupedServices.map((service) => (
+ {servicesToDisplay.map((service) => (
<ServiceCard
key={service.key}
serviceName={service.name}
@@ -1184,6 +1187,17 @@ function ServerSectionComponent({
)}
</>
)}
+
+ {!isExpanded && groupedServices.length > 8 && portLayout !== "grid" && groupingMode === "services" && (
+ <div className="p-4 text-center border-t border-slate-100 dark:border-slate-800">
+ <button
+ onClick={onToggleExpanded}
+ className="text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300 text-sm font-medium"
+ >
+ + {groupedServices.length - 8} more services
+ </button>
+ </div>
+ )}
</div>
)}
diff --git a/frontend/src/components/settings/SettingsModal.jsx b/frontend/src/components/settings/SettingsModal.jsx
index cb4cc73..07226db 100644
--- a/frontend/src/components/settings/SettingsModal.jsx
+++ b/frontend/src/components/settings/SettingsModal.jsx
@@ -233,7 +233,15 @@ export function SettingsModal({
>
<div className="flex items-center gap-2">
<AutoxposeLogo size={16} className="text-slate-600 dark:text-slate-300" />
- <span>autoxpose</span>
+ <a
+ href="https://github.com/mostafa-wahied/autoxpose"
+ target="_blank"
+ rel="noopener noreferrer"
+ onClick={(e) => e.stopPropagation()}
+ className="hover:underline hover:text-indigo-600 dark:hover:text-indigo-400"
+ >
+ autoxpose
+ </a>
{autoxposeStatus?.connected && (
<span className="flex items-center gap-1 text-xs text-emerald-600 dark:text-emerald-400">
<CheckCircle className="h-3 w-3" />
diff --git a/frontend/src/components/ui/WhatsNewModal.jsx b/frontend/src/components/ui/WhatsNewModal.jsx
index 7df7ca4..c3a88ed 100644
--- a/frontend/src/components/ui/WhatsNewModal.jsx
+++ b/frontend/src/components/ui/WhatsNewModal.jsx
@@ -5,7 +5,33 @@ import { Globe, Database, Sparkles, Shield, Layout, Server, HardDrive, Wrench, P
import { getFeatureIcon } from '../../lib/feature-icons';
import { cn } from '@/lib/utils';
-const HighlightsSection = ({ highlights }) => {
+const AUTOXPOSE_REPO = 'https://github.com/mostafa-wahied/autoxpose';
+
+const linkifyAutoxpose = (text) => {
+ if (!text.toLowerCase().includes('autoxpose')) return text;
+
+ const parts = text.split(/(autoxpose)/i);
+ return parts.map((part, i) =>
+ part.toLowerCase() === 'autoxpose' ? (
+ <a
+ key={i}
+ href={AUTOXPOSE_REPO}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="underline hover:text-indigo-600 dark:hover:text-indigo-400"
+ >
+ autoxpose
+ </a>
+ ) : part
+ );
+};
+
+const hasAutoxpose = (item) => {
+ return item.title?.toLowerCase().includes('autoxpose') ||
+ item.description?.toLowerCase().includes('autoxpose');
+};
+
+const HighlightsSection = ({ highlights, onOpenSettings, onClose }) => {
if (!highlights?.length) return null;
return (
@@ -19,9 +45,20 @@ const HighlightsSection = ({ highlights }) => {
<li key={index} className="flex items-start gap-2">
<span className="text-indigo-600 dark:text-indigo-400 mt-0.5">•</span>
<div>
- <span className="font-semibold text-slate-900 dark:text-slate-100">{item.title}</span>
+ <span className="font-semibold text-slate-900 dark:text-slate-100">{linkifyAutoxpose(item.title)}</span>
{item.description && (
- <span className="text-slate-600 dark:text-slate-400"> — {item.description}</span>
+ <span className="text-slate-600 dark:text-slate-400"> - {linkifyAutoxpose(item.description)}</span>
+ )}
+ {hasAutoxpose(item) && (
+ <button
+ onClick={() => {
+ onClose?.();
+ onOpenSettings?.();
+ }}
+ className="ml-2 inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-full bg-indigo-100 dark:bg-indigo-900/50 text-indigo-700 dark:text-indigo-300 hover:bg-indigo-200 dark:hover:bg-indigo-800/50 transition-colors cursor-pointer border-none"
+ >
+ Set up →
+ </button>
)}
</div>
</li>
@@ -105,7 +142,7 @@ const VersionBadge = ({ version }) => (
</div>
);
-const VersionSection = ({ versionData, index }) => (
+const VersionSection = ({ versionData, index, onOpenSettings, onClose }) => (
<div
className={cn(
"space-y-4 p-4 rounded-lg border bg-gradient-to-br transition-all duration-500",
@@ -122,7 +159,7 @@ const VersionSection = ({ versionData, index }) => (
</h2>
</div>
- <HighlightsSection highlights={versionData.changes.highlights} />
+ <HighlightsSection highlights={versionData.changes.highlights} onOpenSettings={onOpenSettings} onClose={onClose} />
<div className="space-y-4">
{versionData.changes.security?.length > 0 && (
@@ -200,9 +237,9 @@ const VersionSection = ({ versionData, index }) => (
</div>
);
-const FlatChangesDisplay = ({ changes }) => (
+const FlatChangesDisplay = ({ changes, onOpenSettings, onClose }) => (
<>
- <HighlightsSection highlights={changes.highlights} />
+ <HighlightsSection highlights={changes.highlights} onOpenSettings={onOpenSettings} onClose={onClose} />
{changes.security?.length > 0 && (
<CategorySection
@@ -278,7 +315,7 @@ const FlatChangesDisplay = ({ changes }) => (
</>
);
-export function WhatsNewModal({ isOpen, onClose, onDismiss, version, changes, groupedChanges }) {
+export function WhatsNewModal({ isOpen, onClose, onDismiss, version, changes, groupedChanges, onOpenSettings }) {
const hasGroupedData = groupedChanges?.length > 0;
return (
@@ -304,10 +341,10 @@ export function WhatsNewModal({ isOpen, onClose, onDismiss, version, changes, gr
<div className="space-y-6">
{hasGroupedData ? (
groupedChanges.map((versionData, index) => (
- <VersionSection key={versionData.version} versionData={versionData} index={index} />
+ <VersionSection key={versionData.version} versionData={versionData} index={index} onOpenSettings={onOpenSettings} onClose={onClose} />
))
) : (
- <FlatChangesDisplay changes={changes} />
+ <FlatChangesDisplay changes={changes} onOpenSettings={onOpenSettings} onClose={onClose} />
)}
</div>
</div>
diff --git a/frontend/src/lib/autoxpose-nudge.js b/frontend/src/lib/autoxpose-nudge.js
new file mode 100644
index 0000000..155261e
--- /dev/null
+++ b/frontend/src/lib/autoxpose-nudge.js
@@ -0,0 +1,102 @@
+const STORAGE_KEY = 'portracker_nudge_state';
+
+const COMMONLY_EXPOSED_SERVICES = [
+ 'vaultwarden',
+ 'bitwarden',
+ 'nextcloud',
+ 'immich',
+ 'paperless',
+ 'home-assistant',
+ 'homeassistant',
+ 'frigate',
+ 'plex',
+ 'jellyfin',
+ 'emby',
+ 'gitea',
+ 'gitlab',
+ 'code-server',
+ 'element',
+ 'syncthing',
+ 'photoprism',
+ 'mealie',
+ 'calibre-web'
+];
+
+const MAX_NUDGES = 3;
+const INTERVALS_MS = [0, 30 * 24 * 60 * 60 * 1000, 90 * 24 * 60 * 60 * 1000];
+
+function getNudgeState() {
+ try {
+ const stored = localStorage.getItem(STORAGE_KEY);
+ if (!stored) return { count: 0, lastShown: 0 };
+ return JSON.parse(stored);
+ } catch {
+ return { count: 0, lastShown: 0 };
+ }
+}
+
+function setNudgeState(state) {
+ try {
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(state));
+ } catch {
+ }
+}
+
+export function shouldShowNudge() {
+ const state = getNudgeState();
+ if (state.count >= MAX_NUDGES) return false;
+
+ const requiredInterval = INTERVALS_MS[state.count] || 0;
+ const elapsed = Date.now() - state.lastShown;
+ return elapsed >= requiredInterval;
+}
+
+export function markNudgeDismissed() {
+ const state = getNudgeState();
+ setNudgeState({
+ count: state.count + 1,
+ lastShown: Date.now()
+ });
+}
+
+function normalizeServiceName(name) {
+ return (name || '').toLowerCase().replace(/[_\s]/g, '-');
+}
+
+function matchesService(serviceName) {
+ for (const target of COMMONLY_EXPOSED_SERVICES) {
+ if (serviceName.includes(target)) {
+ return target;
+ }
+ }
+ return null;
+}
+
+export function findEligibleService(servers) {
+ if (!servers?.length) return null;
+
+ for (const server of servers) {
+ const ports = server.data || server.ports || [];
+ for (const port of ports) {
+ const rawName = port.customServiceName || port.originalServiceName || port.owner;
+ const serviceName = normalizeServiceName(rawName);
+ const matched = matchesService(serviceName);
+ if (matched) {
+ return {
+ name: rawName,
+ displayName: formatDisplayName(matched)
+ };
+ }
+ }
+ }
+ return null;
+}
+
+function formatDisplayName(name) {
+ if (!name) return '';
+ const normalized = name.replace(/[-_]/g, ' ');
+ return normalized
+ .split(' ')
+ .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
+ .join(' ');
+}
diff --git a/frontend/src/lib/whats-new.js b/frontend/src/lib/whats-new.js
index 4d78c26..6b9b969 100644
--- a/frontend/src/lib/whats-new.js
+++ b/frontend/src/lib/whats-new.js
@@ -70,7 +70,7 @@ export function parseChangelog(changelogContent) {
if (inHighlights && line.startsWith('- ')) {
const highlightText = line.replace(/^-\s*/, '');
- const parts = highlightText.split(/\s*[—–-]\s*/);
+ const parts = highlightText.split(/\s+[-–—]\s+/);
const title = parts[0]?.trim() || highlightText;
const description = parts[1]?.trim() || '';
features.highlights.push({ title, description });
@@ -226,6 +226,9 @@ export function combineVersionChanges(versions, versionKeys) {
for (const version of sortedVersions) {
const versionChanges = versions[version];
if (versionChanges) {
+ if (versionChanges.highlights?.length) {
+ combined.highlights.push(...versionChanges.highlights);
+ }
CATEGORY_KEYS.forEach(key => {
if (versionChanges[key]?.length) {
combined[key].push(...versionChanges[key]);
@@ -245,6 +248,9 @@ export function groupVersionChanges(versions, versionKeys) {
const changes = createFeatureBuckets();
if (versionChanges) {
+ if (versionChanges.highlights?.length) {
+ changes.highlights.push(...versionChanges.highlights);
+ }
CATEGORY_KEYS.forEach(key => {
if (versionChanges[key]?.length) {
changes[key].push(...versionChanges[key]);
@@ -256,7 +262,7 @@ export function groupVersionChanges(versions, versionKeys) {
version,
changes
};
- }).filter(item => CATEGORY_KEYS.some(key => item.changes[key]?.length > 0));
+ }).filter(item => item.changes.highlights?.length > 0 || CATEGORY_KEYS.some(key => item.changes[key]?.length > 0));
}
export function shouldShowWhatsNew(currentVersion) {