Fix/module resurrect not found#123
Open
userux wants to merge 2 commits into
Open
Conversation
…ager' with periodic_save
micimize
added a commit
to micimize/resurrect.wezterm
that referenced
this pull request
Mar 5, 2026
Addresses a crash loop caused by periodic auto-save capturing ghost SSH domain tabs (stuck in "Connecting..." with empty cwd and zero dimensions) into workspace JSON. On restore, these spawn broken tabs that cascade into UI crashes. Save-side safeguards: - Add is_pane_healthy() to filter panes with nil/empty cwd, zero cell dimensions, or non-spawnable domains before tree construction - Skip tabs with no healthy panes in window state serialization - Skip windows with no valid tabs in workspace save - Skip periodic save entirely when workspace is degraded - Create .bak backup before overwriting state files Restore-side safeguards: - Add validate_pane_tree() to check cwd and domain validity, with recursive pruning of invalid subtrees - Validate each tab before restoring, skip invalid ones - Track restored_count independently from loop index for correct first-tab reuse logic - Wrap per-window restore in pcall with state reset on failure - Guard against empty tabs[1] access when spawning windows - Fall back to .bak file when primary state file is invalid - Nil guard on active_tab:activate() (latent upstream bug) Upstream fixes incorporated: - PR MLFlexer#127: nil pane guard in insert_panes() for symmetric layouts - PR MLFlexer#123: use direct require("resurrect.state_manager") to fix circular module dependency in save actions - PR MLFlexer#118: set active workspace after restore_workspace() Wrap io.lines() in pcall in load_json() to handle missing files gracefully instead of throwing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Mar 13, 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.
local resurrect = require("resurrect") in plugin/resurrect/state_manager.lua not importing correct module.
I changed it to local state_manager_mod = require("resurrect.state_manager").
should fix #117 and #119