Skip to content

[backport cloud/1.54] fix(agent): focus a chat’s open draft tab instead of calling it unavailable - #20276

Merged
christian-byrne merged 1 commit into
cloud/1.54from
backport-19873-to-cloud-1.54
Oct 6, 2026
Merged

christian-byrne merged 1 commit into
cloud/1.54from
backport-19873-to-cloud-1.54

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor

Backports #19873 to Cloud 1.54 after the automatic cherry-pick reported conflicts.\n\nThe resolution preserves the release branch’s REST error handling, legacy tab-binding coverage, and older browser fixture APIs while adding the workflow-list completeness, per-workflow lifecycle check, draft ownership race fix, and black-box journey from the main fix.\n\nValidation:\n- 5 focused unit suites: 303 passed\n- app typecheck passed\n- browser typecheck passed\n- format, Oxlint, ESLint, Knip, and pre-push checks passed\n\nNo main-only REST operation-name or telemetry-option contracts were pulled into this release branch.

…ilable (#19873)

Returning to a chat whose target is an unsaved Agent draft could say the
workflow was unavailable while that chat-owned draft tab was still open.
This focuses the owned tab instead, while preserving the unavailable
state for deleted workflows.

- Treat a complete workflow listing as conclusive when no local tab owns
the workflow ID.
- When a local tab does own the ID, read `GET /api/workflows/{id}`
because the listing omits version-less drafts; only a 404 proves
deletion.
- Re-resolve tab ownership after that asynchronous read so closing or
replacing a draft during restoration cannot reopen a stale tab.
- Keep incomplete listings and non-404 read failures inconclusive rather
than retiring a live target.
- Validate persisted workflow bindings against non-empty graph IDs.

- Restoration, resolver, and REST client unit suites: 131 passed.
- Browser typecheck passed.
- The remaining browser journey composes chat-history restoration, the
real REST client, and tab focus; redundant deletion journeys are covered
at unit/API level and by `agentDeletedTargetNotice.spec.ts`.
- [Recorded browser
walkthrough](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/36979467267)
(shows returning to the chat focusing its existing draft tab instead of
displaying the unavailable notice).

The recorded browser walkthrough above is the visual evidence for the
user-visible state change.

Supersedes #19649 and #18562.

Linear:
[FE-3015](https://linear.app/comfyorg/issue/FE-3015/historical-chats-can-restore-closed-unsaved-workflows)
@vercel

vercel Bot commented Oct 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
billing-web Ignored Ignored Oct 6, 2026 2:09am UTC
billing-web-test Ignored Ignored Oct 6, 2026 2:09am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (2)
  • [release]
  • [backport

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 528424d8-38f8-4e2d-9506-6e2918cd3a6b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@christian-byrne christian-byrne added the backport Backporting a PR onto a release candidate label Oct 6, 2026
@christian-byrne christian-byrne self-assigned this Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 10/06/2026, 02:11:25 AM UTC

Links

🎭 Playwright: ✅ 1989 passed, 0 failed · 2 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1968 / ❌ 0 / ⚠️ 2 / ⏭️ 4)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

@github-actions
github-actions Bot requested a review from benjcooley October 6, 2026 02:10
@christian-byrne
christian-byrne merged commit 00a23eb into cloud/1.54 Oct 6, 2026
94 of 98 checks passed
@christian-byrne
christian-byrne deleted the backport-19873-to-cloud-1.54 branch October 6, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Backporting a PR onto a release candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant