Skip to content

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

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

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

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor

Backports #19873 to Cloud 1.55 after the automatic cherry-pick reported conflicts.\n\nThe resolution preserves the release branch’s existing REST helper contract and legacy tab-binding coverage 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: 300 passed\n- app 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.

@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: 77c19a4d-415b-490a-99b7-9b34cdd8ca6f

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

🎭 Playwright: ✅ 2152 passed, 0 failed · 1 flaky

📊 Browser Reports
  • chromium: View Report (✅ 2131 / ❌ 0 / ⚠️ 1 / ⏭️ 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)
  • New-test walkthrough (chromium, recorded video): View Report

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 10/06/2026, 02:18:49 AM UTC

Links

🌾 Fallow: ✅ Passed

Fallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened.

No new findings in the changed files.

Reproduce locally
# the base the gate compared against
npx fallow audit --root . --quiet --format json \
  --changed-since 606d44f5a48a72c6b9c005520da139aa34896636

Full docs: ADR-DEVEX-LINT-0015

🧩 Custom Nodes Ecosystem Matrix: ✅ Passed

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

Stage Result What a failure here means
pin-status success Informational. It never fails the build; it warns when the corpus snapshot is over 30 days old.
corpus success Infrastructure: the pack mirror could not be fetched, validated or cached. Not your diff.
shards success Harness integrity, not pack breakage. A shard only checks that every built spec wrote its row; vitest's own exit code is deliberately ignored because pack code leaks unhandled rejections.
verdicts success The population verdict per renderer. This is the stage that judges packs. Exit 1 is FAIL; exit 2 is withheld — rows were missing, so nothing was measured, which is not the same as your change breaking packs.
detection-proofs success The instrument self-test: the matrix must FAIL on a deliberately poisoned corpus. A failure here means the gate cannot be trusted this run, in either direction.

On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff.

Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped.

Reproduce locally
# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
  npx vitest run --config vitest.matrix.config.mts

Full docs: scripts/registry-census/README.md

@github-actions
github-actions Bot requested a review from benjcooley October 6, 2026 02:10
@datadog-official

This comment has been minimized.

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Oct 6, 2026
…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)
@christian-byrne
christian-byrne force-pushed the backport-19873-to-cloud-1.55 branch from e4cf78a to 760b76a Compare October 6, 2026 02:16
@christian-byrne
christian-byrne merged commit 03b5b06 into cloud/1.55 Oct 6, 2026
43 checks passed
@christian-byrne
christian-byrne deleted the backport-19873-to-cloud-1.55 branch October 6, 2026 02:17
jaeone94 added a commit that referenced this pull request Oct 6, 2026
…le test

The #20275 backport kept a main-only `surface` option in the expected
reportError call. ReportErrorOptions on cloud/1.55 has no `surface`, so the
403/500 lifecycle cases failed on every PR against this branch.
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 risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant