Skip to content

Order HAR exports chronologically#252

Open
komen205 wants to merge 1 commit into
httptoolkit:mainfrom
komen205:codex/fix-har-export-order
Open

Order HAR exports chronologically#252
komen205 wants to merge 1 commit into
httptoolkit:mainfrom
komen205:codex/fix-har-export-order

Conversation

@komen205

Copy link
Copy Markdown
Contributor

Summary

  • sort generated HAR entries by startedDateTime
  • reuse the same chronological comparator when importing HAR files
  • add a regression test for reverse-ordered multi-selection exports

Why

Multi-selected events are intentionally stored in selection order. Selecting requests from newest to oldest therefore passed a reverse-chronological array to HAR generation, which preserved that order in the exported file.

Sorting at the HAR generation boundary keeps the existing selection UX unchanged while ensuring every HAR export path produces chronological entries.

User impact

The latest request now appears last in exported HAR files, regardless of the direction used to select requests.

Validation

  • npm run test:unit — 934 tests passed
  • git diff --check

@komen205
komen205 marked this pull request as ready for review July 17, 2026 19:54
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