Commit 4a2b256
authored
fix(web): resolve rendering bug of sub-second timeline revisions (#558)
* fix(web): resolve rendering bug of sub-second timeline revisions
The timeline visualizer previously failed to render revisions with durations shorter than 1 second properly.
This was caused by an integer underflow in the vertex shader (`revision-v2.vertex.glsl`) when calculating the lower bound for clipping (`minTime.y`). By subtracting `1e10-1.0` (which is too large to safely cast to a uint) from `vs.leftEdgeTime.y`, the calculation yielded a corrupted huge number. The subsequent component-wise `max(time.xy, minTime)` overwrote the starting nanoseconds (`time.y`) with this corrupt number, resulting in incorrect width calculations for sub-second revisions.
The shader logic has been updated to set the nanosecond bound `minTime.y` explicitly to `0`. This securely preserves the actual nanoseconds `time.y` when applying the component-wise max.
Also added a new `DenseRevisions` story in `timeline-chart.stories.ts` to test high-density short revisions.
Fixe #557
* Fix issues pointed by gemini code assist1 parent 20a3cc4 commit 4a2b256
2 files changed
Lines changed: 42 additions & 2 deletions
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
0 commit comments