fix(debug-mode): remove duplicate debug mode flag#1714
Merged
icecrasher321 merged 1 commit intostagingfrom Oct 22, 2025
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
There was a problem hiding this comment.
Greptile Overview
Summary
Consolidated debug mode state management into the execution store, eliminating duplicate tracking in the general settings store. This resolves browser cache issues caused by the redundant state.
Key Changes:
- Removed
isDebugModeEnabledfrom general settings store and replaced all usages withisDebuggingfrom execution store - Removed automatic toggling of debug mode flag in control bar - debug state is now managed directly via
setIsDebugging(true)when starting debug execution - Simplified execution completion logic by removing conditional checks for debug mode state
- Updated executor to read debug state from execution store instead of general store
- Updated all tests and mocks to reflect the new state location
Impact:
The change consolidates debug state into a single source of truth, making the system more predictable and eliminating potential sync issues between the two stores that could cause browser cache problems.
Confidence Score: 5/5
- This PR is safe to merge with minimal risk
- The refactoring is well-executed with consistent changes across all affected files. Debug state is properly consolidated into execution store, all references are updated correctly, and tests are updated to match. The logic flow remains unchanged - only the source of truth for debug state has moved.
- No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| apps/sim/stores/settings/general/store.ts | 5/5 | Removed isDebugModeEnabled state and toggleDebugMode action as debug state moved to execution store |
| apps/sim/executor/index.ts | 5/5 | Changed debug mode detection from useGeneralStore to useExecutionStore.getState().isDebugging |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution.ts | 5/5 | Removed duplicate debug mode tracking; removed auto-reset of general store debug mode; simplified execution completion logic |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/control-bar/control-bar.tsx | 5/5 | Removed redundant isDebugModeEnabled checks and auto-toggle logic when starting debug mode |
Sequence Diagram
sequenceDiagram
participant User
participant ControlBar
participant useWorkflowExecution
participant ExecutionStore
participant Executor
participant Workflow
User->>ControlBar: Click Debug Button
ControlBar->>ControlBar: Check if debugging
alt Not Debugging
ControlBar->>useWorkflowExecution: handleRunWorkflow(undefined, true)
useWorkflowExecution->>ExecutionStore: setIsExecuting(true)
useWorkflowExecution->>ExecutionStore: setIsDebugging(true)
useWorkflowExecution->>Executor: new Executor()
Executor->>ExecutionStore: getState().isDebugging
Note over Executor: isDebugging = true
useWorkflowExecution->>ExecutionStore: setPendingBlocks([...])
ExecutionStore->>Workflow: Notify state change
Workflow->>Workflow: Render pending blocks (isDebugging && pendingBlocks)
else Already Debugging
ControlBar->>useWorkflowExecution: handleCancelDebug()
useWorkflowExecution->>ExecutionStore: reset()
ExecutionStore->>Workflow: Notify state change
end
User->>ControlBar: Click Step/Resume
ControlBar->>useWorkflowExecution: handleStepDebug() / handleResumeDebug()
useWorkflowExecution->>Executor: executeNext()
Executor->>ExecutionStore: setActiveBlocks()
Executor->>useWorkflowExecution: Execution complete
useWorkflowExecution->>ExecutionStore: setIsExecuting(false)
useWorkflowExecution->>ExecutionStore: setIsDebugging(false)
useWorkflowExecution->>ExecutionStore: setActiveBlocks(new Set())
8 files reviewed, no comments
waleedlatif1
added a commit
that referenced
this pull request
Oct 23, 2025
* fix(debug-mode): remove duplicate debug mode flag (#1714) * feat(i18n): update translations (#1709) * improvement(condition): added variable and envvar highlighting for condition input (#1718) * fix(dashboard): add additional context for paginated logs in dashboard, add empty state when selected cell has no data (#1719) * fix(dashboard): add additional context for paginated logs in dashboard, add empty state when selected cell has no data * apps/sim * renaming * remove relative import * feat(tools): added webflow OAuth + tools (#1720) * feat(tools): added webflow OAuth + tools * remove itemId from delete item * remove siteId * added webhook triggers + oauth scopes + site/collection selector * update sample payload for webflow triggers * cleanup * fix discord color * feat(i18n): update translations (#1721) * improvement(schedule): fix UI bug with schedule modal (#1722)
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
Remove duplicate tracking of debug mode causing browser cache issues.
Type of Change
Testing
Tested manually
Checklist