Skip to content

Comments

Fix workspace name when restoring a workspace#118

Open
fvalenza wants to merge 1 commit intoMLFlexer:mainfrom
fvalenza:topic/restore_workspace_name
Open

Fix workspace name when restoring a workspace#118
fvalenza wants to merge 1 commit intoMLFlexer:mainfrom
fvalenza:topic/restore_workspace_name

Conversation

@fvalenza
Copy link

@fvalenza fvalenza commented Aug 21, 2025

Hello and thanks for this plugin !

Currently when restoring a workspace, it restores the state (tabs/panes/processes) without restoring the workspace name ( hence we are still on default workspace and in the spawned window, no traces of the name of restored worspace)

This PR shall fix this:

  • When opts.spawn_in_workspace is true -> add the restored workspace to the current instance of wezterm and switch to it
  • When opts.spawn_in_workspace is false -> spawn a new instance with the restored workspace's state + rename it accordingly so we can continue editing the same workspace (instead of manually renaming it).

Fixes #114

gcc42 added a commit to gcc42/resurrect.wezterm that referenced this pull request Jan 11, 2026
When restoring a workspace, the tabs/panes/processes were restored but
the workspace name remained 'default'. Now properly restores the original
workspace name using set_active_workspace or rename_workspace depending
on the spawn mode.

Fixes: MLFlexer#118
gcc42 added a commit to gcc42/resurrect.wezterm that referenced this pull request Jan 12, 2026
When restoring a workspace, the tabs/panes/processes were restored but
the workspace name remained 'default'. Now properly restores the original
workspace name using set_active_workspace or rename_workspace depending
on the spawn mode.

Includes mux fake implementations and regression test.

Fixes: MLFlexer#118
gcc42 added a commit to gcc42/resurrect.wezterm that referenced this pull request Jan 12, 2026
* docs: add critical code review and improvement plan

Review of unchanged files (fuzzy_loader, encryption, file_io, utils):
- Identified P0 security issues in shell command construction
- Found zero test coverage for encryption and fuzzy_loader
- Documented inconsistent error handling patterns
- Created prioritized improvement roadmap

* fix(workspace): restore workspace name after restore

When restoring a workspace, the tabs/panes/processes were restored but
the workspace name remained 'default'. Now properly restores the original
workspace name using set_active_workspace or rename_workspace depending
on the spawn mode.

Includes mux fake implementations and regression test.

Fixes: MLFlexer#118

* fix(file_io): wrap io.lines in pcall for graceful error handling

The load_json() function now catches errors when files don't exist
or can't be read, emits an error event, and returns nil instead of
throwing an exception.

* test: add utils and encryption test suites

utils_spec.lua (109 lines, 12 tests):
- Path normalization, string utilities, table utilities

encryption_spec.lua (47 lines, 2 tests):
- Command construction for age and gpg decrypt

* docs(CLAUDE): forbid force push without approval
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doesn't open with correct workspace name

1 participant