feat(onboarding): Add platform kind for SCM card display labels#114596
Merged
feat(onboarding): Add platform kind for SCM card display labels#114596
Conversation
…display labels The existing `type` field on PlatformIntegration is a misnomer in many entries (React Native is `language`, Android is `framework`, iOS is `language`, etc.) and is also load-bearing for the framework-suggestion modal gating. Rather than risk breaking that gate by re-tagging entries, add a parallel `kind` field with a corrected taxonomy: - `language` for actual programming languages - `framework` for app frameworks and SDK wrappers - `library` for drop-in libraries - `platform` (new) for OSes, runtimes, and consoles Use `kind` to render the muted subtitle on the SCM onboarding platform card, replacing the raw `type` string which was producing nonsense labels like "language" under the React Native card.
Replace the `kind` field on PlatformIntegration with a standalone `getPlatformKind(key, type)` helper in `static/app/data/platformKinds.tsx`. Only platforms whose existing `type` is incorrect for display need an override entry; everything else falls back to `type` directly. Keeps PlatformIntegration honest about the data it actually carries (the field was leaking into every consumer's type but only the SCM card read it) and avoids burdening unrelated callers with a concept they don't need.
Abdkhan14
approved these changes
May 1, 2026
Contributor
Abdkhan14
left a comment
There was a problem hiding this comment.
Nit: platformKinds can just be a ts file
The file contains no JSX, so .ts is the correct extension.
3 tasks
cleptric
pushed a commit
that referenced
this pull request
May 5, 2026
) The SCM onboarding platform card was rendering raw `PlatformIntegration.type` as a muted subtitle, which produced nonsense labels like "language" under React Native (a framework) and "framework" under Android (an OS). Add a sidecar `getPlatformKind(key, type)` lookup that returns a corrected display kind, and wire the card through it. **Why a sidecar instead of a field on `PlatformIntegration`** Two related but separate concepts. `type` is misnamed but load-bearing for the framework-suggestion modal gate, so it cannot be re-tagged in place. A `kind` field on `PlatformIntegration` was the first cut, but it leaked into every consumer's type while only the SCM card read it. Pulling it into `static/app/data/platformKinds.tsx` keeps `PlatformIntegration` honest and limits the new concept to the surface that needs it. **Override list** Only platforms whose `type` is wrong for display get an override entry; everything else falls back to its existing `type`. | Platform | `type` | `kind` | |---|---|---| | android | framework | platform | | apple, apple-ios, apple-macos | language | platform | | dotnet | language | platform | | nintendo-switch, playstation, xbox | console | platform | | cordova, electron, react-native | language | framework | | dart | framework | language |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SCM onboarding platform card was rendering raw
PlatformIntegration.typeas a muted subtitle, which produced nonsense labels like "language" under React Native (a framework) and "framework" under Android (an OS). Add a sidecargetPlatformKind(key, type)lookup that returns a corrected display kind, and wire the card through it.Why a sidecar instead of a field on
PlatformIntegrationTwo related but separate concepts.
typeis misnamed but load-bearing for the framework-suggestion modal gate, so it cannot be re-tagged in place. Akindfield onPlatformIntegrationwas the first cut, but it leaked into every consumer's type while only the SCM card read it. Pulling it intostatic/app/data/platformKinds.tsxkeepsPlatformIntegrationhonest and limits the new concept to the surface that needs it.Override list
Only platforms whose
typeis wrong for display get an override entry; everything else falls back to its existingtype.typekind