🔧 Chore Description
The Sprite timeline render path was deleted in #1066, along with the two suites that
covered it: features/timeline/__tests__/markers.test.ts (699 lines) and
batching.test.ts (564 lines). Their coverage was not ported to the Mesh replacements
that took over, so both Mesh renderers now have no direct tests.
rg -l 'MeshMarkerRenderer|MeshRectangleRenderer|MARKER_COLORS|MARKER_ALPHA' -- '*.test.ts'
returns nothing.
Nothing is broken for a user today. The risk is that a change to either renderer now
lands with nothing to catch it.
What is unguarded
MeshMarkerRenderer:
- Viewport culling of markers —
MeshMarkerRenderer.ts:133,
resolvedEndTime < bounds.timeStart || marker.startTime > bounds.timeEnd.
TemporalSegmentTree covers frame culling, which is a different path.
- Marker type to colour and alpha —
MeshMarkerRenderer.ts:153-154, MARKER_COLORS[marker.type]
and MARKER_ALPHA_BY_TYPE[marker.type]. MarkerProcessor.test.ts and MarkerHitTest.test.ts
hardcode literal colours in their fixtures, so neither exercises the lookup.
- End-time resolution and the min-width clamp —
MeshMarkerRenderer.ts:129,140,144,
endTime ?? startTime then Math.max(exactWidth, MARKER_MIN_WIDTH_PX). markerDuration has
these as a pure function, but the renderer inlines the ?? rather than calling it, so the
named regression "a marker with no endTime is not extended to the next marker" is unguarded
where it lives.
updateMarkers() — no test calls it. Worth knowing the behaviour changed in the port: the
Sprite class re-sorted by startTime, the Mesh class uses sortMarkersByTimeAndSeverity.
- The real
MARKER_MIN_WIDTH_PX (2), MARKER_GAP_PX (1) and MARKER_BUCKET_PX (4)
(flamechart.types.ts:683-697) are never proved to be what the renderer wires in —
MarkerProcessor.test.ts passes its own MIN = 3.
MeshRectangleRenderer and the production culling path:
- No test asserts a visible rectangle's
x, y, width, height or eventRef.
TemporalSegmentTree.ts:585-586 sets x and width from zoom; RectangleCache.ts:289-291
sets y and height. Bucket y is still asserted, but that is the bucket path.
- An unknown category is dropped —
RectangleCache.ts:279 if (rects) and the
if (!batch) { continue; } in MeshRectangleRenderer.render.
- A zero-duration event yields no rect —
RectangleCache.ts:274, if (duration.total && category).
- Batch dirty/clear bookkeeping.
MeshRectangleRenderer keeps it and its own comment says it is
"for tests and debugging", but nothing reads batches any more.
- Depth culling under a vertical pan. No culling test passes a non-zero
offsetY —
the shared makeViewport helper defaults it to 0 and neither culling suite overrides it.
Notes
RectangleCache.getCulledRectangles() is the production path. It is currently called by one
test (TemporalSegmentTree.test.ts:319) for a legacy-parity event count only;
RectangleCache.bucket.test.ts drives legacyCullRectangles, which is the oracle, not production.
- Marker hit testing is well covered by
MarkerHitTest.test.ts, severity and offsetX included.
The gap is the renderer, not the hit test.
- Some of the old cases were weak and need not be ported as written: four of the five old T014
hit-test cases wrapped their assertions in if (markerScreenX >= 0 && ...), so they could pass
having executed no assertion, and "should handle zero zoom gracefully" had no assertion at all.
🔧 Chore Description
The Sprite timeline render path was deleted in #1066, along with the two suites that
covered it:
features/timeline/__tests__/markers.test.ts(699 lines) andbatching.test.ts(564 lines). Their coverage was not ported to the Mesh replacementsthat took over, so both Mesh renderers now have no direct tests.
returns nothing.
Nothing is broken for a user today. The risk is that a change to either renderer now
lands with nothing to catch it.
What is unguarded
MeshMarkerRenderer:MeshMarkerRenderer.ts:133,resolvedEndTime < bounds.timeStart || marker.startTime > bounds.timeEnd.TemporalSegmentTreecovers frame culling, which is a different path.MeshMarkerRenderer.ts:153-154,MARKER_COLORS[marker.type]and
MARKER_ALPHA_BY_TYPE[marker.type].MarkerProcessor.test.tsandMarkerHitTest.test.tshardcode literal colours in their fixtures, so neither exercises the lookup.
MeshMarkerRenderer.ts:129,140,144,endTime ?? startTimethenMath.max(exactWidth, MARKER_MIN_WIDTH_PX).markerDurationhasthese as a pure function, but the renderer inlines the
??rather than calling it, so thenamed regression "a marker with no endTime is not extended to the next marker" is unguarded
where it lives.
updateMarkers()— no test calls it. Worth knowing the behaviour changed in the port: theSprite class re-sorted by
startTime, the Mesh class usessortMarkersByTimeAndSeverity.MARKER_MIN_WIDTH_PX(2),MARKER_GAP_PX(1) andMARKER_BUCKET_PX(4)(
flamechart.types.ts:683-697) are never proved to be what the renderer wires in —MarkerProcessor.test.tspasses its ownMIN = 3.MeshRectangleRendererand the production culling path:x,y,width,heightoreventRef.TemporalSegmentTree.ts:585-586setsxandwidthfrom zoom;RectangleCache.ts:289-291sets
yandheight. Bucketyis still asserted, but that is the bucket path.RectangleCache.ts:279if (rects)and theif (!batch) { continue; }inMeshRectangleRenderer.render.RectangleCache.ts:274,if (duration.total && category).MeshRectangleRendererkeeps it and its own comment says it is"for tests and debugging", but nothing reads
batchesany more.offsetY—the shared
makeViewporthelper defaults it to 0 and neither culling suite overrides it.Notes
RectangleCache.getCulledRectangles()is the production path. It is currently called by onetest (
TemporalSegmentTree.test.ts:319) for a legacy-parity event count only;RectangleCache.bucket.test.tsdriveslegacyCullRectangles, which is the oracle, not production.MarkerHitTest.test.ts, severity and offsetX included.The gap is the renderer, not the hit test.
hit-test cases wrapped their assertions in
if (markerScreenX >= 0 && ...), so they could passhaving executed no assertion, and "should handle zero zoom gracefully" had no assertion at all.