Skip to content

feat(frontend): mark the public version, open what a listing advertises, and turn pinning on - #8579

Draft
yangzhang75 wants to merge 4 commits into
apache:mainfrom
yangzhang75:pin/7-listings
Draft

yangzhang75 wants to merge 4 commits into
apache:mainfrom
yangzhang75:pin/7-listings

Conversation

@yangzhang75

@yangzhang75 yangzhang75 commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Two places outside the share dialog have to agree with the pin, and then the feature is complete.

  • The versions panel marks the version the Hub is serving, as a quiet second line under its
    timestamp rather than a tag: the panel is 230px wide, so horizontal room is scarce while
    vertical room is free. That row is also how an author who has moved on gets the published copy
    back — it is already in the panel, so restoring it is the restore they already know. The panel
    re-reads when the share dialog closes, since that is where the pin can have moved and the panel
    is covered until then.
  • Hub entries open what they advertise. A hub card shows the public copy, so an author whose
    working copy has moved on behind a pin now lands on the published preview — what they just saw,
    and where Clone gives them a copy of it — rather than in their editor showing something else.
    Their own listings are untouched: there the entry is their workflow.
  • The flag goes on. gui.workflow-workspace.version-pinning-enabled flips to true, which is
    what makes the switch appear in the share dialog. It is deliberately the last change of the
    series: every surface that has to agree with a pin is in place by the time an author can make
    one. Nothing downstream needed its own gate — a listing marker and a hub link both depend on a
    pin existing, and no pin can exist while the control is hidden.

Any related issues, documentation, discussions?

Closes #7943
Part of #7828. Design discussion: #7128. Stacked on #8576, #8577 and #8578; until those merge
this PR shows their commits too, and the review here is the last one.

This is the PR that turns the feature on. It should merge last.

How was this PR tested?

Frontend: the versions-list spec covers the marker appearing only on the version the Hub serves
and the panel re-reading when the announcement comes; the menu spec covers the announcement being
made when the share dialog closes, and not when the user has just revoked their own access and is
being navigated away; the registry spec covers the routing rule — a hub entry whose public copy
is behind goes to the preview, one that is not goes to the editor, and a private-search row is
never diverted; the card and list specs cover the argument reaching the rule. Full suite passes
(6608), production (AOT) build passes, prettier clean.

Backend: GuiConfigSpec now pins the flag's default to on (72 tests); the dashboard package
passes (572); scalafmt clean.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 5)

🤖 Generated with Claude Code

@github-actions github-actions Bot added engine frontend Changes related to the frontend GUI common platform Non-amber Scala service paths labels Sep 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @aglinxinyuan, @tanishqgandhi1908, @mengw15
    You can notify them by mentioning @aglinxinyuan, @tanishqgandhi1908, @mengw15 in a comment.

@codecov-commenter

codecov-commenter commented Sep 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.46018% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.35%. Comparing base (3726dd7) to head (f895a39).

Files with missing lines Patch % Lines
...t-panel/versions-list/versions-list.component.html 40.00% 3 Missing ⚠️
...shboard/user/workflow/WorkflowPublishService.scala 94.87% 1 Missing and 1 partial ⚠️
...ra/web/resource/dashboard/SearchQueryBuilder.scala 50.00% 1 Missing ⚠️
...esource/dashboard/WorkflowSearchQueryBuilder.scala 97.95% 1 Missing ⚠️
...ponent/user/share-access/share-access.component.ts 97.72% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8579      +/-   ##
============================================
+ Coverage     92.33%   92.35%   +0.02%     
- Complexity     5045     5046       +1     
============================================
  Files          1260     1260              
  Lines         54067    54259     +192     
  Branches       6755     6782      +27     
============================================
+ Hits          49921    50110     +189     
- Misses         2486     2491       +5     
+ Partials       1660     1658       -2     
Flag Coverage Δ *Carryforward flag
access-control-service 77.38% <ø> (ø)
agent-service 99.16% <ø> (ø) Carriedforward from 3726dd7
amber 87.38% <96.80%> (+0.06%) ⬆️
computing-unit-managing-service 60.48% <ø> (ø)
config-service 87.50% <100.00%> (+0.12%) ⬆️
file-service 82.00% <ø> (ø)
frontend 96.55% <96.00%> (+<0.01%) ⬆️
notebook-migration-service 83.73% <ø> (ø)
pyamber 98.57% <ø> (ø) Carriedforward from 3726dd7
workflow-compiling-service 72.43% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 6 better · 🔴 3 worse · ⚪ 6 noise (<±5%) · 0 without baseline

Compared against main 3726dd7 benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 384 0.234 25,338/32,831/32,831 us 🟢 -15.5% / 🔴 +138.0%
🟢 bs=100 sw=10 sl=64 803 0.49 123,353/157,658/157,658 us 🟢 -13.7% / 🔴 +70.5%
🟢 bs=1000 sw=10 sl=64 916 0.559 1,091,885/1,124,889/1,124,889 us 🟢 -9.3% / 🔴 +34.6%
Baseline details

Latest main 3726dd7 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 384 tuples/sec 405 tuples/sec 968.33 tuples/sec -5.2% -60.3%
bs=10 sw=10 sl=64 MB/s 0.234 MB/s 0.247 MB/s 0.591 MB/s -5.3% -60.4%
bs=10 sw=10 sl=64 p50 25,338 us 23,463 us 10,646 us +8.0% +138.0%
bs=10 sw=10 sl=64 p95 32,831 us 38,844 us 14,120 us -15.5% +132.5%
bs=10 sw=10 sl=64 p99 32,831 us 38,844 us 16,498 us -15.5% +99.0%
bs=100 sw=10 sl=64 throughput 803 tuples/sec 802 tuples/sec 1,252 tuples/sec +0.1% -35.9%
bs=100 sw=10 sl=64 MB/s 0.49 MB/s 0.49 MB/s 0.764 MB/s 0.0% -35.9%
bs=100 sw=10 sl=64 p50 123,353 us 121,145 us 83,736 us +1.8% +47.3%
bs=100 sw=10 sl=64 p95 157,658 us 182,738 us 92,464 us -13.7% +70.5%
bs=100 sw=10 sl=64 p99 157,658 us 182,738 us 108,561 us -13.7% +45.2%
bs=1000 sw=10 sl=64 throughput 916 tuples/sec 910 tuples/sec 1,321 tuples/sec +0.7% -30.7%
bs=1000 sw=10 sl=64 MB/s 0.559 MB/s 0.556 MB/s 0.806 MB/s +0.5% -30.7%
bs=1000 sw=10 sl=64 p50 1,091,885 us 1,089,584 us 811,260 us +0.2% +34.6%
bs=1000 sw=10 sl=64 p95 1,124,889 us 1,239,637 us 847,636 us -9.3% +32.7%
bs=1000 sw=10 sl=64 p99 1,124,889 us 1,239,637 us 879,277 us -9.3% +27.9%
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,521.28,200,128000,384,0.234,25337.53,32831.41,32831.41
1,100,10,64,20,2491.87,2000,1280000,803,0.490,123353.43,157658.31,157658.31
2,1000,10,64,20,21829.59,20000,12800000,916,0.559,1091885.32,1124888.58,1124888.58

@yangzhang75
yangzhang75 force-pushed the pin/7-listings branch 4 times, most recently from 948d15f to 0322b30 Compare September 28, 2026 21:13
@yangzhang75
yangzhang75 marked this pull request as ready for review October 6, 2026 18:42
@yangzhang75
yangzhang75 marked this pull request as draft October 7, 2026 01:36
@yangzhang75
yangzhang75 force-pushed the pin/7-listings branch 3 times, most recently from a14d056 to f665e29 Compare October 13, 2026 00:55
yangzhang75 and others added 4 commits October 18, 2026 15:06
Search and the listings it feeds were reading the author's live columns,
which for a pinned workflow is the one copy the public cannot open. A
draft would turn up in a public search under a title nobody has seen, and
the card would advertise a name the detail page does not show.

Each filter is now applied to whichever copy the caller may see:
`onVisibleCopy` builds the same filter twice -- over the live columns for
rows the caller was granted access to, over the frozen ones for rows they
reach only because the workflow is public -- and ORs the two. A
disjunction over bare columns rather than a CASE, so each side stays
eligible for its own fulltext index. Unpinned public rows fall back to
the live columns, so a following workflow searches exactly as it does now.

Listings carry two more things from the same query: the frozen name and
description to show a viewer without granted access, and whether the copy
on show is behind the author's working copy. `constructWhereClause` takes
`includePublic` for this; the other builders accept and ignore it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The author can pin a version, and their working copy then moves on. This
gives them a way back to what the public is seeing: pinning leaves an
anchor in the revision history they already use, and the panel marks it
as the one currently public, so restoring the published version is the
restore they already know.

The anchor is a version row whose delta is the identity patch, so
replaying it returns exactly what was pinned however many edits pile up
after. An existing row cannot stand in: a version row replays to the
content as it was *before* the change it records. Pinning content that is
already the pinned one reuses its anchor rather than adding a twin, and
the read that decides takes a row lock so two pins racing cannot both
insert.

Two consequences the anchor forces:

- It must not start the version panel's aggregation window. It lands
  seconds after the save it freezes, and the panel folds close-together
  versions into the newest, which would hide the author's own save behind
  a row they never made.
- The revision history is now readable only with granted access, or while
  nothing is pinned. Replaying a version folds deltas back from the
  author's current content, so listing versions of a pinned workflow would
  hand a public viewer the very edits the pin is holding back.

`publish-status` carries the pinned version's date, read from the version
row so the dialog and the panel print one value rather than two clocks'.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The share dialog said whether a workflow was public and nothing about
which copy the public was getting. With pinning that is now a choice, so
the dialog carries it: a two-option control -- Follow latest, or Pinned --
under the Public tile, plus a line naming the pinned version by the date
it went public.

Follow latest is the default and is exactly what publishing does today.
Pinning freezes the version the author has now; while a pin is in place
and their working copy has moved on, the panel says so and offers Update
to current, which is the only way those edits reach the public.

The panel re-reads its state when a save lands rather than on a timer:
`WorkflowPersistService` now emits on persist, rename and re-describe,
which is what makes "your edits are not public yet" appear as soon as the
autosave lands rather than the next time the dialog is opened. Publishing
returns the state it produced, so the panel does not have to ask again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…tises

Two places outside the share dialog have to agree with the pin.

The versions panel marks the version the Hub is serving, as a quiet
second line under its timestamp. That row is also how an author who has
moved on gets the published copy back: it is already in the panel, so
restoring it is the restore they already know. The panel re-reads when
the share dialog closes, since that is where the pin can have moved and
the panel is covered until then.

Hub entries open what they advertise. A hub card shows the public copy,
so an author whose working copy has moved on behind a pin now lands on
the published preview -- what they just saw, and where Clone gives them a
copy of it -- rather than in their editor showing something else. Their
own listings are untouched: there the entry is their workflow, and it
opens the editor as before.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common engine frontend Changes related to the frontend GUI platform Non-amber Scala service paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frontend: mark the public version and open what a listing advertises

2 participants