Skip to content

feat: startup snapshot writing card#381

Closed
asuzuki-jumptrading wants to merge 1 commit into
mainfrom
asuzuki/startup-accounts
Closed

feat: startup snapshot writing card#381
asuzuki-jumptrading wants to merge 1 commit into
mainfrom
asuzuki/startup-accounts

Conversation

@asuzuki-jumptrading

@asuzuki-jumptrading asuzuki-jumptrading commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator
  • Add startup snapshot writing card
  • Update cards so each has 2 values
  • Fix layout for smaller screens

@asuzuki-jumptrading asuzuki-jumptrading marked this pull request as ready for review July 2, 2026 19:50
@greptile-jt

greptile-jt Bot commented Jul 2, 2026

Copy link
Copy Markdown
Prompt To Fix All 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.

---

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

Comment on lines +163 to +166
const remainingSeconds =
remainingSeconds1 == null && remainingSeconds2 == null
? undefined
: Math.min(remainingSeconds1 ?? Infinity, remainingSeconds2 ?? Infinity);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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:

Suggested change
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.

@asuzuki-jumptrading asuzuki-jumptrading force-pushed the asuzuki/startup-accounts branch from b04d82b to 38fe7c4 Compare July 2, 2026 19:58
@greptile-jt

greptile-jt Bot commented Jul 2, 2026

Copy link
Copy Markdown

Comments Outside Diff (1)

  1. src/features/StartupProgress/Firedancer/Snapshot/index.tsx, line 168-173 (link)

    P1 Progress bar ignores writing stage

    phaseCompleteFraction only tracks inserting progress (insertCompressedBytes / totalCompressedBytes), but remainingSeconds now accounts for both inserting and writing. Since snapin and snapwr run concurrently and writing can be the slower stage (e.g., slow disk I/O), this creates an inconsistent state: the progress bar reaches 100% while the remaining-time estimate still shows non-zero time.

    Consider also factoring writing progress into phaseCompleteFraction, taking the minimum of the two concurrent stages so the progress bar reflects whichever is the bottleneck:

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: src/features/StartupProgress/Firedancer/Snapshot/index.tsx
    Line: 168-173
    
    Comment:
    **Progress bar ignores writing stage**
    
    `phaseCompleteFraction` only tracks inserting progress (`insertCompressedBytes / totalCompressedBytes`), but `remainingSeconds` now accounts for both inserting **and** writing. Since `snapin` and `snapwr` run concurrently and writing can be the slower stage (e.g., slow disk I/O), this creates an inconsistent state: the progress bar reaches 100% while the remaining-time estimate still shows non-zero time.
    
    Consider also factoring writing progress into `phaseCompleteFraction`, taking the minimum of the two concurrent stages so the progress bar reflects whichever is the bottleneck:
    
    
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: src/features/StartupProgress/Firedancer/Snapshot/index.tsx
Line: 168-173

Comment:
**Progress bar ignores writing stage**

`phaseCompleteFraction` only tracks inserting progress (`insertCompressedBytes / totalCompressedBytes`), but `remainingSeconds` now accounts for both inserting **and** writing. Since `snapin` and `snapwr` run concurrently and writing can be the slower stage (e.g., slow disk I/O), this creates an inconsistent state: the progress bar reaches 100% while the remaining-time estimate still shows non-zero time.

Consider also factoring writing progress into `phaseCompleteFraction`, taking the minimum of the two concurrent stages so the progress bar reflects whichever is the bottleneck:

```suggestion
  const phaseCompleteFraction = Math.min(
    totalDecompressedBytes
      ? Math.min(insertDecompressedBytes ?? 0, writeOutDecompressedBytes ?? 0) /
        totalDecompressedBytes
      : 0,
    1,
  );
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (2): Last reviewed commit: "feat: startup snapshot writing card" | Re-trigger Greptile

@asuzuki-jumptrading asuzuki-jumptrading force-pushed the asuzuki/startup-accounts branch from 38fe7c4 to af687b3 Compare July 2, 2026 21:03
@greptile-jt

greptile-jt Bot commented Jul 2, 2026

Copy link
Copy Markdown

Reviews (3): Last reviewed commit: "feat: startup snapshot writing card" | Re-trigger Greptile

@asuzuki-jumptrading

Copy link
Copy Markdown
Collaborator Author

Combining these changes in one PR here: #382

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