-
Notifications
You must be signed in to change notification settings - Fork 61
Improve version pinning behavior in collaborative editor #4166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Changes the version dropdown and read-only logic to use URL parameter presence instead of comparing lock versions. When viewing a run from history, only pins the version if it differs from latest, preventing unnecessary read-only mode when viewing latest version runs. The version dropdown now shows both "latest" and version numbers as separate options, making it clearer when editing the latest version versus viewing a pinned snapshot.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4166 +/- ##
==========================================
- Coverage 89.05% 89.05% -0.01%
==========================================
Files 425 425
Lines 19686 19691 +5
==========================================
+ Hits 17532 17536 +4
- Misses 2154 2155 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@stuartc @taylordowns2000 while working on this, I learnt that opening the collab editor with @taylordowns2000 I have updated the read-only tooltips to "You are viewing a pinned version of this workflow" instead of "You cannot edit because this an old snapshot.." |
Relocates the version mismatch banner from the top of the canvas to the bottom of the MiniHistory panel, improving UI organization and making the warning more contextual to the run being viewed. Changes the banner from dismissible to actionable - replaces the X button with a "Go to vN" button that navigates to the correct version. This makes it easier for users to resolve the mismatch rather than just hide it. The banner now supports two display modes: - Collapsed panel: constrained width (150px) wraps text to 3 lines - Expanded panel: full width keeps text and button on 1 line Updates tests to match new behavior and adds coverage for compact mode.
taylordowns2000
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome. thank you @midigofrank
|
I really love how this has been simplified! The logic using URL parameters makes so much more sense. Great work, @midigofrank One thing for future consideration (definitely not for this PR and I may have missed context from earlier conversations): the dropdown UX where both "latest" and "v19" appear when v19 is the latest version. Since they represent the same content but have different behaviours (editable vs read-only), it might be a bit confusing to users. Maybe "latest" could be a separate button outside of version dropdown, or the dropdown could use visual indicators to show which options are editable vs read-only (although that might be a bit cluttered). Not sure what the best solution would be yet... one to discuss and flag for a rainy day perhaps @taylordowns2000 @theroinaochieng . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this work - it's so much cleaner! And the version mismatch banner is so much nicer now.
Some feedback:
I think the tooltip message should be updated from "You are viewing a pinned version of this workflow" to "You are viewing an older version of this workflow". I think "pinned version" is a bit confusing. I didn't really understand what it meant until I dove more into the code and could see what was happening.It's not always an older version. Keep as is for now.- I fixed a small typo for variable name.
- I tested your 4th step in Validation steps and didn't get the behaviour you described. It sorts itself out when you click around, but it would be better if it was on latest (see Loom) - please confirm if this is expected behaviour or not. If it's expected I think we can merge.
Nice to have (shouldn't block merging):
- We should handle what happens when the user enters an invalid v= number in the URL (e.g.
v=99999). At the moment it gets stuck in "Loading workflow" (See Loom). If it's a quick win, we could include it in this PR.
Loom: https://www.loom.com/share/6b48692121904c6aa8d989204e211394
Also noting for future consideration, my comment here from before.
|
@midigofrank I also noticed this, but I think this should be a follow up issue https://www.loom.com/share/09bbafb4587d4aa386f9d13d766c2a51 There's some fishy behaviour after refreshing if two runs within the same workorder have different versions. It doesn't seem to be showing the correct version number. Stu was noting some observations about this on this issue |
|
So to be clear, I think we only need action on the stuff mentioned in "Some feedback" before merging:
Follow up issues:
|
|
@lmac-1 , confirmed that theres one missing link - the run detail page
|
Only include version param when snapshot differs from current workflow version. This prevents unnecessary read-only mode when viewing runs executed on the latest version.
Tests verify that the version param is: - Excluded when run snapshot matches current workflow version - Included when run snapshot differs from current workflow version

Description
Changes the version dropdown and read-only logic to use URL parameter presence instead of comparing lock versions. When viewing a run from history, only pins the version if it differs from latest, preventing unnecessary read-only mode when viewing latest version runs.
The version dropdown now shows both "latest" and version numbers as separate options, making it clearer when editing the latest version versus viewing a pinned snapshot.
Closes #4121
Closes #4149
Validation steps
1. Version Dropdown Behavior
?v=parameter?v=172. MiniHistory and Read-Only Mode
?v=Xparameter3. Latest Version with Pinned Parameter
?v=19to the URL (pinning to latest version)?vparameter is removed from the URL4. Clicking Latest Version Run in MiniHistory
?v=parameterAdditional notes for the reviewer
The key behavioral change is that we now use URL parameter presence (
?v=X) to determine read-only state, rather than comparing workflow lock versions. This makes the behavior more predictable and prevents unnecessary read-only mode when viewing runs at the latest version.AI Usage
Please disclose how you've used AI in this work (it's cool, we just want to know!):
You can read more details in our Responsible AI Policy
Pre-submission checklist
:owner,:admin,:editor,:viewer)