Skip to content

Conversation

@ym
Copy link
Contributor

@ym ym commented Nov 7, 2025

The feature will be ported to dev later once this PR is merged

@adamshiervani adamshiervani requested a review from Copilot November 7, 2025 16:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a failsafe mode feature for the JetKVM application to handle critical process failures gracefully, particularly video capture crashes. When a failure is detected, the system enters failsafe mode, displays relevant UI notifications, restricts access to affected features, and provides crash log download functionality.

  • Adds server-side crash detection and failsafe mode activation logic
  • Implements UI overlays and banners to notify users of failsafe mode
  • Blocks video-related RPC methods when in failsafe mode
  • Provides crash log retrieval and GitHub issue reporting workflow

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
failsafe.go New file implementing core failsafe detection logic and crash log handling
main.go Adds failsafe mode check at application startup
webrtc.go Integrates failsafe mode notifications into session lifecycle events
video.go Adds failsafe notification to video state retrieval
native.go Passes failsafe state to native subsystem initialization
internal/native/native.go Adds disable flag to skip native initialization in failsafe mode
internal/native/cgo_linux.go Guards all CGO calls with failsafe disabled checks
jsonrpc.go Registers new RPC handler for retrieving failsafe logs
log.go Adds dedicated logger for failsafe subsystem
cmd/main.go Enhances crash dump creation with symlink management
ui/src/hooks/stores.ts Adds failsafe mode state management store
ui/src/hooks/useJsonRpc.ts Blocks video-related RPC methods in failsafe mode
ui/src/routes/devices.$id.tsx Integrates failsafe mode UI and conditionally renders video
ui/src/routes/devices.$id.settings.tsx Disables video/hardware settings navigation in failsafe mode
ui/src/routes/devices.$id.settings.general.reboot.tsx Adds loading state to reboot dialog
ui/src/components/FaileSafeModeOverlay.tsx New overlay component for failsafe mode with log download
ui/src/components/FailSafeModeBanner.tsx New banner component for settings page failsafe notification
ui/src/index.css Adds diagonal stripes CSS class for failsafe UI
Comments suppressed due to low confidence (1)

ui/src/components/FaileSafeModeOverlay.tsx:1

  • The filename 'FaileSafeModeOverlay.tsx' has an inconsistent spelling - 'Faile' should be 'Fail'. This creates a mismatch with the exported component name 'FailSafeModeOverlay' and the import path.
import { useState } from "react";

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


// unlink the last crash log file
failsafeCrashLog = string(content)
_ = os.Remove(lastCrashPath)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we delay trashing the crashlog until we've exited the failsafe mode through some action?

ym and others added 2 commits November 10, 2025 12:29
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ym ym requested a review from IDisposable November 10, 2025 12:00
@ym ym merged commit 5743a81 into release/049 Nov 10, 2025
5 checks passed
@ym ym deleted the feat/cgo-recovery-mode branch November 10, 2025 16:57
ym added a commit that referenced this pull request Nov 10, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
ym added a commit that referenced this pull request Nov 10, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
ym added a commit that referenced this pull request Nov 11, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
Co-authored-by: Marc Brooks <IDisposable@gmail.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.

4 participants