Skip to content

perf: preparse session timeline usage timestamps - #440

Open
seonghobae wants to merge 7 commits into
developmentalfrom
perf/preparse-session-timeline-usage
Open

perf: preparse session timeline usage timestamps#440
seonghobae wants to merge 7 commits into
developmentalfrom
perf/preparse-session-timeline-usage

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 14, 2026

Copy link
Copy Markdown

Buyer-visible performance gap

SessionTimelineChart parsed usage timestamps inside the sort comparator, parsed them again during the forward merge, and parsed the same sessionStartedAt anchor once per formatted row. Comparator invocation count is not one-per-record, so long sessions paid repeated string parsing work while the UI thread prepared chart data.

Test-first repair

  • RED head 1b7159dce952c662ea5d8a4677760487e479a2c0 instruments Date.parse through the shipped React component and requires each usage timestamp to be parsed exactly once. The prior comparator-based implementation violates that bound.
  • GREEN production code decorates a local usage copy with one numeric timestamp, sorts by the numeric key, and reuses it in the tool-event cursor.
  • Current head additionally absorbs ⚡ Bolt: [성능 개선] Date 객체 생성 제거를 통한 파싱 최적화 #425's valid CodeRabbit feedback by adding formatRelativeTimeFromMs, parsing the session anchor once per prop value, and asserting the anchor parse budget in the component-level regression.
  • Existing chronological order, cumulative summaries, display data, and input immutability remain covered by the established chart tests.
  • CHANGELOG and APA 7 doctoring trace the design to ECMA-262 without using flaky wall-clock thresholds.

Replacement scope

This clean current-base PR supersedes stale duplicate optimization PRs #432, #434, and #436, plus the still-open narrower PR #425 and duplicate #445. It does not reuse their old heads or reported microbenchmark numbers and does not include unrelated API-route changes from broader predecessor stacks. API-route daily-stat invalidation is owned separately by #446.

Exact-head gate

Current exact head: f33cefdc7c8c199996e31d7806a76c4005ca27bd.

Require exact-head CI, web tests/coverage/build, Security Scan, OSV, dependency review, Semgrep, central OpenCode coverage evidence, current-head automated review, zero unresolved valid findings, and a qualifying independent approval. Do not reuse predecessor-head evidence.

Copy link
Copy Markdown
Author

@opencode-agent @cwl-noema-review

Review exact current head e9a1fc3b821f1237873ad2c5b3aa79035f141013 against protected developmental. Verify the RED component regression fails on comparator parsing, the optimized path parses each usage timestamp exactly once without mutating inputs or changing chronological/cumulative output, and the test avoids wall-clock flakiness. Confirm APA 7 ECMA-262 traceability and no unrelated route or dependency changes. Publish a formal exact-head verdict without mutating the branch.

@seonghobae
seonghobae enabled auto-merge (squash) August 14, 2026 09:31
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: db5a3a17-f55e-4f6d-b05a-f79bf7fc4457

📥 Commits

Reviewing files that changed from the base of the PR and between 1c1a161 and f33cefd.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • docs/doctoring/session-timeline-timestamp-parsing.md
  • packages/web/src/components/dashboard/session-timeline-chart.tsx
  • packages/web/src/components/dashboard/session-timeline-date-parse.test.tsx
  • packages/web/src/lib/format.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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