--dryRun fails for navigate callbacks and startNavigation/endNavigation
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cli, typescript
- Domain
- cli, testing-qa
Research direction
Start with UserFlowMock in packages/cli/src/lib/commands/collect/utils/user-flow/user-flow.mock.ts. Make navigate call the requestor when it is a function and otherwise call page.goto, then add no-op-style startNavigation and endNavigation methods that only log, following startTimespan and endTimespan. Done when a dry-run e2e case with a callback navigate and one with startNavigation/endNavigation completes without writing a report or raising a protocol error.
Written by the indexing model from the issue text.
Description
Problem
collect --dryRun fails for any flow that navigates with a callback, or calls startNavigation/endNavigation. It fails before writing any report.
UserFlowMock (packages/cli/src/lib/commands/collect/utils/user-flow/user-flow.mock.ts) stands in for Lighthouse's UserFlow in a dry run:
-
navigate(requestor)always callspage.goto(requestor). Whenrequestoris a function, as inflow.navigate(async () => page.click('a')), Chrome rejects it:ProtocolError: Protocol error (Page.navigate): Invalid parameters Failed to deserialize params.url - BINDINGS: mandatory field missing at position 50 -
It has no
startNavigationorendNavigationmethods. A flow that calls them, or a recording withstartNavigation/endNavigationsteps, cannot run.
Reproduction
user-flow 0.21.6, with no Lighthouse config:
// user-flows/click.uf.mts
export default {
flowOptions: { name: 'Click' },
interactions: async ({ flow, page, collectOptions }) => {
await flow.navigate(collectOptions.url);
await flow.navigate(async () => {
await page.click('a');
});
},
};
npx user-flow collect --url https://example.com --ufPath ./user-flows --dryRun
flow.navigate(collectOptions.url) alone dry-runs fine.
Proposed fix
In UserFlowMock:
navigate: run the callback whenrequestoris a function, otherwisepage.goto(requestor);- add
startNavigationandendNavigation, which only log, likestartTimespanandendTimespan.
Tests: a dry-run e2e case with a callback navigate and with startNavigation/endNavigation.
Context: these are how @push-based/lighthouse-soft-navigation measures soft navigations, so dry runs of those flows fail today.
- Dominant language
- HTML
- Stars
- 131
- Forks
- 7
- Avg merge
- 7h 58m
- Merged PRs (30d)
- 42
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from push-based/user-flow
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
push-based/user-flow#356 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 24/100
push-based/user-flow#285 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
push-based/user-flow#272 · 1 comment ·
Maintainers usually reply within 1 day
-
nx-plugin - init command adds `"PLUGIN_NAME": "^0.0.0"` to `package.json`May be free again @ChristopherPHolder claimed this 1212 days ago, and no pull request is open. Openbug DX
push-based/user-flow#248 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
push-based/user-flow#247 · 1 comment ·
Maintainers usually reply within 1 day
All issues in push-based/user-flow
Similar issues
-
area: ops bug complexity: trivial
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
accensa/x402-facilitator-stellar#773 ·
Maintainers usually reply within 1 day
-
[Bug / Enhancement]: Improve teleop_robot CLI with configurable timeout, robust input validation, and clean ROS shutdownPossibly taken @muskan-creates352 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 3 days
-
console enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
MFisher14/ctf-flightdeck#39 ·
-
CLI: expose public search language with --languagePossibly taken @semajzandrews claimed this today. Openenhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
evener-transcript-v2-upgrade tool still scans transcript files through bufio's 4 KiB default bufferOpen
Difficulty 1/5 Under an hour Newbie friendliness 78/100
prime-radiant-inc/evener#6370 ·
Maintainers usually reply within 1 day