Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
bec18f4
Use the markers.category array for the chrome event categories
canova Dec 12, 2025
ae84914
Only add a payload for chrome markers if the event has a payload
canova Dec 12, 2025
b1f4716
Remove the unneeded special handling for matching chrome payloads for…
canova Dec 12, 2025
5a5218b
🔃 Daily sync: main -> l10n (December 19, 2025)
Dec 19, 2025
566a17a
Update all Yarn dependencies (2025-12-18) (#5728)
depfu[bot] Dec 19, 2025
e9f26ae
🔃 Daily sync: main -> l10n (December 20, 2025)
Dec 20, 2025
34a21fa
Update all Yarn dependencies (2025-12-24)
depfu[bot] Dec 24, 2025
2591f3e
Update the test snapshots
canova Dec 24, 2025
f9525d4
Update all Yarn dependencies (2025-12-24) (#5735)
canova Dec 24, 2025
272a75c
Pontoon/Firefox Profiler: Update Russian (ru)
mozilla-pontoon Dec 24, 2025
8ec599d
🔃 Daily sync: main -> l10n (December 25, 2025)
Dec 25, 2025
0d72df8
Put radio buttons into labels (#5738)
arai-a Dec 25, 2025
c7d09f0
🔃 Daily sync: main -> l10n (December 26, 2025)
Dec 26, 2025
65d404f
Pontoon/Firefox Profiler: Update Russian (ru)
mozilla-pontoon Dec 29, 2025
e7e03ce
Pontoon/Firefox Profiler: Update Chinese (China) (zh-CN)
mozilla-pontoon Dec 30, 2025
226d03c
Pontoon/Firefox Profiler: Update Friulian (fur)
mozilla-pontoon Jan 3, 2026
b76666c
Update comment for "unique-string" (#5741)
DaniPopes Jan 6, 2026
2b37a62
🔃 Daily sync: main -> l10n (January 7, 2026)
Jan 7, 2026
b651afc
Hide tooltip filter button in non-sticky tooltips and add hideFilterB…
KaranPradhan266 Jan 7, 2026
b89b418
🔃 Daily sync: main -> l10n (January 8, 2026)
Jan 8, 2026
87cac64
Add a menu to copy the Marker Table as text (#5732)
arai-a Jan 8, 2026
314005f
⬆️ Update protobufjs to version 8.0.0 (#5734)
depfu[bot] Jan 8, 2026
739300a
Update all Yarn dependencies (2025-12-31) (#5743)
depfu[bot] Jan 8, 2026
c77c42d
Update all Yarn dependencies (2026-01-08) (#5748)
depfu[bot] Jan 8, 2026
7eaaa33
🔃 Daily sync: main -> l10n (January 9, 2026)
Jan 9, 2026
8c1f96e
Pontoon/Firefox Profiler: Update Chinese (Taiwan) (zh-TW)
mozilla-pontoon Jan 9, 2026
fd3b8ab
Pontoon/Firefox Profiler: Update Italian (it)
mozilla-pontoon Jan 9, 2026
43a770d
Pontoon/Firefox Profiler: Update English (Great Britain) (en-GB)
mozilla-pontoon Jan 9, 2026
37e9471
Make the entire list item clickable for the "Full Range" (#5742)
arai-a Jan 9, 2026
912beec
Pontoon/Firefox Profiler: Update German (de)
mozilla-pontoon Jan 9, 2026
a43d03d
Pontoon/Firefox Profiler: Update German (de)
mozilla-pontoon Jan 9, 2026
b32ae2a
Change the order in which we consult the various symbol sources: Chec…
mstange Jan 2, 2026
0d48bc0
Make option 4 work more like options 1 and 2.
mstange Jan 5, 2026
9b62de6
Create a proper class for the symbol provider that getSymbolStore pas…
mstange Jan 4, 2026
2b6c486
Make SymbolStoreDB.getSymbolTable return null if the symbol table isn…
mstange Jan 6, 2026
f53bdfa
Move symbol table caching and demangling into RegularSymbolProvider.
mstange Dec 16, 2025
6cae060
Remove unused ISymbolStoreDB interface.
mstange Jan 9, 2026
3f43d12
Disable async chunks in the symbolicator-cli build.
mstange Jan 6, 2026
45bf912
Move symbol table demangling out of SymbolStore into SymbolProvider (…
mstange Jan 9, 2026
0dd124f
Remove SVG asset imports from profile-data.ts
mstange Jan 6, 2026
c70f208
Remove SVG asset imports from profile-data.ts (#5747)
mstange Jan 9, 2026
e50b275
Add hidden dark/light switch
arai-a Jan 9, 2026
4e831d7
Apply dark mode to common elements
arai-a Dec 27, 2025
7362a0b
Apply dark mode to photon components
arai-a Jan 9, 2026
205583f
Apply dark mode to Home components
arai-a Jan 9, 2026
6ee904d
Apply dark mode to TreeView component
arai-a Jan 9, 2026
d977cbd
Apply dark mode to FilterNavigationBar component
arai-a Jan 9, 2026
8f6daa8
Apply dark mode to profileViewerTopBar
arai-a Jan 9, 2026
1668cf9
Apply dark mode to Timeline components
arai-a Jan 9, 2026
395215b
Pontoon/Firefox Profiler: Update Swedish (sv-SE)
mozilla-pontoon Jan 9, 2026
8791990
Apply dark mode to TabBar component
arai-a Jan 9, 2026
796762c
Apply dark mode to settings components
arai-a Jan 9, 2026
7e28c8f
Apply dark mode to sidebar components
arai-a Jan 9, 2026
c0cae98
Apply dark mode to timeline markers
arai-a Jan 9, 2026
9757cee
Apply dark mode to flame graph and stack chart
arai-a Jan 9, 2026
d1bdae7
Apply dark mode to Tooltip components
arai-a Jan 9, 2026
a1775bc
Apply dark mode to marker chart
arai-a Dec 27, 2025
24fb9a0
Apply dark mode to network chart
arai-a Jan 9, 2026
4fc34c1
Apply dark mode to TrackContextMenu component
arai-a Jan 9, 2026
0533f31
Apply dark mode to TabSelectorMenu component
arai-a Dec 27, 2025
dfc19d7
Apply dark mode to MetaInfo component
arai-a Jan 9, 2026
fe783a3
Apply dark mode to CodeView components
arai-a Jan 9, 2026
eabe31d
Apply dark mode to colored border
arai-a Jan 9, 2026
f0cb975
Apply dark mode to CompareHome component
arai-a Dec 27, 2025
fb930b1
Apply dark mode to UploadedRecordingsHome component
arai-a Jan 9, 2026
05f88a8
Apply dark mode to context menu components
arai-a Jan 9, 2026
2bf111b
Apply dark mode to PanelSearch components
arai-a Jan 9, 2026
bddf3bc
Apply dark mode to DragAndDrop component
arai-a Jan 9, 2026
bd33a02
Apply dark mode to ErrorBoundary component
arai-a Jan 9, 2026
9e0d695
Apply dark mode to KeyboardShortcut component
arai-a Jan 9, 2026
3af973d
Apply dark mode to ProfileDeleteButton component
arai-a Jan 9, 2026
5df6f47
Apply dark mode to ProfileRootMessage component
arai-a Dec 27, 2025
c3ac36d
Apply dark mode to SymbolicationStatusOverlay component
arai-a Jan 9, 2026
5bbc5f2
Apply dark mode to ZipFileViewer component
arai-a Jan 9, 2026
2d263b9
Apply dark mode to JsTracer components
arai-a Jan 9, 2026
f2a6fd7
Apply dark mode to code error overlays
arai-a Jan 9, 2026
1d731b5
Update snapshots
arai-a Dec 27, 2025
58fa3c2
Pontoon/Firefox Profiler: Update Russian (ru)
mozilla-pontoon Jan 9, 2026
5cdd2c0
Add Dark mode checkbox
arai-a Jan 9, 2026
4061219
Fix HCM coloring on dark mode
arai-a Jan 9, 2026
da0fd3d
Pontoon/Firefox Profiler: Update English (Canada) (en-CA)
mozilla-pontoon Jan 9, 2026
36f6d6a
Pontoon/Firefox Profiler: Update Interlingua (ia)
mozilla-pontoon Jan 10, 2026
e5dfd1b
Pontoon/Firefox Profiler: Update Interlingua (ia)
mozilla-pontoon Jan 10, 2026
72a2efd
Move more code to the dark-mode.ts and add tests
arai-a Jan 10, 2026
71f9467
🔃 Daily sync: main -> l10n (January 10, 2026)
Jan 10, 2026
c6568d7
Pontoon/Firefox Profiler: Update Belarusian (be)
mozilla-pontoon Jan 10, 2026
f6d3055
Pontoon/Firefox Profiler: Update Spanish (Chile) (es-CL)
mozilla-pontoon Jan 11, 2026
1bf8578
Pontoon/Firefox Profiler: Update Dutch (nl), Frisian (fy-NL)
mozilla-pontoon Jan 12, 2026
67547d0
Fix the node zlib path.
mstange Jan 12, 2026
a0150a5
Stop blindly extracting uint8array.buffer after calling compress().
mstange Jan 11, 2026
ed862de
In the assembly view state, refer to the current symbol by index.
mstange Jan 30, 2025
e50f4f3
Do not apply sticky tooltip on double click (#5754)
arai-a Jan 13, 2026
861d194
Pontoon/Firefox Profiler: Update French (fr)
mozilla-pontoon Jan 13, 2026
3eafdfd
⬆️ Update globals to version 17.0.0 (#5749)
depfu[bot] Jan 13, 2026
31304d5
🔃 Daily sync: main -> l10n (January 14, 2026)
Jan 14, 2026
a96ee9b
Pontoon/Firefox Profiler: Update Chinese (China) (zh-CN)
mozilla-pontoon Jan 14, 2026
8ac7cf7
Pontoon/Firefox Profiler: Update Portuguese (Brazil) (pt-BR)
mozilla-pontoon Jan 15, 2026
9227b28
Keep the colorField markerSchema field when processing profiles in th…
fqueze Jan 16, 2026
f5c75d5
Pontoon/Firefox Profiler: Update Greek (el)
mozilla-pontoon Jan 18, 2026
02e88bd
Update all Yarn dependencies (2026-01-14) (#5756)
depfu[bot] Jan 19, 2026
4bf51dc
Skip the ChartCanvas redraw on the Viewport's internal default state …
arai-a Jan 19, 2026
c954fec
Merge branch 'main' into extractarraybuffer
mstange Jan 19, 2026
1bc1177
Fix typo in comment
mstange Jan 19, 2026
b23085c
Stop blindly extracting uint8array.buffer after calling compress() (#…
mstange Jan 19, 2026
676b779
Merge branch 'main' into current-symbol-index
mstange Jan 19, 2026
dd46268
In the assembly view state, refer to the current symbol by index (#5755)
mstange Jan 19, 2026
46b51e0
Remove unused prop disableOverscan.
mstange Jan 12, 2026
583ec0f
Slightly simplify CallNodeContextMenu props.
mstange Jan 12, 2026
ce4a5f7
Split lineNumber into scrollToLineNumber and highlightedLineNumber
mstange Jan 12, 2026
ca1de43
Move two functions out of profile-data.ts into a new file bottom-box.ts.
mstange Jan 12, 2026
a69621a
Compute the "scroll to hot spot" when making the bottom box info.
mstange Jan 29, 2025
0d7cde8
Make assembly view scrolling work like source view scrolling.
mstange Jan 14, 2026
4cb91b5
Implement highlightedInstruction support in the assembly view.
mstange Jan 14, 2026
98b5328
Make it clear that the highlight will be unset when not specified.
mstange Jan 19, 2026
0853138
Fix "scroll to hotspot" functionality in the source view + assembly v…
mstange Jan 19, 2026
12e3d22
🔃 Daily sync: main -> l10n (January 20, 2026)
Jan 20, 2026
3278553
Split gz.ts properly into node and browser variants.
mstange Jan 9, 2026
b362390
Merge branch 'main' into colorField-in-gecko-profiles
mstange Jan 20, 2026
0b38eda
Keep the colorField markerSchema field when processing profiles in th…
mstange Jan 20, 2026
28467d6
Merge branch 'main' into dark-mode
mstange Jan 20, 2026
25763b4
Implement dark mode (#5740)
mstange Jan 20, 2026
c21481c
Fix the profile viewer background color
arai-a Jan 20, 2026
5b49858
Fix the selected track background color
arai-a Jan 20, 2026
06b0dc2
Revert the link color for the light mode
arai-a Jan 20, 2026
215d44f
🔃 Daily sync: main -> l10n (January 21, 2026)
Jan 21, 2026
bfef123
Pontoon/Firefox Profiler: Update Italian (it)
mozilla-pontoon Jan 21, 2026
5ed0508
Pontoon/Firefox Profiler: Update Chinese (Taiwan) (zh-TW), Interlingu…
mozilla-pontoon Jan 21, 2026
2440fdf
Pontoon/Firefox Profiler: Update Dutch (nl)
mozilla-pontoon Jan 21, 2026
0e3de5f
Pontoon/Firefox Profiler: Update German (de)
mozilla-pontoon Jan 21, 2026
c21a3af
Fix light-mode colors (#5765)
mstange Jan 21, 2026
9a98388
Pontoon/Firefox Profiler: Update Russian (ru)
mozilla-pontoon Jan 21, 2026
74932df
Pontoon/Firefox Profiler: Update English (Great Britain) (en-GB)
mozilla-pontoon Jan 21, 2026
f1c5854
Pontoon/Firefox Profiler: Update Spanish (Chile) (es-CL)
mozilla-pontoon Jan 21, 2026
51e429e
Stop computing self line/address hits for the double-clicked call node.
mstange Jan 20, 2026
9add0bf
Add getCallNodeFramePerStack and use it in getNativeSymbolsForCallNode.
mstange Jan 12, 2026
6ba8c8c
Simplify and speed up the computation of the call-node-specific line …
mstange Jan 12, 2026
705756f
🔃 Daily sync: main -> l10n (January 22, 2026)
Jan 22, 2026
a16e571
Pontoon/Firefox Profiler: Update Frisian (fy-NL)
mozilla-pontoon Jan 22, 2026
a20e2a1
Tweak dark mode colours.
mstange Jan 21, 2026
05f2785
Use ink colors in dark mode for the Home and ProfileRootMessage views.
mstange Jan 22, 2026
c5ff411
Fix kbd colors for the keyboard shortcuts displayed in the "connected…
mstange Jan 22, 2026
1d5d774
Fix home documentation button hover colors.
mstange Jan 22, 2026
ee7f84f
Tweak dark mode colours. (#5767)
mstange Jan 22, 2026
cd5ebf4
Update all Yarn dependencies (2026-01-21) (#5766)
depfu[bot] Jan 22, 2026
9b79a68
⬆️ Update stylelint-config-standard to version 40.0.0 (#5772)
depfu[bot] Jan 22, 2026
27b9695
⬆️ Update stylelint to version 17.0.0 (#5771)
depfu[bot] Jan 22, 2026
6500317
Bump lodash from 4.17.21 to 4.17.23 (#5769)
dependabot[bot] Jan 22, 2026
5ab85a9
Pontoon/Firefox Profiler: Update Swedish (sv-SE)
mozilla-pontoon Jan 22, 2026
ac4bb14
Enable some basic type-aware lints.
mstange Sep 19, 2025
05a89d9
🔃 Daily sync: main -> l10n (January 23, 2026)
Jan 23, 2026
eb0d4a6
Pontoon/Firefox Profiler: Update French (fr)
mozilla-pontoon Jan 23, 2026
73c2582
Enable some basic type-aware lints (#5775)
canova Jan 23, 2026
f9029f0
Add prev/next buttons in the assembly view.
mstange Jan 30, 2025
c3eaddf
Make the "x of y" text above the assembly view localizable.
mstange Jan 23, 2026
e927183
Allow seeing different assembly code for the same function (#5349)
mstange Jan 23, 2026
d6b8d44
Pontoon/Firefox Profiler: Update English (Canada) (en-CA)
mozilla-pontoon Jan 23, 2026
d66ec1d
🔃 Daily sync: main -> l10n (January 24, 2026)
Jan 24, 2026
edc7479
Pontoon/Firefox Profiler: Update Swedish (sv-SE)
mozilla-pontoon Jan 24, 2026
eb91781
Pontoon/Firefox Profiler: Update English (Great Britain) (en-GB)
mozilla-pontoon Jan 24, 2026
ccfdfc6
Pontoon/Firefox Profiler: Update German (de), Italian (it)
mozilla-pontoon Jan 24, 2026
302deb1
Pontoon/Firefox Profiler: Update Turkish (tr)
mozilla-pontoon Jan 24, 2026
07985aa
Pontoon/Firefox Profiler: Update Chinese (Taiwan) (zh-TW)
mozilla-pontoon Jan 24, 2026
4787d5a
Pontoon/Firefox Profiler: Update Interlingua (ia)
mozilla-pontoon Jan 24, 2026
c7b7aa7
Pontoon/Firefox Profiler: Update Dutch (nl)
mozilla-pontoon Jan 24, 2026
ef50717
Pontoon/Firefox Profiler: Update Frisian (fy-NL)
mozilla-pontoon Jan 24, 2026
6bd1b03
Pontoon/Firefox Profiler: Update Spanish (Chile) (es-CL)
mozilla-pontoon Jan 24, 2026
304b7a7
Pontoon/Firefox Profiler: Update Russian (ru)
mozilla-pontoon Jan 24, 2026
a3cd6f4
Pontoon/Firefox Profiler: Update Russian (ru)
mozilla-pontoon Jan 24, 2026
bc622c8
Pontoon/Firefox Profiler: Update Portuguese (Brazil) (pt-BR)
mozilla-pontoon Jan 25, 2026
4dbcf81
Refine tree view a11y (Fixes #5674)
fatadel Jan 26, 2026
f9a1724
🔃 Daily sync: main -> l10n (January 27, 2026)
Jan 27, 2026
094fbe8
Pontoon/Firefox Profiler: Update French (fr)
mozilla-pontoon Jan 27, 2026
f565e71
Align double-click behavior of stack chart with flame graph
fatadel Jan 27, 2026
1b72cf5
Merge branch 'main' into gz-node-browser-split
mstange Jan 27, 2026
2292f5b
Split gz.ts properly into node and browser variants (#5764)
mstange Jan 27, 2026
800ffe0
Merge branch 'main' into better-call-node-line-and-address-timings
mstange Jan 27, 2026
81de1ee
Simplify and optimize the computation of per-call-node line and addre…
mstange Jan 27, 2026
7631610
Add window.toggleDarkMode to toggle the dark mode from devtools console
canova Jan 26, 2026
4f7633c
Remove the dark mode checkbox from the home page
canova Jan 26, 2026
450121b
Remove the unused Window interface functions
canova Jan 26, 2026
fb81edd
Move the dark mode toggle to devtools console (#5783)
canova Jan 27, 2026
2741a27
Merge branch 'main' into l10n
canova Jan 27, 2026
f3e5f58
🔃 Sync: l10n -> main (Jan 27, 2026) (#5785)
canova Jan 27, 2026
1b6b00e
Merge branch 'main' into chrome-marker-improvements
canova Jan 27, 2026
de511d9
Improve Chrome importer marker payload logic (#5717)
canova Jan 27, 2026
3b1ad62
Add a Focus Self transform.
mstange Jan 22, 2026
35c005e
Add translation notes for "focus self" strings.
mstange Jan 23, 2026
e06bd91
Add a Focus Self transform (#5774)
mstange Jan 27, 2026
17bd391
Enable the Turkish locale in production (#5786)
canova Jan 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ coverage
webpack.local-config.js
*.orig
*.rej
.idea/
12 changes: 12 additions & 0 deletions docs-user/guide-filtering-call-trees.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ Merging takes a call node and removes it from the call tree. Any self time for t

Focusing on a function or call node removes all of the ancestor call nodes—the children call nodes remain. If a stack does not contain that function or node, then it is removed. This effectively focuses on a subtree or a set of subtrees on the call tree.

### Focus on Function Self

Focus on function self is similar to focus on function, but more restrictive: it only keeps samples where the focused function is the innermost implementation-filtered frame. This helps you analyze where within a function the self time is being spent, by removing samples where the function is calling other code.

For example, if you focus-self on a JavaScript function with the JS implementation filter, you'll only see samples where that JS function has self time, and any native (C++) calls below it will be shown as descendants. This is particularly useful for:

- Finding which parts of a function are slow (by looking at the assembly or source lines)
- Understanding what engine internals are being called by a JS function (by switching implementation filter after focusing)
- Eliminating noise from code your function calls, to concentrate on the function's own execution

If the same function appears multiple times in a stack (recursion), only the innermost instance is kept as the root.

### Focus on Category

Focusing on the nodes that belong to the same category as the selected node, thereby merging all nodes that belong to another category.
Expand Down
62 changes: 55 additions & 7 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from 'eslint/config';
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import babelPlugin from '@babel/eslint-plugin';
import reactPlugin from 'eslint-plugin-react';
import importPlugin from 'eslint-plugin-import';
Expand All @@ -11,7 +12,7 @@ import jestDomPlugin from 'eslint-plugin-jest-dom';
import prettierConfig from 'eslint-config-prettier';
import globals from 'globals';

export default [
export default defineConfig(
// Global ignores
{
ignores: [
Expand All @@ -27,8 +28,8 @@ export default [
// Base JavaScript config
js.configs.recommended,

// TypeScript config
...tsPlugin.configs['flat/recommended'],
// TypeScript config with type checking
...tseslint.configs.recommendedTypeChecked,

// React config
reactPlugin.configs.flat.recommended,
Expand All @@ -50,6 +51,7 @@ export default [
ecmaFeatures: {
jsx: true,
},
// Note: projectService is enabled for TypeScript files only, below
},
},
plugins: {
Expand Down Expand Up @@ -178,6 +180,32 @@ export default [
},
],
'@typescript-eslint/no-require-imports': 'off',

// Disable "no-unsafe" checks which complain about using "any" freely.
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-return': 'off',

// Disable this one due to false positives when narrowing return types,
// see https://github.com/typescript-eslint/typescript-eslint/issues/6951
// (it can make `yarn ts` fail after `yarn lint-fix`)
'@typescript-eslint/no-unnecessary-type-assertion': 'off',

// Consider enabling these in the future
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/only-throw-error': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/await-thenable': 'off',
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'off',
'@typescript-eslint/no-array-delete': 'off',
},
linterOptions: {
// This property is specified both here in addition to the command line in
Expand All @@ -189,7 +217,27 @@ export default [
},
},

// Source files - enable stricter TypeScript rules
// Enable type-aware lints for TypeScript files.
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},

// Explicitly disable type-aware rules for JS files, to avoid the following error:
// > You have used a rule which requires type information, but don't have
// > parserOptions set to generate type information for this file.
{
files: ['**/*.js', '**/*.mjs', '**/*.cjs'],
...tseslint.configs.disableTypeChecked,
},

// For non-test files, only allow import, no require(). (For test files we
// allow require() because we use it for JSON fixtures.)
{
files: ['src/**/*.ts', 'src/**/*.tsx'],
rules: {
Expand Down Expand Up @@ -266,5 +314,5 @@ export default [
},

// Prettier config (must be last to override other formatting rules)
prettierConfig,
];
prettierConfig
);
57 changes: 57 additions & 0 deletions jest-resolver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

// Custom Jest resolver that respects the "browser" field in package.json
// This allows tests to use browser implementations instead of Node.js implementations
//
// Set JEST_ENVIRONMENT=node to use Node.js implementations (default: browser)

const fs = require('fs');
const path = require('path');

// Determine environment mode: "browser" or "node"
const USE_BROWSER = process.env.JEST_ENVIRONMENT !== 'node';

// Read package.json once at module load time
const PROJECT_ROOT = __dirname;
const BROWSER_MAPPINGS = parseBrowserMappingsFromPackageJson(PROJECT_ROOT);

module.exports = (request, options) => {
const resolved = options.defaultResolver(request, options);

if (USE_BROWSER) {
return BROWSER_MAPPINGS[resolved] ?? resolved;
}

return resolved;
};

function parseBrowserMappingsFromPackageJson(projectRoot) {
const browserMappings = {};
const packageJsonPath = path.join(projectRoot, 'package.json');
try {
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
const browserField = packageJson.browser;

if (browserField && typeof browserField === 'object') {
// Pre-validate all browser mappings and convert to absolute paths
for (const [source, target] of Object.entries(browserField)) {
const absoluteSource = path.resolve(projectRoot, source);
const absoluteTarget = path.resolve(projectRoot, target);

if (!fs.existsSync(absoluteTarget)) {
console.warn(
`Warning: Browser mapping target does not exist: ${target}`
);
continue;
}

browserMappings[absoluteSource] = absoluteTarget;
}
}
} catch (error) {
console.error(`Error reading package.json for browser field: ${error}`);
}
return browserMappings;
}
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ module.exports = {
testMatch: ['<rootDir>/src/**/*.test.{js,jsx,ts,tsx}'],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],

// Use custom resolver that respects the "browser" field in package.json
resolver: './jest-resolver.js',

testEnvironment: './src/test/custom-environment',
setupFilesAfterEnv: ['jest-extended/all', './src/test/setup.ts'],

Expand Down
17 changes: 17 additions & 0 deletions locales/be/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,13 @@ MarkerContextMenu--select-the-sender-thread = Выберыце паток-адп
# $filter (String) - Search string that will be used to filter the markers.
MarkerFiltersContextMenu--drop-samples-outside-of-markers-matching = Адкідваць сэмплы па-за межамі маркераў, якія адпавядаюць «<strong>{ $filter }</strong>»

## MarkerCopyTableContextMenu
## This is the menu when the copy icon is clicked in Marker Chart and Marker
## Table panels.

MarkerCopyTableContextMenu--copy-table-as-plain = Скапіяваць табліцу маркераў як звычайны тэкст
MarkerCopyTableContextMenu--copy-table-as-markdown = Скапіяваць табліцу маркераў як Markdown

## MarkerSettings
## This is used in all panels related to markers.

Expand All @@ -415,6 +422,14 @@ MarkerSettings--panel-search =
.title = Паказваць толькі маркеры, якія адпавядаюць пэўнаму імені
MarkerSettings--marker-filters =
.title = Фільтры маркераў
MarkerSettings--copy-table =
.title = Скапіяваць табліцу як тэкст
# This string is used when the user tries to copy a marker table with
# more than 10000 rows.
# Variable:
# $rows (Number) - Number of rows the marker table has
# $maxRows (Number) - Number of maximum rows that can be copied
MarkerSettings--copy-table-exceeed-max-rows = Колькасць радкоў перавышае ліміт: { $rows } > { $maxRows }. Будуць скапіяваныя толькі першыя ({ $maxRows }) радкі.

## MarkerSidebar
## This is the sidebar component that is used in Marker Table panel.
Expand Down Expand Up @@ -535,6 +550,8 @@ MenuButtons--metaInfo--profiling-started = Запіс пачаўся:
MenuButtons--metaInfo--profiling-session = Працягласць запісу:
MenuButtons--metaInfo--main-process-started = Асноўны працэс пачаўся:
MenuButtons--metaInfo--main-process-ended = Асноўны працэс скончыўся:
MenuButtons--metaInfo--file-name = Назва файла:
MenuButtons--metaInfo--file-size = Памер файла:
MenuButtons--metaInfo--interval = Інтэрвал:
MenuButtons--metaInfo--buffer-capacity = Ёмістасць буфера:
MenuButtons--metaInfo--buffer-duration = Працягласць буфера:
Expand Down
27 changes: 27 additions & 0 deletions locales/de/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ Home--additional-content-title = Bestehende Profile laden
Home--additional-content-content = Sie können eine Profildatei per <strong>Ziehen und Ablegen</strong> hierher bewegen, um sie zu laden, oder:
Home--compare-recordings-info = Sie können auch Aufnahmen vergleichen. <a>Öffnen Sie die Vergleichsschnittstelle.</a>
Home--your-recent-uploaded-recordings-title = Ihre kürzlich hochgeladenen Aufzeichnungen
Home--dark-mode-title = Dunkler Modus
# We replace the elements such as <perf> and <simpleperf> with links to the
# documentation to use these tools.
Home--load-files-from-other-tools2 =
Expand Down Expand Up @@ -405,6 +406,13 @@ MarkerContextMenu--select-the-sender-thread = Absender-Thread „<strong>{ $thre
# $filter (String) - Search string that will be used to filter the markers.
MarkerFiltersContextMenu--drop-samples-outside-of-markers-matching = Stichproben außerhalb der Markierungen verwerfen, die mit „<strong>{ $filter }</strong>“ übereinstimmen

## MarkerCopyTableContextMenu
## This is the menu when the copy icon is clicked in Marker Chart and Marker
## Table panels.

MarkerCopyTableContextMenu--copy-table-as-plain = Markierungstabelle als Reintext kopieren
MarkerCopyTableContextMenu--copy-table-as-markdown = Markierungstabelle als Markdown kopieren

## MarkerSettings
## This is used in all panels related to markers.

Expand All @@ -413,6 +421,14 @@ MarkerSettings--panel-search =
.title = Nur Markierungen anzeigen, die zu einem bestimmten Namen passen
MarkerSettings--marker-filters =
.title = Filter für Markierungen
MarkerSettings--copy-table =
.title = Tabelle als Text kopieren
# This string is used when the user tries to copy a marker table with
# more than 10000 rows.
# Variable:
# $rows (Number) - Number of rows the marker table has
# $maxRows (Number) - Number of maximum rows that can be copied
MarkerSettings--copy-table-exceeed-max-rows = Die Anzahl der Zeilen überschreitet das Limit: { $rows } > { $maxRows }. Nur die ersten { $maxRows } Zeilen werden kopiert.

## MarkerSidebar
## This is the sidebar component that is used in Marker Table panel.
Expand Down Expand Up @@ -1139,6 +1155,17 @@ AssemblyView--show-button =
# Assembly refers to the low-level programming language.
AssemblyView--hide-button =
.title = Assembly-Ansicht ausblenden
# The "◀" button above the assembly view.
AssemblyView--prev-button =
.title = Zurück
# The "▶" button above the assembly view.
AssemblyView--next-button =
.title = Weiter
# The label showing the current position and total count above the assembly view.
# Variables:
# $current (Number) - The current position (1-indexed).
# $total (Number) - The total count.
AssemblyView--position-label = { $current } von { $total }

## UploadedRecordingsHome
## This is the page that displays all the profiles that user has uploaded.
Expand Down
2 changes: 2 additions & 0 deletions locales/el/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ MarkerSettings--panel-search =
.title = Εμφάνιση μόνο των σημαδιών που αντιστοιχούν σε ένα συγκεκριμένο όνομα
MarkerSettings--marker-filters =
.title = Φίλτρα δείκτη
MarkerSettings--copy-table =
.title = Αντιγραφή πίνακα ως κειμένου

## MarkerSidebar
## This is the sidebar component that is used in Marker Table panel.
Expand Down
16 changes: 16 additions & 0 deletions locales/en-CA/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ Home--additional-content-title = Load existing profiles
Home--additional-content-content = You can <strong>drag and drop</strong> a profile file here to load it, or:
Home--compare-recordings-info = You can also compare recordings. <a>Open the comparing interface.</a>
Home--your-recent-uploaded-recordings-title = Your recent uploaded recordings
Home--dark-mode-title = Dark mode
# We replace the elements such as <perf> and <simpleperf> with links to the
# documentation to use these tools.
Home--load-files-from-other-tools2 =
Expand Down Expand Up @@ -429,6 +430,13 @@ MarkerContextMenu--select-the-sender-thread = Select the sender thread “<stron
# $filter (String) - Search string that will be used to filter the markers.
MarkerFiltersContextMenu--drop-samples-outside-of-markers-matching = Drop samples outside of markers matching “<strong>{ $filter }</strong>”

## MarkerCopyTableContextMenu
## This is the menu when the copy icon is clicked in Marker Chart and Marker
## Table panels.

MarkerCopyTableContextMenu--copy-table-as-plain = Copy marker table as plain text
MarkerCopyTableContextMenu--copy-table-as-markdown = Copy marker table as Markdown

## MarkerSettings
## This is used in all panels related to markers.

Expand All @@ -437,6 +445,14 @@ MarkerSettings--panel-search =
.title = Only display markers that match a certain name
MarkerSettings--marker-filters =
.title = Marker Filters
MarkerSettings--copy-table =
.title = Copy table as text
# This string is used when the user tries to copy a marker table with
# more than 10000 rows.
# Variable:
# $rows (Number) - Number of rows the marker table has
# $maxRows (Number) - Number of maximum rows that can be copied
MarkerSettings--copy-table-exceeed-max-rows = The number of rows exceeds the limit: { $rows } > { $maxRows }. Only the first { $maxRows } rows will be copied.

## MarkerSidebar
## This is the sidebar component that is used in Marker Table panel.
Expand Down
27 changes: 27 additions & 0 deletions locales/en-GB/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ Home--additional-content-title = Load existing profiles
Home--additional-content-content = You can <strong>drag and drop</strong> a profile file here to load it, or:
Home--compare-recordings-info = You can also compare recordings. <a>Open the comparing interface.</a>
Home--your-recent-uploaded-recordings-title = Your recent uploaded recordings
Home--dark-mode-title = Dark mode
# We replace the elements such as <perf> and <simpleperf> with links to the
# documentation to use these tools.
Home--load-files-from-other-tools2 =
Expand Down Expand Up @@ -429,6 +430,13 @@ MarkerContextMenu--select-the-sender-thread = Select the sender thread “<stron
# $filter (String) - Search string that will be used to filter the markers.
MarkerFiltersContextMenu--drop-samples-outside-of-markers-matching = Drop samples outside of markers matching “<strong>{ $filter }</strong>”

## MarkerCopyTableContextMenu
## This is the menu when the copy icon is clicked in Marker Chart and Marker
## Table panels.

MarkerCopyTableContextMenu--copy-table-as-plain = Copy marker table as plain text
MarkerCopyTableContextMenu--copy-table-as-markdown = Copy marker table as Markdown

## MarkerSettings
## This is used in all panels related to markers.

Expand All @@ -437,6 +445,14 @@ MarkerSettings--panel-search =
.title = Only display markers that match a certain name
MarkerSettings--marker-filters =
.title = Marker Filters
MarkerSettings--copy-table =
.title = Copy table as text
# This string is used when the user tries to copy a marker table with
# more than 10000 rows.
# Variable:
# $rows (Number) - Number of rows the marker table has
# $maxRows (Number) - Number of maximum rows that can be copied
MarkerSettings--copy-table-exceeed-max-rows = The number of rows exceeds the limit: { $rows } > { $maxRows }. Only the first { $maxRows } rows will be copied.

## MarkerSidebar
## This is the sidebar component that is used in Marker Table panel.
Expand Down Expand Up @@ -1163,6 +1179,17 @@ AssemblyView--show-button =
# Assembly refers to the low-level programming language.
AssemblyView--hide-button =
.title = Hide the assembly view
# The "◀" button above the assembly view.
AssemblyView--prev-button =
.title = Previous
# The "▶" button above the assembly view.
AssemblyView--next-button =
.title = Next
# The label showing the current position and total count above the assembly view.
# Variables:
# $current (Number) - The current position (1-indexed).
# $total (Number) - The total count.
AssemblyView--position-label = { $current } of { $total }

## UploadedRecordingsHome
## This is the page that displays all the profiles that user has uploaded.
Expand Down
Loading