add bounded copied terminal snapshots - #673
Draft
sirfergy wants to merge 12 commits into
Draft
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Probe sibling SwiftTerm resource bundles only for xctest bundles, including tests loaded by a separate SwiftPM runner. Keep application resource discovery and the nontrapping Bundle.module avoidance unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> (cherry picked from commit 7e815dc)
Keep copied DTO construction internal and derive row text lazily from full cell values with BufferLine-equivalent trimming. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the Objective-C autorelease pool on Apple platforms and run the same scoped lifecycle assertions directly on Linux. Import Darwin explicitly in the macOS callback teardown tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep immutable line identity tokens alive in paragraph keys so allocator reuse cannot turn a cached LTR paragraph into an RTL cache hit. Do not retain mutable terminal buffers or repeat token hashing on the cache fast path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Owner
|
The core idea is sound, but this PR contains a bunch of unrelated things, which we should review independently. |
Keep this proposal focused on copied terminal state. The extracted changes are being proposed independently; the downstream release remains pinned to the existing combined fork revision. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Sep 2, 2026
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.
SwiftTerm keeps a view's mutable terminal private, but embedders still need input modes and a bounded copy of the viewport or history. Expose copied values captured under one terminal-lock transaction, so hosts can inspect them without retaining live terminal storage.
The snapshot remains valid after later feeds, resizes, and history trimming. Callers choose the history limit; row coordinates retain the terminal's scroll-invariant numbering.
Tests
Covers copied-value lifetime, input modes, bounded history, complete grapheme text, row coordinates, and checked Sendable values.
Related
Previously bundled work is now proposed independently:
Existing commits are preserved; the final diff contains only copied snapshots.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com