Proposal: some improvements, and how to track them

Aberta
#9 5 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
12/100
Tipo de issue
Funcionalidade
Clareza
Precisa de esclarecimento
Status de atividade
Ativa
Stack de tecnologia
nodejs, typescript
Domínio
cli, devtools

Direção de pesquisa

This is a maintainer-approval proposal, not a single task, so do not start a patch from it. Before any work, the maintainer needs to agree on which items to take and how to split them. The items name the insights, navigations, tasks, profile and scan commands, and scan uses fs.globSync. A useful first step is to reproduce one of the listed bugs and ask in the thread which item to pick.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Hi @jackfranklin,

I've been using trace-engine-cli and spent some time going through the codebase. I have a list of possible improvements. Before opening a batch of issues, I'd like to check which ones make sense to you and how you prefer to handle them.

Bugs (reproduced locally)
  • insights and navigations silently ignore --time-range. The option is global, so both commands accept it and return data for the full trace.
  • insights reports navigationId: null even when it uses the first InsightSet.
  • Numeric options are not validated. tasks --top -5 and profile --bucket 0 return empty results with exit code 0, which an agent reads as "nothing found".
  • scan silently skips files it cannot decompress or parse. With a directory containing one valid trace, one truncated .json and one corrupt .json.gz, scan <dir> --grep RunTask reports totalFilesScanned: 3, totalFilesMatched: 1 and exits 0 with no warning, so a broken file looks the same as a file with no matches.
Features
  • compare <baseline> <candidate>: compare two traces (CWV deltas and rating changes, main thread busy time, long tasks, top function regressions). Useful for before/after checks on a PR.
  • Cover more insight models. insights exposes 5 of the 19 models in the engine (ForcedReflow, DOMSize, LCPDiscovery, DocumentLatency, ImageDelivery and FontDisplay are missing, among others). Exposing state and metricSavings would also help agents prioritize.
  • --format json, and possibly stdin input and --fail-on thresholds for CI.
Tests and infra
  • Add a small real Chrome trace with snapshot tests. All fixtures are synthetic, and Dependabot bumps @paulirish/trace_engine daily, so a change in the engine's output shape could still pass CI.
  • Add "engines": { "node": ">=22" }. scan uses fs.globSync, which is not available in Node 20.
Docs
  • A section on how to record a compatible trace (DevTools, Puppeteer, chrome-devtools-mcp).

Would it be OK if I open one issue per item (or only for the ones you're interested in), and then send a PR for each once we agree on the approach in the issue? If you'd prefer to skip some of these or handle them differently, just let me know.

Thanks!

Linguagem predominante
TypeScript
Estrelas
15
Forks
4
Merge médio
1d 17h
PRs com merge (30d)
22

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de ChromeDevTools/trace-engine-cli

Todas as issues de ChromeDevTools/trace-engine-cli

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.