[GH-ISSUE #1494] Shared State Reset #1487

Open
opened 2026-03-03 19:51:53 +03:00 by kerem · 5 comments
Owner

Originally created by @rstone4-chwy on GitHub (Jan 11, 2023).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1494

Originally assigned to: @NghiaTranUIT on GitHub.

Description

I often have to use shared state to set a bool based on a condition. For example, while working on auto-login behavior I set a bool to true once the auto-login process has completed so I don't create an infinite auto-login loop. The only way to my knowledge to reset shared state is to close Proxyman completely. The request is for the ability to reset the shared state back to defaults without having to reboot.

Why this feature/change is important?

Increase developer velocity

Originally created by @rstone4-chwy on GitHub (Jan 11, 2023). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1494 Originally assigned to: @NghiaTranUIT on GitHub. ## Description I often have to use shared state to set a bool based on a condition. For example, while working on auto-login behavior I set a bool to true once the auto-login process has completed so I don't create an infinite auto-login loop. The only way to my knowledge to reset shared state is to close Proxyman completely. The request is for the ability to reset the shared state back to defaults without having to reboot. ## Why this feature/change is important? Increase developer velocity
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 11, 2023):

You can use clearSharedState(); to clear the shared state.

Ref: https://docs.proxyman.io/scripting/environment-variables#1.-shared-state

<!-- gh-comment-id:1378900803 --> @NghiaTranUIT commented on GitHub (Jan 11, 2023): You can use clearSharedState(); to clear the shared state. Ref: https://docs.proxyman.io/scripting/environment-variables#1.-shared-state
Author
Owner

@rstone4-chwy commented on GitHub (Jan 11, 2023):

Doing so requires setting up a script and then having to enable/disable it. I'm looking for a button in the toolbar or menu item that let's me reset without opening 2 UI windows or restarting the app

<!-- gh-comment-id:1378939156 --> @rstone4-chwy commented on GitHub (Jan 11, 2023): Doing so requires setting up a script and then having to enable/disable it. I'm looking for a button in the toolbar or menu item that let's me reset without opening 2 UI windows or restarting the app
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 12, 2023):

Ah, I get it. I will add a hidden menu to manually reset all shared state @rstone4-chwy 👍

<!-- gh-comment-id:1379677976 --> @NghiaTranUIT commented on GitHub (Jan 12, 2023): Ah, I get it. I will add a hidden menu to manually reset all shared state @rstone4-chwy 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 12, 2023):

@rstone4-chwy let's try this build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.15.0_Reset_SharedState_by_button.dmg

You can manually reset the sharedState from the More Menu Button 👍

Screenshot_2023-01-12_at_11_51_53

<!-- gh-comment-id:1379777575 --> @NghiaTranUIT commented on GitHub (Jan 12, 2023): @rstone4-chwy let's try this build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.15.0_Reset_SharedState_by_button.dmg You can manually reset the `sharedState` from the More Menu Button 👍 ![Screenshot_2023-01-12_at_11_51_53](https://user-images.githubusercontent.com/5878421/211971793-1a322e8f-324b-4734-ac8c-e4706d6f6a36.jpg)
Author
Owner

@rstone4-chwy commented on GitHub (Jan 12, 2023):

Amazing, thank you so much

<!-- gh-comment-id:1380555525 --> @rstone4-chwy commented on GitHub (Jan 12, 2023): Amazing, thank you so much
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#1487
No description provided.