Repository navigation
Conversation
Reviewer's Guide by SourceryThis pull request introduces snapshot and recording functionality for tmux panes. It adds Sequence diagram for creating a PaneSnapshotsequenceDiagram
participant User
participant Pane
participant PaneSnapshot
User->>Pane: snapshot(start, end)
Pane->>PaneSnapshot: from_pane(self, start, end)
activate PaneSnapshot
PaneSnapshot-->>Pane: PaneSnapshot instance
deactivate PaneSnapshot
Pane-->>User: PaneSnapshot instance
Sequence diagram for creating a PaneRecording and adding a snapshotsequenceDiagram
participant User
participant Pane
participant PaneRecording
participant PaneSnapshot
User->>Pane: record()
Pane->>PaneRecording: PaneRecording()
activate PaneRecording
PaneRecording-->>Pane: PaneRecording instance
deactivate PaneRecording
User->>PaneRecording: add_snapshot(pane, start, end)
PaneRecording->>Pane: snapshot(start, end)
Pane->>PaneSnapshot: from_pane(self, start, end)
activate PaneSnapshot
PaneSnapshot-->>Pane: PaneSnapshot instance
deactivate PaneSnapshot
Pane->>PaneRecording: append(PaneSnapshot)
PaneRecording-->>User: void
Updated class diagram for Pane, PaneSnapshot, and PaneRecordingclassDiagram
class Pane {
+capture_pane()
+snapshot()
+record()
}
class PaneSnapshot {
+content: list[str]
+timestamp: datetime
+pane_id: str
+window_id: str
+session_id: str
+server_name: str
+metadata: dict[str, str]
+from_pane()
+content_str
}
class PaneRecording {
+snapshots: list[PaneSnapshot]
+add_snapshot()
+latest
+get_snapshots_between()
}
Pane -- PaneSnapshot : creates
Pane -- PaneRecording : creates
PaneRecording -- PaneSnapshot : contains
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #568 +/- ##
==========================================
- Coverage 52.37% 52.12% -0.26%
==========================================
Files 26 27 +1
Lines 3729 3793 +64
Branches 747 749 +2
==========================================
+ Hits 1953 1977 +24
- Misses 1472 1511 +39
- Partials 304 305 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tony
force-pushed
the
pane-capture-snapshots
branch
3 times, most recently
from
February 16, 2025 22:24
c58334b to
fc1d7f4
Compare
tony
force-pushed
the
pane-capture-snapshots
branch
from
February 16, 2025 22:33
fc1d7f4 to
c61ba63
Compare
tony
force-pushed
the
pane-capture-snapshots
branch
2 times, most recently
from
February 23, 2025 20:36
c305c76 to
6d91728
Compare
tony
force-pushed
the
pane-capture-snapshots
branch
2 times, most recently
from
February 25, 2025 22:17
3cc1d33 to
42e0ac8
Compare
tony
force-pushed
the
master
branch
4 times, most recently
from
April 12, 2025 12:08
0188aed to
ea5b0c4
Compare
tony
force-pushed
the
pane-capture-snapshots
branch
from
April 26, 2026 11:21
42e0ac8 to
85bc459
Compare
tony
force-pushed
the
pane-capture-snapshots
branch
from
May 10, 2026 15:56
85bc459 to
1583584
Compare
tony
force-pushed
the
pane-capture-snapshots
branch
from
May 30, 2026 13:26
cc27575 to
62c69d7
Compare
tony
force-pushed
the
pane-capture-snapshots
branch
from
July 18, 2026 11:02
62c69d7 to
790494e
Compare
This was referenced Nov 1, 2026
why: original snapshot/topics docs had doctests with hardcoded outputs
($ echo "Hello World", fixed pane IDs like %1, fixed timestamps) that
could never match real fixture pane content. Each doctest block also
referenced 'snapshot' from a previous block, but pytest-doctest-docutils
doesn't share state across markdown code blocks — every block needs to
define its own variables. As a result all 10 examples failed at parse or
execution time.
what:
- replace hardcoded output expectations with structural assertions
(isinstance, 'in' membership, startswith) that work against any
real pane content
- explicitly redefine 'snapshot = pane.snapshot()' at the top of each
block that uses it, since doctest blocks don't share state
- add 'import datetime' to the recording block so the time-filter
example actually runs
- use 'datetime.timezone.utc' instead of unaware datetime to match
the timestamp the snapshot stores
- use ELLIPSIS to match the variable pane_id ('%...')
why: CI matrix lacks typing_extensions in production deps; only Self is needed for typing, which 3.11+ provides natively. what: - Move Self import under TYPE_CHECKING + sys.version_info gate - Pattern matches existing libtmux/pane.py and window.py
tony
force-pushed
the
pane-capture-snapshots
branch
from
November 7, 2026 02:18
790494e to
d688196
Compare
This branch has not been deployed
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.
Changes
feat: Add
test_snapshotTest plan
Coverage
Automatic
Summary by Sourcery
Introduce snapshot and recording functionality for tmux panes. This allows capturing and analyzing pane content and metadata at various points in time. Add tests to verify the correctness of the new features.
New Features:
Pane.snapshot()to create a snapshot of the pane's current state.Pane.record()to create a recording of pane snapshots.PaneSnapshotclass to store pane content and metadata.PaneRecordingclass to manage a time-series of pane snapshots.test_snapshotto test the snapshot functionality and ensure correctness of capturing pane content and metadata.test_pane_recordingto test the recording functionality, including adding snapshots, iterating through them, and filtering by time.Tests: