feat: startup snapshot writing card#381
Conversation
Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/features/StartupProgress/Firedancer/Snapshot/index.tsx
Line: 163-166
Comment:
**Remaining time may be underestimated**
Since `snapin` (insert) and `snapwr` (write) are separate tiles that run concurrently in the pipeline, the overall phase completes when the **slower** of the two finishes — not the faster one. `Math.min` picks the lower remaining-time estimate, which corresponds to the stage that will finish first, causing the header to show a shorter remaining time than the actual wait.
`Math.max` would select the bottleneck estimate instead:
```suggestion
const remainingSeconds =
remainingSeconds1 == null && remainingSeconds2 == null
? undefined
: Math.max(remainingSeconds1 ?? 0, remainingSeconds2 ?? 0);
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: src/features/StartupProgress/Firedancer/Snapshot/SnapshotWritingCard.tsx
Line: 40
Comment:
**Redundant "Writing" prefix on throughput**
The card title is already "Writing" (rendered at 28px). Adding `prefix="Writing"` to `SnapshotThroughput` makes the header read "Writing … Writing X.XX GB/sec". The other cards avoid this — `SnapshotReadingCard` uses no prefix, and `SnapshotDecompressingCard` uses `"Output"` to disambiguate input vs output throughput.
Consider dropping the prefix to stay consistent:
```suggestion
<SnapshotThroughput throughput={throughputObj} />
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "feat: startup snapshot writing card" | Re-trigger Greptile |
| const remainingSeconds = | ||
| remainingSeconds1 == null && remainingSeconds2 == null | ||
| ? undefined | ||
| : Math.min(remainingSeconds1 ?? Infinity, remainingSeconds2 ?? Infinity); |
There was a problem hiding this comment.
Remaining time may be underestimated
Since snapin (insert) and snapwr (write) are separate tiles that run concurrently in the pipeline, the overall phase completes when the slower of the two finishes — not the faster one. Math.min picks the lower remaining-time estimate, which corresponds to the stage that will finish first, causing the header to show a shorter remaining time than the actual wait.
Math.max would select the bottleneck estimate instead:
| const remainingSeconds = | |
| remainingSeconds1 == null && remainingSeconds2 == null | |
| ? undefined | |
| : Math.min(remainingSeconds1 ?? Infinity, remainingSeconds2 ?? Infinity); | |
| const remainingSeconds = | |
| remainingSeconds1 == null && remainingSeconds2 == null | |
| ? undefined | |
| : Math.max(remainingSeconds1 ?? 0, remainingSeconds2 ?? 0); |
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/features/StartupProgress/Firedancer/Snapshot/index.tsx
Line: 163-166
Comment:
**Remaining time may be underestimated**
Since `snapin` (insert) and `snapwr` (write) are separate tiles that run concurrently in the pipeline, the overall phase completes when the **slower** of the two finishes — not the faster one. `Math.min` picks the lower remaining-time estimate, which corresponds to the stage that will finish first, causing the header to show a shorter remaining time than the actual wait.
`Math.max` would select the bottleneck estimate instead:
```suggestion
const remainingSeconds =
remainingSeconds1 == null && remainingSeconds2 == null
? undefined
: Math.max(remainingSeconds1 ?? 0, remainingSeconds2 ?? 0);
```
How can I resolve this? If you propose a fix, please make it concise.b04d82b to
38fe7c4
Compare
|
38fe7c4 to
af687b3
Compare
|
Reviews (3): Last reviewed commit: "feat: startup snapshot writing card" | Re-trigger Greptile |
|
Combining these changes in one PR here: #382 |
Uh oh!
There was an error while loading. Please reload this page.