Skip to content

Remove additional headers in Generic Versioned Sync from Local Storage - #3715

Merged
akshay-gupta7 merged 13 commits into
mainfrom
akshay/generic-versioned-storage
Dec 10, 2025
Merged

akshay-gupta7 merged 13 commits into
mainfrom
akshay/generic-versioned-storage

Conversation

@akshay-gupta7

@akshay-gupta7 akshay-gupta7 commented Dec 2, 2025 •

Copy link
Copy Markdown
Contributor

Why does this PR exist?

Closes #3672 #3704

What does this pull request do?

This pull request removes the storage of additional headers in Local Storage for the Generic Versioned Sync functionality. Previously, these headers were being stored and possibly utilized in the sync flow, which could present security or consistency issues. By cleaning up the handling and removing unnecessary headers from Local Storage, the sync logic is more streamlined and secure, reducing the chance of accidental leakage or unintended behavior. This change ensures only required information is persisted between sessions.

Testing this change

  1. Run the plugin and execute any versioned sync operation that previously would store additional headers.
  2. Open the browser's Local Storage and verify that the previously stored headers (if any) are no longer being saved or accessed as part of the sync process.
  3. Ensure that the sync functionality continues to operate as expected, and that only the necessary data is being persisted.
  4. Optionally, attempt to regress the change by reintroducing the headers and confirming that their removal now prevents them from appearing in Local Storage.

Additional Notes (if any)

Screenshot 2025-12-09 at 12 22 24 AM

@changeset-bot

changeset-bot Bot commented Dec 2, 2025 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 557c408

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tokens-studio/figma-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Dec 2, 2025 •

Copy link
Copy Markdown
Contributor

⤵️ 📦 ✨ The artifact was successfully created! Want to test it? Download it here 👀 🎁

@github-actions

github-actions Bot commented Dec 2, 2025 •

Copy link
Copy Markdown
Contributor

Commit SHA:39d45ed0b20137393b634dff9060f84867b1aed2
No changes to code coverage between the base branch and the head branch

@github-actions

github-actions Bot commented Dec 2, 2025 •

Copy link
Copy Markdown
Contributor

Commit SHA:1568bcaeaa2b8177ec7056d1f29c894a8d65a964
Current PR reduces the test coverage percentage by 1 for some tests

@akshay-gupta7

Copy link
Copy Markdown
Contributor Author

@copilot the dialog to display users regarding the security update regarding generic versioned storage is being displayed to the user every time they open the plugin, it should be displayed once till the user clicks on OK on the dialog

Copilot AI commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

@akshay-gupta7 I've opened a new pull request, #3724, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 3 commits December 9, 2025 20:20
* Initial plan

* Fix dialog persistence by adding effect to persist flag to storage

Co-authored-by: akshay-gupta7 <9948167+akshay-gupta7@users.noreply.github.com>

* Move dialog flag to top-level settings for proper persistence

Co-authored-by: akshay-gupta7 <9948167+akshay-gupta7@users.noreply.github.com>

* remove changeset

* Add flag to notifyUISettings and message type

Co-authored-by: akshay-gupta7 <9948167+akshay-gupta7@users.noreply.github.com>

* Fix tests to include new seenGenericVersionedHeaderMigrationDialog flag

Co-authored-by: akshay-gupta7 <9948167+akshay-gupta7@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: akshay-gupta7 <9948167+akshay-gupta7@users.noreply.github.com>
Co-authored-by: Akshay Gupta <gravity.akshay@gmail.com>
Comment thread .changeset/seven-spies-cover.md Outdated
Comment thread packages/tokens-studio-for-figma/src/app/components/AppContainer/AppContainer.tsx Outdated
Comment thread packages/tokens-studio-for-figma/src/app/components/AppContainer/AppContainer.tsx Outdated
Comment thread packages/tokens-studio-for-figma/src/app/components/AppContainer/AppContainer.tsx Outdated
@akshay-gupta7
akshay-gupta7 requested a review from six7 December 10, 2025 12:50
@akshay-gupta7
akshay-gupta7 merged commit 5a6d25e into main Dec 10, 2025
11 of 13 checks passed
@akshay-gupta7
akshay-gupta7 deleted the akshay/generic-versioned-storage branch December 10, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants