Skip to content

Add global --permalink and --short-permalink flags to profiler-cli - #6338

Merged
canova merged 1 commit into
firefox-devtools:mainfrom
canova:permalink-arg
Oct 6, 2026
Merged

canova merged 1 commit into
firefox-devtools:mainfrom
canova:permalink-arg

Conversation

@canova

@canova canova commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Main | Deploy preview

Any command can now also print a profiler.firefox.com URL for the view it showed. The daemon maps the command to a small set of ephemeral view settings (thread, tab, search, idle, strategy, filters, marker selection), and the querier applies them through the same Redux wrappers the queries use, snapshots the URL state, and reverts, so nothing leaks into the session. Marker queries open the marker chart, or the marker table with --list. --short-permalink shortens through share.firefox.dev.

Part of #6185.

@canova
canova requested a review from mstange September 21, 2026 12:49
@codecov

codecov Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.00000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.23%. Comparing base (6221821) to head (a8141eb).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/profile-query/index.ts 86.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6338      +/-   ##
==========================================
+ Coverage   84.12%   84.23%   +0.11%     
==========================================
  Files         356      356              
  Lines       38445    38451       +6     
  Branches    10787    10772      -15     
==========================================
+ Hits        32340    32390      +50     
+ Misses       5676     5632      -44     
  Partials      429      429              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +996 to +1000
/**
* Compose the idle/search/ephemeral-filter/strategy wrappers around fn(), in
* the order the sample queries use. Also used to snapshot the URL state for
* permalinks so the link agrees with the query output.
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Huh, the function composing here looks complicated. I haven't really dug into why this is needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It also uses a Pick<> type whose purpose I haven't yet identified.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You're right that it's hard to read. I simplified this code a bit. The wrappers aren't new, we usually pass _with.. for ephemeral filters etc, so they are pushed and popped only for that command.

For Pick<>, yeah I usually dislike them too, but missed it here. AI loves using them to deduplicate code or reduce the code, but it makes them very hard to read, especially you can't see their values. Replaced it.

Any command can now also print a profiler.firefox.com URL for the view
it showed. The daemon maps the command to a small set of ephemeral view
settings (thread, tab, search, idle, strategy, filters, marker
selection), and the querier applies them through the same Redux wrappers
the queries use, snapshots the URL state, and reverts, so nothing leaks
into the session. Marker queries open the marker chart, or the marker
table with --list. --short-permalink shortens through share.firefox.dev.

Part of firefox-devtools#6185.
@canova
canova requested a review from mstange October 2, 2026 10:15
@canova
canova added this pull request to the merge queue Oct 6, 2026
Merged via the queue into firefox-devtools:main with commit b7c2a3d Oct 6, 2026
23 checks passed
@fatadel fatadel mentioned this pull request Oct 13, 2026
fatadel added a commit that referenced this pull request Oct 13, 2026
Changes:

[Florian Quèze] profiler-cli: accept several marker handles and ranges in marker info (#6277)
[Nazım Can Altınova] Add "profiler-cli profile save <path>" (#6340)
[Nazım Can Altınova] Fix the upload progress bar not showing in light mode (#6348)
[Nazım Can Altınova] Fix the variable name passed to the malformed response error strings (#6351)
[Markus Stange] Add missing await when calling Chrome importer (#6346)
[Markus Stange] Use "falls through" for all fallthrough comments (#6344)
[Markus Stange] Move source map related profile logic files into profile-logic/source-maps/ (#6349)
[Markus Stange] Make the source view actually read-only. (#6313)
[Markus Stange] Run CI on merge queue branches (#6352)
[Markus Stange] Serve production build by default during local development (#6353)
[Nazım Can Altınova] Fix "... was not wrapped in act" warnings in tests (#6362)
[Nazım Can Altınova] Add a scope tree test for shorthand destructuring defaults (#6367)
[fatadel] Accept --session before subcommands in profiler-cli (#6358)
[Nazım Can Altınova] Replace the deprecated loose option with Babel assumptions (#6366)
[fatadel] Clarify how to save profiles for later access (#6355)
[Markus Stange] Speed up activity graph drawing (#5888)
[Nazım Can Altınova] Make `yarn test-cli` and `yarn test-all` faster (#6369)
[Nazım Can Altınova] Add global `--permalink` and `--short-permalink` flags to profiler-cli (#6338)
[Nazım Can Altınova] Use a profile with tab information in the tab selector URL tests (#6370)
[fatadel] Move FileIO table labels into the Gecko profile upgrader (#6375)
[fatadel] Clear preview selections when zooming out in the CLI (#6380)
[Nazım Can Altınova] Add the ability to apply source maps to the profiles using `profiler-edit` (#6382)
[fatadel] 🔃 Sync: l10n -> main (October 13, 2026) (#6389)

And special thanks to our localizers:

de: Ralf Duehnfahr
el: Jim Spentzos
en-GB: Ian Neal
es-CL: ravmn
fr: Théo Chevalier
fy-NL: Fjoerfoks
ia: Melo46
it: Francesco Lodolo [:flod]
nl: Fjoerfoks
ro: IulianArian
ro: robbp
ru: Valery Ledovskoy
sv-SE: Andreas Pettersson
tr: Selim Şumlu
tr: Sena nur
zh-TW: Pin-guang Chen
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.

2 participants