feat: add winTerm v0.4 workspace restore foundations#3
Open
HelloThisWorld wants to merge 25 commits into
Open
Conversation
|
|
||
| Snapshots are written on the periodic policy and before destructive or migration operations. The default retention is the newest three valid files. Snapshot names contain a fixed-width generation so selection is deterministic. If the newest snapshot is corrupted, recovery examines older snapshots. Loading a damaged Last Session tries the last validated backup; damaged managed files can be moved to quarantine with sanitized reason metadata. | ||
|
|
||
| Recovery inspection recommends the latest valid snapshot after an abnormal shutdown, otherwise Last Session, otherwise a new session. It never overwrites normal state without a later explicit recovery choice. A recovered pane can report that a command was running, but no command is stored or replayed and no process is reattached. |
|
|
||
| Snapshots are written on the periodic policy and before destructive or migration operations. The default retention is the newest three valid files. Snapshot names contain a fixed-width generation so selection is deterministic. If the newest snapshot is corrupted, recovery examines older snapshots. Loading a damaged Last Session tries the last validated backup; damaged managed files can be moved to quarantine with sanitized reason metadata. | ||
|
|
||
| Recovery inspection recommends the latest valid snapshot after an abnormal shutdown, otherwise Last Session, otherwise a new session. It never overwrites normal state without a later explicit recovery choice. A recovered pane can report that a command was running, but no command is stored or replayed and no process is reattached. |
| - [ ] Last Session and periodic snapshots are written and loaded by the running application. | ||
| - [ ] Startup and exit settings, workspace gallery/editor, import summary/confirmation, recovery prompt, restore report, and diagnostics views are present and manually exercised. | ||
| - [ ] Actual windows, positions, sizes, maximized/fullscreen policy, active window, and mixed-DPI monitor changes restore. | ||
| - [ ] Actual tab order, pane layout/ratio, focused and zoomed panes, profiles, CWDs, themes, and fonts restore for PowerShell, CMD, and available WSL profiles. |
|
|
||
| The storage layout is a winTerm-only `workspaces` directory under the application state root. It contains `last-session.json`, its backup, `snapshots`, `named`, `imported`, `quarantine`, and a rebuildable `index.json`. This storage never uses Microsoft Terminal package identity or LocalState. | ||
|
|
||
| Visual docking, corner docking, `GridNode`, `EmptySlotNode`, cross-window live pane transfer, terminal brokering, ConPTY reattachment, command replay, and SSH reconnection remain outside this architecture. |
| bool IsForbiddenKey(const std::string_view key) | ||
| { | ||
| static const std::set<std::string, std::less<>> forbidden{ | ||
| "autorun", |
| "environmentvariables", | ||
| "executable", | ||
| "executablepath", | ||
| "externalfile", |
| "plugin", | ||
| "plugins", | ||
| "privatekey", | ||
| "privatekeypath", |
| "privatekeypath", | ||
| "registry", | ||
| "script", | ||
| "shellarguments", |
| "registry", | ||
| "script", | ||
| "shellarguments", | ||
| "sshprivatekey", |
| "script", | ||
| "shellarguments", | ||
| "sshprivatekey", | ||
| "startupcommand", |
This comment has been minimized.
This comment has been minimized.
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.
Summary of the Pull Request
References and Relevant Issues
winTerm v0.4 Workspace Restore development task.
Detailed Description of the Pull Request / Additional comments
The implementation persists restore descriptions rather than process state. Imports cannot execute commands or choose arbitrary executables. Process state, terminal output, command history, clipboard content, credentials, and environment dumps are not persisted.
Full runtime acceptance remains intentionally open until the project is compiled and exercised in a built winTerm application. See
docs/v0.4-acceptance.mdfor exact evidence and open gates.Validation Steps Performed
scripts/winterm/test.ps1 -Suite Smoke— passedgit diff --check— passedPR Checklist