feat(FN-2663): add cached update-check setting, APIs, and banner

- Add global updateCheckEnabled setting to core schema/types and wire dashboard command to cache update checks in the CLI
- Implement dashboard server update-check cache module plus REST routes for status and refresh behavior
- Add dashboard client hook, legacy API helpers, and UpdateAvailableBanner UI to show cached CLI update notices
- Cover update-check server routes, hook behavior, banner rendering, and route registration with focused tests
- Document update-check configuration and API behavior in architecture and settings reference docs
This commit is contained in:
Fusion
2026-04-27 01:40:07 -07:00
committed by gsxdsm
parent 90a28dfe23
commit e80850e7c9
18 changed files with 827 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import "./UpdateAvailableBanner.css";
import { X } from "lucide-react";
interface UpdateAvailableBannerProps {
latestVersion: string;
currentVersion: string;
onDismiss: () => void;
}
export function UpdateAvailableBanner({ latestVersion, currentVersion, onDismiss }: UpdateAvailableBannerProps) {
return (
<div className="update-available-banner" role="status" aria-live="polite">
<p className="update-available-banner__text">
Update available: v{latestVersion} (current: v{currentVersion}). Run <code>npm i -g @runfusion/fusion</code> to
update. {" "}
<a
className="update-available-banner__link"
href="https://github.com/Runfusion/Fusion/releases"
target="_blank"
rel="noreferrer"
>
Release notes
</a>
</p>
<button
type="button"
className="update-available-banner__dismiss touch-target"
aria-label="Dismiss update notice"
onClick={onDismiss}
>
<X size={16} aria-hidden="true" />
</button>
</div>
);
}