Skip to content

chore: rename misspelled functions, remove duplicate import and dead code#2277

Open
fix2015 wants to merge 1 commit into
ChromeDevTools:mainfrom
fix2015:fix/typos-and-duplicate-import
Open

chore: rename misspelled functions, remove duplicate import and dead code#2277
fix2015 wants to merge 1 commit into
ChromeDevTools:mainfrom
fix2015:fix/typos-and-duplicate-import

Conversation

@fix2015

@fix2015 fix2015 commented Jul 1, 2026

Copy link
Copy Markdown

Found a handful of identifier typos in NetworkFormatter.ts while reading through the network capture code:

  • `formatHeadlers` → `formatHeaders` (function def + 2 call sites)
  • `converNetworkRequestDetailedToStringDetailed` → `convertNetworkRequestDetailedToStringDetailed` (missing 't')
  • `responseAsTest` → `responseAsText`

Also fixed a few other small things:

  • `navigationStated` → `navigationStarted` in WaitForHelper.ts
  • doubled "for for" in a PageCollector log message
  • `node:fs/promises` was imported twice under different names in McpContext.ts (`fs` and `fsPromises`) — consolidated to a single import
  • removed a dead `if (!navigations)` guard in NetworkCollector.splitAfterNavigation — `navigations` is already defaulted to `[]` via `??` so the check can never be falsy

a handful of identifier typos in NetworkFormatter.ts:
- formatHeadlers → formatHeaders
- converNetworkRequestDetailedToStringDetailed → convertNetworkRequest...
- responseAsTest → responseAsText

also:
- navigationStated → navigationStarted in WaitForHelper.ts
- doubled "for for" → "for" in a PageCollector log message
- removed duplicate import of node:fs/promises in McpContext.ts
- removed dead if (!navigations) guard that could never trigger since
  navigations was already defaulted to [] via ??

@OrKoN OrKoN left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@OrKoN OrKoN changed the title fix: rename misspelled functions, remove duplicate import and dead code chore: rename misspelled functions, remove duplicate import and dead code Jul 1, 2026
Comment thread src/PageCollector.ts
}
override splitAfterNavigation(page: Page) {
const navigations = this.storage.get(page) ?? [];
if (!navigations) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this should not be removed but rather then ?? [] should be.

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.

3 participants