Skip to content

$metadata always flagged as "Configuration changed" on push to git provider #3875

@UdayHyma

Description

@UdayHyma

Describe the bug
When pushing to any git-based storage provider, $metadata always shows "Configuration changed" in the push diff view, even when the user only changed a token value and made no configuration changes. Reported by a user on ADO, but the same code pattern exists in all providers (GitHub, GitLab, Bitbucket, Supernova, Tokens Studio).

To Reproduce:
Connect the plugin to any git-based storage provider (ADO, GitHub, GitLab, etc.)
Pull tokens from remote
Change a single token value (e.g. update a color)
Open the Push dialog
Switch to the "Diff" tab
$metadata shows "Configuration changed" alongside the actual token change

Expected behavior
$metadata should only appear in the diff when the configuration (e.g. token set order) has actually changed.
Screenshots or Screencasts
Screenshot from reporter showing Push to ADO dialog with $metadata → "Configuration changed" alongside a single token value change (color.base_palette.0250).

Image

Root cause (from code investigation)
All providers construct push metadata with only tokenSetOrder:

src/app/store/providers/ado/ado.tsx, lines 68-70
src/app/store/providers/github/github.tsx, lines 71-73
src/app/store/providers/gitlab/gitlab.tsx, lines 77-79
src/app/store/providers/bitbucket/bitbucket.tsx, lines 80-82
src/app/store/providers/supernova/supernova.tsx, lines 52-54
src/app/store/providers/tokens-studio/tokensStudio.tsx, lines 112-114

But the local diff comparison in src/hooks/useChangedState.ts (line 30) constructs metadata as { tokenSetOrder, tokenSetsData: tokenSetMetadata }. The extra tokenSetsData key never exists in the remote metadata, so isEqual on line 86 of src/utils/findDifferentState.ts always returns false.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

Status

📥 Triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions