Skip to content

WIP: Honor colorField when the marker field has format 'unique-string'#6068

Open
fqueze wants to merge 1 commit into
firefox-devtools:mainfrom
fqueze:colorfield-unique-string
Open

WIP: Honor colorField when the marker field has format 'unique-string'#6068
fqueze wants to merge 1 commit into
firefox-devtools:mainfrom
fqueze:colorfield-unique-string

Conversation

@fqueze
Copy link
Copy Markdown
Contributor

@fqueze fqueze commented May 29, 2026

[note: this is a WIP because I haven't fully reviewed it. I think it's OK or mostly OK, so anybody can feel free to take it over the finish line. I'm submitting this as PR to have a deploy preview, and so I don't lose it, but I'm not actively working on this right now.]

The marker chart's colorField lookup read the field value directly from the payload, but for fields with format 'unique-string' the payload holds a string-table index rather than the string itself, so the value never matched a valid GraphColor and the marker fell back to blue.

Add a getMarkerFieldValue helper in marker-schema.ts that dereferences unique-string / flow-id / terminating-flow-id field values through the string table, use it from MarkerChart Canvas, and collapse two existing inline copies of the same pattern (markerPayloadMatchesSearch and getGroupingValue) onto the helper. The console.warn calls in markerPayloadMatchesSearch that fired only for malformed profiles are dropped along the way.

The marker chart's colorField lookup read the field value directly from
the payload, but for fields with format 'unique-string' the payload
holds a string-table index rather than the string itself, so the value
never matched a valid GraphColor and the marker fell back to blue.

Add a getMarkerFieldValue helper in marker-schema.ts that dereferences
unique-string / flow-id / terminating-flow-id field values through the
string table, use it from MarkerChart Canvas, and collapse two existing
inline copies of the same pattern (markerPayloadMatchesSearch and
getGroupingValue) onto the helper. The console.warn calls in
markerPayloadMatchesSearch that fired only for malformed profiles are
dropped along the way.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

❌ Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.77%. Comparing base (61e5d10) to head (ecfaae1).
⚠️ Report is 98 commits behind head on main.

Files with missing lines Patch % Lines
src/profile-logic/marker-schema.ts 89.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6068      +/-   ##
==========================================
- Coverage   83.81%   83.77%   -0.05%     
==========================================
  Files         328      329       +1     
  Lines       34255    34550     +295     
  Branches     9572     9669      +97     
==========================================
+ Hits        28712    28945     +233     
- Misses       5115     5176      +61     
- Partials      428      429       +1     

☔ View full report in Codecov by Sentry.
📢 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.

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.

1 participant