Add Sessions Restore and Crash Preventing Features#54
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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]docs/Session-Restore.md).Settings System Updates
assets/settings_catalog.json:restore_session_on_startup(controls whether to show the restore bar) andsave_session_continuously(enables crash recovery by continuous session saving), both defaulting totrue.General Refactor Documentation
assets/settings_catalog.jsonand the addition of session restore-related settings (docs/General-Codebase-Refactor.md).