Skip to content

feat(ui): Debug Run Caching [FLOW-DEV-165]#2136

Open
billcookie wants to merge 22 commits into
mainfrom
FLOW-DEV-165
Open

feat(ui): Debug Run Caching [FLOW-DEV-165]#2136
billcookie wants to merge 22 commits into
mainfrom
FLOW-DEV-165

Conversation

@billcookie

@billcookie billcookie commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

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

  • 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.

What I haven't done

How I tested

Screenshot

image

Which point I want you to review particularly

  • Should we add warning class on edges as well?

Memo

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Cloud Run Preview Deployed

🔗 Click here to open the preview in a new tab

@billcookie billcookie marked this pull request as ready for review June 4, 2026 05:11
Copilot AI review requested due to automatic review settings June 4, 2026 05:11

Copilot AI 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.

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.

Comment thread ui/src/hooks/useGraphStaleness.ts
Comment thread ui/src/hooks/useGraphStaleness.ts
Comment thread ui/src/hooks/useGraphStaleness.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants