Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 8257573 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1885 +/- ##
==========================================
+ Coverage 57.19% 57.44% +0.25%
==========================================
Files 446 446
Lines 23273 23417 +144
Branches 5242 5270 +28
==========================================
+ Hits 13310 13453 +143
+ Misses 8422 8418 -4
- Partials 1541 1546 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| supersetSets[s].flatMap((t) => { | ||
| const rep = setMembers[t][0]; | ||
| return shown[rep] | ||
| .filter(([u, l]) => !isQualification(u) && !setSets[s].has(partKey(u, l))) | ||
| .map(([u]) => depths[group[rep]].get(u)); | ||
| }), |
There was a problem hiding this comment.
Representative depth changes labels When columns show the same parts but have different hidden trace steps, this code uses only the first column’s trace depth to choose what a bare column should add. Reordering the columns can therefore change which kind of part appears in its label, making labels inconsistent.
| supersetSets[s].flatMap((t) => { | |
| const rep = setMembers[t][0]; | |
| return shown[rep] | |
| .filter(([u, l]) => !isQualification(u) && !setSets[s].has(partKey(u, l))) | |
| .map(([u]) => depths[group[rep]].get(u)); | |
| }), | |
| supersetSets[s].flatMap((t) => | |
| setMembers[t].flatMap((m) => | |
| shown[m] | |
| .filter(([u, l]) => !isQualification(u) && !setSets[s].has(partKey(u, l))) | |
| .map(([u]) => depths[group[m]].get(u)), | |
| ), | |
| ), |
Prompt To Fix With AI
This is a comment left during a code review.
Path: sdk/model/src/labels/derive_distinct_labels.ts
Line: 635-640
Comment:
**Representative depth changes labels** When columns show the same parts but have different hidden trace steps, this code uses only the first column’s trace depth to choose what a bare column should add. Reordering the columns can therefore change which kind of part appears in its label, making labels inconsistent.
```suggestion
supersetSets[s].flatMap((t) =>
setMembers[t].flatMap((m) =>
shown[m]
.filter(([u, l]) => !isQualification(u) && !setSets[s].has(partKey(u, l)))
.map(([u]) => depths[group[m]].get(u)),
),
),
```
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
The PR appears safe to merge, though the representative-dependent choice of label part is worth correcting.
Fix with agent prompt
Summary
The PR repairs same-named labels distinguished only by an absent part, then bundles identical shown-part sets to avoid repeated comparisons.
Traceis the sequence of label-producing entries; its visible parts are now grouped for subset comparisons.Entryis a column specification with optional trace and qualifications; its labels can be repaired without losing qualification tags.EnrichedRecordholds the expanded trace used to render and compare labels; the new bundling reads its shown parts and trace depths.TypeStatsholds per-type importance and occurrence counts; importance guides the choice of replacement distinction.Reviews (2) · Last reviewed commit: "MILAB-7092: Compare shown part sets once..."