Skip to content

extended collections#3911

Open
akshay-gupta7 wants to merge 32 commits into
mainfrom
akshay/extended-collections-2
Open

extended collections#3911
akshay-gupta7 wants to merge 32 commits into
mainfrom
akshay/extended-collections-2

Conversation

@akshay-gupta7

@akshay-gupta7 akshay-gupta7 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Why does this PR exist?

Closes #0000

When exporting child (extended) themes, two bugs existed:

  1. Variables in child collections showed resolved values (e.g. #D6D6D6) instead of variable aliases/references.
  2. All child collection variables appeared blue (explicit override) even when they matched the parent — they should appear white (inherited).

Additionally, the Export to Figma theme selector had no enforcement of parent/child dependencies — a user could check a child theme without its parent, causing broken exports.

What does this pull request do?

Bug: aliases resolved instead of linked (extended collections)

  • Removed a silent clearValueForMode call in setter functions that was failing at runtime (not in Figma's public TypeScript typings) and blocking setValueForMode from running, leaving stale resolved values in place.

Bug: all child variables show as blue/overridden

  • Implemented a two-pass export strategy:
    • Pass 1: write all values and aliases to both the composite child mode and the parent mode.
    • Pass 2 (updateVariablesToReference): when setting an alias on a composite mode, check if the parent mode already has the same alias — if so, call clearValueForMode on the child mode so Figma shows it as inherited (white) rather than overridden (blue).
  • Scalar setters (setColorValuesOnVariable, setNumberValuesOnVariable, etc.) compare the value being written against the parent mode's current value and call clearValueForMode instead of setValueForMode when they match.

Feature: auto-select parent theme in export dialog

  • Checking a child theme in the Export to Figma dialog now automatically checks all ancestor themes.
  • Unchecking a parent theme is blocked (and the checkbox is visually disabled) while any of its descendants remain checked.

Lint fixes

  • Removed unused imports (IconPencil, separateCollectionsByType, createExtendedVariableCollection, findParentCollection, isExtendedCollectionTheme, createVariableMode).
  • Replaced continue statements in createNecessaryVariableCollections with a processTheme helper using early return.
  • Fixed use-before-define in createExtendedCollections.ts by reordering function declarations.
  • Replaced inline require() in test files with top-level imports.
  • Extracted inline JSX arrow functions and IIFE patterns to named callbacks/variables to satisfy react/jsx-no-bind and react/no-unstable-nested-components.
  • Escaped unescaped " entity in OptionsModal.

Testing this change

  1. Set up a Figma Enterprise file with a parent variable collection and at least one extended child collection.
  2. In Tokens Studio, configure a parent theme and one or more child (extended) themes with $figmaIsExtension: true.
  3. Export selecting only child themes — confirm the parent is auto-checked and cannot be unchecked while the child is selected.
  4. Export both parent and child themes together — verify:
    • Variables that reference another variable show as aliases (not resolved hex values).
    • Variables whose value matches the parent mode appear white (inherited), not blue (overridden).
    • Variables that genuinely differ from the parent remain blue.

Additional Notes (if any)

clearValueForMode is not in Figma's public TypeScript typings but exists at runtime on Enterprise clients. It is called via (variable as any).clearValueForMode(modeId). If the method is absent (non-Enterprise), the call is guarded and fails silently without breaking the export.

@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4b3cda7

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 Minor

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

@akshay-gupta7 akshay-gupta7 self-assigned this Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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

@anathaniel-TS

Copy link
Copy Markdown

🛡️ Hyma Compliance Check

No compliance-relevant changes detected

~25 file(s) scanned · 0 findings

ℹ️ This check is informational.
🛡️ Hyma Compliance Check · automated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces robust support for Figma extended (child) variable collections across import/export and theme management, fixing alias linking and “inherited vs overridden” presentation for child collections, and adding UI enforcement around parent/child dependencies and Enterprise-only capabilities.

Changes:

  • Fixes extended-collection export so variable aliases remain aliases (not resolved raw values) and child values that match the parent are shown as inherited (not explicit overrides).
  • Adds Enterprise detection and extends UI flows to support creating/managing extended theme groups and enforcing selection constraints (parent/child and mutual exclusivity).
  • Expands types, schemas, selectors, plugin handlers, and tests to carry/handle extended collection metadata (parent IDs, parent modes, overrides).

Reviewed changes

Copilot reviewed 57 out of 58 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
packages/tokens-studio-for-figma/src/utils/themeListToTree.ts Sort themes/groups to display parent before extended children
packages/tokens-studio-for-figma/src/utils/dragDropOrder/findOrderableTargetIndexesInThemeList.tsx Prevent reordering targets involving extended themes
packages/tokens-studio-for-figma/src/types/VariableCollectionSelection.ts Add extended-collection metadata to selection types
packages/tokens-studio-for-figma/src/types/ThemeObject.ts Add extended theme metadata fields
packages/tokens-studio-for-figma/src/types/AsyncMessages.ts Add CHECK_FIGMA_ENTERPRISE async message types
packages/tokens-studio-for-figma/src/storage/schemas/themeObjectSchema.ts Persist extended theme metadata in schema
packages/tokens-studio-for-figma/src/selectors/isFigmaEnterpriseSelector.ts Selector for Enterprise capability
packages/tokens-studio-for-figma/src/selectors/index.ts Export new selectors
packages/tokens-studio-for-figma/src/selectors/exportExtendedCollectionsSelector.ts Selector for exportExtendedCollections setting
packages/tokens-studio-for-figma/src/plugin/updateVariablesToReference.ts Alias linking updates + extended-mode inheritance logic
packages/tokens-studio-for-figma/src/plugin/updateVariablesFromPlugin.ts Live variable updates respect parent-mode inheritance rules
packages/tokens-studio-for-figma/src/plugin/updateVariables.ts Extended-collection-aware variable lookup + safe removal behavior
packages/tokens-studio-for-figma/src/plugin/setValuesOnVariable.ts Extended-collection aware variable set/alias queuing
packages/tokens-studio-for-figma/src/plugin/setStringValuesOnVariable.ts Clear child override when matching parent string
packages/tokens-studio-for-figma/src/plugin/setNumberValuesOnVariable.ts Clear child override when matching parent number
packages/tokens-studio-for-figma/src/plugin/setColorValuesOnVariable.ts Clear child override when matching parent color
packages/tokens-studio-for-figma/src/plugin/setBooleanValuesOnVariable.ts Clear child override when matching parent boolean
packages/tokens-studio-for-figma/src/plugin/pullVariables.ts Import tokens/themes with extended collection overrides + hierarchy
packages/tokens-studio-for-figma/src/plugin/pullVariables.test.ts Mock new Figma collections API for tests
packages/tokens-studio-for-figma/src/plugin/extendedCollections/index.ts Expose extended collections helpers
packages/tokens-studio-for-figma/src/plugin/extendedCollections/importExtendedCollections.ts Build theme hierarchy metadata during import
packages/tokens-studio-for-figma/src/plugin/extendedCollections/createExtendedCollections.ts Create/update extended collections via extend()
packages/tokens-studio-for-figma/src/plugin/createNecessaryVariableCollections.ts Export-time collection creation supports extended collections
packages/tokens-studio-for-figma/src/plugin/createLocalVariablesWithoutModesInPlugin.ts Pass settings into collection creation
packages/tokens-studio-for-figma/src/plugin/createLocalVariablesInPlugin.ts Ensure parent themes processed before extended themes
packages/tokens-studio-for-figma/src/plugin/controller.ts Register Enterprise-check handler
packages/tokens-studio-for-figma/src/plugin/asyncMessageHandlers/swapFigmaModes.ts Enforce mutual exclusivity of parent vs extended active collections
packages/tokens-studio-for-figma/src/plugin/asyncMessageHandlers/index.ts Export new async handler
packages/tokens-studio-for-figma/src/plugin/asyncMessageHandlers/getAvailableVariableCollections.ts Return extended collection/mode metadata to UI
packages/tokens-studio-for-figma/src/plugin/asyncMessageHandlers/checkFigmaEnterprise.ts Probe Enterprise support via extend()
packages/tokens-studio-for-figma/src/plugin/asyncMessageHandlers/tests/getAvailableVariableCollections.test.ts Update expectations for new collection fields
packages/tokens-studio-for-figma/src/plugin/tests/extendedCollectionsOverrides.test.ts Unit tests for override-clearing behavior
packages/tokens-studio-for-figma/src/plugin/tests/extendedCollections.test.ts Integration tests for import/export extended collections
packages/tokens-studio-for-figma/src/app/store/models/userState.ts Track isFigmaEnterprise in state
packages/tokens-studio-for-figma/src/app/store/models/settings.tsx Add exportExtendedCollections setting
packages/tokens-studio-for-figma/src/app/store/models/reducers/tokenState/saveTheme.ts Preserve/cascade extended theme metadata & mirroring
packages/tokens-studio-for-figma/src/app/store/models/reducers/tokenState/index.ts Export deleteThemeGroup reducer
packages/tokens-studio-for-figma/src/app/store/models/reducers/tokenState/deleteThemeGroup.ts Delete whole theme groups (esp. extended groups)
packages/tokens-studio-for-figma/src/app/store/models/reducers/tokenState/deleteTheme.ts Delete a theme and its extended descendants
packages/tokens-studio-for-figma/src/app/store/models/reducers/settingsState/setExportExtendedCollections.ts Reducer for exportExtendedCollections
packages/tokens-studio-for-figma/src/app/store/models/reducers/settingsState/index.ts Export new settings reducer
packages/tokens-studio-for-figma/src/app/store/models/effects/settingsState/setExportExtendedCollections.ts Effect wiring for exportExtendedCollections
packages/tokens-studio-for-figma/src/app/store/models/effects/settingsState/index.ts Export new settings effect
packages/tokens-studio-for-figma/src/app/components/ThemeSelector/ThemeSelector.tsx Enforce parent/extended mutual exclusivity when applying themes
packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/TokenSetThemeItem.tsx Add disabled state for token set controls
packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/ThemeListItemContent.tsx Indentation + disable reorder for extended themes
packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/ThemeListGroupHeader.tsx Group actions menu (extend/delete) + indentation
packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/StyledExtendedThemeGroup.tsx Styling wrappers for extended group visuals
packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/SingleThemeEntry.tsx Formatting/lint adjustments
packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/ManageThemesModal.tsx Extend group creation, hierarchy UI, enterprise detection, reorder cascade
packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/CreateOrEditThemeForm.tsx Extend-mode UI + mirror-parent toggle for extended themes
packages/tokens-studio-for-figma/src/app/components/ManageStylesAndVariables/OptionsModal.tsx Add “Export extended collections” toggle (Enterprise-only)
packages/tokens-studio-for-figma/src/app/components/ManageStylesAndVariables/LabelledCheckbox.tsx Add disabled support for labelled checkbox
packages/tokens-studio-for-figma/src/app/components/ManageStylesAndVariables/ExportThemesTab.tsx Auto-select ancestors + disable unchecking parents with selected descendants
packages/tokens-studio-for-figma/src/app/components/ImportVariablesDialog.tsx Filter unsupported multi-level extensions (via extensionDepth)
packages/tokens-studio-for-figma/src/app/components/ExportProvider/SingleFileExport.tsx Strip internal extended metadata from exported themes JSON
packages/tokens-studio-for-figma/src/app/components/ExportProvider/MultiFilesExport.tsx Strip internal extended metadata from exported themes JSON
packages/tokens-studio-for-figma/src/app/components/AppContainer/tests/AppContainerIntegration.test.tsx Update startup params test fixture

Comment thread packages/tokens-studio-for-figma/src/plugin/updateVariablesFromPlugin.ts Outdated
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Commit SHA:41fdc13fc5ec139ade27beae0f7ca4beb4b112ad

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: akshay/extended-collections-2 
Status File % Stmts % Branch % Funcs % Lines
🟢 total 59.89 (0.15) 51.85 (0.13) 57.56 (-0.17) 60.4 (0.16)
🟢 packages/tokens-studio-for-figma/src/app/components/ImportVariablesDialog.tsx 31.81 (4.23) 18.75 (2.09) 12 (3.31) 34.42 (4.24)
🔴 packages/tokens-studio-for-figma/src/app/components/ExportProvider/MultiFilesExport.tsx 64 (-4.18) 100 (0) 50 (-7.14) 64 (-4.18)
🟢 packages/tokens-studio-for-figma/src/app/components/ExportProvider/SingleFileExport.tsx 91.66 (0.76) 100 (0) 81.81 (1.81) 91.42 (0.8)
🔴 packages/tokens-studio-for-figma/src/app/components/ManageStylesAndVariables/LabelledCheckbox.tsx 50 (0) 0 (-100) 0 (0) 50 (0)
🔴 packages/tokens-studio-for-figma/src/app/components/ManageStylesAndVariables/OptionsModal.tsx 1.61 (-0.31) 0 (0) 0 (0) 1.66 (-0.34)
🟢 packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/CreateOrEditThemeForm.tsx 44.69 (2.76) 39.42 (5.55) 40.9 (2.44) 46.55 (3.03)
🔴 packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/ManageThemesModal.tsx 36.75 (-15.14) 30.55 (-15.03) 36.95 (-5.15) 36.09 (-15.22)
✨ 🆕 packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/StyledExtendedThemeGroup.tsx 0 100 100 0
🟢 packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/ThemeGroupDropDownMenu.tsx 60 (50) 75 (75) 40 (40) 62.5 (50)
🔴 packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/ThemeListGroupHeader.tsx 53.33 (3.33) 14.81 (-10.19) 11.11 (-3.17) 53.33 (3.33)
🔴 packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/ThemeListItemContent.tsx 87.5 (4.17) 50 (-50) 50 (0) 87.5 (4.17)
🔴 packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/TokenSetThemeItem.tsx 83.33 (0) 57.89 (-17.11) 66.66 (0) 83.33 (0)
🔴 packages/tokens-studio-for-figma/src/app/components/ThemeSelector/ThemeSelector.tsx 84.61 (-0.17) 75 (-1.66) 81.25 (0) 83.72 (-0.06)
🔴 packages/tokens-studio-for-figma/src/app/store/models/userState.ts 90.47 (-4.53) 100 (0) 80 (-8.88) 90.47 (-4.53)
✨ 🆕 packages/tokens-studio-for-figma/src/app/store/models/effects/settingsState/setExportExtendedCollections.ts 50 100 50 50
✨ 🆕 packages/tokens-studio-for-figma/src/app/store/models/reducers/settingsState/setExportExtendedCollections.ts 0 100 0 0
✨ 🆕 packages/tokens-studio-for-figma/src/app/store/models/reducers/tokenState/deleteThemeGroup.ts 100 50 100 100
🟢 packages/tokens-studio-for-figma/src/plugin/controller.ts 98.33 (0.03) 100 (0) 75 (0) 100 (0)
🟢 packages/tokens-studio-for-figma/src/plugin/createLocalVariablesInPlugin.ts 77.5 (50.94) 61.11 (38.26) 83.33 (58.33) 78.08 (51.86)
🔴 packages/tokens-studio-for-figma/src/plugin/createNecessaryVariableCollections.ts 97.53 (-2.47) 86.36 (-9.09) 100 (0) 97.22 (-2.78)
🟢 packages/tokens-studio-for-figma/src/plugin/mergeVariableReferences.ts 81.81 (9.09) 66.66 (8.33) 83.33 (16.67) 82.35 (5.88)
🟢 packages/tokens-studio-for-figma/src/plugin/notifiers.ts 100 (0) 50 (25) 100 (0) 100 (0)
🔴 packages/tokens-studio-for-figma/src/plugin/pullVariables.ts 76.49 (-1.88) 64.03 (4.26) 82.85 (-1.15) 76.98 (-1.87)
🟢 packages/tokens-studio-for-figma/src/plugin/setBooleanValuesOnVariable.ts 91.66 (2.78) 100 (0) 100 (0) 91.66 (2.78)
🟢 packages/tokens-studio-for-figma/src/plugin/setColorValuesOnVariable.ts 100 (0) 96.42 (0.59) 100 (0) 100 (0)
🟢 packages/tokens-studio-for-figma/src/plugin/setStringValuesOnVariable.ts 90.9 (3.4) 100 (7.7) 100 (0) 90.9 (3.4)
🟢 packages/tokens-studio-for-figma/src/plugin/setValuesOnVariable.ts 84.42 (-0.11) 77.82 (0.64) 84.21 (1.86) 84.61 (-0.13)
🔴 packages/tokens-studio-for-figma/src/plugin/updateVariables.ts 95.12 (-1.03) 81.81 (3.24) 90.9 (-9.1) 97.29 (1.14)
🔴 packages/tokens-studio-for-figma/src/plugin/updateVariablesFromPlugin.ts 67.16 (-6.42) 48.48 (-5.22) 100 (0) 71.42 (-2.16)
🟢 packages/tokens-studio-for-figma/src/plugin/updateVariablesToReference.ts 88.7 (1.2) 81.25 (9.03) 100 (0) 88.33 (-1.14)
✨ 🆕 packages/tokens-studio-for-figma/src/plugin/asyncMessageHandlers/checkFigmaEnterprise.ts 100 87.5 100 100
🔴 packages/tokens-studio-for-figma/src/plugin/asyncMessageHandlers/getAvailableVariableCollections.ts 84.21 (-15.79) 50 (0) 100 (0) 83.33 (-16.67)
🔴 packages/tokens-studio-for-figma/src/plugin/asyncMessageHandlers/swapFigmaModes.ts 86.15 (-9.3) 71.87 (-12.34) 100 (0) 85.48 (-9.64)
✨ 🆕 packages/tokens-studio-for-figma/src/plugin/extendedCollections/applyChildModeValue.ts 100 100 100 100
✨ 🆕 packages/tokens-studio-for-figma/src/plugin/extendedCollections/collectionContext.ts 100 100 100 100
✨ 🆕 packages/tokens-studio-for-figma/src/plugin/extendedCollections/importExtendedCollections.ts 71.42 87.5 40 71.42
✨ 🆕 packages/tokens-studio-for-figma/src/plugin/extendedCollections/index.ts 100 100 100 100
✨ 🆕 packages/tokens-studio-for-figma/src/plugin/extendedCollections/valuesEquivalent.ts 92.85 95.45 100 100
✨ 🆕 packages/tokens-studio-for-figma/src/selectors/exportExtendedCollectionsSelector.ts 50 100 0 50
✨ 🆕 packages/tokens-studio-for-figma/src/selectors/isFigmaEnterpriseSelector.ts 100 100 100 100
✨ 🆕 packages/tokens-studio-for-figma/src/utils/themeHierarchy.ts 100 100 100 100
🟢 packages/tokens-studio-for-figma/src/utils/themeListToTree.ts 87.5 (23.87) 52.17 (5.75) 86.66 (36.66) 86.48 (22.85)
🟢 packages/tokens-studio-for-figma/src/utils/uiSettings.ts 100 (0) 92.9 (0.2) 100 (0) 100 (0)

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Commit SHA:41fdc13fc5ec139ade27beae0f7ca4beb4b112ad
Current PR reduces the test coverage percentage by 1 for some tests

@akshay-gupta7
akshay-gupta7 marked this pull request as ready for review July 3, 2026 06:55
Centralize the child-mode inherit-vs-override decision in one diff-writer,
guard the missing clearValueForMode API, and skip raw writes for tokens
that get aliased so references no longer resolve to raw blue overrides.
@anathaniel-TS

Copy link
Copy Markdown

🛡️ Hyma Compliance Check

No compliance-relevant changes detected

29 file(s) scanned · 0 findings (theme/collection UI + local plugin state only — no new external calls, endpoints, or data flows)

ℹ️ This check is informational.
🛡️ Hyma Compliance Check · automated

Preserve extension metadata on theme rename, skip empty collections on
import, restore dimension typing for FLOAT aliases, guard $figmaParentThemeId
cycles, cache the Enterprise probe, notify on non-Enterprise extend failure,
sort themes parent-first, and cover the import→edit→export path with a test.
Persist the export-extended-collections setting across restarts, rewire
theme mutual exclusion onto $figmaParentThemeId (with stale parent-mode
cleanup), cascade deleteThemeGroup, populate $figmaVariableReferences
for imported extended themes, id-key the child-collection scan, prune
export-dialog selection on filter/delete, reset extend-mode state on
all close paths, and i18n the new UI strings.
Add checkFigmaEnterprise session cache + view-only + probe fast-path
tests, assert the extend() failure notifyUI toast, and pin the FLOAT
alias → dimension typing under useDimensions/useRem.
@anathaniel-TS

Copy link
Copy Markdown

🛡️ Hyma Compliance Check

⚠️ 2 finding(s) across 2 file(s)

Severity Category File Headline
🟡 MEDIUM Access Control userState.ts (+3 more) New Figma-Enterprise entitlement gate introduced for extended-collections/theme-group features
🟢 LOW Access Control AppContainerIntegration.test.tsx New activeOrganizationId startup field observed but its source implementation was not visible in this scan
Full finding details

[Access Control] New Figma-Enterprise entitlement gate introduced for extended-collections / theme-group-extend features

  • File: packages/tokens-studio-for-figma/src/app/store/models/userState.ts (~L101-107, new isFigmaEnterprise state); also packages/tokens-studio-for-figma/src/app/components/ManageStylesAndVariables/OptionsModal.tsx (~L56-74, new CHECK_FIGMA_ENTERPRISE async check gating "Export extended collections"), packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/ThemeListGroupHeader.tsx (~L92-134, "Extend Theme Group" menu item disabled unless isFigmaEnterprise), and packages/tokens-studio-for-figma/src/app/components/ManageThemesModal/ManageThemesModal.tsx (~L380-389)
  • Implication: A new plan-tier/entitlement gate was introduced that checks Figma Enterprise status via a CHECK_FIGMA_ENTERPRISE plugin message and disables the new "extend theme group" / "export extended collections" functionality for non-Enterprise files. This is a new access-control mechanism worth recording. Since the gate currently appears to be enforced client-side (UI disabled state) based on a plugin-reported flag, it should be confirmed that the underlying Figma collection.extend() API itself enforces the Enterprise restriction server-side, so a technically inclined user cannot bypass the UI-level gate.
  • Recommended action: Confirm the Enterprise check is authoritative (backed by Figma's own API entitlement rather than only a client-side flag) — if so, no further action needed; document the new entitlement/access-control gate in the access-control change log.

[Access Control] New activeOrganizationId startup field observed — source not fully visible in this scan (flagged conservatively)

  • File: packages/tokens-studio-for-figma/src/app/components/AppContainer/__tests__/AppContainerIntegration.test.tsx (line ~149, test mock reference only)
  • Implication: A new activeOrganizationId field was added to the plugin startup payload/state (evidenced only by a test-mock update), which could carry a Figma organization/workspace identifier through plugin startup. The GitHub file-list fetch used for this automated scan appears to have been capped at ~30 files for this PR (locale files and at least two plugin-side files referenced in existing review comments — getAvailableVariableCollections.ts, updateVariablesFromPlugin.ts — were not present in the returned diff), so the actual source implementation of activeOrganizationId could not be reviewed directly. Flagging conservatively since it may relate to multi-user/workspace data isolation.
  • Recommended action: Manually review the full PR diff (paginating past 30 files if needed) to confirm where activeOrganizationId originates, whether it is persisted or transmitted anywhere, and update the ROPA if it represents a new data element tied to organization/workspace scoping.

ℹ️ This check is informational — findings do not block merging.
🛡️ Hyma Compliance Check · automated

@anathaniel-TS

Copy link
Copy Markdown

🛡️ Hyma Compliance Check

No compliance-relevant changes detected

22 file(s) scanned · 0 findings

ℹ️ This check is informational.
🛡️ Hyma Compliance Check · automated

@anathaniel-TS

Copy link
Copy Markdown

🛡️ Hyma Compliance Check

No compliance-relevant changes detected

24 file(s) scanned · 0 findings

ℹ️ This check is informational.
🛡️ Hyma Compliance Check · automated

@anathaniel-TS

Copy link
Copy Markdown

🛡️ Hyma Compliance Check

⚠️ 1 finding(s) across 1 file(s)

Severity Category File Headline
🟢 LOW Secrets/Credentials packages/tokens-studio-for-figma/src/app/store/models/userState.ts New Personal Access Token (PAT) state field introduced
Full finding details

[Secrets/Credentials] New Personal Access Token (PAT) state field introduced

  • File: packages/tokens-studio-for-figma/src/app/store/models/userState.ts (new field tokensStudioPAT: string | null, null default)
  • Implication: A new credential-holding state field tokensStudioPAT is declared (null default, currently unused in this PR). No secret value is committed. If later populated, a PAT is a sensitive credential whose storage, persistence and transmission must be controlled. (Informational: the PR also adds new analytics track() events emitting theme metadata — theme IDs / group names / counts — through the existing telemetry pipeline; no personal data and no new subprocessor.)
  • Recommended action: Ensure any future population of tokensStudioPAT keeps it out of logs, analytics payloads and unencrypted/persisted storage, and confines it to memory or secure storage. No action needed for the analytics events (design metadata only).

ℹ️ This check is informational — findings do not block merging.
🛡️ Hyma Compliance Check · automated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants