Skip to content

Add storage reset settings and streamer reliability updates#519

Merged
zortos293 merged 2 commits into
devfrom
zortos/add-storage-reset-settings
Jun 22, 2026
Merged

Add storage reset settings and streamer reliability updates#519
zortos293 merged 2 commits into
devfrom
zortos/add-storage-reset-settings

Conversation

@zortos293

@zortos293 zortos293 commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds settings and IPC wiring for resetting persistent storage.
  • Updates main-process, preload, and renderer flows to support the new reset path.
  • Refines native streamer, signaling, updater, and codec handling for more predictable behavior under reconnects and failures.
  • Refreshes localized copy, docs, and build automation to match the new behavior.

Testing

  • Added and updated unit coverage around updater, video acceleration, codec diagnostics, controller input, and GFN/shared behavior.
  • Performed targeted local validation of the updated settings and stream flow paths.
  • Not run (not requested)

Summary by CodeRabbit

  • New Features

    • Added QR code-based authentication login.
    • Added persistent storage management to view locations and reset storage.
    • Added customizable recording bitrate control.
    • Added native keyboard shortcut support for stream actions (stats toggle, pointer lock, fullscreen, recording, etc.).
    • Enhanced Linux hardware codec diagnostics with detailed guidance.
  • Documentation

    • Updated macOS downloads section directing users to the community-maintained OpenNOW-Mac repository.
  • Chores

    • Migrated build system from npm to Bun for dependency management.
    • Updated Electron dependency and added QR code library.

@capy-ai

capy-ai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR introduces end-to-end native keyboard shortcut support (Rust protocol v3 + Electron IPC), QR/device-code login via NVIDIA device authorization, GFN persistent cloud storage management (fetch/reset with paywall and statuspage fallback), a configurable recording bitrate setting, a shared controller gamepad bitmask utility with search overlays, Linux updater detection, a video acceleration command-line builder extracted from main.ts, and a comprehensive Settings UI overhaul with storage meter, grouped navigation, and codec diagnostics hints.

Changes

Native Streamer Shortcut System

Layer / File(s) Summary
Shared protocol contracts
opennow-stable/src/shared/gfn.ts, opennow-stable/src/shared/ipc.ts, opennow-stable/src/shared/nativeStreamer.ts, native/opennow-streamer/src/protocol.rs
Defines NativeStreamerShortcutAction/NativeStreamerShortcutBindings, device-login types, persistent-storage types, recordingBitrateMbps; bumps native protocol to v3; adds all new IPC channel constants.
Rust shortcut parser and keyboard handler
native/opennow-streamer/src/shortcuts.rs, native/opennow-streamer/src/gstreamer_platform.rs, native/opennow-streamer/src/gstreamer_input.rs, native/opennow-streamer/src/backend.rs, native/opennow-streamer/src/gstreamer_backend.rs, native/opennow-streamer/src/input.rs, native/opennow-streamer/src/main.rs, native/opennow-streamer/src/gstreamer_pipeline.rs
New shortcuts.rs parses/matches key bindings; gstreamer_platform.rs gains Windows shortcut detection, key suppression, render-target surface management, and set/clear shortcut binding APIs; gstreamer_backend.rs applies bindings on start/offer and clears on stop; "update-shortcuts" command is dispatched via main.rs.
Electron shortcut IPC and renderer dispatch
opennow-stable/src/main/nativeStreamer/manager.ts, opennow-stable/src/main/signaling/signalingCoordinator.ts, opennow-stable/src/preload/index.ts, opennow-stable/src/renderer/src/streamShortcutActions.ts, opennow-stable/src/renderer/src/App.tsx, opennow-stable/src/renderer/src/components/StreamView.tsx, opennow-stable/src/renderer/src/gfn/webrtcClient.ts, opennow-stable/src/shared/gfn.test.ts
NativeStreamerManager.updateShortcuts forwards bindings; signalingCoordinator handles NATIVE_UPDATE_SHORTCUTS; streamShortcutActions dispatches CustomEvent; App.tsx introduces handleStreamShortcutAction and handleStreamShortcutActionRef; StreamView routes screenshot/recording via listener; webrtcClient gains timed synthetic Escape suppression.

QR / Device-Code Login

Layer / File(s) Summary
AuthService device login logic
opennow-stable/src/main/gfn/auth.ts
Adds buildAuthHeadersForClient (standard/Steam Deck), requestDeviceAuthorization, exchangeDeviceCode, refreshAuthTokens with authClientId, and startDeviceLogin/pollDeviceLogin/completeDeviceLogin/cancelDeviceLogin in AuthService.
Device login IPC and preload
opennow-stable/src/main/ipc/accountCatalogHandlers.ts, opennow-stable/src/preload/index.ts
Registers AUTH_DEVICE_LOGIN_* IPC handlers; exposes all four device-login methods plus persistent-storage methods in the preload bridge.
QR login UI
opennow-stable/src/renderer/src/components/LoginScreen.tsx, opennow-stable/src/renderer/src/App.tsx, locales/en.json, opennow-stable/src/renderer/src/styles.css
LoginScreen generates a QR image from verificationUriComplete, renders the QR panel and cancel button; App.tsx manages activeLoginMode/qrLoginChallenge state and handleQrLogin polling loop.

GFN Persistent Storage Management

Layer / File(s) Summary
Fetch and reset implementation
opennow-stable/src/main/gfn/persistentStorage.ts
Exports fetchPersistentStorageLocations (paywall products → statuspage fallback with timeout/dedup) and resetPersistentStorage (multi-token, multi-region retry, auth-failure early exit).
Storage IPC handler
opennow-stable/src/main/ipc/accountCatalogHandlers.ts
Adds PERSISTENT_STORAGE_LOCATIONS_FETCH and PERSISTENT_STORAGE_RESET IPC handlers with session token candidates and dynamic-region resolution.
Persistent storage Settings section
opennow-stable/src/renderer/src/components/SettingsPage.tsx, locales/en.json, opennow-stable/src/renderer/src/styles.css
loadSubscriptionData conditionally fetches storage locations; derives meter/region/label values; handleResetPersistentStorage confirms and posts reset; full Account→Persistent Storage section rendered with meter, region select, and status messaging.

Video Acceleration Refactor and Recording Bitrate

Layer / File(s) Summary
buildVideoAccelerationCommandLine module
opennow-stable/src/main/videoAcceleration.ts, opennow-stable/src/main/videoAcceleration.test.ts, opennow-stable/src/main/index.ts
Extracts platform-specific Chromium feature/switch construction into a standalone builder; main.ts applies builder output via appendSwitch loop; tests cover Linux hardware and software decode paths.
Recording bitrate setting and StreamView wiring
opennow-stable/src/main/settings.ts, opennow-stable/src/renderer/src/App.tsx, opennow-stable/src/renderer/src/components/StreamView.tsx, opennow-stable/src/renderer/src/components/SettingsPage.tsx, locales/en.json
Adds recordingBitrateMbps: number | null with normalizeRecordingBitrateMbps clamping; threads value from settings through App.tsx into StreamView where MediaRecorder receives the explicit videoBitsPerSecond; SettingsPage renders Auto/Custom slider control.

Controller Gamepad, Linux Updater, and Settings UI Overhaul

Layer / File(s) Summary
Gamepad bitmask utility and controller search overlays
opennow-stable/src/renderer/src/utils/controllerGamepad.ts, opennow-stable/src/renderer/src/utils/controllerGamepad.test.ts, opennow-stable/src/renderer/src/components/HomePage.tsx, opennow-stable/src/renderer/src/components/LibraryPage.tsx, opennow-stable/src/renderer/src/styles.css
Introduces controllerButton bitmask and readControllerGamepadButtons; both HomePage and LibraryPage adopt the utility, reduce repeat interval to 140 ms, and add a controller-mode search overlay with focused input.
Linux updater support detection
opennow-stable/src/main/linuxUpdaterSupport.ts, opennow-stable/src/main/linuxUpdaterSupport.test.ts, opennow-stable/src/main/updater.ts
getLinuxUpdaterSupport classifies AppImage/deb/unsupported via dpkg/apt and /etc/os-release; createAppUpdaterController returns a disabled no-op controller on unsupported Linux; 5 test cases cover all branches.
SettingsPage navigation, codec hint, and CSS overhaul
opennow-stable/src/renderer/src/components/SettingsPage.tsx, opennow-stable/src/renderer/src/lib/codecDiagnostics.ts, opennow-stable/src/renderer/src/lib/codecDiagnostics.test.ts, opennow-stable/src/renderer/src/App.tsx, opennow-stable/src/renderer/src/styles.css, locales/en.json
Refactors SettingsPage to grouped nav model with onClose, inferAspectRatioFromResolution, iconified label rows, Linux hardware codec hint (shouldShowLinuxHardwareCodecHint), Advanced section restructure; App.tsx gains pageBeforeSettings navigation memory; CSS adds login QR panel, storage section meter, settings modal keyframes, and sidebar/nav restyling.

Build System

Layer / File(s) Summary
Bun CI and Electron install script
.github/workflows/auto-build.yml, opennow-stable/package.json, opennow-stable/scripts/ensure-electron-installed.mjs, README.md
Switches CI from npm ci to bun install --frozen-lockfile; adds postinstall/electron:install hooks running ensure-electron-installed.mjs, which validates or downloads/extracts the Electron runtime with platform-specific extraction; bumps Electron to ^42.3.3; adds qrcode dependency.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant LoginScreen
  participant AppTsx as App.tsx
  participant Preload
  participant AuthService
  participant NvidiaOAuth as NVIDIA OAuth API

  User->>LoginScreen: click "Sign in with QR"
  LoginScreen->>AppTsx: onQrLogin()
  AppTsx->>Preload: startDeviceLogin(provider)
  Preload->>AuthService: startDeviceLogin
  AuthService->>NvidiaOAuth: POST /device/authorize
  NvidiaOAuth-->>AuthService: device_code, verification_uri_complete
  AuthService-->>Preload: AuthDeviceLoginChallenge
  Preload-->>AppTsx: challenge
  AppTsx->>LoginScreen: qrLoginChallenge (verificationUriComplete)
  LoginScreen->>LoginScreen: QRCode.toDataURL(verificationUriComplete) → QR image
  loop poll until authorized/expired
    AppTsx->>Preload: pollDeviceLogin(attemptId)
    Preload->>AuthService: pollDeviceLogin
    AuthService->>NvidiaOAuth: POST /token (device_code)
    NvidiaOAuth-->>AuthService: pending / authorized
    AuthService-->>AppTsx: AuthDeviceLoginPollResult
  end
  AppTsx->>Preload: completeDeviceLogin(attemptId)
  Preload->>AuthService: completeDeviceLogin → persist session
  AuthService-->>AppTsx: AuthSession
Loading
sequenceDiagram
  participant NativeProc as NativeStreamer (Rust)
  participant Manager as NativeStreamerManager
  participant Coordinator as signalingCoordinator
  participant AppTsx as App.tsx
  participant StreamView

  AppTsx->>Coordinator: IPC NATIVE_UPDATE_SHORTCUTS (bindings)
  Coordinator->>Manager: updateShortcuts(bindings)
  Manager->>NativeProc: stdin {"type":"update-shortcuts", shortcuts}
  NativeProc->>NativeProc: set_native_shortcut_bindings
  Note over NativeProc: user presses shortcut key
  NativeProc->>Manager: stdout {"type":"shortcut", action}
  Manager->>AppTsx: IPC native-shortcut signaling event
  AppTsx->>AppTsx: handleStreamShortcutAction(action)
  AppTsx->>StreamView: dispatchStreamShortcutAction(action)
  StreamView->>StreamView: captureScreenshot / toggleRecording
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related issues

Poem

🐇 A rabbit hops through keys and bytes,
Shortcuts parsed through dark Rust nights,
QR codes glow on login's face,
Cloud storage mapped to every place,
Controller search with bitmask art—
Each feature flows from one small cart.
Bun installs it, Electron's dressed! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.84% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Add storage reset settings and streamer reliability updates' accurately describes the primary changes in the changeset: storage reset functionality, settings enhancements, and native streamer improvements are all substantive components of the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch zortos/add-storage-reset-settings
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch zortos/add-storage-reset-settings

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 839a06927d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread opennow-stable/package-lock.json Outdated
@@ -1,8575 +0,0 @@
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep the npm lockfile until release jobs stop using it

I checked .github/workflows/release.yml: the preflight job still runs npm ci in opennow-stable and the release build job does the same, while scripts/sync-release-version.mjs still reads package-lock.json. With this file deleted, npm ci --dry-run in this tree now exits EUSAGE because it “can only install with an existing package-lock.json or npm-shrinkwrap.json,” so tag/manual release builds are blocked until the release workflow and version sync script are migrated to bun/bun.lock or the npm lockfile is retained.

Useful? React with 👍 / 👎.

@zortos293 zortos293 changed the base branch from main to dev June 22, 2026 21:38
@zortos293 zortos293 merged commit d1b7e19 into dev Jun 22, 2026
10 of 11 checks passed
@zortos293 zortos293 deleted the zortos/add-storage-reset-settings branch June 22, 2026 21:38
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