Skip to content

Fix #621: Linux client settings GUI#647

Open
amillionbouncyballs wants to merge 2 commits into
e-dream-ai:masterfrom
amillionbouncyballs:622-linux-client-settings-gui
Open

Fix #621: Linux client settings GUI#647
amillionbouncyballs wants to merge 2 commits into
e-dream-ai:masterfrom
amillionbouncyballs:622-linux-client-settings-gui

Conversation

@amillionbouncyballs
Copy link
Copy Markdown
Collaborator

⚠️ WARNING - DEFAULT CACHE LIMIT IS 10 GB ⚠️

After deleting your settings.json to test this PR, the default generated file sets a 10 GB limit, and anything above will trigger the eviction logic and will PERMANENTLY DELETE cached dream videos until the total is under that limit.. If you have a large cache, please be very careful.

PR Details

Implements a 3-step ImGui sign-in wizard for the Linux client, replacing the previous console prompt. Matches the look and flow of the Mac/Windows wizard (ported from FirstTimeSetupWin32.cpp).

Modified:

  • EDreamClient.cpp
    ESHasFirstTimeSetupCallback() added so the console login path can be skipped when the GUI wizard is registered.

  • client.h
    Linux pre-window auth block now skips the console prompt entirely when the GUI wizard is registered.

  • client_linux.h
    Registers the wizard callback before CElectricSheep::Startup() runs; suppresses event loop while wizard is visible.

  • RendererVulkan.cpp
    Calls FirstTimeSetupVulkan_DrawIfNeeded() inside the existing ImGui frame.

  • DisplayVulkan.cpp
    Feeds keyboard and mouse Wayland events into the wizard. Renamed mouse-moved callback (s_mouseCallback → s_onMouseMovedCallback).

  • PlatformUtils_Internal.h / PlatformUtils_Linux.cpp
    Renamed PlatformUtils_GetMouseCallback() to PlatformUtils_GetOnMouseMovedCallback().

  • CMakeLists.txt
    Added FirstTimeSetupVulkan.cpp to sources.

  settings.content.cache_size defaults to 10 GB (CacheManager.cpp).
  On first run with a large existing cache the eviction logic will
  PERMANENTLY DELETE cached dream videos until the total is under
  10 GB. If you have a large cache, set this key BEFORE running:
    ~/.config/infinidream/settings.json:
      "settings.content.cache_size": <desired GB as integer>
  This is pre-existing behaviour, not introduced by this commit, but
  newly relevant as Linux users may be running the client for the
  first time after a long beta period with accumulated content.

Linux: add GUI sign-in wizard (closes e-dream-ai#622)

Implements a 3-step ImGui sign-in wizard for the Linux client,
replacing the previous console prompt. Matches the look and flow of
the Mac/Windows wizard (ported from FirstTimeSetupWin32.cpp).

New files:
  client_generic/Client/FirstTimeSetupVulkan.h
  client_generic/Client/FirstTimeSetupVulkan.cpp

    3-step wizard: email entry → OTP verification → tips/completion.
    Light-sheet ImGui style matching Mac/Windows appearance.
    System font loading with fallbacks: NotoSans → DejaVu →
      Liberation → ImGui default.
    Keyboard input via xkb_state_key_get_utf8 for full UTF-8/
      international layout support.
    Clipboard paste via Ctrl+V and Shift+Insert, backed by wl-paste
      with xclip/xsel fallbacks.
    Async OTP send/verify with atomic completion flags.
    Playback paused while wizard is visible, restored on close.

Modified:
  EDreamClient.cpp        — ESHasFirstTimeSetupCallback() added so the
                            console login path can be skipped when the
                            GUI wizard is registered.
  client.h                — Linux pre-window auth block now skips the
                            console prompt entirely when the GUI wizard
                            is registered.
  client_linux.h          — Registers the wizard callback before
                            CElectricSheep::Startup() runs; suppresses
                            event loop while wizard is visible.
  RendererVulkan.cpp      — Calls FirstTimeSetupVulkan_DrawIfNeeded()
                            inside the existing ImGui frame.
  DisplayVulkan.cpp       — Feeds keyboard and mouse Wayland events
                            into the wizard. Renamed mouse-moved
                            callback (s_mouseCallback →
                            s_onMouseMovedCallback) for clarity.
  PlatformUtils_Internal.h / PlatformUtils_Linux.cpp
                          — Renamed PlatformUtils_GetMouseCallback()
                            to PlatformUtils_GetOnMouseMovedCallback().
  CMakeLists.txt          — Added FirstTimeSetupVulkan.cpp to sources.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ng, ops runbook

Three changes born from a debugging session where the client appeared to be
stuck downloading nothing despite healthy quota and disk space. Root cause was
the account being assigned a 4-dream developer test playlist server-side; the
downloader was correctly idle because everything in that playlist was already
cached. None of this was visible without reading logs carefully.

1. Linux settings dialog (SettingsDialogVulkan)
   Full ImGui-based settings dialog for Linux, mirroring the Windows/macOS
   equivalents. Tabs: Account, Controls, Disk, Display, Advanced.

2. Playlist status in Disk tab
   The Disk tab now shows a "Playlist" row with the current playlist name,
   cached/total dream count (e.g. "4 / 164 downloaded"), and the live
   downloader status string. A misconfigured account — stuck on a test
   playlist with everything already cached — is now immediately visible
   when opening Settings, without needing to grep log files.

3. Downloader warning when all playlist dreams are cached
   DreamDownloader::FindDreamsThread now logs a one-shot warning when
   getNextUncachedDream() returns null while quota is still healthy:
     "All N dreams in playlist \"...\" are already cached — nothing to
      download. If unexpected, check your server-side playlist assignment
      (remaining quota: X.XX GB)."
   Also sets the download status string to "All playlist dreams cached"
   so it surfaces in the settings dialog immediately.

4. FORCE_PLAYLIST_CHANGE_RUNBOOK.md
   Documents the full procedure for switching a user's active playlist.
   There is no REST endpoint for this — it requires a Socket.IO event on
   the /remote-control namespace (not the default / namespace, which
   silently accepts connections but ignores all events). Includes the
   Python script, how to find production playlist UUIDs, confirmation
   steps, and the key facts that make this non-obvious.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant