Skip to content
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

Revert All Selection #68

Closed
SSimpl3 opened this issue Apr 4, 2021 · 19 comments
Closed

Revert All Selection #68

SSimpl3 opened this issue Apr 4, 2021 · 19 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@SSimpl3
Copy link

SSimpl3 commented Apr 4, 2021

Problem Description

Easily revert every single selection that can be reverted with the click of a button. In cases the script did an oopsie I would like to easily and quickly revert all change made by the script. I can just click all then press a "Revert All Selection" button to have the opposite effect for reversible script

Proposed solution

Add a button that says "Revert All Selection", between script preset selection and OS selection maybe

Alternatives considered

Additional information

I used the 0.10.1 version

@SSimpl3 SSimpl3 added the enhancement New feature or request label Apr 4, 2021
@mikhoul
Copy link

mikhoul commented Apr 4, 2021

Here's a reg file that I compiled that revert most windows services to their default so 99% of the tweaks will be reverted if you merge this file in your registry.

IMPORTANT: Since not all windows versions have the same services it will merge services that don't exist on some Windows version. So you should review the file manually before using it. Also this reg file can contain error du to Microsoft updates and other changes. So you use it at your own risk.

Note: I used this file after messing with some Win10 VM machine and saved me lot of times, but again use it at your own risk.

AIO_DefaultServicesWindows10.zip

@SSimpl3
Copy link
Author

SSimpl3 commented Apr 5, 2021

Here's a reg file that I compiled that revert most windows services to their default so 99% of the tweaks will be reverted if you merge this file in your registry.

IMPORTANT: Since not all windows versions have the same services it will merge services that don't exist on some Windows version. So you should review the file manually before using it. Also this reg file can contain error du to Microsoft updates and other changes. So you use it at your own risk.

Note: I used this file after messing with some Win10 VM machine and saved my me lot of times, but again use it at your own risk.

AIO_DefaultServicesWindows10.zip

Thank you, this is nice but I am unable to read all of the source code, I'll be keeping it just in case I really need it

@undergroundwires undergroundwires added this to the 0.11.0 milestone Apr 9, 2021
@undergroundwires undergroundwires self-assigned this Apr 9, 2021
@undergroundwires
Copy link
Owner

Thanks for the feedback @SSimpl3, it make sense. I will implement this in the next minor release.

@usamac
Copy link

usamac commented Aug 9, 2021

Thanks for the feedback @SSimpl3, it make sense. I will implement this in the next minor release.
Hey, I was just wondering if this was implemented already or did you run into some issues with it? If it's already in, I've created a few new in the past month and now need to revert one to see if it's what's stopping me from making something work, but I am unsure of how to revert (if already implemented.) I can just use the reg file, but rather use a default feature if it exists.

@undergroundwires
Copy link
Owner

@usamac Happy to see you around! I did not have the time to put into project recently, but now I'm back. It's not implemented yet. I'll look at it along with other things that come up so it may have it.

I'd really appreciate with some help on the UI. I'm not sure where to put to button/switch/text.. I'm open to suggestions. Just a comment giving an idea or a small sketch. Goal is to keep UI as simple and clean as possible.

@usamac
Copy link

usamac commented Aug 23, 2021 via email

@neube3
Copy link

neube3 commented Sep 24, 2023

Hello! Thank you for this project and all the time you put into it. Believe me, it is appreciated.

I am also waiting for this feature (not that I need it, but I see it as essential for safety - mistakes happen).

I was also thinking about other, not mutually-exclusive solutions to the issue (which I don't think warranted opening a new issue - if you feel differently, please let me know):

  1. Simply generate two scripts. One with changes (A), and one with all the possible reverts (B, or A'). I do understand that not all changes are reversible by their very nature, but I think that the B script should at least mention what irreversible bits of script from A were introduced. So B would ideally be composed of "Revert A" and even just a lump list of irreversible functions and their descriptions. For v 1.0 (unless you or someone here have a better solution already).
  2. A bigger change that would require modification of current scripts and would not be backwards compatible - number/designate current scripts one by one (even as 00001, 00002...) in the comments for the script. Allow uploading of an "A" script which has numbered changes, grab the relevant function numbers and return to the user a custom "your A reverted as much as possible" script (revert 00001, revert 00002...). Mention irreversible changes in comment at the end.

@undergroundwires
Copy link
Owner

Is this UI good? Check tooltips, behavior, options etc.
revert-all-ui

Note: @neube3 I think we cover case 1 with this. I can add info in tooltip stating some scripts are irreversible and will not be reverted by this option. Case 2 will be addressed in #59 with import/export functionality.

@undergroundwires
Copy link
Owner

undergroundwires commented Jan 30, 2024

I have updated the tooltips to incorporate the feedback from @neube3. They now show information about irreversible states. Showing all script names are too much for a tooltip, but this could be presented as a "final review" in separate dialog before running/saving scripts. This was brought up in #50 too.

None Selected
image image

@marcello-pietrobon
Copy link

I was testing this version 0.12.10 and ran the installer, but I don't see the 'Revert' line, even if I for example click on 'Standard'.
Maybe I'm missing something.

image

@neube3
Copy link

neube3 commented Feb 4, 2024

Hello again, sorry for the delay.

This looks good... but the whole point was to provide the script user with the written down list of the irreversible changes. So that they know what they changed in their system that will stay that way even after a "(as) full revert (as possible)".

Over the years we make so many changes to our systems (especially power-users and/or privacy-conscious ones) that it is sometimes hard to keep track of - which can be a problem later on when troubleshooting something that seems not connected.
Abstract example: you change something using the scripts, including the irreversible ones. You revert whatever you could, but don't remember the irreversible changes. Some of those changes preclude you from diagnosing or fixing some other, seemingly unrelated thing and/or is confusing for the support staff who will not exactly jump to conclusion you must have made an esoteric, irreversible change to your system, but waste everyone's time trying to fix the unfixable.

I have seen a decent share of "This doesn't look right", "This should work at this point" which later were concluded to have been result of more esoteric changes.

To reiterate: the list of irreversible changes must be saved with the script (and reverse script, since people are more likely to actually keep this one) so it is easier to diagnose and fix (and to know when it's pointless to try) problems months and years later.

@lggomez
Copy link

lggomez commented Feb 5, 2024

I gotta agree with @neube3 on the non-deterministic and occasionally breaking nature of changes. i.e: in my case disabling biometric auth destroyed the login functionality in a multiuser install, and removing the app store completely broke windows 365 and remote desktop

Microsoft definitely goes a long way in behalf of making us have the OS set up the way they want, even downloading and then executing the script becomes almost impossible without disabling the windows security real time protection

That said and FWIW, I consider any change without an explicit reversal to be irreversible (which in most cases consists of deletion of stuff)

These 2 will provide more insight and ease management of the changes:

  1. The actual list of selected item names, in order of execution. That is already provided in the full script but a quick index without the code can save a lot of time
  2. The reversal script for the selected items

@marcello-pietrobon
Copy link

I have to say I agree. I'm afraid it will be a lot of work for undergroundwires to go through all the hundreds of scripts... Definitely it would be helpful to have it.

@undergroundwires
Copy link
Owner

undergroundwires commented Feb 6, 2024

Thank you for the feedback.

We're mixing stuff here. Lets talk about these in three topics for clarity. I think implementing all these three will solve what you're mentioning.


1. Import/export (#262)

This is what will enable what you're saying as:

the list of irreversible changes must be saved with the script

I built basic import/export before but could not release due to lack of ID support, but the way it worked was keeping all the script data in script file as metadata (#59) which documents all script names and their revert status. The code got too old, and I need to rework on this when I release ID support. So this is planned as one of the priority features.

I already built a small tool to go through all scripts and ID field, so this way we can store/query them easily.


2. Preview of selection before running

As I understand, what we're talking about can be solved through a "sanity check" before saving/downloading/running script. We can show a flattened list of all selected scripts and their revert status on UI (and even mark the ones outside of "Standard" selection) and allow users to exclude them from selection on that UI.

It solves feedback like:

The actual list of selected item names, in order of execution

I think this we can discuss further in #50, which is a specific issue for this feature.

This way users get a flattened view (not tree structure for simplicity) for double check. Just like when we order stuff online like from Amazon.


3. This actual issue, revert all selection button

The buttons are not released yet, that's why you couldn't test them. I will do a new feature release (0.14.0) with this and ID support as mentioned above.

I like how @lggomez you describe irreversible scripts as "which in most cases consists of deletion of stuff". So I will put this in tooltip so people understand why they're irreversible by their nature.

I have a question here though. After reading your feedback, I realize a potential issue.

Let's say that someone wants to revert a set of selection (such as "Standard" selection or their own custom selection), they select some scripts, and click on "Revert all" and the button gives you script with all of revert codes whenever possible which means that it still keeps irreversible scripts in selection such as cleanup scripts in current selection.

To make this more clear, let's say user has these scripts selected:

  1. (non-revert state) Do this reversibly.
  2. (non-revert state) Do that permanently.
  3. (non-revert state) Clean that permanently.

They click on "Revert all" and they get this:

  1. (revert state) Do this reversibly.
  2. (non-revert state) Do that permanently.
  3. (non-revert state) Clean that permanently.

So script number 2) and 3) still apply without reversion. This is probably not what users expect when they want to "revert" stuff, they'll be willing to "roll back" some stuff that potentially broke, not conduct a privacy clean-up here.

We could solve it by removing irreversible stuff completely from selection when "Revert: All" is clicked. But I'm not sure if this would be confusing or complicated.

How can we solve this best way?

@undergroundwires undergroundwires added the help wanted Extra attention is needed label Feb 6, 2024
@undergroundwires undergroundwires pinned this issue Feb 6, 2024
@neube3
Copy link

neube3 commented Feb 6, 2024

Hello and thank you for listening to us. We’re glad to have you at the helm.

(I’m writing this with limited view granted by the mobile version, sorry for mistakes and/or inconsistencies)

As for the revert all - I see this caveat as a dangerous thing. "Revert all" sign permanent, irreversible changes is definitely outside of what users expect.

I would propose a solution 1, 2 or 1+2, pick-and-mix style:

  1. When having a non-revert script (mind you, ignoring the irreversibility parameter) selected along with a revert script, disallow running/downloading before user checks a tickbox "I understand that I’m mixing do and undo scripts and still want to do it" that shows up. Or similar. Wording could probably use help. Anyway: don’t allow mixing scripts without explicit confirmation.
  2. Going back to undergroundwires example - when the user clicks on the "Revert all" button, they get a toast/other message "Are you sure you want to mix script reversal and running irreversible scripts together?" with a choice "Oh, no, I want only reverting scripts selected" or "I want to mix scripts".

There is also a nuclear option, enumerating it only for completeness sake: never allow mixing revert and non-revert scripts.
It would seem that if a user needed a revert and then something irreversible done, they can just have 2 scripts instead of one to do everything at once.

While I cannot think of a single solid usercase for this (perhaps unintended) feature, it doesn’t mean there cannot be any and I’m opposed to taking away functionalities (even potentially dangerous ones, like this one) as a rule.

@lggomez
Copy link

lggomez commented Feb 7, 2024

Thanks for the extended response @undergroundwires. I don't see a clear answer as Microsoft's shenanigans always break any attempt at improving user experience and reversible in this case is not a strong guarantee, although a change for which rollback code exists

Case in point, I built a script and this is what I got on 22H2:

Screenshot 2024-02-07 121702

I still regret to this day the moment I inadvertently allowed W10 to downgrade into this pile of junk

Rant aside:

We could solve it by removing irreversible stuff completely from selection when "Revert: All" is clicked. But I'm not sure if this would be confusing or complicated.

I'm leaning towards neube3 suggestion here

Going back to undergroundwires example - when the user clicks on the "Revert all" button, they get a toast/other message "Are you sure you want to mix script reversal and running irreversible scripts together?" with a choice "Oh, no, I want only reverting scripts selected" or "I want to mix scripts"

All of this hard work you make compiling all of these scripts into a single configurable source is enough to warrant not going deeper into the rabbit hole with specific script handling. Most power users already assume the risk of something breaking but a more explicit UI/wording should suffice along with the option of getting all reversals in a separate script

@undergroundwires
Copy link
Owner

Thank you for your quick and clear feedback and nice words ❤️. It's motivating and really appreciated. Your contributions and ideas are valuable and currently decisive on the development.

@lggomez, feel free to create an issue for this so community can help further. This is a horrible side-effect and should be addressed.

Back to the topic, let me know if this sounds good or we should do some changes in plans/approach. I'm waiting for a green light.


What to do now

So what we will do is:

  • Revert all ("Selected") button will end-up in "mixed" selection. So clicking on it will NOT automatically remove the scripts that are not irreversible from selection. It's not nice that clicking on a button result in such "bad state", but this seems to be the least confusing option.
  • We'll mitigate this risk by adding a warning mechanism to explain this "mixed" state for now, but add better ways in future. Disabling buttons through "I understand the risks" is good approach but this should be rolled out iteratively as it changes the current experience heavily. So how about adding an eye-catching warning to start with?

About the warning, I'm thinking of a caution bar will be visible above the buttons:

  1. Show mixed state warning if revert+non-revert is mixed.
  2. Show non-standard selection warning if selection includes scripts outside of Standard recommendation.
  3. Show irreversible warning if the selection contains any irreversible scripts.

This is a sketch to illustrate (I created this through some hacks on browser, final UI and texts will be better, probably with tooltips and stuff):

image

So these will be visible above the buttons with a eye-catching color (red or yellow).


What to do next

Future improvements we can add:

  1. Action buttons for each warning. Such as "select only reversible", "exclude non-standard", "exclude irreversible" buttons to resolve those quickly to go back to a sane (i.e. noob friendly common use-case state).
  2. Present "I understand the risks" button that will reveal action buttons (copy/download/save/run etc.)
  3. And adding 2. Preview of selection before running from previous post. I will prioritize this highest. This will allow excluding/including scripts one by one manually as last sanity check. This will be visible as dialog (which you mentioned as Are you sure you want to mix script reversal and running irreversible scripts together) only when user clicks on download or copy.

undergroundwires added a commit that referenced this issue Feb 11, 2024
This commit introduces 'Revert: None - Selected' toggle, enabling users
to revert all reversible scripts with a single action, improving user
safety and control over script effects.

This feature addresses user-reported concerns about the ease of
reverting script changes. This feature should enhance the user experience
by streamlining the revert process along with providing essential
information about script reversibility.

Key changes:

- Add buttons to revert all selected scripts or setting all selected
  scripts to non-revert state.
- Add tooltips with detailed explanations about consequences of
  modifying revert states, includinginformation about irreversible
  script changes.

Supporting changes:

- Align items on top menu vertically for better visual consistency.
- Rename `SelectionType` to `RecommendationStatusType` for more clarity.
- Rename `IReverter` to `Reverter` to move away from `I` prefix
  convention.
undergroundwires added a commit that referenced this issue Feb 11, 2024
This commit introduces 'Revert: None - Selected' toggle, enabling users
to revert all reversible scripts with a single action, improving user
safety and control over script effects.

This feature addresses user-reported concerns about the ease of
reverting script changes. This feature should enhance the user experience
by streamlining the revert process along with providing essential
information about script reversibility.

Key changes:

- Add buttons to revert all selected scripts or setting all selected
  scripts to non-revert state.
- Add tooltips with detailed explanations about consequences of
  modifying revert states, includinginformation about irreversible
  script changes.

Supporting changes:

- Align items on top menu vertically for better visual consistency.
- Rename `SelectionType` to `RecommendationStatusType` for more clarity.
- Rename `IReverter` to `Reverter` to move away from `I` prefix
  convention.
undergroundwires added a commit that referenced this issue Feb 11, 2024
This commit introduces 'Revert: None - Selected' toggle, enabling users
to revert all reversible scripts with a single action, improving user
safety and control over script effects.

This feature addresses user-reported concerns about the ease of
reverting script changes. This feature should enhance the user experience
by streamlining the revert process along with providing essential
information about script reversibility.

Key changes:

- Add buttons to revert all selected scripts or setting all selected
  scripts to non-revert state.
- Add tooltips with detailed explanations about consequences of
  modifying revert states, includinginformation about irreversible
  script changes.

Supporting changes:

- Align items on top menu vertically for better visual consistency.
- Rename `SelectionType` to `RecommendationStatusType` for more clarity.
- Rename `IReverter` to `Reverter` to move away from `I` prefix
  convention.
- The `.script` CSS class was duplicated in `TheScriptsView.vue` and
  `TheScriptsArea.vue`, leading to style collisions in the development
  environment. The class has been renamed to component-specific classes
  to avoid such issues in the future.
@neube3
Copy link

neube3 commented Feb 16, 2024

Sorry for the delay; overall LGTM (with G for "Great" ;)), except I really dislike allowing mixed states. I see your plan for the future and agree with it, but I still dislike mixed state. Imo it should never be a realistic option. I know it’s probably not possible at the moment to just split it into two downloads for the users, but one can dream :P.

(Also: there is a mistype error in the last red message on the screenshot; writing from phone so I can’t see it when typing, but the multiple negative thing occurred and flipped the meaning :))

@undergroundwires
Copy link
Owner

This is released since 0.13.0. I created #330 to follow up on warnings. Thank you @SSimpl3, @usamac, @neube3, @marcello-pietrobon, @lggomez again for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants