Skip to content

Add reload command to mini-browser#3

Open
slyjain wants to merge 1 commit into
runablehq:mainfrom
slyjain:add-reload-command
Open

Add reload command to mini-browser#3
slyjain wants to merge 1 commit into
runablehq:mainfrom
slyjain:add-reload-command

Conversation

@slyjain

@slyjain slyjain commented Apr 29, 2026

Copy link
Copy Markdown

Reloads the current page and waits for networkidle0 so SPAs fully render. Prints the current URL to stdout.

Note: package-lock.json was not present in the repo and is being avoided.

Reloads the current page and waits for networkidle0 so SPAs fully render. Prints the current URL to stdout.

Note: package-lock.json was not present in the repo and is being avoided.
Copilot AI review requested due to automatic review settings April 29, 2026 15:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a reload command to the mb CLI so callers can reload the current tab, wait for networkidle0 (helpful for SPA rendering), and print the current URL afterward.

Changes:

  • Register new reload command in the CLI command dispatcher.
  • Add reload to CLI help text under Navigation.
  • Implement src/commands/reload.ts using page.reload({ waitUntil: "networkidle0", timeout: flags.timeout }) and print page.url().

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/index.ts Wires reload into the command map and documents it in --help.
src/commands/reload.ts Implements the reload behavior via Puppeteer connect/reload/print/disconnect.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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