console icon indicating copy to clipboard operation
console copied to clipboard

Changes to secret path are not correctly display in history dialog

Open rohan-chaturvedi opened this issue 1 year ago • 6 comments

Describe the bug

When a secret's path is updated via the CLI / API / SDK, an update event is shown in the UI but the diff of the previous vs current path is not shown

To Reproduce

Steps to reproduce the behavior:

  1. Create a secret
  2. Update its path
  3. View secret history in Console

Expected behavior

The difference between the previous and current path should be displayed

Screenshots

image

rohan-chaturvedi avatar Feb 23 '24 15:02 rohan-chaturvedi

@rohan-chaturvedi i'll like to look at this.

teyim avatar Mar 02 '24 18:03 teyim

Hello, @rohan-chaturvedi , we would like to work on this issue under Fosshack 2024. Me and my teammate @viku3150 are well versed with the tech stack and the codebase and hence would like to take this forward. Please assign us for the same. Thank you.

nishaaannnt avatar Jul 26 '24 18:07 nishaaannnt

@rohan-chaturvedi can you tell me what do you mean by update path? Does it mean to update the value of the key? maybe I am missing something. Can you guide me on how to update the path. Thanks!

nishaaannnt avatar Jul 27 '24 10:07 nishaaannnt

@nishaaannnt I mean the path attribute of a secret, i.e which folder the secret is in. Currently the path can only be updated via the REST API though, as there is no way to do this via the UI. The API docs should give more context: https://docs.phase.dev/public-api/secrets#update-secrets

rohan-chaturvedi avatar Jul 27 '24 10:07 rohan-chaturvedi

@rohan-chaturvedi Screenshot 2024-07-27 at 7 06 30 PM Let me know your thoughts. Fixed it. Took a lot of time to figure out the backend but was worth it. Also added a spacing between green and red, because it looks better, if you like, I can add the same spacing to other changes like comment, key etc. For spacing used {" "} .

nishaaannnt avatar Jul 27 '24 13:07 nishaaannnt

Looks great!

rohan-chaturvedi avatar Jul 27 '24 14:07 rohan-chaturvedi