From 361b5bd76afde4c3663bb041e983a758947a6b29 Mon Sep 17 00:00:00 2001 From: Sebastian Munoz Date: Wed, 25 Nov 2026 15:32:53 +0100 Subject: [PATCH] feat(debug-files): Label WASM source maps in the debug files list Show "WebAssembly source map" for the new wasmsourcemap debug file type instead of the raw type name. Adds the first tests for getPrettyFileType. Refs TGDX-153 Co-Authored-By: Claude Opus 5.5 --- .../settings/projectDebugFiles/utils.spec.tsx | 23 +++++++++++++++++++ .../settings/projectDebugFiles/utils.tsx | 1 + 2 files changed, 24 insertions(+) create mode 100644 static/app/views/settings/projectDebugFiles/utils.spec.tsx diff --git a/static/app/views/settings/projectDebugFiles/utils.spec.tsx b/static/app/views/settings/projectDebugFiles/utils.spec.tsx new file mode 100644 index 000000000000..05480f9aa419 --- /dev/null +++ b/static/app/views/settings/projectDebugFiles/utils.spec.tsx @@ -0,0 +1,23 @@ +import {DebugFileFixture} from 'sentry-fixture/debugFile'; + +import {getPrettyFileType} from './utils'; + +describe('getPrettyFileType', () => { + it('labels WASM source maps', () => { + const dsym = DebugFileFixture({ + symbolType: 'wasmsourcemap', + cpuName: 'any', + data: undefined, + }); + expect(getPrettyFileType(dsym)).toBe('WebAssembly source map'); + }); + + it('falls back to the raw symbol type for unknown types', () => { + const dsym = DebugFileFixture({ + symbolType: 'somethingnew', + cpuName: 'any', + data: undefined, + }); + expect(getPrettyFileType(dsym)).toBe('somethingnew'); + }); +}); diff --git a/static/app/views/settings/projectDebugFiles/utils.tsx b/static/app/views/settings/projectDebugFiles/utils.tsx index aac821dbccf0..184f9b985901 100644 --- a/static/app/views/settings/projectDebugFiles/utils.tsx +++ b/static/app/views/settings/projectDebugFiles/utils.tsx @@ -12,6 +12,7 @@ const PRETTY_SYMBOL_TYPES = { portablepdb: t('Portable PDB'), sourcebundle: t('SourceBundle'), wasm: t('WebAssembly'), + wasmsourcemap: t('WebAssembly source map'), bcsymbolmap: t('BCSymbolMap'), il2cpp: t('IL2CPP mapping'), };