Repository navigation
feat(frontend): preview an operator's result when hovering it on the canvas - #9058
Conversation
Every external output port of an operator that keeps its result is stored, but results were only ever read from the first port, so a Split's second output or an If's True branch could not be shown. A pagination request can now name the output port to read, with the first port as the default, and the reply carries the port it read and that port's row count. The live result updates keep following the first port, so a client paging another port takes the count from the reply. The result store's count per operator now comes from the first port too; it was built from every stored port, so a terminal Split's second output could replace its first output's count. On the frontend, the result service gives each extra port its own pagination service, which names its port in its requests, keeps no page cache and takes its row count from each reply, and every port's service takes its schema only from replies to its own requests. The result table and its row detail can show any port. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
083308b to
99dfefa
Compare
Switching the table to another output port left the previous port's rows on screen when the new port was empty, with the loading state never ending, and a late reply for the previous port could replace the new port's rows. A port change now starts from an empty table, a reply for an operator or port no longer shown is dropped, and an empty page ends the loading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…canvas Resting the pointer on an operator for half a second shows a card beside it with the operator's first rows and its size, or its error, or how to keep a result the run did not keep. A pointer passing over, dragging, or a click opens nothing, and the card lingers a moment so the pointer can move into it. An operator with several outputs says the rows are the first output's. The preview can be turned off under Layers, and stays off while the heat-map overlay is on. The first rows come from a request of their own, so a preview never moves the result table's page or reads its cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
99dfefa to
a64630b
Compare
Automated Reviewer SuggestionsBased on the
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #9058 +/- ##
============================================
+ Coverage 91.82% 91.84% +0.01%
- Complexity 5066 5068 +2
============================================
Files 1273 1275 +2
Lines 55338 55540 +202
Branches 7001 7037 +36
============================================
+ Hits 50814 51010 +196
+ Misses 2802 2791 -11
- Partials 1722 1739 +17
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Resolve the conflicts with apache#8766: a page with no rows takes its columns from the stored schema, and the reply still carries the port's total count and is dropped when it belongs to another operator or port. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 392 | 0.239 | 24,711/36,826/36,826 us | 🔴 +10.5% / 🔴 +201.2% |
| 🔴 | bs=100 sw=10 sl=64 | 798 | 0.487 | 117,964/177,693/177,693 us | 🔴 +18.7% / 🔴 +103.9% |
| ⚪ | bs=1000 sw=10 sl=64 | 957 | 0.584 | 1,036,490/1,096,739/1,096,739 us | ⚪ within ±5% / 🔴 +34.1% |
Baseline details
Latest main 94914a0 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 392 tuples/sec | 412 tuples/sec | 1,019 tuples/sec | -4.9% | -61.5% |
| bs=10 sw=10 sl=64 | MB/s | 0.239 MB/s | 0.251 MB/s | 0.622 MB/s | -4.8% | -61.6% |
| bs=10 sw=10 sl=64 | p50 | 24,711 us | 22,355 us | 10,144 us | +10.5% | +143.6% |
| bs=10 sw=10 sl=64 | p95 | 36,826 us | 38,954 us | 12,225 us | -5.5% | +201.2% |
| bs=10 sw=10 sl=64 | p99 | 36,826 us | 38,954 us | 15,527 us | -5.5% | +137.2% |
| bs=100 sw=10 sl=64 | throughput | 798 tuples/sec | 866 tuples/sec | 1,371 tuples/sec | -7.9% | -41.8% |
| bs=100 sw=10 sl=64 | MB/s | 0.487 MB/s | 0.528 MB/s | 0.837 MB/s | -7.8% | -41.8% |
| bs=100 sw=10 sl=64 | p50 | 117,964 us | 113,433 us | 79,910 us | +4.0% | +47.6% |
| bs=100 sw=10 sl=64 | p95 | 177,693 us | 149,665 us | 87,155 us | +18.7% | +103.9% |
| bs=100 sw=10 sl=64 | p99 | 177,693 us | 149,665 us | 106,643 us | +18.7% | +66.6% |
| bs=1000 sw=10 sl=64 | throughput | 957 tuples/sec | 983 tuples/sec | 1,415 tuples/sec | -2.6% | -32.4% |
| bs=1000 sw=10 sl=64 | MB/s | 0.584 MB/s | 0.6 MB/s | 0.864 MB/s | -2.7% | -32.4% |
| bs=1000 sw=10 sl=64 | p50 | 1,036,490 us | 1,017,468 us | 780,407 us | +1.9% | +32.8% |
| bs=1000 sw=10 sl=64 | p95 | 1,096,739 us | 1,099,821 us | 817,814 us | -0.3% | +34.1% |
| bs=1000 sw=10 sl=64 | p99 | 1,096,739 us | 1,099,821 us | 848,683 us | -0.3% | +29.2% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,510.31,200,128000,392,0.239,24711.39,36826.47,36826.47
1,100,10,64,20,2506.72,2000,1280000,798,0.487,117963.73,177692.80,177692.80
2,1000,10,64,20,20898.94,20000,12800000,957,0.584,1036489.50,1096738.66,1096738.66…nd keep it fresh Pressing an output port to drag a link now closes the card: a native capture listener on the paper replaces element/blank:pointerdown, which JointJS never emits for a magnet. Deleting the card's operator closes it and cancels a pending one, and ngOnDestroy clears both card timers. The card fetches its rows again on its operator's result updates until it shows a full preview, keeping the rows on show while it does. selectPage's default column limit is ALL_COLUMNS, as peekFirstRows' is: Number.MAX_SAFE_INTEGER fails the server's Int parse, so the row details modal's request was never answered. The heat-map test now waits out the preview delay, and a new test covers the Layers > Result preview toggle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The row details modal's column limit is a separate fix, as the review asked, so selectPage goes back to what it was before 7e4e75f. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
carloea2
left a comment
There was a problem hiding this comment.
Rechecked the addressed threads and preview behavior. No further blocker found; CI is green.
…mit (apache#9242) ### What changes were proposed in this PR? `selectPage` defaulted its column limit to `Number.MAX_SAFE_INTEGER`, which the server cannot read as an Int, so a request that left it out was never answered and was recorded as a compilation error. The Row Details modal and report generation both leave it out. The default is now `ALL_COLUMNS`, which is Int.MaxValue, and the page cache is keyed by the same value. ### Any related issues, documentation, discussions? Closes apache#9241. Found in the review of apache#9058, which uses the same value for its hover preview. ### How was this PR tested? A new `workflow-result.service.spec.ts` case checks that a page asked for without a column limit sends `ALL_COLUMNS`, and the existing cache case still passes on the default. In the running app, Row Details shows the clicked row and no error is recorded. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
What changes were proposed in this PR?
Resting the pointer on an operator for half a second shows a card beside it with the operator's first rows and its size, or its error, or how to keep a result the run did not keep. A pointer passing over, dragging, or a click opens nothing, and the card lingers a moment so the pointer can move into it. Any press on the canvas, including on a port to draw a link, closes the card, and so does deleting its operator. An operator with several outputs says the rows are the first output's. The preview can be turned off under Layers, and stays off while the heat-map overlay is on.
The first rows come from a request of their own, so a preview never moves the result table's page or reads its cache. While the operator runs, the card fetches again on each of its result updates until it has its rows.
The PR's own changes are a64630b, 7e4e75f and 18159ea.
Any related issues, documentation, discussions?
Closes #9057. Part of #9052. Design discussed in #8842.
How was this PR tested?
A new spec for the hover card covers a table's rows and size, an error, a chart, no result, and several outputs. New cases in the workflow editor's spec cover the delay before the card opens and the moment it lingers, and the result service's spec covers fetching the first rows without moving the table. Further cases cover closing the card on a press on a port, on its operator's deletion and when the editor is destroyed, refetching while the operator runs, and the preview staying off under the heat map and the Layers toggle. The affected frontend specs pass.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5.5)
🤖 Generated with Claude Code