Skip to content

rsession extension does not persist non-default task components added before session save#506

Open
michaelcosj wants to merge 1 commit into
stevearc:masterfrom
michaelcosj:fix/rsession-extension-does-not-persist-non-default-components
Open

rsession extension does not persist non-default task components added before session save#506
michaelcosj wants to merge 1 commit into
stevearc:masterfrom
michaelcosj:fix/rsession-extension-does-not-persist-non-default-components

Conversation

@michaelcosj
Copy link
Copy Markdown

@michaelcosj michaelcosj commented Mar 14, 2026

Fix: Resession extension not persisting non-default task components

This PR fixes a bug where custom components added to tasks (such as restart_on_save) were not being restored when loading a session with the resession extension.

When tasks with custom components were saved and later loaded from a resession session, those components would be lost. For example, if a user added a restart_on_save component to a task, after restoring the session, that task would no longer restart on file save.

  1. Task:serialize() properly saves all serializable components to the components field
  2. When loading, overseer.new_task(params) is called
  3. overseer.new_task() has special handling for from_template tasks that bypasses the normal Task.new() flow where components are added
  4. As a result, params.components containing the serialized custom components was never processed

Added an explicit call to task:add_components(params.components) after loading the task on the extension, ensuring all serialized components are properly restored.

closes #507

…ault task components added before session save
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.

bug: Resession extension not persisting non-default task components**

1 participant