Repository navigation
fix(agent): preserve dragged media URL in sent messages - #20246
Conversation
Swarmhost agentic reviewThe detailed evaluation is available to employees in the internal Slack review thread. Evaluation budget remaining for this pull request: 96 automatic and 99 manual. Updated by Swarmhost's agentic review process. |
📦 Bundle: 9.41 MB gzip 🔴 +5 BDetailsSummary
Category Glance App Entry Points — 5.36 kB (baseline 5.36 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 2.16 MB (baseline 2.16 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration Status: 3 unchanged Views & Navigation — 147 kB (baseline 147 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces Status: 18 unchanged Panels & Settings — 669 kB (baseline 669 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens Status: 29 unchanged User & Accounts — 61.2 kB (baseline 61.2 kB) • ⚪ 0 BAuthentication, profile, and account management bundles Status: 15 unchanged Editors & Dialogs — 341 kB (baseline 341 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors Status: 12 unchanged UI Components — 211 kB (baseline 211 kB) • ⚪ 0 BReusable component library chunks Status: 24 unchanged Data & Services — 1.36 MB (baseline 1.36 MB) • ⚪ 0 BStores, services, APIs, and repositories Status: 25 unchanged Utilities & Hooks — 2.29 MB (baseline 2.29 MB) • ⚪ 0 BHelpers, composables, and utility bundles Status: 62 unchanged Vendor & Third-Party — 14.3 MB (baseline 14.3 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 19 MB (baseline 19 MB) • ⚪ 0 BBundles that do not match a named category
Status: 1 added / 1 removed / 351 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-10-12T08:53:05.172Z",
"gitSha": "c8aa8edc9bbaa08e5a17a144a9dd8e5d0142bbae",
"branch": "christian/fix-nested-agent-output",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2011.8659999999977,
"styleRecalcs": 11,
"styleRecalcDurationMs": 2.353,
"layouts": 11,
"layoutDurationMs": 1.8070000000000002,
"taskDurationMs": 288.096,
"heapDeltaBytes": -1418556,
"heapUsedBytes": 66193544,
"domNodes": -162,
"jsHeapTotalBytes": 3932160,
"scriptDurationMs": 5.952000000000001,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "canvas-idle",
"durationMs": 2011.349999999993,
"styleRecalcs": 11,
"styleRecalcDurationMs": 2.2030000000000003,
"layouts": 11,
"layoutDurationMs": 1.879,
"taskDurationMs": 289.26800000000003,
"heapDeltaBytes": -1212660,
"heapUsedBytes": 66609188,
"domNodes": -162,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 5.944000000000002,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1695.3619999999887,
"styleRecalcs": 71,
"styleRecalcDurationMs": 9.895,
"layouts": 12,
"layoutDurationMs": 1.987,
"taskDurationMs": 571.008,
"heapDeltaBytes": -7806600,
"heapUsedBytes": 66841484,
"domNodes": -162,
"jsHeapTotalBytes": 10485760,
"scriptDurationMs": 86.576,
"eventListeners": -67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1696.550000000002,
"styleRecalcs": 71,
"styleRecalcDurationMs": 9.402000000000001,
"layouts": 12,
"layoutDurationMs": 1.7720000000000002,
"taskDurationMs": 494.112,
"heapDeltaBytes": -234300,
"heapUsedBytes": 67478552,
"domNodes": -162,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 87.017,
"eventListeners": -67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1710.4319999999689,
"styleRecalcs": 18,
"styleRecalcDurationMs": 4.088,
"layouts": 13,
"layoutDurationMs": 1.907,
"taskDurationMs": 193.88400000000001,
"heapDeltaBytes": 20243000,
"heapUsedBytes": 87873240,
"domNodes": 47,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 7.016999999999999,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666990291262138,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1820.5360000000042,
"styleRecalcs": 19,
"styleRecalcDurationMs": 4.65,
"layouts": 14,
"layoutDurationMs": 2.22,
"taskDurationMs": 313.738,
"heapDeltaBytes": 20304704,
"heapUsedBytes": 88082092,
"domNodes": 47,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 7.701000000000001,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666972477064224,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-clipping",
"durationMs": 401.57299999998486,
"styleRecalcs": 15,
"styleRecalcDurationMs": 2.3030000000000004,
"layouts": 11,
"layoutDurationMs": 1.7959999999999998,
"taskDurationMs": 265.125,
"heapDeltaBytes": -1992896,
"heapUsedBytes": 65578688,
"domNodes": 0,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 96.14699999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.662500000000005,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 477.90700000001607,
"styleRecalcs": 15,
"styleRecalcDurationMs": 2.286,
"layouts": 11,
"layoutDurationMs": 1.573,
"taskDurationMs": 298.366,
"heapDeltaBytes": 381568,
"heapUsedBytes": 68121496,
"domNodes": 0,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 97.85100000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665517241379316,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 958.549000000005,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 614.722,
"heapDeltaBytes": -1973484,
"heapUsedBytes": 81011504,
"domNodes": -192,
"jsHeapTotalBytes": 13901824,
"scriptDurationMs": 39.8,
"eventListeners": -106,
"totalBlockingTimeMs": 327,
"frameDurationMs": 27.617142857142856,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-order-dense-n200-w200-i120",
"durationMs": 975.7769999999937,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 644.9040000000001,
"heapDeltaBytes": -1883520,
"heapUsedBytes": 81184668,
"domNodes": -192,
"jsHeapTotalBytes": 14426112,
"scriptDurationMs": 38.55200000000001,
"eventListeners": -105,
"totalBlockingTimeMs": 319,
"frameDurationMs": 27.311111111111106,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 691.6219999999953,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 278.40500000000026,
"heapDeltaBytes": -5184308,
"heapUsedBytes": 76353596,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 76.94399999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 92,
"frameDurationMs": 20.58823529411765,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-order-sparse-n1000-w20-i120",
"durationMs": 703.0229999999733,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 259.544,
"heapDeltaBytes": -5594308,
"heapUsedBytes": 74726480,
"domNodes": 0,
"jsHeapTotalBytes": 266240,
"scriptDurationMs": 80.375,
"eventListeners": 0,
"totalBlockingTimeMs": 93,
"frameDurationMs": 20.58529411764705,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "extension-clean-combined-draw",
"durationMs": 6337.769000000008,
"styleRecalcs": 2,
"styleRecalcDurationMs": 0.17,
"layouts": 2,
"layoutDurationMs": 0.3649999999999999,
"taskDurationMs": 5369.4439999999995,
"heapDeltaBytes": 5398708,
"heapUsedBytes": 84404904,
"domNodes": -258,
"jsHeapTotalBytes": 389120,
"scriptDurationMs": 4119.169,
"eventListeners": -68,
"totalBlockingTimeMs": 2,
"frameDurationMs": 20.91523178807947,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "extension-clean-combined-draw",
"durationMs": 5218.963000000031,
"styleRecalcs": 3,
"styleRecalcDurationMs": 0.5570000000000002,
"layouts": 3,
"layoutDurationMs": 0.4490000000000002,
"taskDurationMs": 4353.866,
"heapDeltaBytes": 12066252,
"heapUsedBytes": 90815368,
"domNodes": -258,
"jsHeapTotalBytes": 5107712,
"scriptDurationMs": 3515.2970000000005,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.864383561643834,
"p95FrameDurationMs": 33.30000000000018
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 5622.719000000017,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.0379999999999998,
"layouts": 5,
"layoutDurationMs": 0.7990000000000003,
"taskDurationMs": 4737.085999999999,
"heapDeltaBytes": -3168288,
"heapUsedBytes": 77433584,
"domNodes": -258,
"jsHeapTotalBytes": 1437696,
"scriptDurationMs": 3816.618,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 19.98718861209964,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "extension-rgthree-prototype-draw",
"durationMs": 5900.853000000041,
"styleRecalcs": 4,
"styleRecalcDurationMs": 0.6420000000000002,
"layouts": 4,
"layoutDurationMs": 0.6280000000000001,
"taskDurationMs": 4935.679,
"heapDeltaBytes": 17931188,
"heapUsedBytes": 97877556,
"domNodes": -258,
"jsHeapTotalBytes": -397312,
"scriptDurationMs": 3827.3709999999996,
"eventListeners": -68,
"totalBlockingTimeMs": 1,
"frameDurationMs": 18.72952380952381,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "large-combo-open",
"durationMs": 136.0239999999635,
"styleRecalcs": 20,
"styleRecalcDurationMs": 10.517,
"layouts": 11,
"layoutDurationMs": 2.291,
"taskDurationMs": 94.65300000000002,
"heapDeltaBytes": -8715296,
"heapUsedBytes": 84033792,
"domNodes": 917,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 5.652000000000001,
"eventListeners": 195,
"totalBlockingTimeMs": 0,
"frameDurationMs": 22.216666666666697,
"p95FrameDurationMs": 33.40000000000009
},
{
"name": "large-combo-open",
"durationMs": 130.35200000001623,
"styleRecalcs": 20,
"styleRecalcDurationMs": 11.542,
"layouts": 11,
"layoutDurationMs": 1.9980000000000002,
"taskDurationMs": 96.75999999999999,
"heapDeltaBytes": -9008792,
"heapUsedBytes": 85608296,
"domNodes": 917,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 5.423,
"eventListeners": 195,
"totalBlockingTimeMs": 0,
"frameDurationMs": 22.216666666666622,
"p95FrameDurationMs": 33.30000000000018
},
{
"name": "large-graph-idle",
"durationMs": 2028.8979999999697,
"styleRecalcs": 12,
"styleRecalcDurationMs": 3.147,
"layouts": 12,
"layoutDurationMs": 1.9559999999999997,
"taskDurationMs": 458.38100000000003,
"heapDeltaBytes": -31925172,
"heapUsedBytes": 66795584,
"domNodes": -258,
"jsHeapTotalBytes": 1736704,
"scriptDurationMs": 17.188000000000002,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66639344262295,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "large-graph-idle",
"durationMs": 2009.5250000000533,
"styleRecalcs": 9,
"styleRecalcDurationMs": 1.8770000000000002,
"layouts": 9,
"layoutDurationMs": 1.565,
"taskDurationMs": 407.283,
"heapDeltaBytes": -2277932,
"heapUsedBytes": 82043248,
"domNodes": -258,
"jsHeapTotalBytes": 3272704,
"scriptDurationMs": 16.113000000000003,
"eventListeners": -68,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665289256198346,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2089.302000000032,
"styleRecalcs": 69,
"styleRecalcDurationMs": 4.123000000000001,
"layouts": 9,
"layoutDurationMs": 1.5430000000000001,
"taskDurationMs": 1001.789,
"heapDeltaBytes": 11276972,
"heapUsedBytes": 88829188,
"domNodes": -258,
"jsHeapTotalBytes": 1662976,
"scriptDurationMs": 448.31100000000004,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.6664,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2128.787999999986,
"styleRecalcs": 69,
"styleRecalcDurationMs": 4.143000000000001,
"layouts": 9,
"layoutDurationMs": 1.5119999999999998,
"taskDurationMs": 1103.262,
"heapDeltaBytes": 1946020,
"heapUsedBytes": 86863800,
"domNodes": -258,
"jsHeapTotalBytes": 5332992,
"scriptDurationMs": 511.78599999999994,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66614173228346,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3125.6030000000123,
"styleRecalcs": 74,
"styleRecalcDurationMs": 5.306,
"layouts": 68,
"layoutDurationMs": 7.266,
"taskDurationMs": 982.5210000000001,
"heapDeltaBytes": -17457740,
"heapUsedBytes": 68292512,
"domNodes": -234,
"jsHeapTotalBytes": 3534848,
"scriptDurationMs": 431.971,
"eventListeners": -67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665957446808513,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3072.599000000025,
"styleRecalcs": 74,
"styleRecalcDurationMs": 5.406999999999999,
"layouts": 68,
"layoutDurationMs": 7.49,
"taskDurationMs": 935.191,
"heapDeltaBytes": 1439508,
"heapUsedBytes": 87270708,
"domNodes": 24,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 436.12600000000003,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665945945945946,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "legacy-node-drag",
"durationMs": 2152.1529999999984,
"styleRecalcs": 46,
"styleRecalcDurationMs": 3.0739999999999994,
"layouts": 7,
"layoutDurationMs": 1.029,
"taskDurationMs": 1112.76,
"heapDeltaBytes": 8771948,
"heapUsedBytes": 96156052,
"domNodes": 0,
"jsHeapTotalBytes": 4874240,
"scriptDurationMs": 517.898,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665891472868214,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2152.870000000007,
"styleRecalcs": 47,
"styleRecalcDurationMs": 3.585999999999999,
"layouts": 8,
"layoutDurationMs": 1.2779999999999998,
"taskDurationMs": 1161.4370000000001,
"heapDeltaBytes": 8552672,
"heapUsedBytes": 95960768,
"domNodes": 0,
"jsHeapTotalBytes": 5398528,
"scriptDurationMs": 539.21,
"eventListeners": 182,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665891472868218,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "minimap-idle",
"durationMs": 2039.8840000000291,
"styleRecalcs": 11,
"styleRecalcDurationMs": 2.3830000000000005,
"layouts": 11,
"layoutDurationMs": 1.802,
"taskDurationMs": 415.964,
"heapDeltaBytes": -1726432,
"heapUsedBytes": 85455524,
"domNodes": -258,
"jsHeapTotalBytes": 3047424,
"scriptDurationMs": 16.146999999999995,
"eventListeners": -67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.665853658536584,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2020.7000000000335,
"styleRecalcs": 10,
"styleRecalcDurationMs": 2.237,
"layouts": 10,
"layoutDurationMs": 1.6399999999999997,
"taskDurationMs": 416.91700000000003,
"heapDeltaBytes": -3337760,
"heapUsedBytes": 83761164,
"domNodes": -258,
"jsHeapTotalBytes": 3571712,
"scriptDurationMs": 17.463,
"eventListeners": -67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 395.84899999999834,
"styleRecalcs": 49,
"styleRecalcDurationMs": 3.750999999999999,
"layouts": 12,
"layoutDurationMs": 1.541,
"taskDurationMs": 263.95000000000005,
"heapDeltaBytes": 23021836,
"heapUsedBytes": 91119644,
"domNodes": 0,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 88.063,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 426.195000000007,
"styleRecalcs": 49,
"styleRecalcDurationMs": 4.012999999999999,
"layouts": 12,
"layoutDurationMs": 1.94,
"taskDurationMs": 273.27000000000004,
"heapDeltaBytes": 22388428,
"heapUsedBytes": 89477228,
"domNodes": 0,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 85.78999999999999,
"eventListeners": 46,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66538461538462,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 2010.5949999999666,
"styleRecalcs": 12,
"styleRecalcDurationMs": 2.4220000000000006,
"layouts": 12,
"layoutDurationMs": 2.091,
"taskDurationMs": 369.436,
"heapDeltaBytes": -6482464,
"heapUsedBytes": 70847564,
"domNodes": -180,
"jsHeapTotalBytes": 8650752,
"scriptDurationMs": 5.580000000000002,
"eventListeners": -114,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666942148760334,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2011.5610000000288,
"styleRecalcs": 13,
"styleRecalcDurationMs": 2.9219999999999993,
"layouts": 12,
"layoutDurationMs": 2.0439999999999996,
"taskDurationMs": 367.46900000000005,
"heapDeltaBytes": -6266636,
"heapUsedBytes": 61689352,
"domNodes": -180,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 5.236,
"eventListeners": -114,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666115702479342,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1676.2610000000109,
"styleRecalcs": 75,
"styleRecalcDurationMs": 9.984,
"layouts": 13,
"layoutDurationMs": 1.8850000000000002,
"taskDurationMs": 458.862,
"heapDeltaBytes": 13750896,
"heapUsedBytes": 81652704,
"domNodes": -180,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 59.474,
"eventListeners": -114,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666336633663363,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1679.3030000000044,
"styleRecalcs": 75,
"styleRecalcDurationMs": 10.139,
"layouts": 12,
"layoutDurationMs": 1.8550000000000002,
"taskDurationMs": 554.85,
"heapDeltaBytes": 43920,
"heapUsedBytes": 68155240,
"domNodes": -172,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 59.443999999999996,
"eventListeners": -112,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666336633663366,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 833.5169999999721,
"styleRecalcs": 21,
"styleRecalcDurationMs": 17.991,
"layouts": 5,
"layoutDurationMs": 8.937000000000001,
"taskDurationMs": 636.2970000000001,
"heapDeltaBytes": 33638444,
"heapUsedBytes": 114920396,
"domNodes": 15956,
"jsHeapTotalBytes": 16392192,
"scriptDurationMs": 24.366000000000003,
"eventListeners": 3244,
"totalBlockingTimeMs": 91,
"frameDurationMs": 19.838095238095235,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8106.266000000005,
"styleRecalcs": 250,
"styleRecalcDurationMs": 10.757000000000001,
"layouts": 10,
"layoutDurationMs": 1.734,
"taskDurationMs": 2981.587,
"heapDeltaBytes": -15338544,
"heapUsedBytes": 68826736,
"domNodes": -278,
"jsHeapTotalBytes": 4845568,
"scriptDurationMs": 1462.051,
"eventListeners": -66,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666255144032924,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8190.702999999985,
"styleRecalcs": 252,
"styleRecalcDurationMs": 11.360999999999999,
"layouts": 12,
"layoutDurationMs": 1.747,
"taskDurationMs": 3548.8450000000003,
"heapDeltaBytes": 8845568,
"heapUsedBytes": 93260940,
"domNodes": -258,
"jsHeapTotalBytes": 4808704,
"scriptDurationMs": 1530.3449999999998,
"eventListeners": -65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66598778004073,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 12588.409000000012,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11385.431999999999,
"heapDeltaBytes": -20757900,
"heapUsedBytes": 274688360,
"domNodes": -3330,
"jsHeapTotalBytes": 10952704,
"scriptDurationMs": 105.696,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.190725126475545,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "vue-large-graph-idle",
"durationMs": 13295.065000000022,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12283.997999999998,
"heapDeltaBytes": -27902000,
"heapUsedBytes": 267648208,
"domNodes": -3330,
"jsHeapTotalBytes": 7282688,
"scriptDurationMs": 139.09,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 22.49341216216216,
"p95FrameDurationMs": 33.400000000001455
},
{
"name": "vue-large-graph-pan",
"durationMs": 14472.987000000046,
"styleRecalcs": 68,
"styleRecalcDurationMs": 6.20699999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13734.562,
"heapDeltaBytes": -21223024,
"heapUsedBytes": 283982540,
"domNodes": -3330,
"jsHeapTotalBytes": 17166336,
"scriptDurationMs": 498.2460000000001,
"eventListeners": -655,
"totalBlockingTimeMs": 0,
"frameDurationMs": 25.20226480836237,
"p95FrameDurationMs": 50
},
{
"name": "vue-large-graph-pan",
"durationMs": 11955.25900000007,
"styleRecalcs": 64,
"styleRecalcDurationMs": 6.845999999999991,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 11111.936,
"heapDeltaBytes": -36412296,
"heapUsedBytes": 268888704,
"domNodes": -3330,
"jsHeapTotalBytes": 7806976,
"scriptDurationMs": 627.6299999999999,
"eventListeners": -651,
"totalBlockingTimeMs": 79,
"frameDurationMs": 20.890734265734267,
"p95FrameDurationMs": 49.899999999999636
},
{
"name": "vue-node-resize-workload",
"durationMs": 3187.661999999989,
"styleRecalcs": 20,
"styleRecalcDurationMs": 43.39200000000002,
"layouts": 20,
"layoutDurationMs": 15.612,
"taskDurationMs": 3047.9599999999996,
"heapDeltaBytes": -24708136,
"heapUsedBytes": 275293076,
"domNodes": -3330,
"jsHeapTotalBytes": 33628160,
"scriptDurationMs": 68.33699999999999,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.363758389261744,
"p95FrameDurationMs": 33.400000000000546
},
{
"name": "vue-node-resize-workload",
"durationMs": 3452.686999999969,
"styleRecalcs": 20,
"styleRecalcDurationMs": 44.97400000000001,
"layouts": 20,
"layoutDurationMs": 18.323000000000008,
"taskDurationMs": 3311.592,
"heapDeltaBytes": -47661964,
"heapUsedBytes": 257603756,
"domNodes": -3330,
"jsHeapTotalBytes": 15323136,
"scriptDurationMs": 61.819,
"eventListeners": -653,
"totalBlockingTimeMs": 0,
"frameDurationMs": 21.295679012345683,
"p95FrameDurationMs": 33.399999999999636
},
{
"name": "vue-zoom-out-idle",
"durationMs": 4693.619000000012,
"styleRecalcs": 1,
"styleRecalcDurationMs": 0.10200000000001874,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4065.7019999999998,
"heapDeltaBytes": 348416,
"heapUsedBytes": 279920348,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 46.05899999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.96678700361011,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 6143.944999999917,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5512.444,
"heapDeltaBytes": 4280944,
"heapUsedBytes": 255879600,
"domNodes": 0,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 47.46600000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 20.776013513513515,
"p95FrameDurationMs": 33.400000000001455
},
{
"name": "workflow-execution",
"durationMs": 440.8859999999777,
"styleRecalcs": 21,
"styleRecalcDurationMs": 9.68,
"layouts": 14,
"layoutDurationMs": 2.882,
"taskDurationMs": 103.98,
"heapDeltaBytes": 7076720,
"heapUsedBytes": 79779660,
"domNodes": 126,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 10.558000000000002,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 453.10799999992923,
"styleRecalcs": 22,
"styleRecalcDurationMs": 9.96,
"layouts": 13,
"layoutDurationMs": 2.7030000000000007,
"taskDurationMs": 90.73699999999998,
"heapDeltaBytes": 6583076,
"heapUsedBytes": 73945516,
"domNodes": 121,
"jsHeapTotalBytes": 524288,
"scriptDurationMs": 8.482,
"eventListeners": 1,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670370370370367,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 206.8699999999808,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.671,
"layouts": 76,
"layoutDurationMs": 10.907,
"taskDurationMs": 174.194,
"heapDeltaBytes": 9001136,
"heapUsedBytes": 100161720,
"domNodes": 4,
"jsHeapTotalBytes": 8650752,
"scriptDurationMs": 74.571,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66923076923079,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-empty-conversation-typing",
"durationMs": 220.83599999996295,
"styleRecalcs": 5,
"styleRecalcDurationMs": 0.761,
"layouts": 76,
"layoutDurationMs": 10.834999999999999,
"taskDurationMs": 186.46699999999998,
"heapDeltaBytes": -19759596,
"heapUsedBytes": 74734080,
"domNodes": 4,
"jsHeapTotalBytes": 11534336,
"scriptDurationMs": 75.804,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66428571428573,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 275.99399999996876,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.4569999999999999,
"layouts": 76,
"layoutDurationMs": 10.484,
"taskDurationMs": 226.46099999999998,
"heapDeltaBytes": -1804872,
"heapUsedBytes": 132271232,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 75.979,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66874999999999,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "agent-composer-long-conversation-typing",
"durationMs": 266.5700000000015,
"styleRecalcs": 5,
"styleRecalcDurationMs": 1.52,
"layouts": 76,
"layoutDurationMs": 10.463999999999999,
"taskDurationMs": 220.3,
"heapDeltaBytes": -2647784,
"heapUsedBytes": 131704384,
"domNodes": 4,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 71.70499999999998,
"eventListeners": 292,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.662500000000023,
"p95FrameDurationMs": 16.800000000000182
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
🎭 Playwright: ✅ 2264 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🧩 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 🌾 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 ae3afc4705a12efcaecde072e5299be0befc4767
Full docs: ADR-DEVEX-LINT-0015 |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 5 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 1 |
| 🟡 Medium | 2 |
| 🟢 Low | 2 |
Panel: 8/8 reviewers contributed findings.
AustinMroz
left a comment
There was a problem hiding this comment.
Looks like I'm a little out-of-the-loop on the changes made to asset drag/drop for agent support. I get the feeling solution here is just pushing a problem further down the stack.
In my original implementation, MIME_ASSET_INFO was intended to be the minimal information needed to resolve the asset being dragged. I would suspect it's better to pass an asset id (from which the /asset/<id>/content url can be derived) then to keep plugging in more information that's starting to self conflict.
PR gets my soft approval. I'm confident it won't break anything that isn't already using the preview_url field.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #20246 +/- ##
==========================================
+ Coverage 86.06% 86.88% +0.82%
==========================================
Files 3637 2601 -1036
Lines 173691 145963 -27728
Branches 45833 38026 -7807
==========================================
- Hits 149483 126826 -22657
+ Misses 22200 18750 -3450
+ Partials 2008 387 -1621
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1115 files with indirect coverage changes 🚀 New features to boost your workflow:
|
cc97a04
There was a problem hiding this comment.
Verdict: comment. Nothing blocks merge, but three P2 questions about the fix's scope should be answered first: whether /content plays on Cloud, the reload path, and the conflicting contract in #20157.
The drag fix works for a live session at 63db650. The video payload test and the list-view pin fail on the base util and pass here, and CI's playwright-video-new-tests (cloud) run passes the un-failed spec. My doubts are about scope. The URL lives only in memory, so a reload loses it. 3D still takes the broken lookup. The /content endpoint the fix relies on is disputed for Cloud media elements by two open drafts. And an open stacked PR assigns preview_url the opposite meaning. Six inline comments cover the line-level items: an untested audio branch (P2), a flatter shape for the preview choice, the ADR rule 2 wording, two spec comments, and a web-first assertion (all P3).
Pre-merge blockers: none.
Findings without an anchorable line (6)
- P2. #20157 gives
preview_urlthe opposite meaning. ryan-di's open #20157 (head7eaa868, stacked oncodex/agent-asset-tray-upgrade) keepspreview_urlas the video's poster image. It adds a separatemedia_urlfor the inline file URL, addsmedia_urltozDraggedAssetInfo, and its newassetDragUtil.test.tsexpectspreview_urlto be the poster for a video. This PR puts the playable file intopreview_url. The two edit the samepreview_url:line instartAssetDrag, and whichever lands second breaks the other's tests. A careless resolution would bind a poster PNG as<video src>inUserMessage.gridAsset. Please agree on one field contract with #20157 before either merges. A separatemedia_url, or an asset id per the existing-findings section below, would keeppreview_urlmeaning "a preview". - P3. The title and the spec say "identity", but only the render URL changed.
attachment_refis stillgetAssetUrlFilename(asset)(assetDragUtil.ts:75), and thatrefis what the composer posts (useAgentSession.ts:869) and dedupes on (AgentPanelRoot.vue:1825-1832). For an unhashed nested output that ref is the filename. So the sent message now previews asset A by id while the agent still resolves by name. Two outputs sharing a filename would show one asset and send the other. That mismatch existed before, but the preview used to hide it and now shows it. The change also applies to every video and audio drag, not only nested outputs. Something likefix(agent): preview dragged video and audio from their own file URLdescribes it. - P3. ADR context, lines 25-27, still says the payload carries a preview URL "for images". This sits outside the diff hunk, so there is no suggestion block. Suggested text: "(the asset's filename, display name, media kind, attachment reference and, where rule 2 allows, a preview URL)".
- P3. The PR body's Summary and Testing sections are stale. Testing lists
UserMessage.test.ts, which this PR does not change. It omitsAssetsSidebarListView.test.ts, which it does change. It reports "45 passed", but the two listed files give 47 at this head. It mentions no Playwright run, although the cloud shard passes in CI. Summary bullet 4 says "unit coverage for the video drag payload" and leaves out the 3D and cross-origin rows. It also leaves out the list-view expectation change fromundefinedto a/viewURL, which is a behavior change with the assets API off. - P3. The body skips the template's Changes, Review Focus and Screenshots sections. Reviewers need several design choices called out: the same-origin gate, excluding 3D, leaving
attachment_refunchanged, and the ADR amendment. - P3. No before/after capture. On Cloud, when the display name differs from the storage name, the sent video tile goes from a 404
/viewlookup to playing. One after-capture, or a link to theplaywright-video-new-testsrecording, would show it. The spec only checkssrc.
Questions (2)
-
P2. Should 3D be excluded? The sent message renders 3D from the same URL:
isReplyAssetKindincludes'3D'(replyAssets.ts:7), andReplyAssetGroup.inspectpassesasset.urltoLoad3dViewerContentasmodelUrl(ReplyAssetGroup.vue:122-129). A dragged nested.glbgets nopreview_url, sogridAssetstill builds/view?filename=<display name>&type=input(UserMessage.vue:135-139). That is #20245's defect for 3D. The bot's concern about advertising GLB bytes as a preview is real for consumers that treatpreview_urlas an image (AttachmentChiponly renders it forkind === 'image'). ForUserMessage, though, the field already means "the URL to render this attachment from". Related loose ends:- Issue #20245's first acceptance item says "non-image media drags carry the asset's own content URL", and
Fixes #20245will close it with 3D still open. - The ADR still rejects "Special-case video in
dragStart" because "one rule covers them all" (lines 89-90), and its Negative consequences do not mention the 3D gap.
Either include 3D or record the gap in the ADR and narrow the issue link.
- Issue #20245's first acceptance item says "non-image media drags carry the asset's own content URL", and
-
P3. What is the origin check guarding against? With the assets API on,
getAssetFileUrlgoes throughapi.apiURL, which is root-relative (api.ts:539-560), so the check cannot fail. With it off, the URL is the historypreview_url, built byresultItemUrlthroughapi.apiURL. I found no producer of an absolute one. When the check does fire, the message does not go without a preview.gridAssetfalls back to the display-name/viewrebuild this PR set out to remove. If the guard stays, is that fallback the behavior you want, or should a rejected URL mean no grid tile?
Existing findings confirmed or contested (6)
- AustinMroz, review: carry an asset id instead of adding URL fields. Confirmed, P2.
previewUrlis stored on the in-memoryUserAttachmentat ack time (useAgentSession.ts:990-997) and never posted. On reload or thread switch,userAttachmentsis rebuilt from the server transcript.parseUserAttachmentssetsidandkindbut neverpreviewUrl(agentTranscript.ts:105-131).gridAssetignoresidand rebuilds/api/view?filename=out_one.mp4&type=input. A scratchUserMessagetest with a rehydrated nested video reproduces this at this head: expected/assets/nested-video-asset/content, received/api/view?filename=out_one.mp4&type=input. So the fix holds only until the next reload. Deriving/assets/<id>/content?disposition=inlinefromitem.idingridAssetwould fix the live path and the reload path with one rule, andpreview_urlwould stay a preview. That would also remove the tension with ADR rule 1 ("no consumer may assume a preview is the file"), which this PR now breaks for video and audio. Austin's approach does not cover the assets-off path, where no content endpoint exists; the drag-side URL could stay for that case. - github-actions, disposition:
fileUrlhad attachment disposition. Addressed in63db650. Removing{ disposition: 'inline' }fails the video payload test. Makingtext/uri-listuse the inline URL fails the uri-list video row, so the URI is unchanged. Whether the inline URL plays on Cloud is a separate question; see the unverified section. - github-actions, non-image kinds: raw file URL for every non-image kind. Addressed. Only video and audio get the URL now, and widening to all non-image kinds fails the 3D row. Excluding 3D leaves its sent-message fallback broken; see question 1.
- github-actions, spec title: title claimed the video is sent by asset id. Addressed by the retitle. The comment added in its place has a leftover clause (inline on spec line 123), and the PR title still claims identity (body item 2).
- github-actions, list-view pin:
AssetsSidebarListView.test.tswould fail. Addressed incc97a04. It fails against the base util and passes here. - github-actions, absolute URLs: unnormalized absolute URL bound as media
src. Addressed by the origin check. Dropping the check fails the cross-origin row. Whether the check is reachable is question 2.
Unverified (1)
-
P2. Does
/api/assets/<id>/content?disposition=inlineplay in a<video>or<audio>element on Cloud? Two open drafts say it may not. #20359 reports that cookie-auth/contentrequests resolve in the session's default workspace, so assets in any other workspace 404. Media elements send cookies but no headers. #20339 (AustinMroz) disables/contenton Cloud as "not functional". If either is right, two things follow:- A hashed top-level video regresses. On base it rendered from
/view?filename=<hash>&type=input, which #20359 says resolves across workspaces. - If #20339 lands, the URL becomes the server
preview_url. An absolute one fails the origin check, the message falls back to the broken rebuild, and this spec's/assets/<id>/contentexpectation fails.
The spec mocks
/content, so it cannot catch a backend 404. To settle it: on Cloud, drag a hashed and an unhashed video from a non-default workspace, send, and check the media request status. - A hashed top-level video regresses. On base it rendered from
Checked and cleared (6)
- ADR title "Never the Preview URL" contradicting the change: no. The title is about the drag URI, which is still
getAssetFileUrl(asset)(assetDragUtil.ts:81-83). - Typing the payload object with
satisfiesagainstzDraggedAssetInfo: the base writer was equally untyped, and this diff changes values, not shape. AssetsSidebarListView.test.tspinning the full serialized payload: the base already pinned it, and the PR updated one value.- The spec rebuilding
AgentPanelmembers (chooseWorkflow,composer,sendButton) and having notest.step: those lines are unchanged by this diff. - Fallow
audit --base origin/main: four unused devDependencies, none in the changed files. Complexity and duplication are 0. no-commentsinventory: three blocks (spec header, spec assertion comment, ADR rule 2). The two spec comments have inline comments. ADR rule 2 is kept, since an ADR is where that rule belongs, with the wording fix inline.
Coverage
Depth standard. Lanes: correctness, maintainability, idiomaticity, tests (with writing-playwright-tests, reviewing-playwright-specs, hardening-flaky-e2e-tests), documentation. No lane skipped.
Checks at this head:
- focused vitest (
MediaAssetCard.test.ts,AssetsSidebarListView.test.ts,src/platform/assets/utils): 366 passed pnpm typecheckandpnpm typecheck:browser: exit 0- type-aware oxlint and oxfmt on changed files: clean
playwright test --liston the spec: 1 test,[cloud]
Red on base: the video payload test and the list-view pin fail with the base assetDragUtil.ts.
Mutations of assetDragUtil.ts:
- caught: drop origin check, widen to all non-image kinds, drop video branch, drop inline disposition, image takes inline URL, uri-list takes inline URL
- survived: drop audio branch, and a deny-list of image and 3D (both addressed by the table suggestion)
I did not run the Playwright spec locally; it needs a cloud-mode server. CI ran it green.
| const previewUrl = URL.parse(resolvePreviewUrl(asset), location.href) | ||
| const fileUrl = URL.parse(getAssetFileUrl(asset), location.href) | ||
| const inlineMediaUrl = | ||
| mediaKind === 'video' || mediaKind === 'audio' | ||
| ? URL.parse( | ||
| getAssetFileUrl(asset, { disposition: 'inline' }), | ||
| location.href | ||
| ) | ||
| : null | ||
| const mediaPreviewUrl = | ||
| mediaKind === 'image' | ||
| ? previewUrl | ||
| : inlineMediaUrl?.origin === location.origin | ||
| ? inlineMediaUrl | ||
| : undefined |
There was a problem hiding this comment.
P3. One decision, which renderable URL each media kind publishes, is now spread over three consts and a nested ternary. previewUrl is resolved for every kind but read only in the image arm. inlineMediaUrl uses null while mediaPreviewUrl uses undefined. The 3D, text and other outcome, which is the point of the last commit, only shows up as the fall-through of undefined?.origin === location.origin. The name inlineMediaUrl is also accurate only with the assets API on. With it off, getAssetFileUrl ignores disposition and returns preview_url or the /view URL (assetUrlUtil.ts:85-92), and that is the only mode where the origin check can fail.
A guard-clause helper spells out each kind's outcome. I have no suggestion block because the helper goes below startAssetDrag, outside this hunk. Replace lines 47-61 with:
const fileUrl = URL.parse(getAssetFileUrl(asset), location.href)
const mediaPreviewUrl = resolveDragPreviewUrl(asset, mediaKind)and add, with import type { MediaType } from '@/utils/formatUtil':
function resolveDragPreviewUrl(asset: AssetItem, mediaKind: MediaType) {
if (mediaKind === 'image') {
return URL.parse(resolvePreviewUrl(asset), location.href)
}
if (mediaKind !== 'video' && mediaKind !== 'audio') return null
const url = URL.parse(
getAssetFileUrl(asset, { disposition: 'inline' }),
location.href
)
return url?.origin === location.origin ? url : null
}I applied this locally at this head. oxfmt and type-aware oxlint are clean, and the 38 tests in MediaAssetCard.test.ts and AssetsSidebarListView.test.ts pass.
There was a problem hiding this comment.
Addressed in bbeb6f4: the rebase dropped the assetDragUtil.ts hunk, so main's assetMediaSources() owns this choice now and the nested ternary is gone.
| 2. Previews stay a rendering concern. `application/x-comfy-asset-info` keeps | ||
| `preview_url` for image previews, and `resolvePreviewUrl` remains the | ||
| source for `<img>` and `<video>` elements. Its own fallback resolves | ||
| through `getAssetContentId` as well, so no code path derives a content URL | ||
| from a job id. | ||
| `preview_url` for image previews and adds a same-origin, inline-disposition | ||
| file URL for playable video and audio attachments. Other non-image kinds | ||
| do not overload `preview_url` with raw file bytes. `resolvePreviewUrl` | ||
| remains the image source, and every file URL resolves through | ||
| `getAssetContentId`, so no code path derives a content URL from a job id. |
There was a problem hiding this comment.
P3. This rewrite dropped the sentence saying resolvePreviewUrl's own fallback resolves through getAssetContentId, so "Adopted only as the supporting tightening in rule 2" (line 85) now refers to nothing. The new claims also hold only with the assets API on. With it off, getAssetFileUrl returns preview_url || /view?... with no disposition and no getAssetContentId (assetUrlUtil.ts:85-92), and AssetsSidebarListView.test.ts:233-234 pins exactly that. "Playable" is really a filename-extension check, so I would name the kinds.
| 2. Previews stay a rendering concern. `application/x-comfy-asset-info` keeps | |
| `preview_url` for image previews, and `resolvePreviewUrl` remains the | |
| source for `<img>` and `<video>` elements. Its own fallback resolves | |
| through `getAssetContentId` as well, so no code path derives a content URL | |
| from a job id. | |
| `preview_url` for image previews and adds a same-origin, inline-disposition | |
| file URL for playable video and audio attachments. Other non-image kinds | |
| do not overload `preview_url` with raw file bytes. `resolvePreviewUrl` | |
| remains the image source, and every file URL resolves through | |
| `getAssetContentId`, so no code path derives a content URL from a job id. | |
| 2. Previews stay a rendering concern. `application/x-comfy-asset-info` keeps | |
| `preview_url` for image previews and, for video and audio, carries the | |
| same-origin URL from `getAssetFileUrl(asset, { disposition: 'inline' })` | |
| so a sent attachment can play. Other kinds carry no `preview_url`. | |
| `resolvePreviewUrl` remains the image source, and its own fallback | |
| resolves through `getAssetContentId` as well, so no code path derives a | |
| content URL from a job id. |
| it('uses the asset content URL to preview a dragged video attachment', () => { | ||
| vi.mocked(useFeatureFlags().flags).assetsEnabled = true | ||
| const { container } = renderCard({ asset: jobGroupedVideo }) | ||
|
|
||
| const { add } = dispatchDragStart(container, { | ||
| assetId: jobGroupedVideo.id | ||
| }) | ||
| const payload = add.mock.calls[0]?.[0] | ||
|
|
||
| expect(JSON.parse(String(payload))).toMatchObject({ | ||
| media_kind: 'video', | ||
| preview_url: `http://localhost:3000/api/assets/${videoAssetId}/content?disposition=inline` | ||
| }) | ||
| }) | ||
|
|
||
| it.for([ | ||
| { | ||
| kind: 'a non-playable 3D file', | ||
| assetsEnabled: true, | ||
| item: modelWithThumbnail | ||
| }, | ||
| { | ||
| kind: 'a cross-origin video', | ||
| assetsEnabled: false, | ||
| item: crossOriginHistoryVideo | ||
| } | ||
| ])( | ||
| 'does not publish raw bytes as preview_url for $kind', | ||
| ({ assetsEnabled, item }) => { | ||
| vi.mocked(useFeatureFlags().flags).assetsEnabled = assetsEnabled | ||
| const { container } = renderCard({ asset: item }) | ||
|
|
||
| const { add } = dispatchDragStart(container, { assetId: item.id }) | ||
| const payload = JSON.parse(String(add.mock.calls[0]?.[0])) | ||
|
|
||
| expect(payload).not.toHaveProperty('preview_url') | ||
| } | ||
| ) |
There was a problem hiding this comment.
P2. The PR claims audio gets the inline URL, but no test drags audio. If line 50 of assetDragUtil.ts becomes mediaKind === 'video', all 38 tests in this file and AssetsSidebarListView.test.ts still pass. A deny-list (mediaKind !== 'image' && mediaKind !== '3D') also passes, because the negative table has only a 3D row. That table also puts two dimensions under one name: the cross-origin row tests the origin check, not "raw bytes". JSON.parse(String(add.mock.calls[0]?.[0])) reports a missing call as a JSON parse error instead of a failed assertion. And media_kind: 'video' re-checks an unchanged field that the list-view test already pins.
One table keyed on the expected preview_url covers all of this. I ran it at this head: 28 tests pass. Each mutation fails exactly one row: dropping audio, the deny-list, and dropping the origin check. These cases only exercise startAssetDrag, so a src/platform/assets/utils/assetDragUtil.test.ts with a real DataTransfer would be the lower level if you'd rather not render a card per row. I kept them here so the suggestion fits in one hunk.
| it('uses the asset content URL to preview a dragged video attachment', () => { | |
| vi.mocked(useFeatureFlags().flags).assetsEnabled = true | |
| const { container } = renderCard({ asset: jobGroupedVideo }) | |
| const { add } = dispatchDragStart(container, { | |
| assetId: jobGroupedVideo.id | |
| }) | |
| const payload = add.mock.calls[0]?.[0] | |
| expect(JSON.parse(String(payload))).toMatchObject({ | |
| media_kind: 'video', | |
| preview_url: `http://localhost:3000/api/assets/${videoAssetId}/content?disposition=inline` | |
| }) | |
| }) | |
| it.for([ | |
| { | |
| kind: 'a non-playable 3D file', | |
| assetsEnabled: true, | |
| item: modelWithThumbnail | |
| }, | |
| { | |
| kind: 'a cross-origin video', | |
| assetsEnabled: false, | |
| item: crossOriginHistoryVideo | |
| } | |
| ])( | |
| 'does not publish raw bytes as preview_url for $kind', | |
| ({ assetsEnabled, item }) => { | |
| vi.mocked(useFeatureFlags().flags).assetsEnabled = assetsEnabled | |
| const { container } = renderCard({ asset: item }) | |
| const { add } = dispatchDragStart(container, { assetId: item.id }) | |
| const payload = JSON.parse(String(add.mock.calls[0]?.[0])) | |
| expect(payload).not.toHaveProperty('preview_url') | |
| } | |
| ) | |
| it.for([ | |
| { | |
| kind: 'a video', | |
| assetsEnabled: true, | |
| item: jobGroupedVideo, | |
| previewUrl: `http://localhost:3000/api/assets/${videoAssetId}/content?disposition=inline` | |
| }, | |
| { | |
| kind: 'an audio file', | |
| assetsEnabled: true, | |
| item: fromPartial<AssetItem>({ | |
| id: 'voice', | |
| name: 'voice.mp3', | |
| tags: ['output'] | |
| }), | |
| previewUrl: | |
| 'http://localhost:3000/api/assets/voice/content?disposition=inline' | |
| }, | |
| { | |
| kind: 'a 3D file', | |
| assetsEnabled: true, | |
| item: modelWithThumbnail, | |
| previewUrl: undefined | |
| }, | |
| { | |
| kind: 'a text file', | |
| assetsEnabled: true, | |
| item: fromPartial<AssetItem>({ | |
| id: 'notes', | |
| name: 'notes.txt', | |
| tags: ['output'] | |
| }), | |
| previewUrl: undefined | |
| }, | |
| { | |
| kind: 'a cross-origin video', | |
| assetsEnabled: false, | |
| item: crossOriginHistoryVideo, | |
| previewUrl: undefined | |
| } | |
| ])( | |
| 'sets the drag preview_url for $kind', | |
| ({ assetsEnabled, item, previewUrl }) => { | |
| vi.mocked(useFeatureFlags().flags).assetsEnabled = assetsEnabled | |
| const { container } = renderCard({ asset: item }) | |
| const { add } = dispatchDragStart(container, { assetId: item.id }) | |
| const [payload] = add.mock.calls[0] ?? [] | |
| assert(typeof payload === 'string') | |
| expect(JSON.parse(payload).preview_url).toBe(previewUrl) | |
| } | |
| ) |
There was a problem hiding this comment.
| // | ||
| // #18197 proved the drag source is correct (a nested row attaches its own | ||
| // output), and #18104 repaired `UserMessage`'s `splitAttachments` to prefer | ||
| // `item.previewUrl`. But `startAssetDrag` publishes `preview_url` only for | ||
| // `mediaKind === 'image'`, so a video drags none, and the fallback rebuilds | ||
| // `/view?filename=<ref>&type=input` from `attachment_ref`. For a nested output | ||
| // that ref is the display filename, because `outputAssetUtil` deliberately | ||
| // does not copy the jobs-endpoint hash onto nested items. | ||
| // `item.previewUrl`. This covers the remaining non-image path: the drag must | ||
| // publish the asset's content URL rather than make the sent message rebuild | ||
| // `/view?filename=<ref>&type=input` from the display filename. |
There was a problem hiding this comment.
P3. "This covers the remaining non-image path" overclaims. Only video is driven here. A dragged 3D file still gets no preview_url and falls back to the display-name /view lookup (UserMessage.vue:135-139). With the assets API off, the drag publishes /view?filename=<name>&type=output, not a content URL. The #18197/#18104 history belongs in the commit message. Lines 17-18 sit outside the hunk but are stale for the same reason ("The last unverified link", "NON-IMAGE"), so I'd trim them in the same edit.
| // | |
| // #18197 proved the drag source is correct (a nested row attaches its own | |
| // output), and #18104 repaired `UserMessage`'s `splitAttachments` to prefer | |
| // `item.previewUrl`. But `startAssetDrag` publishes `preview_url` only for | |
| // `mediaKind === 'image'`, so a video drags none, and the fallback rebuilds | |
| // `/view?filename=<ref>&type=input` from `attachment_ref`. For a nested output | |
| // that ref is the display filename, because `outputAssetUtil` deliberately | |
| // does not copy the jobs-endpoint hash onto nested items. | |
| // `item.previewUrl`. This covers the remaining non-image path: the drag must | |
| // publish the asset's content URL rather than make the sent message rebuild | |
| // `/view?filename=<ref>&type=input` from the display filename. | |
| // | |
| // With the assets API on, the drag publishes the dragged video's content URL, | |
| // so the sent message does not rebuild `/view?filename=<ref>&type=input` from | |
| // the display filename. |
| // The dragged output is what the sent message must show. A nested output | ||
| // has no hash, so a ref-based `/view?filename=<display name>&type=input` | ||
| // only resolves when the display name happens to equal the storage name - | ||
| // the PM-1157/PM-1158 shape. Assert the source identifies the dragged | ||
| // asset by its own id instead. | ||
| // the PM-1157/PM-1158 shape. Assert the rendered preview source identifies | ||
| // the dragged asset by its own id instead; attachment upload identity is | ||
| // a separate backend-facing contract. |
There was a problem hiding this comment.
P3. The test title, the header comment and the assertion message at lines 132-133 already say what this checks. The last clause, "attachment upload identity is a separate backend-facing contract", is left over from the review thread and names a contract the code never defines. The backend still receives attachment_ref, which here is the display filename.
| // The dragged output is what the sent message must show. A nested output | |
| // has no hash, so a ref-based `/view?filename=<display name>&type=input` | |
| // only resolves when the display name happens to equal the storage name - | |
| // the PM-1157/PM-1158 shape. Assert the source identifies the dragged | |
| // asset by its own id instead. | |
| // the PM-1157/PM-1158 shape. Assert the rendered preview source identifies | |
| // the dragged asset by its own id instead; attachment upload identity is | |
| // a separate backend-facing contract. |
There was a problem hiding this comment.
Addressed in bbeb6f4: the leftover "attachment upload identity" clause is gone, and this assertion comment now matches main's wording.
| // the PM-1157/PM-1158 shape. Assert the rendered preview source identifies | ||
| // the dragged asset by its own id instead; attachment upload identity is | ||
| // a separate backend-facing contract. | ||
| const src = await video.getAttribute('src') |
There was a problem hiding this comment.
P3. Now that test.fail() is gone, this one-shot getAttribute read followed by a non-retrying expect decides whether CI passes. The flake table in browser_tests/README.md (Snapshot-then-assert) asks for a retrying assertion here. I have no suggestion block because lines 132-134 fall outside the diff hunk. Replace lines 129-134 with:
await expect(
video,
`content requests: ${contentRequests.join(', ')}; ` +
`ref-based /view requests: ${viewRequests.join(', ')}`
).toHaveAttribute('src', new RegExp(`/assets/${NESTED_VIDEO.id}/content`))There was a problem hiding this comment.
Addressed in e7e31b2: the one-shot getAttribute read is now a retrying toHaveAttribute('src', …). The request-recording arrays, which only fed the old failure message, are removed, and both routes still serve the fixture.
63db650 to
bbeb6f4
Compare
|
Rebased onto current |
There was a problem hiding this comment.
Verdict: comment. The round-2 blockers are fixed at bbeb6f4. Five P2 items remain: reload loses the URL, untested audio, a stale PR body, the 3D scope, and the Cloud /content question.
The rebase onto main does what my last review asked. The drag-side hunk is gone. recordUser carries mediaUrl into UserAttachment, and UserMessage prefers it for video and audio. The updated UserMessage.test.ts row fails against the base UserMessage.vue (base returns blob:poster) and passes here. That also fixes the poster-as-<video src> bug #20156 left on main. One side effect is also an improvement: an uploaded video's sent tile used to point at the composer's thumbnail blob, which settleSubmission revokes, and it now uses the upload's /view URL. I no longer consider my earlier request for changes blocking. The remaining items are P2 and P3, and four inline comments cover the line-level ones.
Pre-merge blockers: none.
Findings without an anchorable line (11)
-
P2. The URL lives only until the next hydrate, not just until a reload.
parseUserAttachments(agentTranscript.ts:109-135) returnsname,ref,idandkind, with no URL.hydrate()replaces every turn's attachments (agentConversationStore.ts:1144-1158). After that, a sent nested video goes back to/view?filename=<display name>&type=input. Hydrate runs on:- page reload
- switching threads and back
- a 409 reattach in the same thread
- Stop on a snapshot turn (
useAgentSession.tshydrate callers)
The hydrated entry still carries the asset
id, soattachmentUrlcould build/assets/<id>/content?disposition=inlinefor video and audio before the/viewfallback. This is AustinMroz's suggestion. If you'd rather leave it, say in the body that the fix covers the live session only, and track the rest in a follow-up instead ofFixes #20245. -
P2. The PR body describes the first revision, not this one. At this head:
- The Summary says the PR carries the content URL "when dragging" and adds "unit coverage for the video drag payload". Neither change is in this diff; main's
assetDragUtil.tsalready publishesmedia_url. - Testing lists
MediaAssetCard.test.tswith "45 passed". That file is not in this diff, and your latest comment says 242. - The body never says where the fix lives:
recordUser→UserAttachment.mediaUrl→UserMessage.attachmentUrl. - The template's Verification and Review Focus sections are missing.
- The Summary says the PR carries the content URL "when dragging" and adds "unit coverage for the video drag payload". Neither change is in this diff; main's
-
P3. The title says "identity", but
ref,idandattachment_refare untouched, and audio is covered too. Your head commit's subject fits better:fix(agent): preserve dragged media URL in sent messages. -
P3. The
splitAttachmentsdocblock is stale (UserMessage.vue:127-133, outside the hunk). "A ref resolves to the uploaded input file; an image without one still has its local preview" no longer describes the rule: a captured URL wins first,mediaUrlfor video and audio andpreviewUrlotherwise. The rest of the block is ticket history (Uy, FE-1323, DES-530). Deleting the block, or replacing the stale sentence with that rule, would fix it. -
P3. The
UserAttachmentdocblock is stale (agentTranscript.ts:15-26, outside the hunk). It saysref"resolves the preview", but the captured URLs now take priority, and it doesn't mentionpreviewUrlormediaUrl. A line saying both are captured at send time and never come back from the server would also explain finding 1. -
P3. The spec header still says "the drag must publish the asset's content URL" (round-1 thread, still current at line 24). Main's drag already does that; the send path is what this spec now pins. The round-1 suggestion still applies. Wording that places the fix on the send path:
// #18197 proved the drag source is correct (a nested row attaches its own // output). This covers the send path: the sent message must keep the dragged // video's media URL rather than rebuild `/view?filename=<ref>&type=input`. -
P3. The spec reads
srconce and checks it with anexpectthat doesn't retry (round-1 thread). Those lines are outside this diff. Now that the test gates CI, a retrying assertion is safer, and with one thecontentRequestsandviewRequestsarrays (lines 68-87) only feed a failure message and can go. Keep bothroute.fulfillhandlers so the test stays off the network:await expect(panel.getByTestId('reply-video-preview')).toHaveAttribute( 'src', new RegExp(`/assets/${NESTED_VIDEO.id}/content`) )
-
P3. The required E2E workflow hasn't run the newly enabled spec at this head. In run 38109115149 ("CI: Tests E2E"),
lint-pr / server-factsfailed onvueDirectiveErrorDiagnostics.ts:34, a file outside this diff. Preflight failed with it, andplaywright-tests-cloud-shardedwas skipped. The only green evidence is "CI: Playwright Videos" (run 38109115089): its six cloud shards report 48 passed each, and the spec is in their file list. Please link that run, or a rerun of the required workflow, in the Testing section. -
P3, nit. The playable-kind check (
kind === 'video' || kind === 'audio') is now written at seven sites:assetDragUtil.ts,useAttachment.localPreviewanduploadedPreview,AssetThumbnail.vue,AssetHoverPreview.vue,MediaAssetCard.vue, and nowUserMessage.vue:164. No shared helper exists. One exported predicate next toisReplyAssetKindwould be a reasonable follow-up. It doesn't have to be in this PR. -
P3, follow-up. ADR-ASSETS-DRAG-DROP-0035 predates #20156. Rule 2 still says
preview_urlis for image previews only and thatresolvePreviewUrlfeeds<video>, and the context's field list has nomedia_url. #20156 introduced this drift, but this PR adds a second<video>consumer ofmedia_url. An amendment here or right after would keep the ADR honest. -
P3. No before/after capture. The sent nested-video tile goes from a failed
/viewload to the real clip. One after-capture, or the trace from the Playwright Videos run, would show it.
Questions (1)
- P2. Is 3D in scope for
Fixes #20245? This is carried from round 1. Main'sassetMediaSourcesgives 3D nomedia_url, andattachmentUrlusespreviewUrlfor 3D. A dragged nested.glbstill opensLoad3dViewerContentwith the display-name/view?filename=<ref>&type=inputURL (ReplyAssetGroup.vueinspect). The issue's first acceptance item says "non-image media drags carry the asset's own content URL". Either include 3D, or narrow the issue link and say so in the body.
Unverified (1)
- P2. Does the sent Cloud tile load, and what happens when #20339 merges? On Cloud, the sent tile is now a cookie-only
<video src="/api/assets/<id>/content?disposition=inline">. #20359 reports that this 404s outside the default workspace, and moves hashed Cloud media to/view?filename=<hash>. On base, a hashed top-level video's sent tile used/api/view?filename=<hash>&type=input, which #20359 says works across workspaces. So this PR may regress hashed videos in non-default workspaces while it fixes nested ones. Separately, #20339 (AustinMroz, draft) changesgetAssetFileUrlto skip/contenton Cloud. This spec runs only in the cloud project and expects/assets/<id>/content, so whichever PR merges second turns it red. To settle the first part: on testcloud, in a non-default workspace, drag a hashed video and send it, then check the<video>request status. Agreeing on a Cloud media URL with #20339 and #20359 settles the second.
Checked and cleared (6)
- Blob revocation after send: not a problem. A send can't start while an attachment is uploading. The uploader always returns
api.apiURL('/view?filename=…&type=input')(AgentPanelRoot.vue:1631-1640), andupdateAttachmentswaps the blob for that URL before send. I confirmed this with a scratch vitest drivinguseAttachmentand the composer store throughsettleSubmission(id, true)while spying onURL.revokeObjectURL: the sentmediaUrlis/api/view?filename=clip.mp4&type=input, and only the poster blob is revoked.dropAttachmentPreviewsnot revokingmediaUrlis therefore no leak. - Video or audio attachments with a
previewUrlbut nomediaUrl: none. Drag payloads setmedia_urlfor every playable asset, and uploads setmediaUrl. Inline prompt atoms never reach the sent attachments. mediaUrlused for images: no producer setsmediaUrlon an image, so no test is owed.- The
recordUsermap: it's needed. Spreading the composer attachment would overwriteUserAttachment.id(the server asset id) with the composer uuid. - The spec rebuilding
AgentPanelmembers (chooseWorkflow,composer,sendButton) instead of using the fixture'sagentPanel: those lines are unchanged by this diff. - #19601 (open, based on pre-#20156 main): its new
stageAcceptedAssetCardforwards onlypreviewUrl. A mechanical rebase would dropmediaUrland silently undo this fix. This spec would catch that, so I'm only noting it for whoever rebases #19601.
Earlier findings at this head
Round 1 (review):
- P3 flatter helper in
assetDragUtil.ts: addressed inbbeb6f4by dropping the hunk (reply). - P3 ADR rule 2 wording: addressed; the amendment is gone (reply). Main's ADR drift is item 10 above.
- P2 audio untested: still open, moved to the new
attachmentUrlaudio branch (inline onUserMessage.test.ts). - P3 spec header overclaims: still open (item 6).
- P3 leftover clause in the spec assertion comment: addressed (reply).
- P3 snapshot-then-assert on
src: still open (item 7). - P2 #20157 opposite
preview_urlmeaning: resolved; the PR now follows main'smedia_urlcontract. - P2 reload loses the URL (AustinMroz's asset-id suggestion): still open (item 1).
- P2 Cloud
/contentplayback: still unverified (Unverified 1). - P2 3D excluded: still open (Questions 1).
- P3 origin-check question: superseded; the code is gone.
- P3 "identity" title: still open (item 3).
- P3 stale PR body, missing template sections, no capture: still open (items 2 and 11).
Round 2 (review):
- P1 drag-side hunk contradicts main's contract: addressed (reply).
- P1 fix belongs in the consumer: addressed by the
recordUserandattachmentUrlchanges. - P2 poster bound as
<video src>on main: addressed; the updated row fails on base and passes here.
The five github-actions threads from round 1 have author replies and stay addressed. No other reviewer has posted since.
Coverage
Depth standard. Lanes: correctness, tests (with writing-playwright-tests, reviewing-playwright-specs, hardening-flaky-e2e-tests), maintainability with idiomaticity (combined for this 5-file diff), and documentation.
Checks at this head:
- vitest over agent
message/,useAgentSession,services/agentandstores/agent: 933 passed pnpm typecheckandpnpm typecheck:browser: exit 0- type-aware oxlint, oxfmt and eslint on changed files: clean
playwright test --liston the spec: 1[cloud]test
Mutations of attachmentUrl and recordUser:
- video uses
previewUrlfirst: caught by the updated row /viewfallback removed: caught by 5 rows- audio branch removed: survives (inline suggestion fixes it)
mediaUrldropped fromrecordUser: survives in unit tests (inline test fixes it)mediaUrlused for every kind: survives, but no producer sets it on an image
I did not run the Playwright spec locally; it needs a cloud server.
| { name: 'a.png', previewUrl: 'blob:a' }, | ||
| { name: 'clip.mp4', ref: 'upload_clip.mp4' } | ||
| { | ||
| name: 'clip.mp4', | ||
| ref: 'upload_clip.mp4', | ||
| previewUrl: 'blob:poster', | ||
| mediaUrl: 'blob:video' | ||
| } | ||
| ] | ||
| }) | ||
|
|
||
| expect(stubbedAssets()).toEqual([ | ||
| { url: 'blob:a', filename: 'a.png', kind: 'image' }, | ||
| { |
There was a problem hiding this comment.
P2. The new audio branch of attachmentUrl (UserMessage.vue:164) has no test. When I narrow it to kind === 'video' ? item.mediaUrl : item.previewUrl, every agent unit test and the browser spec still pass, and a sent audio attachment falls back to the display-name /view lookup again. One audio entry in this row covers it. I ran the suggestion at this head: 21 pass, and the narrowed branch fails this row. The audio entry sits before the video so both edits stay inside this hunk.
| { name: 'a.png', previewUrl: 'blob:a' }, | |
| { name: 'clip.mp4', ref: 'upload_clip.mp4' } | |
| { | |
| name: 'clip.mp4', | |
| ref: 'upload_clip.mp4', | |
| previewUrl: 'blob:poster', | |
| mediaUrl: 'blob:video' | |
| } | |
| ] | |
| }) | |
| expect(stubbedAssets()).toEqual([ | |
| { url: 'blob:a', filename: 'a.png', kind: 'image' }, | |
| { | |
| { name: 'a.png', previewUrl: 'blob:a' }, | |
| { name: 'song.mp3', ref: 'upload_song.mp3', mediaUrl: 'blob:song' }, | |
| { | |
| name: 'clip.mp4', | |
| ref: 'upload_clip.mp4', | |
| previewUrl: 'blob:poster', | |
| mediaUrl: 'blob:video' | |
| } | |
| ] | |
| }) | |
| expect(stubbedAssets()).toEqual([ | |
| { url: 'blob:a', filename: 'a.png', kind: 'image' }, | |
| { | |
| url: 'blob:song', | |
| filename: 'upload_song.mp3', | |
| kind: 'audio', | |
| label: 'song.mp3' | |
| }, | |
| { |
There was a problem hiding this comment.
Addressed in e7e31b2: applied as suggested. The audio row fails when attachmentUrl narrows to kind === 'video'.
| (item.ref | ||
| ? api.apiURL(`/view?filename=${encodeURIComponent(item.ref)}&type=input`) | ||
| : undefined) | ||
| const url = attachmentUrl(item, kind) |
There was a problem hiding this comment.
Nit (P3): attachmentUrl has one caller, and the change it makes is to swap item.previewUrl for a kind-based choice. Inlining keeps the original ?? shape, drops the third name (capturedUrl) and the bare return, and avoids the truthiness check, which now sends an empty-string URL to /view where ?? would not. No suggestion block, because the edit spans this line and the hunk at 158-168. Replace line 148 with the block below and delete lines 158-168:
const url =
(kind === 'video' || kind === 'audio' ? item.mediaUrl : item.previewUrl) ??
(item.ref
? api.apiURL(`/view?filename=${encodeURIComponent(item.ref)}&type=input`)
: undefined)There was a problem hiding this comment.
Withdrawn. I tried inlining in e7e31b2 before pushing, but the repository's pre-push fallow audit flagged gridAsset for complexity (cyclomatic 10, CRAP 31.6), so I kept attachmentUrl as written. The stale splitAttachments docblock above it is deleted.
| attachments?.map(({ name, previewUrl, mediaUrl, ref }) => ({ | ||
| name, | ||
| previewUrl, | ||
| mediaUrl, |
There was a problem hiding this comment.
P3. Only the cloud Playwright spec covers this line. When I remove mediaUrl, here, the 1095 unit tests across useAgentSession, useAgentDraftSubmission, stores/agent, AgentPanelRoot, ConversationView and message/ all pass. The nearest test, "(h) attachments pass through to the postMessage wire body", checks only the wire body. The spec did not run in the required E2E workflow at this head (see the review body). One unit test next to (h) would catch a dropped field. It goes in useAgentSession.test.ts, which is outside this diff, so it's prose here:
it('keeps the media URL on the sent user entry', async () => {
const session = useAgentSession({
rest: fakeRest(),
events: fakeEvents().source
})
session.start()
await session.sendMessage('use this', [
{
ref: 'clip.mp4',
name: 'clip.mp4',
mediaUrl: '/api/view?filename=clip.mp4&type=input'
}
])
expect(session.entries.value[0]).toMatchObject({
role: 'user',
attachments: [{ mediaUrl: '/api/view?filename=clip.mp4&type=input' }]
})
})I ran it at this head: it passes, and it fails once mediaUrl, is removed from this map.
There was a problem hiding this comment.
Addressed in e7e31b2: useAgentSession.test.ts gains "keeps the media URL on the sent user entry", which fails when mediaUrl is dropped from this map.
| ref: string | ||
| name: string | ||
| previewUrl?: string | ||
| mediaUrl?: string |
There was a problem hiding this comment.
Nit (P3): SentAttachment is a hand-copied subset of ComposerAttachment, which is its only runtime producer (useAgentDraftSubmission.ts). This PR had to add mediaUrl to it by hand. Deriving the type makes the next field arrive automatically. No suggestion block, because it needs an import outside this hunk:
import type { ComposerAttachment } from '../../types/composerAttachment'
type SentAttachment = Pick<
ComposerAttachment,
'ref' | 'name' | 'previewUrl' | 'mediaUrl'
>There was a problem hiding this comment.
Addressed in e7e31b2: SentAttachment is now Pick<ComposerAttachment, 'ref' | 'name' | 'previewUrl' | 'mediaUrl'>.
Dismissed after independent review of current head bbeb6f4. The review\x27s blocking preview_url contract conflict is removed: the fix now preserves the merged media_url contract through recordUser and makes sent video/audio prefer mediaUrl over previewUrl or the display-name /view fallback. UserMessage unit coverage passes locally (21 tests); the cloud browser regression remains enabled. The review\x27s reload/3D concerns are not represented as resolved by this dismissal.
- inline the sent attachment URL choice in UserMessage.gridAsset and drop stale comments - derive SentAttachment from ComposerAttachment - add an audio row to the reply grid test and a recordUser mediaUrl test - use AgentPanel helpers and a retrying src assertion in the nested video spec Amp-Thread-ID: https://ampcode.com/threads/T-01a1177b-fc45-73ee-9012-2a8e92b4f052
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: approved at e7e31b2.
At my request, the review orb pushed e7e31b2 on top of the author's commits, so no independent reviewer has looked at that commit. Before approving, I checked relevance against current main (ae3afc4). The nested-video spec is still test.fail there. Main's recordUser also drops mediaUrl, and UserMessage still rebuilds /view?filename=<ref>&type=input. #18700 and #20172 don't touch this path, so this fix is still needed.
Open and non-blocking, now listed in the PR body:
- A sent bubble falls back to the
reflookup after a reload or hydrate. - 3D drags carry no
media_url. - Cloud
/contentplayback outside the default workspace is unverified (#20359, #20339).
Review record
What e7e31b2 changed:
- added an audio row to the reply-grid routing test
- added a
useAgentSessiontest that the sent entry keepsmediaUrl - derived
SentAttachmentwithPick<ComposerAttachment, …> - deleted the stale
splitAttachmentsdocblock and corrected theUserAttachmentone - in the nested-video spec: the header now names the send path, it uses
AgentPanelhelpers, it asserts with a retryingtoHaveAttribute('src', …), and the dead request-recording arrays are gone - updated the PR title and body to match the head
Round 1 (review):
- P3 flatter helper in
assetDragUtil.ts: obsolete after the rebase (reply) - P3 ADR rule 2 wording: obsolete after the rebase (reply). Main's ADR predates #20156; that is a follow-up.
- P2 audio untested: fixed in
e7e31b2(reply) - P3 spec header: fixed in
e7e31b2(reply) - P3 leftover clause in the spec comment: fixed in
bbeb6f4(reply) - P3 snapshot-then-assert: fixed in
e7e31b2(reply) - P2 #20157's opposite
preview_urlmeaning: resolved; the PR follows main'smedia_urlcontract - P2 reload loses the URL (AustinMroz's asset-id suggestion): open, documented as a known limit; it needs the Cloud
/contentquestion settled first - P2 Cloud
/contentplayback: unverified, documented - P2 3D excluded: open, documented; main's drag contract has no 3D
media_url - P3 origin-check question: obsolete; that code is gone
- P3 "identity" title and stale PR body: fixed; title and body updated
Round 2 (review, later dismissed):
- P1 drag-side hunk contradicts main's contract: fixed in
bbeb6f4(reply) - P1 fix belongs in the consumer: fixed in
bbeb6f4 - P2 poster bound as
<video src>: fixed inbbeb6f4
Round 3 (review):
- P2 audio row: fixed in
e7e31b2(reply) - Nit, inline
attachmentUrl: withdrawn because the pre-push fallow complexity gate flaggedgridAsset(reply) - P3
recordUserunit test: fixed ine7e31b2(reply) - Nit, derive
SentAttachment: fixed ine7e31b2(reply) - P3 stale docblocks: fixed in
e7e31b2 - P3 required E2E not run: resolved; the required E2E workflow ran green at this head
- Follow-ups outside this PR: the ADR drift, a shared playable-kind predicate, and a before/after capture
Other reviewers:
- The five github-actions threads were addressed by the author in round 1.
- AustinMroz's review is covered by the reload item above.
- CodeRabbit approved.
Checks at e7e31b2:
- vitest over agent
message/,useAgentSession,services/agentandstores/agent: 934 passed - mutations: dropping the audio branch and dropping
mediaUrlfromrecordUsereach fail exactly one new test pnpm typecheck,pnpm typecheck:browser, oxlint, eslint, oxfmt, knip and fallow audit: clean- hosted CI: 109 success, 26 skipped, 0 failed, including
e2e-status,playwright-tests-cloud-sharded1-4 andplaywright-video-new-tests (cloud)
comfy-greenlight-bot
left a comment
There was a problem hiding this comment.
This pull request at head commit e7e31b2 has been reviewed and approved by Swarmhost's agentic review process.
The detailed evaluation is available to employees in the internal Slack review thread.
…messages (#20246) (#20980) Manual backport of #20246 to `cloud/1.56` after backport automation did not create a PR. Validation: 228 focused Agent tests passed; app typecheck, formatting, type-aware Oxlint, ESLint, and Knip passed. The change includes the release-compatible local `ComposerAttachment` type adaptation required by this branch. --------- Co-authored-by: Alexander Brown <drjkl@comfy.org>
…essages (#20246) (#20979) Manual backport of #20246 to `core/1.56` after backport automation did not create a PR. Validation: 228 focused Agent tests passed; app typecheck, formatting, type-aware Oxlint, ESLint, and Knip passed. The change includes the release-compatible local `ComposerAttachment` type adaptation required by this branch. --------- Co-authored-by: Alexander Brown <drjkl@comfy.org>
Summary
A dragged nested video lost its own file URL once the message was sent: the sent bubble rebuilt
/view?filename=<display name>&type=input, which only resolves when the display name equals the storage name. Since #20156 the drag already publishesmedia_url; this PR carriesmediaUrlthroughuseAgentSession.recordUserintoUserAttachment, andUserMessagenow prefers it for video and audio (images keeppreviewUrl; anything without a captured URL keeps the/view?filename=<ref>fallback). This also stops a video poster from being bound as<video src>.Known limits, unchanged from main: the captured URLs live only in the live session, so after a reload or hydrate the bubble falls back to the
reflookup; 3D drags carry nomedia_url, so a sent nested.glbstill uses the fallback.Fixes #20245
Verification
pnpm exec vitest runover agentmessage/,useAgentSession,services/agent,stores/agent: 934 passed. New cases: an audio row in the reply-grid routing test, and auseAgentSessiontest that the sent user entry keepsmediaUrl(each fails when its branch is removed).browser_tests/tests/agent/agentNestedOutputSentPreview.spec.tsis no longertest.fail; it drives the real nested-row drag, sends, and asserts the sent videosrcis/assets/<id>/content(cloud project).pnpm typecheck,pnpm typecheck:browser, oxlint, oxfmt, eslint, knip, and fallow audit pass.