Skip to content

fix(flows): retry transient canvas load errors in place - #8484

Open
AmirrezaFarnamTaheri wants to merge 2 commits into
tinyhumansai:mainfrom
AmirrezaFarnamTaheri:upstream/fix-flow-canvas-retry-transient-load-20261028
Open

AmirrezaFarnamTaheri wants to merge 2 commits into
tinyhumansai:mainfrom
AmirrezaFarnamTaheri:upstream/fix-flow-canvas-retry-transient-load-20261028

Conversation

@AmirrezaFarnamTaheri

@AmirrezaFarnamTaheri AmirrezaFarnamTaheri commented Oct 28, 2026 •

Copy link
Copy Markdown

Summary

  • Add Retry to the workflow canvas's transient load-error state.
  • Retry the same requested flow without forcing navigation away and back.
  • Preserve existing loading, missing-flow and successful editor behavior.

Problem

After a temporary flows_get failure the canvas showed an error but offered no way to retry without navigation.

Solution

Introduce a user-initiated retry counter in the loader effect and display the existing translated Retry button, retaining the URL's original flow ID.

Submission Checklist

N/A items include explicit explanations; no local test execution is claimed.

  • Tests cover happy and failure/edge paths: app/src/pages/tests/FlowCanvasPage.test.tsx — failed initial getFlow, in-place Retry and preserved flow identity.
  • Diff coverage ≥80%: exact-head CI Fast #40656209537 passed and measured 100% (2/2 changed executable lines).
  • Coverage matrix updated: N/A — behavior within existing feature rows, no feature added, retired or renamed.
  • Affected feature IDs listed under Related: 9.4.1 (Workflows page/editor navigation).
  • No new external network dependency; the test suite uses existing local/fake services.
  • Release-cut manual smoke checklist updated: N/A — no signing, installer, publisher, or release-cut behavior changed; reviewer manual smoke is specified below.
  • Linked issue via Closes #NNN: N/A — no existing upstream tracking issue has been identified; none is fabricated.

Impact

Workflow editor UI only. No automatic retry loops, persistence mutation or core RPC changes.

Related


AI Authored PR Metadata (required for Codex/Linear PRs)

Linear Issue

  • Key: N/A — direct fork-to-upstream contribution without a supplied Linear issue.
  • URL: N/A.

Commit & Branch

  • Branch: AmirrezaFarnamTaheri:upstream/fix-flow-canvas-retry-transient-load-20261028
  • Commit SHA: 87cb1b98662903a3cefb8bcd14c63a11bfa6cd61

Validation Run

  • Hosted CI Fast static/format, TypeScript and focused/full Vitest checks: run #40656209537 passed.
  • Hosted changed-line diff coverage 100% (2/2 changed executable lines), above the required gate.
  • PR Quality metadata/links: passed.
  • Rust fmt/check: N/A — no Rust files modified.
  • Tauri fmt/check: N/A — no Tauri files modified.
  • Local tests: not executed in this connector-only workspace; do not interpret hosted CI as a local run.

Validation Blocked

  • command: Local desktop/keyboard integration smoke.
  • error: Not executed in this session (requires an installed desktop/web runtime and manual interaction).
  • impact: Hosted tests and coverage are green, but manual UX acceptance remains open for reviewers.

Behavior Changes

  • Intended behavior change: Add Retry to the workflow canvas's transient load-error state.
  • User-visible effect: Retry the same requested flow without forcing navigation away and back.

Parity Contract

  • Legacy behavior preserved: Preserve existing loading, missing-flow and successful editor behavior.
  • Guard/fallback/dispatch parity checks: app/src/pages/tests/FlowCanvasPage.test.tsx — failed initial getFlow, in-place Retry and preserved flow identity; no unrelated inference or service semantics change.

Duplicate / Superseded PR Handling

Summary by CodeRabbit

  • Bug Fixes
    • Added a retry option when a flow fails to load, allowing users to try loading it again. A flow also reloads when its route changes.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ba11d844-f420-4203-8557-29b9293cc150
Commits

Reviewing files that changed from the base of the PR and between 3e0c980 and 87cb1b9.

Files selected for processing: 2
  • app/src/pages/FlowCanvasPage.tsx
  • app/src/pages/__tests__/FlowCanvasPage.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

Walkthrough

FlowCanvasPage now provides a retry action when a flow load fails. The loading effect runs again when the retry counter or route ID changes. A test covers a failed request followed by a successful retry.

Changes: Flow load retry

Layer / File(s) Summary
Retry flow loading
app/src/pages/FlowCanvasPage.tsx, app/src/pages/__tests__/FlowCanvasPage.test.tsx
A Retry button increments a counter that reruns the flow-loading effect. The test verifies the error display, successful retry, canvas display, and two requests for the same flow ID.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: senamakel

Merge Risk: Minimal · up to 87cb1

The retry control safely retries failed workflow loads without a confirmed merge-blocking issue.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: retrying transient flow canvas load errors without leaving the current view.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit spots a flow that stalled,
One button answers when it’s called.
The fetch returns; the canvas gleams,
The rabbit hops through retry dreams.
Two requests, and all is well.

Comment @coderabbitai help to get the list of available commands.

@AmirrezaFarnamTaheri
AmirrezaFarnamTaheri marked this pull request as ready for review October 28, 2026 09:13
@tinysweeper

tinysweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Reviewed head: 87cb1b98662903a3cefb8bcd14c63a11bfa6cd61

