Skip to content

Search also matches a frame's file path - #557

Open
guillermo-delrio wants to merge 1 commit into
jlfwong:mainfrom
guillermo-delrio:search-by-filename
Open

guillermo-delrio wants to merge 1 commit into
jlfwong:mainfrom
guillermo-delrio:search-by-filename

Conversation

@guillermo-delrio

Copy link
Copy Markdown

Fixes #468.

Frames that share a name (many run functions, for example) can now be told apart by searching for part of their
file path, case-insensitively. A frame that matches by name keeps its highlight ranges; a frame that matches only by
its file is shown as a match without highlighting.

Tests in src/lib/profile-search.test.ts cover a file-only match, case-insensitivity, a name match that keeps its
ranges, and frames without a file.

This change was written by GitLab Duo agents and reviewed by GitLab Duo Code Review in a public GitLab fork made for
the GitLab Transcend hackathon:
https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/2420033/showcase/-/merge_requests/2
Let me know if you'd prefer anything done differently.

Frames that share a name (many `run` functions, for example) can now be told apart by searching for part of their
file path, case-insensitively. A frame that matches by name keeps its highlight ranges; a frame that matches only by
file is shown as a match without highlighting. Tests cover file matches, case, and frames without a file.

Written by GitLab Duo agents and reviewed by GitLab Duo Code Review in a public fork:
https://gitlab.com/gitlab-ai-hackathon/transcend-october-2026/2420033/showcase/-/merge_requests/2
jogibear9988 added a commit to node-projects/speedscope that referenced this pull request Nov 18, 2026
Port useful changes from 17 of the 28 open jlfwong/speedscope PRs into
this fork, reconciling them with dc794b2's large-trace loading optimizations.
All PR decisions, exact source heads, excluded changes and known boundaries
are recorded in docs/UPSTREAM_PR_REVIEW.md.

Imports and model:
- jlfwong#558: missing/string/zero pid and tid normalization, metadata consistency,
  trailing-comma JSON tolerance, optional ID types and sample regressions.
- jlfwong#552 (partial), jlfwong#466: instruction/line position fields, hex positions,
  positive subpositions, inline-file scopes and correct callee/root identity.
  Exclude global visited-node collapsing and unvalidated cyclic-root logic.
- jlfwong#523, jlfwong#371: V8 version-warning prefixes in native/byte JSON parsing and
  folded-stack comment filtering, preserving # inside real frame names.
- jlfwong#388: direct JS Self-Profiling importer with timestamp midpoint weighting,
  iterative/cached stack expansion and reference/cycle validation; sample,
  recording example, format-detection and roundtrip coverage.
- jlfwong#383: keep program samples independent while retaining GC stack placement;
  review six Chrome snapshots and add explicit parentage regression.
- jlfwong#438 (partial): iterative grouped-call-tree sorting without argument spreads,
  verified at depth 20,000. Exclude the renderer rewrite's culling regression.

UI, CLI and documentation:
- jlfwong#557, jlfwong#555, jlfwong#461: source-path search, OS-dependent tooltip offsets and an
  optional profileAccepts request header, with tests/documentation.
- jlfwong#543: localhost-only --serve with raw binary profile delivery, asynchronous
  asset reads, canonical/symlink path confinement, HTTP error handling and
  MIME types. Package the new server module and add real HTTP tests.
- jlfwong#495, jlfwong#529: mkdtemp profile directories, URL-safe Windows/Unix paths and
  validated SPEEDSCOPE_PORT support on the current esbuild API.
- jlfwong#401 (partial): keep program stdout out of perf.data and emitted traces;
  exclude destructive Docker commands, kernel pinning and the idle example.
- jlfwong#417, jlfwong#416: accurate color-assignment and total/self-time explanations.

jlfwong#532 and jlfwong#447 are superseded; the nine remaining PRs have concrete
correctness, product-compatibility or validation issues recorded in the
review. No upstream PR states were changed.

Validation:
- Full Jest: 226 pass / 2 pre-existing PMCStat decimal-format snapshot failures;
  305 passing snapshots. The failures were also reproduced on fe804e6.
- TypeScript, repository-wide TS/TSX ESLint and changed-file formatting pass.
- Browser-target build, CLI --help/--version, npm package file inclusion pass.
- HTTP server tests cover assets, raw profiles, methods, malformed paths,
  directories, encoded traversal, symlink escape and subsequent healthy reads.
- CLI wrapper test verifies spaces/#/% in filenames; dev server responds on
  requested port 59311 and rejects invalid port configuration.
- bash -n validates the perf helper; Linux capture itself was not available.
- Browser: supplied 1,039,851-event PLC gzip imports in 1905 ms in one run,
  renders four profiles and a Sandwich table. All four call-sequence hashes,
  call counts and weights match the earlier optimized importer; metadata names
  now include normalized process information. JS Self-Profiling and source-path
  search also verified interactively.

Co-authored-by: Guillermo del Río Párraga <2420033-GuillermoRP@users.noreply.gitlab.com>
Co-authored-by: Luka Papez <luka.papez@outlook.com>
Co-authored-by: Marc-Andre Casavant <marc.casavant@inkbridge.io>
Co-authored-by: Damien Retzinger <damienwebdev@gmail.com>
Co-authored-by: Jeff Lee <jeffrey.lee@figma.com>
Co-authored-by: MrMinemeet <alex@wtf-my-code.works>
Co-authored-by: ᴩʜᴏɴᴇᴅʀᴏɪᴅ <73050054+PhoneDroid@users.noreply.github.com>
Co-authored-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Co-authored-by: Blake Williams <blake@blakewilliams.me>
Co-authored-by: ChangShun Wu <camork1@gmail.com>
Co-authored-by: Alex Watt <alex@alexcwatt.com>
Co-authored-by: Jamie Wong <jamie.lf.wong@gmail.com>
Co-authored-by: Jeremy Rose <japthorp@slack-corp.com>
Co-authored-by: hyj1991 <yeekwanvong@gmail.com>
Co-authored-by: Gabriele N. Tornetta <phoenix1987@gmail.com>

This branch has not been deployed

No deployments
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.

Allow search by filename

1 participant