Skip to content

Commit 2c37267

Browse files
committed
docs(snapshot/README): Add Capabilities and Limitations table
why: Clarify module boundaries and set appropriate user expectations what: - Added a clear tabular format separating what the module can and cannot do - Highlighted key capabilities with checkmarks - Identified important limitations with X marks
1 parent 7e03add commit 2c37267

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/libtmux/snapshot/README.md

+35
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,41 @@ ServerSnapshot
7676
└── Pane 1 (with optional content)
7777
```
7878

79+
## Capabilities and Limitations
80+
81+
Now that you understand the basics, it's important to know what snapshots can and cannot do:
82+
83+
### State and Structure
84+
85+
| Capabilities | Limitations |
86+
|------------|----------------|
87+
|**Structure Preserver**: Captures hierarchical tmux objects (servers, sessions, windows, panes) |**Memory Snapshot**: Doesn't capture system memory state or processes beyond tmux |
88+
|**Immutable Reference**: Creates read-only records that won't change as live tmux changes |**Time Machine**: Can't revert the actual tmux server to previous states |
89+
|**Relationship Keeper**: Maintains parent-child relationships between tmux objects |**System Restorer**: Can't restore the full system to a previous point in time |
90+
91+
### Content and Data
92+
93+
| Capabilities | Limitations |
94+
|------------|----------------|
95+
|**Content Capturer**: Preserves visible pane text content when requested |**App State Preserver**: Can't capture internal application state (e.g., vim buffers/cursor) |
96+
|**Serialization Mechanism**: Converts tmux state to dictionaries for storage |**Complete Backup**: Doesn't capture scrollback buffers or hidden app state |
97+
|**Configuration Recorder**: Documents session layouts for reference |**Process Manager**: Doesn't track processes beyond their visible output |
98+
99+
### Functionality
100+
101+
| Capabilities | Limitations |
102+
|------------|----------------|
103+
|**Filtering Tool**: Provides ways to search objects based on custom criteria |**Server Modifier**: Doesn't change the live tmux server in any way |
104+
|**Testing Aid**: Enables tmux automation tests with before/after comparisons |**State Restorer**: Doesn't automatically recreate previous environments |
105+
106+
### Important Limitations to Note
107+
108+
1. **Not a Complete Environment Restorer**: While you can use snapshots to guide restoration, the module doesn't provide automatic recreation of previous tmux environments. You'd need to implement custom logic to recreate sessions and windows from snapshot data.
109+
110+
2. **No Internal Application State**: Snapshots capture only what's visible in panes, not the internal state of running applications. For example, a snapshot of a pane running vim won't preserve unsaved buffers or the undo history.
111+
112+
3. **Read-Only by Design**: Snapshots intentionally can't modify the live tmux server. This ensures safety but means you must use the regular libtmux API for any modifications.
113+
79114
## Basic Usage
80115

81116
Creating snapshots is straightforward using the factory functions:

0 commit comments

Comments
 (0)