Verdict: Ready for maintainer review · Priority: none
Coverage: Reviewed 2 of 2 files.
Pull request purpose (title): fix(flows): retry tr…

Diagnostics and supporting details

Full summary

Pull request purpose (title): fix(flows): retry transient canvas load errors in place. This pull request fixes a stuck workflow canvas after a transient core outage by adding an in-place Retry button to the load-error state, as described in the PR title and description. The canvas error view gains a secondary Button that advances a new `loadAttempt` counter, which is added to the fetch effect's dependency list so the effect re-runs and re-requests the same workflow. The latest-push delta is unavailable, so no push-scoped comparison is asserted.

Review snapshot

Change surface Files Review signal Count
Production 1 Active findings 0
Tests 1 Noted findings 0
Documentation 0 Resolved findings 0
Configuration 0 Pending checks/questions 0

Completeness: Complete
Test assessment: No supported feature-to-test mapping was available; this does not mean tests are absent or passed.

Features

  • Added — In-place Retry button on canvas load error: Users can recover from temporary `flows_get` failures without leaving the route; the error state layout gains the button alongside the banner. (app/src/pages/FlowCanvasPage.tsx export default function FlowCanvasPage() {)
  • Added — Retry-triggered re-fetch via loadAttempt dependency: Advances a local attempt counter that is part of the load effect's dependencies, so retry re-runs the fetch using the existing route id while keeping the cancellation guard intact. (app/src/pages/FlowCanvasPage.tsx export default function FlowCanvasPage() {)

Tests

No supported feature-to-test mapping was produced. Test execution is not inferred.

Findings

No active actionable findings.

Before merge

None.

Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: I checked the retry wiring against the load effect and the test: `loadAttempt` is added to the effect's dependency list, the effect resets to `loading` and re-fetches the same `id`, and the `cancelled` guard still covers superseded requests, so a retry after a transient failure re-requests the same flow. `t('common.retry')` already exists in every locale file. The new test's mock sequence matches the flow. I found no defects in this change. _The code index is behind this pull request (indexed at `aea3da445557`), so retrieved context may be out of date._

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: Lane security found the retry leaves the requested flow id unchanged, preserves cleanup/cancel logic, adds no new network, subprocess, or untrusted-input path, and uses the repository's `useT()`-based translation; no defects found.
  • Lane summary: The change adds a retry button that bumps a `loadAttempt` counter to re-run the existing flow-load effect, plus a matching unit test. The requested flow id is unchanged by the retry and the effect's cleanup/cancel logic is preserved, so the requested-flow assertion holds; it introduces no new network, subprocess, or untrusted-input path. The retry text uses `t('common.retry')` per the repository's `useT()` rule. No defects found. _The code index is behind this pull request (indexed at `aea3da445557`), so retrieved context may be out of date._

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: Lane tests found the new test asserts the canvas renders, two `getFlow` calls, and the same flow id on retry, so it is a real assertion that fails on a broken retry dependency or dropped id; no reportable defects.
  • Lane summary: The change adds a retry button to the workflow canvas load-error state, keyed on a `loadAttempt` counter added to the load effect's dependencies, and the new test drives the real path: first fetch rejects, the error banner shows, the retry button is clicked, and the test asserts the canvas renders, `getFlow` was called twice, and the second call used the same flow id. That is a real assertion that fails if the effect stops depending on `loadAttempt` or the retry drops the id, so the new behaviour is covered. No reportable defects found. _The code index is behind this pull request (indexed at `aea3da445557`), so retrieved context may be out of date._

commits

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: Lane commits reported no sensitive content in committed files.
  • Lane summary: No sensitive content in committed files. _The code index is behind this pull request (indexed at `aea3da445557`), so retrieved context may be out of date._

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: Lane description found the PR description matches the diff: Retry button, `loadAttempt` added to the fetch effect's dependency array, and a test asserting retry re-requests the same flow id; nothing significant undocumented and no defect worth reporting.
  • Lane summary: The description matches the diff: a Retry button in the canvas error state, a `loadAttempt` counter added to the fetch effect's dependency array, and a test asserting the retry re-requests the same flow ID. Nothing significant in the diff is left undocumented. I found no defect worth reporting. _The code index is behind this pull request (indexed at `aea3da445557`), so retrieved context may be out of date._
Evidence and run details
  • Models: ladder/vectors-oai3, deepseek-v4.1-flash
  • Spend: $0.002308
  • Tokens: 112943 input · 2767 output · 40704 cached · 137 embedding
  • Updated: 2026-10-28T09:14:33Z
Head State Pass summary
87cb1b986629 ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 2026-10-28T09:14:33Z)

tinysweeper 0.1.2

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T09:15:36.679314Z 87cb1b9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

tinysweeper found nothing blocking. Approving.

Diagnostics

Total spend: $0.0023

@tinysweeper

tinysweeper Bot commented Oct 28, 2026

Copy link
Copy Markdown

🖼️ UI wireframes

Flow canvas / load error state

Before
+--------------------------------------------+
| [ ! ] Failed to load flow                 |
|       (error banner message)              |
|                                           |
+--------------------------------------------+
After
+--------------------------------------------+
| [ ! ] Failed to load flow                 |
|       (error banner message)              |
|                                           |
| [ Retry ]                                 |
|                                           |
+--------------------------------------------+

tinysweeper 0.1.2

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Oct 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant