feat(dashboard,cli): update-check frequency, GitHub star button, more resizable modals

Update-check frequency (end-to-end)
- Add `updateCheckFrequency: "manual" | "on-startup" | "daily" | "weekly"`
  to GlobalSettings (default: "daily").
- Backend `performUpdateCheck` honors the frequency: TTL = day/week,
  `manual` returns cache or empty without hitting npm, `on-startup`
  refreshes once per process lifetime then serves cache. `/refresh`
  route forces network regardless.
- Settings → Updates surfaces a working `<select>` for the cadence,
  disabled when auto-checks are off entirely.
- Tests: 4 new cases covering ttlForFrequency mapping, weekly window,
  manual semantics, on-startup once-per-process behavior.

TUI update notice
- Read cached update result synchronously on TUI startup. When an
  update is available, render a yellow notice line on the splash and
  a colored ● next to the version in the status bar.

Settings modal header polish
- Add "Star on GitHub" pill (icon + Star + cached star count from the
  GitHub API, 1h localStorage TTL) and "Help" button (opens project
  Discussions). Both link to the Runfusion/Fusion repo.
- Star button auto-hides after the user clicks it (intent = star),
  tracked in localStorage `fusion:github-star-clicked`.
- Settings → General gets a "Show Star on GitHub button" checkbox so
  users can hide it preemptively. New global setting
  `showGitHubStarButton: boolean` (default true) gates rendering.

More resizable modals
- Task Detail modal: 85vh default, resize: both, persisted via
  useModalResizePersist (key `fusion:task-detail-modal-size`).
- Quick Chat FAB: full 8-direction resize (4 corners + 4 edges) via
  pointer-event handlers; persisted to
  `fusion:quick-chat-size-<projectId>`. Each handle has the right
  cursor + role="separator" for accessibility.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-27 17:55:15 -07:00
parent dba2299137
commit 1fe59be960
16 changed files with 752 additions and 98 deletions

View File

@@ -30,6 +30,8 @@ export const DEFAULT_GLOBAL_SETTINGS = {
favoriteModels: undefined,
openrouterModelSync: true,
updateCheckEnabled: true,
updateCheckFrequency: "daily",
showGitHubStarButton: true,
modelOnboardingComplete: undefined,
useClaudeCli: undefined,
// Global baseline lanes for per-role model selection

View File

@@ -1089,9 +1089,24 @@ export interface GlobalSettings {
* the OpenRouter API at startup so the model picker shows all available
* OpenRouter models (not just the static built-in list). Default: true. */
openrouterModelSync?: boolean;
/** When true (default), checks npm daily for new versions of @runfusion/fusion
* and shows update notices in the CLI and dashboard. */
/** When true (default), checks npm for new versions of @runfusion/fusion and
* shows update notices in the CLI and dashboard. The actual cadence is
* governed by `updateCheckFrequency`. Disabled = no automatic checks at all. */
updateCheckEnabled?: boolean;
/** When false, hides the "Star on GitHub" button in the Settings modal
* header. Defaults to true (visible). The button is also hidden once the
* user has clicked it (tracked client-side in localStorage). */
showGitHubStarButton?: boolean;
/** Cadence for automatic update checks. The dashboard's `/update-check`
* route uses this to decide whether to consult npm or return a cached
* result.
* - `manual`: never auto-check; only when the user clicks "Check now"
* - `on-startup`: refresh once when the server starts, then cache
* indefinitely until next startup
* - `daily` (default): 24h cache TTL
* - `weekly`: 7-day cache TTL
*/
updateCheckFrequency?: "manual" | "on-startup" | "daily" | "weekly";
/** When true, indicates the user has completed the AI model onboarding flow
* (connected at least one provider and selected a default model). When
* false/undefined, the dashboard will auto-open the onboarding modal.