Skip to content

Add Sessions Restore and Crash Preventing Features#54

Merged
ovsky merged 8 commits intodevfrom
feature/restore-session
Dec 5, 2025
Merged

Add Sessions Restore and Crash Preventing Features#54
ovsky merged 8 commits intodevfrom
feature/restore-session

Conversation

@ovsky
Copy link
Owner

@ovsky ovsky commented Dec 5, 2025

This pull request introduces a comprehensive session restore feature to the browser, similar to another browsers behavior, allowing users to recover tabs after crashes or unexpected closures. The implementation includes continuous session saving, crash detection, smart filtering of internal pages, and a user-facing restore bar. Supporting settings and documentation are also added. The most important changes are grouped below.

Session Restore Feature Implementation

  • Added a user-facing session restore bar to the UI (assets/ui.html, assets/ui.css), which prompts users to restore tabs after a crash or restart, with dynamic messaging and interactive buttons. [1] [2] [3]
  • Documented the session restore feature, including its workflow, session file format, filtering logic, and testing recommendations (docs/Session-Restore.md).

Settings System Updates

  • Added two new settings to assets/settings_catalog.json: restore_session_on_startup (controls whether to show the restore bar) and save_session_continuously (enables crash recovery by continuous session saving), both defaulting to true.
  • The new settings are documented and integrated into the session restore logic and UI.

General Refactor Documentation

  • Updated refactor documentation to cover the new settings system, including the structure of assets/settings_catalog.json and the addition of session restore-related settings (docs/General-Codebase-Refactor.md).

ovsky added 8 commits December 5, 2025 14:33
Added .vscode directory and tasks.json to .gitignore to prevent committing local Visual Studio Code configuration files.
Introduces docs/General-Codebase-Refactor.md, detailing major refactoring changes including security fixes, privacy features, UI improvements, page caching, favicon system, build system updates, and a new settings system. Serves as a comprehensive reference for recent architectural and feature updates.
Adds JavaScript injection to simulate the Do Not Track header and block third-party cookie access when enabled in user settings. This enhances user privacy by overriding navigator.doNotTrack and restricting cookie access in cross-origin iframes.
Expanded comments in UI::ApplySettings to clarify how privacy settings (do_not_track, block_third_party_cookies, enable_web_security) are implemented or supported. Added accessor methods in UI.h for these settings to facilitate JavaScript injection in tabs.
Implements session management for restoring tabs after crashes or normal shutdown. Adds settings for continuous session saving and restoring previous sessions on startup, with UI prompts and logic to avoid overwriting sessions before user choice. Updates tab creation, navigation, and close events to trigger session saves, and provides functions for session file handling and tab restoration.
Introduces a session restore bar to the UI, including new HTML markup, CSS styles, and JavaScript functions for showing, hiding, and handling user actions. Updates .gitignore to exclude session data and .vscode directory.
Introduces two new settings: 'Restore previous session' to reopen tabs from the last session on startup, and 'Enable crash recovery' to continuously save session state for restoring tabs after crashes or unexpected closures.
Introduces a detailed markdown document describing the Chrome-like session restore functionality, including features, UI design, implementation details, session file format, internal page filtering, and testing checklist.
@ovsky ovsky merged commit ffd8110 into dev Dec 5, 2025
6 checks passed
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