Repository navigation
feat(frontend): mark the public version, open what a listing advertises, and turn pinning on - #8579
Draft
yangzhang75 wants to merge 6 commits into
Draft
yangzhang75 wants to merge 6 commits into
yangzhang75 wants to merge 6 commits into
Conversation
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8579 +/- ##
==========================================
Coverage 92.60% 92.61%
- Complexity 5046 5053 +7
==========================================
Files 1252 1253 +1
Lines 53586 53878 +292
Branches 6673 6727 +54
==========================================
+ Hits 49625 49897 +272
- Misses 2317 2326 +9
- Partials 1644 1655 +11
*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:
|
1 of 7 tasks
Contributor
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 409 | 0.25 | 23,287/32,303/32,303 us | 🔴 +11.7% / 🔴 +138.6% |
| 🟢 | bs=100 sw=10 sl=64 | 818 | 0.499 | 121,732/137,339/137,339 us | 🟢 -9.9% / 🔴 +47.2% |
| 🔴 | bs=1000 sw=10 sl=64 | 928 | 0.566 | 1,073,157/1,191,316/1,191,316 us | 🔴 +6.5% / 🔴 +32.1% |
Baseline details
Latest main be65bf8 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 409 tuples/sec | 444 tuples/sec | 983 tuples/sec | -7.9% | -58.4% |
| bs=10 sw=10 sl=64 | MB/s | 0.25 MB/s | 0.271 MB/s | 0.6 MB/s | -7.7% | -58.3% |
| bs=10 sw=10 sl=64 | p50 | 23,287 us | 20,847 us | 10,903 us | +11.7% | +113.6% |
| bs=10 sw=10 sl=64 | p95 | 32,303 us | 36,239 us | 13,539 us | -10.9% | +138.6% |
| bs=10 sw=10 sl=64 | p99 | 32,303 us | 36,239 us | 16,174 us | -10.9% | +99.7% |
| bs=100 sw=10 sl=64 | throughput | 818 tuples/sec | 803 tuples/sec | 1,259 tuples/sec | +1.9% | -35.0% |
| bs=100 sw=10 sl=64 | MB/s | 0.499 MB/s | 0.49 MB/s | 0.769 MB/s | +1.8% | -35.1% |
| bs=100 sw=10 sl=64 | p50 | 121,732 us | 121,164 us | 86,981 us | +0.5% | +40.0% |
| bs=100 sw=10 sl=64 | p95 | 137,339 us | 152,372 us | 93,289 us | -9.9% | +47.2% |
| bs=100 sw=10 sl=64 | p99 | 137,339 us | 152,372 us | 105,695 us | -9.9% | +29.9% |
| bs=1000 sw=10 sl=64 | throughput | 928 tuples/sec | 937 tuples/sec | 1,300 tuples/sec | -1.0% | -28.6% |
| bs=1000 sw=10 sl=64 | MB/s | 0.566 MB/s | 0.572 MB/s | 0.793 MB/s | -1.0% | -28.6% |
| bs=1000 sw=10 sl=64 | p50 | 1,073,157 us | 1,068,578 us | 854,105 us | +0.4% | +25.6% |
| bs=1000 sw=10 sl=64 | p95 | 1,191,316 us | 1,118,558 us | 901,686 us | +6.5% | +32.1% |
| bs=1000 sw=10 sl=64 | p99 | 1,191,316 us | 1,118,558 us | 924,532 us | +6.5% | +28.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,488.78,200,128000,409,0.250,23286.53,32302.75,32302.75
1,100,10,64,20,2446.42,2000,1280000,818,0.499,121731.64,137339.34,137339.34
2,1000,10,64,20,21562.18,20000,12800000,928,0.566,1073157.08,1191316.34,1191316.34
yangzhang75
force-pushed
the
pin/7-listings
branch
4 times, most recently
from
September 28, 2026 21:13
948d15f to
0322b30
Compare
yangzhang75
force-pushed
the
pin/7-listings
branch
from
October 6, 2026 18:01
0322b30 to
12f841a
Compare
yangzhang75
marked this pull request as ready for review
October 6, 2026 18:42
yangzhang75
marked this pull request as draft
October 7, 2026 01:36
A public workflow follows the author's latest content, as publishing has
always done. This adds the other state: the author pins the version they
have now, and the public copy stops moving until they pin again.
`is_public` stays the on/off switch; `published_content` is the pin, NULL
while following. `WorkflowPublishService` owns the two states, and three
endpoints expose them: POST and DELETE `/workflow/pin/{wid}` to pin and
unpin, GET `/workflow/publish-status/{wid}` for what the author is shown.
Publishing and unpublishing move through the same service, so unpublishing
drops the pin rather than leaving a private workflow carrying one.
Two paths are narrowed so a pin can hold. A save wrote the whole row back,
so a publish landing while a save was in flight was silently rolled back,
and a request body could set the publish columns itself; saves now write
only name, description and content. Creating a workflow clears the publish
columns for the same reason.
Nothing reads the pinned copy yet: every workflow is in the following
state it is in today, and nothing on screen changes.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
With a version pinned, a workflow has two copies: the author's working copy and the frozen one on public show. This routes every read that serves a viewer without granted access through the frozen copy, and freezes the name and description with the graph. `WorkflowPublishService.publicCopyOf` returns the three fields as a group, so a surface cannot pick up the published graph under a title the author has not published; `WorkflowAccessResource.hasGrantedAccess` is the seam that decides which copy a caller gets. Granted access -- owner, shared, project member -- keeps tracking the author's latest, because sharing is not publishing. Name and description freeze because they are as public as the graph: if only the graph froze, a report about a title could be answered by editing the title while the pinned copy still advertised it. Routed through it: opening a workflow, the hub's read, Clone, Duplicate, `/workflow_name`, `/workflow_description` and the size a listing shows. A workflow that follows the author's latest -- every workflow today -- is served exactly what it is served now. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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>
yangzhang75
force-pushed
the
pin/7-listings
branch
from
October 8, 2026 18:07
12f841a to
b5ace52
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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.
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.
gui.workflow-workspace.version-pinning-enabledflips totrue, which iswhat 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 #7853, #8575, #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:
GuiConfigSpecnow pins the flag's default to on (72 tests); the dashboard packagepasses (572); scalafmt clean.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 5)
🤖 Generated with Claude Code