Tab Restoration
Recover accidentally closed tabs with built-in undo functionality.Restore Last Closed Tab
The restore command uses ⌘Z, leveraging the system’s undo mechanism for intuitive recovery.
Restore Implementation
Tab restoration is powered by SwiftData’s undo manager:Alternative Restore Method
You can also use the dedicated keyboard shortcut:Keyboard Shortcuts
Restore Last Tab
⌘Z - Undo tab closure
Reopen Closed Tab
⌘⇧T - Alternative restore method
Close Tab
⌘W - Close current tab
Close Window
Closes the window if the Settings window is active
Window Management
Manage multiple windows and their sessions.Close Behavior
The close window command intelligently handles different window types, with special handling for the Settings window.
Creating New Windows
- Normal Window
- Private Window
Tab Lifecycle
Tab Closing
- Tab is marked for deletion in the model context
- Undo manager records the deletion operation
- UI updates to remove the tab
- State is preserved for potential restoration
Tab Activation
When switching tabs, the session state is preserved:Session Persistence
Ora Browser automatically saves your session state:What’s Saved
- Open tabs and their URLs
- Tab order and organization
- Active tab selection
- Window positions and sizes
- Container assignments for tabs
- Pinned tab states
What’s Not Saved (Private Mode)
- Browsing history in private windows
- Cookies and cache from private sessions
- Form data entered in private tabs
- Download history from private browsing
Lazy Tab Loading
Tabs are loaded on-demand to improve startup performance:Benefits
Faster Startup
Only the active tab loads immediately
Lower Memory
Inactive tabs don’t consume memory
Quick Switch
Tabs load instantly when activated
Better Performance
System resources used efficiently
Picture-in-Picture Session
Picture-in-Picture automatically manages media sessions when switching tabs:When auto-PiP is enabled, switching away from a tab with playing video automatically opens Picture-in-Picture mode.
Container Sessions
Tabs are organized into containers with independent sessions:Container Benefits
Container Activation
Best Practices
Preventing Data Loss
Use Tab Pinning
Use Tab Pinning
Pin important tabs to prevent accidental closure:
- Press ⌘D to pin/unpin a tab
- Pinned tabs are preserved across sessions
- They appear first in the tab bar
Regular Saves
Regular Saves
Ora Browser automatically saves session state:
- After each tab operation
- When switching windows
- Periodically in the background
- When quitting the application
Container Organization
Container Organization
Organize tabs into containers for better session management:
- Create containers for different projects
- Use container-specific settings
- Restore entire container contexts
Recovery Strategies
- Immediate Recovery
- Session Recovery
- History Search
For just-closed tabs:
- Press ⌘Z immediately
- Or use ⌘⇧T to reopen
- Multiple undos are supported
Command Menu Integration
Session management is integrated into the command menu:Available Commands
| Command | Shortcut | Description |
|---|---|---|
| New Tab | ⌘T | Opens launcher for new tab |
| Close Tab | ⌘W | Closes current tab |
| Restore Tab | ⌘Z | Undoes last tab closure |
| Reopen Closed | ⌘⇧T | Alternative restore |
| New Window | ⌘N | Opens new window |
| New Private | ⌘⇧N | Opens private window |
Advanced Session Features
Undo Manager
The session system uses SwiftData’s built-in undo manager:- Multiple undo levels for tab closures
- Automatic state tracking without manual implementation
- Efficient memory usage with system-managed undo stack
- Integration with macOS standard undo behavior
Tab State Persistence
Each tab maintains its state even when inactive:- URL and title are always available
- Scroll position preserved
- Form data retained (except in private mode)
- JavaScript state maintained
- Media playback position saved
Performance Optimizations
Lazy Loading
Tabs load only when needed, not at startup
Memory Management
Inactive tabs release memory automatically
Smart Restoration
Frequently used tabs load first
Background Sync
Session state syncs without blocking UI
Troubleshooting
Tab Won’t Restore
- Ensure you’re pressing ⌘Z shortly after closing
- Check if the undo stack has been cleared
- Verify the tab wasn’t from a private window
- Try using ⌘⇧T as an alternative
Session Not Restored After Restart
- Check if you force-quit during a save operation
- Verify that the app has write permissions
- Look for tabs in History (⌘Y)
- Ensure you’re not in private browsing mode
Multiple Tabs Restore Incorrectly
- Tabs restore in reverse order of closure
- Press ⌘Z multiple times for multiple tabs
- Check container assignments for organization
- Verify that tab data wasn’t corrupted
