Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.8k
feat(logs): add retry from context menu and detail sidebar for failed runs#4181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Uh oh!
There was an error while loading. Please reload this page.
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
06aebaa
feat(logs): add retry from context menu and detail sidebar for failed…
waleedlatif1 ccf9751
fix(logs): address PR review — redact workflowInput, improve fallback…
waleedlatif1 2591102
fix(logs): store workflowInput unredacted to preserve retry fidelity
waleedlatif1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
24 changes: 23 additions & 1 deletion
24 apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx
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
16 changes: 15 additions & 1 deletion
16 ...app/workspace/[workspaceId]/logs/components/log-row-context-menu/log-row-context-menu.tsx
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -4,6 +4,7 @@ import { Badge } from '@/components/emcn' | ||
| import { formatDuration } from '@/lib/core/utils/formatting' | ||
| import { getIntegrationMetadata } from '@/lib/logs/get-trigger-options' | ||
| import { getBlock } from '@/blocks/registry' | ||
| import type { WorkflowLog } from '@/stores/logs/filters/types' | ||
| import { CORE_TRIGGER_TYPES } from '@/stores/logs/filters/types' | ||
| export const LOG_COLUMNS = { | ||
| @@ -422,3 +423,37 @@ export const formatDate = (dateString: string) => { | ||
| })(), | ||
| } | ||
| } | ||
| /** | ||
| * Extracts the original workflow input from a log entry for retry. | ||
| * Prefers the persisted `workflowInput` field (new logs), falls back to | ||
| * reconstructing from `executionState.blockStates` (old logs). | ||
| */ | ||
| export function extractRetryInput(log: WorkflowLog): unknown | undefined { | ||
| const execData = log.executionData as Record<string, unknown> | undefined | ||
| if (!execData) return undefined | ||
| if (execData.workflowInput !== undefined) { | ||
| return execData.workflowInput | ||
| } | ||
| const executionState = execData.executionState as | ||
| | { | ||
| blockStates?: Record< | ||
| string, | ||
| { output?: unknown; executed?: boolean; executionTime?: number } | ||
| > | ||
| } | ||
| | undefined | ||
| if (!executionState?.blockStates) return undefined | ||
| // Starter/trigger blocks are pre-populated with executed: false and executionTime: 0, | ||
| // which distinguishes them from blocks that actually ran during execution. | ||
| for (const state of Object.values(executionState.blockStates)) { | ||
| if (state.executed === false && state.executionTime === 0 && state.output != null) { | ||
| return state.output | ||
| } | ||
waleedlatif1 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
waleedlatif1 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| return undefined | ||
| } | ||
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
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
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
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.