Commit Graph

2 Commits

Author SHA1 Message Date
davidmonterocrespo24 2146b09c29 feat(desktop): hide header strip, splash screen, native locale switcher
Three QoL fixes for the Tauri shell:

  1. Hide the entire AppHeader strip in VITE_DESKTOP, not just the
     marketing nav. The previous gate left the black bar painting
     over the editor with the brand + auto-save + share + auth
     slot, all of which are irrelevant in desktop (cloud Pro
     features, license is handled by DesktopWelcomePage, the title
     bar already says "Velxio Desktop"). Return null at the top so
     the editor takes the full window height.

  2. Splash screen during sidecar boot + Monaco hydration. Cold
     launch was a 3-8 s black window — now there's an inline SVG
     logo, "Velxio" wordmark, slogan, animated spinner, and a
     "Starting local backend…" caption. Lives in index.html as a
     fixed-position overlay with display:none by default; the inline
     script reveals it only when `window.__TAURI__` is present, so
     web users never see it. main.tsx fades it out (250 ms ease-out)
     after two animation frames — guarantees React's first paint has
     committed before the handoff, no black flash. Self-contained:
     inline styles, inline SVG, inline CSS keyframes, zero external
     requests.

  3. Native locale switcher under View → Language. Emits
     `velxio://menu` with action='set-locale' + the locale code; the
     desktop/menu.ts handler navigates via history.pushState +
     popstate so React Router picks it up without a hard reload
     (Monaco + simulator state preserved). Locale list mirrors
     i18n/config.ts::LOCALES.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 19:39:22 -03:00
davidmonterocrespo24 30d0da430b feat(desktop): native menubar bridge + best-effort file logger
Two new modules under the existing desktop/ subtree, both no-op
outside a Tauri runtime (tauriBridge.listen / .invoke fail gracefully).

  desktop/menu.ts — listens for the `velxio://menu` event the Rust
    shell emits from the native menubar (Velxio Desktop / File / Edit
    / View / Help, full menu defined in
    pro/desktop/src-tauri/src/menu.rs). Internal actions handled
    directly here: Save .vlx and Open .vlx via utils/vlxFile, Toggle
    Serial Monitor via useSimulatorStore, Check for Updates via the
    tauri-plugin-updater global. The rest (new-project, Find,
    Toggle File Explorer) re-emit as window CustomEvent so the owners
    of that UI state can subscribe without pulling this module in.

  desktop/log.ts — `dlog(message, extra?)` round-trips a line to a
    Rust `write_debug_log` command that appends to
    `<app_data_dir>/desktop-debug.log`. Packaged Tauri apps have no
    devtools or stdout capture, so this is the only way to see what
    the webview did when a user reports a bug. Falls back to plain
    console.log when the command isn't registered (older shell).

mountDesktop() now installs the menu listener and dlog's its own
start — useful as a "did the desktop module even load" smoke marker.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 18:08:46 -03:00