feat(ui): Debug Run Caching [FLOW-DEV-165]#2136
Open
billcookie wants to merge 22 commits into
Open
Conversation
Contributor
|
🚀 Cloud Run Preview Deployed |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds client-side “debug run cache staleness” tracking to the editor so the UI can warn when a stored debug run no longer matches the current workflow graph and highlight stale nodes.
Changes:
- Persist a lightweight graph snapshot on debug-run start and mark runs/nodes as stale when the workflow graph changes.
- Surface staleness in the UI (debug action bar tooltip/icon + per-node warning badge).
- Add i18n strings for the new “Debug Cache is Stale” message.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/src/stores/indexedDB.ts | Extends persisted debug job state with graph snapshot + staleness fields. |
| ui/src/lib/reactFlow/nodeTypes/GeneralNode/index.tsx | Shows a warning badge on nodes flagged as stale. |
| ui/src/lib/reactFlow/nodeTypes/GeneralNode/hooks.ts | Computes isNodeStale from editor context and exposes it to the node component. |
| ui/src/lib/i18n/locales/zh.json | Adds translation for “Debug Cache is Stale”. |
| ui/src/lib/i18n/locales/ja.json | Adds translation for “Debug Cache is Stale”. |
| ui/src/lib/i18n/locales/fr.json | Adds translation for “Debug Cache is Stale”. |
| ui/src/lib/i18n/locales/es.json | Adds translation for “Debug Cache is Stale”. |
| ui/src/lib/i18n/locales/en.json | Adds i18n key for “Debug Cache is Stale”. |
| ui/src/hooks/useGraphStaleness.ts | New hook: snapshots graph + computes run/node staleness from Yjs changes and undo/redo. |
| ui/src/hooks/index.ts | Exports the new useGraphStaleness hook. |
| ui/src/features/Editor/index.tsx | Wires staleNodeIds into the editor context. |
| ui/src/features/Editor/hooks.ts | Instantiates useGraphStaleness and returns staleNodeIds for context wiring. |
| ui/src/features/Editor/editorContext.tsx | Adds staleNodeIds to EditorContextType. |
| ui/src/features/Editor/components/OverlayUI/components/DebugActionBar/index.tsx | Shows stale-state tooltip/icon on the debug start button. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Overview
This PR adds client-side “debug run cache staleness” tracking to the editor so the UI can warn when a stored debug run no longer matches the current workflow graph and highlight stale nodes.
What I've done
What I haven't done
How I tested
Screenshot
Which point I want you to review particularly
warningclass on edges as well?Memo