Skip to content

Fix workbench scenario lifecycle guards - #19

Merged
bnquon merged 2 commits into
mainfrom
fix/workbench-scenario-guards
Aug 30, 2026
Merged

Fix workbench scenario lifecycle guards#19
bnquon merged 2 commits into
mainfrom
fix/workbench-scenario-guards

Conversation

@bnquon

@bnquon bnquon commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Prevents unsaved drafts from restoring removed imported scenarios.
  • Blocks scenario/example actions during file operations and loading.
  • Keeps removal and Exit refresh failures visible.
  • Preserves the blank workbench, History access, and historical read-only behavior.

Validation

  • npm run check
  • npm run test:frontend -- --run
  • git diff --check

Broad lifecycle/integration coverage remains intentionally deferred. Generated build and mode-only changes were excluded from the commit.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

This PR leaves an unsynchronized unsaved-scenario refresh path that can report a successful newer operation as a failure and lose a newly saved scenario; please address before merging.

Reviewed changes This review covers scenario lifecycle guards, unsaved and empty-workbench transitions, scenario-browser action gating, and workspace bootstrap result propagation.

  • Scenario transitions Tracks the scenario opened before an unsaved draft and adds an Exit action that restores it or refreshes the workspace.
  • Empty workbench Adds a blank state when examples are hidden and no local scenario is available, with a restore action.
  • Interaction guards Blocks scenario selection, removal, import, and example dismissal during runs, file operations, loading, and historical read-only mode.
  • Refresh outcomes Makes workspace bootstrap report success and surfaces removal and Exit refresh failures.
  • Save feedback Adds an accessible interactive multiline tooltip explaining why Save as is unavailable.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using GPT Luna𝕏

Comment thread frontend/src/features/workbench/WorkbenchPage.tsx Outdated
Comment thread frontend/src/features/workbench/WorkbenchPage.tsx

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes This incremental review covers the refresh-race fixes added since the previous Pullfrog review.

  • Distinguished refresh outcomes Separated successful, failed, and superseded workspace bootstrap requests so stale results do not surface as failures.
  • Serialized unsaved exits Prevented repeated Exit refreshes and ignored superseded results during unsaved-scenario recovery.
  • Extended lifecycle guards Propagated catalog-loading state to Save as and scenario browser actions, and handled superseded removal refreshes without reporting false failures.

Pullfrog  | View workflow run | Using GPT Luna𝕏

@bnquon
bnquon merged commit f6f472c into main Aug 30, 2026
4 checks passed
@bnquon
bnquon deleted the fix/workbench-scenario-guards branch August 30, 2026 06:09
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.

1 participant