Repository navigation
fix: stop agent turn on Escape after submitting via mouse click on Send - #18296
Conversation
The composer's Escape-to-stop handler only fired while the prompt editor's own contenteditable element had focus, so it worked after submitting with Enter (focus never left the editor) but not after clicking Send with the mouse (focus moves to the button). Add a container-level keydown handler that catches Escape from any focused element still inside the composer, without changing focus behavior.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎭 Playwright: ✅ 2074 passed, 0 failed · 1 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🌾 Fallow: ✅ PassedFallow 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 f1e094f20781c4b0b6760defd3e6df4fba13dc67
Full docs: ADR-DEVEX-LINT-0015 📦 Bundle: 9.96 MB gzip 🟢 -1.14 kBDetailsSummary
Category Glance App Entry Points — 3.87 kB (baseline 3.87 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.46 MB (baseline 1.46 MB) • 🔴 +19 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 132 kB (baseline 132 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 14 added / 14 removed / 4 unchanged Panels & Settings — 639 kB (baseline 639 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 18 unchanged User & Accounts — 37.9 kB (baseline 37.9 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 6 added / 6 removed / 5 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 7 added / 7 removed / 1 unchanged UI Components — 123 kB (baseline 123 kB) • 🔴 +45 BReusable component library chunks
Status: 7 added / 7 removed / 9 unchanged Data & Services — 3.87 MB (baseline 3.88 MB) • 🟢 -3.37 kBStores, services, APIs, and repositories
Status: 13 added / 13 removed / 3 unchanged Utilities & Hooks — 577 kB (baseline 577 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 19 added / 19 removed / 19 unchanged Vendor & Third-Party — 17.4 MB (baseline 17.4 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 17.8 MB (baseline 17.8 MB) • 🔴 +37 BBundles that do not match a named category
Status: 73 added / 73 removed / 229 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-21T22:23:18.151Z",
"gitSha": "1255eca92e76e1fcc268b46b85b0a2845f042898",
"branch": "fix/escape-stop-after-send-click",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 1993.7000000000467,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.2250000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 292.011,
"heapDeltaBytes": 2841680,
"heapUsedBytes": 65041204,
"domNodes": -258,
"jsHeapTotalBytes": 3923968,
"scriptDurationMs": 7.9819999999999975,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 1993.0120000000215,
"styleRecalcs": 9,
"styleRecalcDurationMs": 5.866999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 361.77899999999994,
"heapDeltaBytes": 13427432,
"heapUsedBytes": 75506568,
"domNodes": -261,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 7.554,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1709.5969999999738,
"styleRecalcs": 73,
"styleRecalcDurationMs": 21.553000000000004,
"layouts": 14,
"layoutDurationMs": 3.8979999999999997,
"taskDurationMs": 647.602,
"heapDeltaBytes": 3358656,
"heapUsedBytes": 65595072,
"domNodes": -262,
"jsHeapTotalBytes": 6021120,
"scriptDurationMs": 118.916,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1694.772999999941,
"styleRecalcs": 73,
"styleRecalcDurationMs": 22.903,
"layouts": 14,
"layoutDurationMs": 4.025,
"taskDurationMs": 673.491,
"heapDeltaBytes": 8175792,
"heapUsedBytes": 70439776,
"domNodes": -260,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 124.49799999999999,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1710.2910000000406,
"styleRecalcs": 31,
"styleRecalcDurationMs": 13.303999999999998,
"layouts": 6,
"layoutDurationMs": 1.025,
"taskDurationMs": 268.454,
"heapDeltaBytes": 2209088,
"heapUsedBytes": 64115740,
"domNodes": 76,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 10.275000000000002,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1708.3760000000439,
"styleRecalcs": 31,
"styleRecalcDurationMs": 13.120999999999999,
"layouts": 6,
"layoutDurationMs": 0.932,
"taskDurationMs": 211.51999999999998,
"heapDeltaBytes": 2116644,
"heapUsedBytes": 64347680,
"domNodes": 76,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 10.405000000000001,
"eventListeners": 15,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-clipping",
"durationMs": 515.8589999999776,
"styleRecalcs": 11,
"styleRecalcDurationMs": 6.424000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 354.38100000000003,
"heapDeltaBytes": 17928064,
"heapUsedBytes": 80016880,
"domNodes": 18,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 128.189,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666665,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 526.2369999999237,
"styleRecalcs": 11,
"styleRecalcDurationMs": 6.535000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 360.928,
"heapDeltaBytes": 17861304,
"heapUsedBytes": 80020368,
"domNodes": 18,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 130.283,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666665,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1046.4709999999968,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 708.292,
"heapDeltaBytes": -13236780,
"heapUsedBytes": 72757124,
"domNodes": -295,
"jsHeapTotalBytes": 19267584,
"scriptDurationMs": 46.059000000000005,
"eventListeners": -217,
"totalBlockingTimeMs": 398,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 1048.7239999999929,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 697.157,
"heapDeltaBytes": -13770852,
"heapUsedBytes": 72352148,
"domNodes": -295,
"jsHeapTotalBytes": 18219008,
"scriptDurationMs": 47.31600000000001,
"eventListeners": -217,
"totalBlockingTimeMs": 395,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 779.4639999999617,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 376.2469999999998,
"heapDeltaBytes": 14266068,
"heapUsedBytes": 90925132,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 119.13799999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 160,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 765.8490000000029,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 365.5340000000002,
"heapDeltaBytes": 14453376,
"heapUsedBytes": 90923284,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 116.20000000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 155,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "extension-clean-combined-draw",
"durationMs": 7851.710999999967,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6988.955000000001,
"heapDeltaBytes": 1273684,
"heapUsedBytes": 83377552,
"domNodes": -14,
"jsHeapTotalBytes": 10485760,
"scriptDurationMs": 5618.2119999999995,
"eventListeners": 0,
"totalBlockingTimeMs": 62,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 33.20000000000073
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6976.658999999927,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6162.944,
"heapDeltaBytes": -12900000,
"heapUsedBytes": 69161460,
"domNodes": -14,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 5116.977000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 45,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 33.29999999999927
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 7543.974999999989,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 6674.3009999999995,
"heapDeltaBytes": 7839800,
"heapUsedBytes": 81912860,
"domNodes": -6,
"jsHeapTotalBytes": 8912896,
"scriptDurationMs": 5371.865,
"eventListeners": 0,
"totalBlockingTimeMs": 98,
"frameDurationMs": 17.779999999999987,
"p95FrameDurationMs": 33.29999999999927
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 6425.324000000046,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.6529999999999974,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5800.822999999999,
"heapDeltaBytes": -13082376,
"heapUsedBytes": 68749896,
"domNodes": -16,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 4778.120999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 51,
"frameDurationMs": 17.776666666666703,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "large-graph-idle",
"durationMs": 2011.275000000012,
"styleRecalcs": 7,
"styleRecalcDurationMs": 5.170000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 474.913,
"heapDeltaBytes": 1049608,
"heapUsedBytes": 82840532,
"domNodes": -248,
"jsHeapTotalBytes": -2068480,
"scriptDurationMs": 28.256000000000004,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2026.6220000000885,
"styleRecalcs": 7,
"styleRecalcDurationMs": 5.051,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 463.4670000000001,
"heapDeltaBytes": 2409112,
"heapUsedBytes": 83136864,
"domNodes": -243,
"jsHeapTotalBytes": -233472,
"scriptDurationMs": 30.150999999999996,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2102.891999999997,
"styleRecalcs": 67,
"styleRecalcDurationMs": 10.524,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1264.531,
"heapDeltaBytes": 15767048,
"heapUsedBytes": 80219336,
"domNodes": -247,
"jsHeapTotalBytes": 1011712,
"scriptDurationMs": 642.701,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2097.509999999943,
"styleRecalcs": 66,
"styleRecalcDurationMs": 10.554,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1267.2140000000002,
"heapDeltaBytes": 15661040,
"heapUsedBytes": 79850504,
"domNodes": 8,
"jsHeapTotalBytes": 749568,
"scriptDurationMs": 651.409,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3135.978000000023,
"styleRecalcs": 63,
"styleRecalcDurationMs": 11.788999999999998,
"layouts": 60,
"layoutDurationMs": 12.222,
"taskDurationMs": 1331.1850000000002,
"heapDeltaBytes": 9674656,
"heapUsedBytes": 74427720,
"domNodes": -250,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 611.1300000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3119.3809999999758,
"styleRecalcs": 62,
"styleRecalcDurationMs": 11.047,
"layouts": 60,
"layoutDurationMs": 12.14,
"taskDurationMs": 1337.1879999999999,
"heapDeltaBytes": 7999796,
"heapUsedBytes": 74106784,
"domNodes": 6,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 620.204,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2227.1109999999794,
"styleRecalcs": 44,
"styleRecalcDurationMs": 7.264000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1489.291,
"heapDeltaBytes": 17530848,
"heapUsedBytes": 83748520,
"domNodes": 8,
"jsHeapTotalBytes": 1204224,
"scriptDurationMs": 747.4119999999999,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2500.0199999999495,
"styleRecalcs": 42,
"styleRecalcDurationMs": 6.054999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1526.1140000000003,
"heapDeltaBytes": 18187704,
"heapUsedBytes": 86069928,
"domNodes": 4,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 790.373,
"eventListeners": 180,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2019.3050000000312,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.132999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 476.29200000000003,
"heapDeltaBytes": -9388768,
"heapUsedBytes": 79652408,
"domNodes": -251,
"jsHeapTotalBytes": 1077248,
"scriptDurationMs": 28.303999999999995,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2027.2109999999657,
"styleRecalcs": 7,
"styleRecalcDurationMs": 5.153000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 472.01900000000006,
"heapDeltaBytes": -6299328,
"heapUsedBytes": 82641480,
"domNodes": -248,
"jsHeapTotalBytes": -495616,
"scriptDurationMs": 28.994999999999994,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 510.140999999976,
"styleRecalcs": 48,
"styleRecalcDurationMs": 9.934999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 325.503,
"heapDeltaBytes": 13580680,
"heapUsedBytes": 76995776,
"domNodes": 22,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 116.21400000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666665,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 497.6850000000468,
"styleRecalcs": 47,
"styleRecalcDurationMs": 9.274000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 314.35900000000004,
"heapDeltaBytes": 13369492,
"heapUsedBytes": 76702316,
"domNodes": 20,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 112.63599999999998,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 2007.5499999999806,
"styleRecalcs": 9,
"styleRecalcDurationMs": 6.249999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 358.394,
"heapDeltaBytes": 1982864,
"heapUsedBytes": 64798240,
"domNodes": -278,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 7.383000000000001,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1993.69200000001,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.013999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 284.369,
"heapDeltaBytes": 17655012,
"heapUsedBytes": 80882404,
"domNodes": -276,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 7.631,
"eventListeners": -198,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1693.8130000000342,
"styleRecalcs": 79,
"styleRecalcDurationMs": 23.275,
"layouts": 18,
"layoutDurationMs": 4.753,
"taskDurationMs": 635.4459999999999,
"heapDeltaBytes": -2485184,
"heapUsedBytes": 61225264,
"domNodes": -276,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 88.026,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1675.612000000001,
"styleRecalcs": 77,
"styleRecalcDurationMs": 23.885,
"layouts": 18,
"layoutDurationMs": 4.909999999999999,
"taskDurationMs": 628.046,
"heapDeltaBytes": -2103144,
"heapUsedBytes": 60610900,
"domNodes": -279,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 87.858,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-transition-enter",
"durationMs": 867.0779999999922,
"styleRecalcs": 19,
"styleRecalcDurationMs": 22.760999999999996,
"layouts": 5,
"layoutDurationMs": 9.814,
"taskDurationMs": 687.114,
"heapDeltaBytes": 20121468,
"heapUsedBytes": 103362604,
"domNodes": 13667,
"jsHeapTotalBytes": 11796480,
"scriptDurationMs": 22.319000000000006,
"eventListeners": 2383,
"totalBlockingTimeMs": 89,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8162.093000000027,
"styleRecalcs": 249,
"styleRecalcDurationMs": 35.611999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4583.5109999999995,
"heapDeltaBytes": -1362568,
"heapUsedBytes": 80406488,
"domNodes": -245,
"jsHeapTotalBytes": 1040384,
"scriptDurationMs": 2185.0240000000003,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.669999999999952,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8261.808999999972,
"styleRecalcs": 250,
"styleRecalcDurationMs": 36.35,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4792.9259999999995,
"heapDeltaBytes": 4647228,
"heapUsedBytes": 86104028,
"domNodes": -244,
"jsHeapTotalBytes": -532480,
"scriptDurationMs": 2382.829,
"eventListeners": -152,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 14351.45,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13930.294,
"heapDeltaBytes": -36700816,
"heapUsedBytes": 174218732,
"domNodes": -8061,
"jsHeapTotalBytes": -5808128,
"scriptDurationMs": 201.454,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 11276.093999999943,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 10779.548999999999,
"heapDeltaBytes": -54070648,
"heapUsedBytes": 168707076,
"domNodes": -8061,
"jsHeapTotalBytes": -6537216,
"scriptDurationMs": 170.87000000000003,
"eventListeners": -14928,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333326,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 16780.809999999976,
"styleRecalcs": 124,
"styleRecalcDurationMs": 13.801999999999982,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16614.184999999998,
"heapDeltaBytes": -21837424,
"heapUsedBytes": 189103392,
"domNodes": -8061,
"jsHeapTotalBytes": -13217792,
"scriptDurationMs": 710.195,
"eventListeners": -14928,
"totalBlockingTimeMs": 13,
"frameDurationMs": 17.226666666666762,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 16900.05400000007,
"styleRecalcs": 116,
"styleRecalcDurationMs": 14.084000000000014,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16749.315,
"heapDeltaBytes": -57935424,
"heapUsedBytes": 178289820,
"domNodes": -8061,
"jsHeapTotalBytes": -10952704,
"scriptDurationMs": 727.173,
"eventListeners": -14928,
"totalBlockingTimeMs": 6,
"frameDurationMs": 17.223333333333237,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-node-resize-workload",
"durationMs": 5139.859000000001,
"styleRecalcs": 20,
"styleRecalcDurationMs": 58.76400000000001,
"layouts": 20,
"layoutDurationMs": 20.26499999999999,
"taskDurationMs": 5068.072,
"heapDeltaBytes": -39611496,
"heapUsedBytes": 184018200,
"domNodes": -8061,
"jsHeapTotalBytes": 20725760,
"scriptDurationMs": 84.80299999999998,
"eventListeners": -14928,
"totalBlockingTimeMs": 169,
"frameDurationMs": 17.220000000000013,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-node-resize-workload",
"durationMs": 5136.491999999976,
"styleRecalcs": 20,
"styleRecalcDurationMs": 59.85399999999999,
"layouts": 20,
"layoutDurationMs": 21.097999999999992,
"taskDurationMs": 5076.201,
"heapDeltaBytes": -32392972,
"heapUsedBytes": 178051016,
"domNodes": -8061,
"jsHeapTotalBytes": 11755520,
"scriptDurationMs": 83.981,
"eventListeners": -14928,
"totalBlockingTimeMs": 221,
"frameDurationMs": 17.220000000000013,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 7166.713000000016,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7009.4,
"heapDeltaBytes": 3502780,
"heapUsedBytes": 171997160,
"domNodes": 0,
"jsHeapTotalBytes": -26214400,
"scriptDurationMs": 98.64,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 7231.412999999975,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 7041.325000000001,
"heapDeltaBytes": -9198352,
"heapUsedBytes": 175611124,
"domNodes": 0,
"jsHeapTotalBytes": -14417920,
"scriptDurationMs": 102.70200000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 91.50099999999384,
"styleRecalcs": 5,
"styleRecalcDurationMs": 13.136000000000001,
"layouts": 3,
"layoutDurationMs": 1.715,
"taskDurationMs": 68.18999999999998,
"heapDeltaBytes": 3136056,
"heapUsedBytes": 64665272,
"domNodes": 123,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 9.085,
"eventListeners": 17,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.669999999999998,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "workflow-execution",
"durationMs": 415.36699999994653,
"styleRecalcs": 13,
"styleRecalcDurationMs": 15.682000000000002,
"layouts": 3,
"layoutDurationMs": 0.8969999999999999,
"taskDurationMs": 81.17099999999999,
"heapDeltaBytes": 4744796,
"heapUsedBytes": 66554372,
"domNodes": 121,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 8.169,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666665,
"p95FrameDurationMs": 16.800000000000182
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🧩 Custom Nodes Ecosystem Matrix: ✅ PassedExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight
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 |
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 5 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 1 |
| 🟡 Medium | 1 |
| 🟢 Low | 2 |
| ⚪ Nit | 1 |
Panel: 8/8 reviewers contributed findings.
| !event.isComposing && | ||
| !event.repeat | ||
| ) { | ||
| event.preventDefault() |
There was a problem hiding this comment.
🟠 High — onContainerKeydown calls preventDefault() but not stopPropagation(), unlike the editor-scoped handler at line 209, so an Escape consumed here keeps bubbling to the window keydown listener in GraphView.vue, where the default Escape binding runs Comfy.Graph.ExitSubgraph (the target is a <button>, so the TEXTAREA/INPUT/contentEditable bail-out doesn't apply). Stopping a run from the Send/Stop button would therefore also kick the user out of the current subgraph and exit agentNodeSelectionStore's node-selection mode, breaking the invariant the existing 'keeps handled Escapes inside the composer' test asserts for the editor path. Add event.stopPropagation() for parity.
Raised by 7 of 8 reviewers (claude-opus-5-thinking-max adversarial, gpt-5.6-sol-max adversarial, kimi-k3-max adversarial, claude-opus-5-thinking-max edge-case, gemini-3.1-pro edge-case, gpt-5.6-sol-max edge-case, kimi-k3-max edge-case).
There was a problem hiding this comment.
Tracked as FE-2649. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| <div | ||
| id="agent-composer" | ||
| class="relative flex flex-col rounded-lg border border-border-default bg-base-background" | ||
| @keydown="onContainerKeydown" |
There was a problem hiding this comment.
🟡 Medium — This container only sees Escape while focus is inside the composer, but Safari and Firefox on macOS do not focus a <button> on pointer click, so sending a prefilled draft by clicking Send leaves focus on <body> and the follow-up Escape never enters #agent-composer — the exact scenario this PR targets still fails there. The new test cannot catch it because userEvent.click explicitly focuses the clicked element; a listener scoped to running at a higher level would cover all browsers.
Raised by 2 of 8 reviewers (claude-opus-5-thinking-max edge-case, gpt-5.6-sol-max edge-case).
There was a problem hiding this comment.
Tracked as FE-2650. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| event.key === 'Escape' && | ||
| running.value && | ||
| !event.isComposing && | ||
| !event.repeat |
There was a problem hiding this comment.
🟢 Low — !event.repeat sits in the outer condition, so auto-repeated Escapes that arrive while the run is still winding down skip this handler entirely and bubble out — which becomes the same leak as the finding above once stopPropagation() is added. Handle (and stop) every Escape while running, and gate only the emit('stop') on !event.repeat.
Raised by 1 of 8 reviewers (gemini-3.1-pro edge-case).
There was a problem hiding this comment.
Tracked as FE-2651. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| // here, and once focus leaves the composer entirely this listener isn't in | ||
| // the event's bubble path either. | ||
| function onContainerKeydown(event: KeyboardEvent): void { | ||
| if ( |
There was a problem hiding this comment.
🟢 Low — The guard ignores event.defaultPrevented, so any descendant that consumes Escape with preventDefault() but no stopPropagation() — including arbitrary consumer content in the public #header slot — will additionally stop the run. Bailing out when event.defaultPrevented is true keeps already-handled Escapes from doubling as a run cancel.
Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
There was a problem hiding this comment.
Tracked as FE-2652. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
| // the event's bubble path either. | ||
| function onContainerKeydown(event: KeyboardEvent): void { | ||
| if ( | ||
| event.key === 'Escape' && |
There was a problem hiding this comment.
⚪ Nit — The match on event.key === 'Escape' does not exclude modifiers, so Shift+Escape (Chrome's task manager) and similar chords silently abort an in-flight run. The editor handler shares this gap, but it rarely held focus during a run; with the Send/Stop button now the usual focus owner this path is much more reachable.
Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).
There was a problem hiding this comment.
Tracked as FE-2653. The PR merged with this thread unresolved, so the finding is carried in Linear rather than lost here. Filed automatically; close the ticket if the finding is no longer true at main.
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #18296 +/- ##
==========================================
+ Coverage 83.21% 84.24% +1.03%
==========================================
Files 2960 2275 -685
Lines 146135 129226 -16909
Branches 37738 34910 -2828
==========================================
- Hits 121599 108863 -12736
+ Misses 23259 20067 -3192
+ Partials 1277 296 -981
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 735 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Cursor review follow-ups on the container-level Escape handler: - Move the running+Escape handling from a container-scoped keydown listener to a document-level one gated on the composer's own `running` state and on where focus actually is. Safari and Firefox don't move focus onto a plain-clicked <button> the way Chrome does, so a listener scoped to bubbling through the composer container never saw the follow-up Escape in those browsers; checking focus directly instead (inside the composer, or nowhere in particular) fixes the cross-browser gap while still ignoring Escape once focus has genuinely left the composer. - Call stopPropagation() so a stop-via-Escape can no longer also reach GraphView's window-level keydown listener and run Comfy.Graph.ExitSubgraph. - Contain (preventDefault/stopPropagation) every Escape while running, even a repeated one, only gating the stop emit itself on `!event.repeat`. - Bail out early when the event is already defaultPrevented. Adds a regression test that dispatches the Send click without moving focus to reproduce the Safari/Firefox case.
Cursor/reviewer follow-up: reconcile the composer's document-level Escape-while-running listener with the rest of the app's Escape handling. There is no central registry that arbitrates Escape ownership here - the codebase's actual convention is listener phase (capture vs bubble) plus explicit stopPropagation()/ stopImmediatePropagation() from whichever handler is more specific (useKeybindingService's role=menu/dialog bailouts, the mention picker's Escape-to-close, select's stopEscapeToDocument, and the capture-phase overlays in OnboardingCoach/TourSpotlight). Expand the comment above this listener to name those precedents explicitly so the coordination reads as deliberate rather than incidental.
The agent composer previously raced GraphView's window-level Escape keybinding dispatch with its own document-level listener plus stopPropagation, rather than actually participating in the app's single keybinding dispatch bus. platform/ can't import from workbench/ (layer architecture), so keybindingService couldn't see the composer's running state directly. Add a small registerEscapeOverride/consultEscapeOverride hook in platform/keybindings/escapeOverride.ts that keybindHandler consults before dispatching the default bare-Escape keybinding (Comfy.Graph.ExitSubgraph). The composer registers into it on mount and unregisters on unmount instead of listening on document directly. An open role=menu/menubar target and an open dialog still win over the override, since both carve-outs already return before it is consulted.
|
|
|
|
…nd (#18296) <!-- ccr-slack-attribution --> _Requested by **Jo Zhang** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1790013777983039?thread_ts=1790013777.983039&cid=C0BGH348Z0C)_ Escape now stops an in-progress agent turn even when the turn was started by clicking the Send button with the mouse, not just when it was started by pressing Enter. - **What**: Before, pressing Escape stopped the agent turn only if the composer's prompt editor still had keyboard focus. Submitting with Enter never moves focus away, so Escape worked there. Clicking Send with the mouse moves focus to the button instead, and the Escape-to-stop handler was wired only to the editor's own keydown event, so it never saw the keypress and the turn kept running. Added a keydown handler on the composer's outer container that also catches Escape while focus is anywhere else inside the composer (including the Send/Stop button), without changing any focus behavior. The existing editor-scoped handler is unchanged, and it still stops propagation before this new handler runs, so nothing fires twice. Escape still does nothing once focus has left the composer entirely (e.g. the user clicked elsewhere on the page) — that behavior is intentional and unchanged. - **Breaking**: none - **Dependencies**: none - `src/workbench/extensions/agent/components/agent/Composer.vue`: the new `onContainerKeydown` handler and its `@keydown` binding on the `#agent-composer` wrapper. - `src/workbench/extensions/agent/components/agent/Composer.test.ts`: new coverage for (1) Escape stopping a run after submitting via a mouse click on Send, and (2) Escape *not* stopping a run once focus has left the composer for an unrelated element on the page. Existing Enter+Escape tests were re-run unmodified and still pass. - [x] Added a unit test that clicks Send with the mouse, then presses Escape, and asserts the turn is stopped — confirmed it fails against the pre-fix code and passes after the fix. - [x] Re-ran the full `Composer.test.ts` suite (93 tests) — all pass, including the existing Enter-then-Escape and mention-picker-Escape cases. - [x] Re-ran the full `src/workbench/extensions/agent` unit test suite (122 files) — all pass, no regressions. - [x] `eslint`, `oxlint`, and `vue-tsc --noEmit` all pass on the changed files/repo. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017F6NfYxdCmZEFy9ut4cdUN
… via mouse click on Send (#18333) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-org.slack.com/archives/C0BGH348Z0C/p1790013777983039)_ Backport of #18296 to `cloud/1.54`. ## Before/After Before: pressing Escape stopped an in-progress agent turn only if the composer's prompt editor still had keyboard focus. Submitting with Enter never moves focus away, so Escape worked there, but clicking Send with the mouse moves focus to the button instead, and the Escape-to-stop handler was wired only to the editor's own keydown event — it never saw the keypress, so the turn kept running. After: a new `platform/keybindings/escapeOverride` hook lets the agent composer register a runtime override that `keybindingService`'s `keybindHandler` consults (after menus/dialogs, before the default `Comfy.Graph.ExitSubgraph` keybinding) whenever bare Escape is pressed. The composer registers a handler that stops the run while focus is anywhere inside the composer (including the Send/Stop button) or nowhere in particular (Safari/Firefox leave focus on `<body>` after a plain click), and declines once focus has genuinely moved elsewhere on the page. ## Conflict resolution notes Cherry-picked the squash-merge commit `c23a1e69cd1de8264ae108fa9f0acd3e33ca48e7` onto `cloud/1.54`. Two test files conflicted, both resolved by keeping both sides' intent: - `src/platform/keybindings/keybindingService.escape.test.ts`: import-only conflict. Kept `cloud/1.54`'s existing `pinia`/`reactive` imports (needed by its own pre-existing "legacy modal" test, which isn't on `main`) and added `afterEach` from the PR for the new `clearEscapeOverrides()` hook. - `src/workbench/extensions/agent/components/agent/Composer.test.ts`: content conflicts. Took the PR's replacement of the old raw-dispatch repeated-Escape assertion, and inserted the PR's three new tests (mouse-click Send, Safari/Firefox no-focus-move, focus-left-composer) ahead of `cloud/1.54`'s pre-existing "does not stop on Escape during IME composition" test, which was preserved unchanged. Dropped one piece of unrelated context ("shows the Stop tooltip while submitting and stops on Escape while streaming") that the PR's diff carried only as surrounding context from `main` — that test isn't part of PR #18296 and isn't present on `cloud/1.54` (added by a different, not-yet-backported PR), so pulling it in here would have been out of scope. Verified: `pnpm typecheck` (via pre-commit hook) and targeted `vitest run` on `escapeOverride.test.ts`, `keybindingService.escape.test.ts`, and `Composer.test.ts` — 109/109 passing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017F6NfYxdCmZEFy9ut4cdUN --- _Generated by [Claude Code](https://claude.ai/code/session_017F6NfYxdCmZEFy9ut4cdUN)_ Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
|
|
1 similar comment
|
…via mouse click on Send (#18334) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-org.slack.com/archives/C0BGH348Z0C/p1790013777983039)_ Backport of #18296 to `core/1.54`. Before: Pressing Escape stopped an in-progress agent turn only if the composer's prompt editor still had keyboard focus. Submitting with Enter never moves focus away, so Escape worked there, but clicking Send with the mouse moves focus to the button (or leaves it on `<body>` in Safari/Firefox), so the editor-scoped Escape handler never saw the keypress and the turn kept running. After: A `registerEscapeOverride` hook (`src/platform/keybindings/escapeOverride.ts`) is consulted by `keybindingService` before it dispatches the default bare-Escape keybinding. The agent composer registers into this hook while a turn is running, so Escape stops the run regardless of where focus landed after a mouse click on Send, without `keybindingService` importing from `workbench/`. Escape still does nothing once focus has genuinely left the composer for another part of the page. Cherry-pick conflicts in `keybindingService.escape.test.ts` and `Composer.test.ts` were caused by an unrelated, not-yet-backported test/mocking refactor already on `main` (unrelated to #18296). Resolved by keeping `core/1.54`'s existing test content/style intact and adding only the new Escape-override tests and imports introduced by #18296 on top of it. Verified with `pnpm typecheck`, `eslint` on changed files, and the full `keybindingService.escape.test.ts` + `escapeOverride.test.ts` + `Composer.test.ts` suites (109 tests, all passing). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017F6NfYxdCmZEFy9ut4cdUN --- _Generated by [Claude Code](https://claude.ai/code/session_017F6NfYxdCmZEFy9ut4cdUN)_ Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
…ng the run (#21960) ## Summary With an Agent turn running, Escape pressed to dismiss an attachment preview in the Agent composer stopped the turn instead of closing the preview. The preview opens on hover without taking focus, so the composer's "Escape stops the run" handling still saw the key; because it called `preventDefault()`/`stopPropagation()`, the preview also stayed open. The same happened through the registered Escape override when focus sat on the preview trigger or nowhere at all (a plain pointer click in Safari/Firefox leaves focus on `<body>`). An open preview now claims Escape in a document capture listener — the pattern `OnboardingCoach`/`TourSpotlight` already use to let an overlay pre-empt everything else — dismisses itself through its own open-change path so hover state stays consistent, and leaves an already-consumed (`defaultPrevented`) Escape alone. Escape with no preview open still stops the run; that behaviour is deliberate and preserved. - BE-23587 - PM-2074 ## Verification Behaviour on base `d10e365416` vs. candidate, Agent streaming, preview opened by hover: | focus when Escape is pressed | base | candidate | | --- | --- | --- | | prompt editor | run stopped, preview still open | preview closed, run keeps running | | preview trigger | run stopped, preview still open | preview closed, run keeps running | | nowhere (`<body>`) | run stopped, preview still open | preview closed, run keeps running | | inside the clicked preview | preview closed, run keeps running | same end state, different path: the capture listener consumes the key, so reka-ui's `escape-key-down`/dismissable layer no longer closes it | | no preview open | run stopped | run stopped | Unit: both new tests in `Composer.test.ts` fail on base with revision-bound assertions (`expected <div data-dismissable-layer …> to be null`; the page-level keydown spy called once) and pass on the candidate. `pnpm test:unit src/workbench/extensions/agent/components/agent/Composer.test.ts src/workbench/extensions/agent/components/agent/composer` — 313 passed, run twice on the candidate; `pnpm test:unit src/workbench/extensions/agent/components/agent` — 724 passed; `pnpm test:unit src/platform/keybindings src/components/sidebar/tabs/queue/MediaLightbox.test.ts` passed; `pnpm typecheck`, `pnpm lint:unstaged:fix`, `pnpm deps:audit`, `pnpm knip` clean. Real browser: an independent reviewer reproduced the actual cancellation in a real browser — red on base, green on the candidate — with a backend-free Storybook + Playwright Chromium harness: 21/21 on the candidate against 17/21 on base, the four base failures being exactly this defect in the prompt-editor, preview-trigger and `<body>`-focus cases. CI: `browser_tests/tests/agent/agentAssetPreviewSwitching.spec.ts`, which covers the clicked-preview Escape path, is part of the suite and ran green on this head (cloud 4/4, Chromium 16/16, `e2e-status` green). A local full-backend E2E run was attempted during implementation and could not be started there — the private image pull returned `Error response from daemon: denied` and the source-build fallback failed with `failed to fetch remote …: exec: "git": executable file not found in $PATH` — so the browser-level evidence is the reviewer's harness plus CI rather than a local backend run. Related, deferred: closing the reply-asset lightbox (`MediaLightbox`) restores focus to the element focused before it opened. When that was `<body>` — a plain pointer click on the thumbnail in Safari does not focus it — focus ends up nowhere, and the *next* Escape is claimed by the composer's "focus nowhere" rule and stops the run. That rule exists for the Safari/Firefox click-Send case (#18296), so narrowing it is a separate decision and is left out of this fix. --------- Co-authored-by: Kishore Shimikeri <kishore@comfy.org> Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Requested by Jo Zhang · Slack thread
Summary
Escape now stops an in-progress agent turn even when the turn was started by clicking the Send button with the mouse, not just when it was started by pressing Enter.
Changes
Review Focus
src/workbench/extensions/agent/components/agent/Composer.vue: the newonContainerKeydownhandler and its@keydownbinding on the#agent-composerwrapper.src/workbench/extensions/agent/components/agent/Composer.test.ts: new coverage for (1) Escape stopping a run after submitting via a mouse click on Send, and (2) Escape not stopping a run once focus has left the composer for an unrelated element on the page. Existing Enter+Escape tests were re-run unmodified and still pass.Test plan
Composer.test.tssuite (93 tests) — all pass, including the existing Enter-then-Escape and mention-picker-Escape cases.src/workbench/extensions/agentunit test suite (122 files) — all pass, no regressions.eslint,oxlint, andvue-tsc --noEmitall pass on the changed files/repo.🤖 Generated with Claude Code
https://claude.ai/code/session_017F6NfYxdCmZEFy9ut4cdUN