Skip to content

iter-53: stability fixes (navigate wait, daemon noise, screenshot fallback)#56

Merged
ractive merged 1 commit intomainfrom
iter-53/stability-fixes
May 6, 2026
Merged

iter-53: stability fixes (navigate wait, daemon noise, screenshot fallback)#56
ractive merged 1 commit intomainfrom
iter-53/stability-fixes

Conversation

@ractive
Copy link
Copy Markdown
Owner

@ractive ractive commented May 6, 2026

Summary

  • navigate --wait-text now re-resolves the target via getTarget after navigation, so wait-text always polls against a fresh console actor. Fixes noSuchActor on the first navigate after a fresh launch.
  • The daemon's "registry not found, connecting directly" warning is now deferred — emitted only when the direct fallback also fails. Happy path is silent; broken path surfaces both the daemon warning and the connection error.
  • screenshot now detects the Firefox-internal "Unable to load actor module" failure and surfaces a clean one-liner naming ff-rdp doctor (including the observed Firefox version), instead of the misleading "relaunch with --headless" hint.

Test plan

  • cargo fmt
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace -q (full workspace passes)
  • New e2e regression: navigate --wait-text calls getTarget ≥2× (asserts the post-navigate re-resolve)
  • New e2e: daemon warning silent on direct-success path
  • New e2e: daemon warning visible when both paths fail
  • New e2e: legacy screenshot path module-load failure → clean version-mismatch message
  • New e2e: Firefox 149+ two-step prepareCapture module-load failure → clean version-mismatch message
  • New unit tests for is_actor_module_load_failure detector

🤖 Generated with Claude Code

…lback)

Three small reliability bugs that combined to make the CLI feel flaky on
first contact:

1. `navigate --wait-text` reproducibly failed on the first navigate after
   a fresh launch with `noSuchActor`. The console actor was resolved
   before navigation and invalidated when the docshell tore down. Fix:
   re-resolve the target via `getTarget` after navigation so wait-text
   always polls against a fresh console actor.

2. The daemon printed `warning: registry not found ... connecting
   directly` even when the direct fallback succeeded. Fix: defer the
   warning into `ConnectionTarget::Direct { deferred_warning }` and only
   surface it if the direct connection also fails.

3. `screenshot` failed with the raw Firefox `Unable to load actor module`
   stack on some builds, with a misleading "relaunch with --headless"
   hint. Fix: detect the module-load failure and surface a clean
   one-liner naming `ff-rdp doctor`, including the observed Firefox
   version.

E2e tests cover each path (regression, happy/broken daemon paths, and
both legacy + Firefox 149+ screenshot module-load failures).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ractive ractive requested a review from Copilot May 6, 2026 20:56
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Warning

Rate limit exceeded

@ractive has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 41 minutes and 38 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 44870e95-25b0-4d45-98e6-c4b7966de99a

📥 Commits

Reviewing files that changed from the base of the PR and between fe096c4 and edf8cf1.

📒 Files selected for processing (10)
  • crates/ff-rdp-cli/src/commands/connect_tab.rs
  • crates/ff-rdp-cli/src/commands/navigate.rs
  • crates/ff-rdp-cli/src/commands/screenshot.rs
  • crates/ff-rdp-cli/src/connection_meta.rs
  • crates/ff-rdp-cli/src/daemon/client.rs
  • crates/ff-rdp-cli/tests/e2e/daemon.rs
  • crates/ff-rdp-cli/tests/e2e/navigate.rs
  • crates/ff-rdp-cli/tests/e2e/screenshot.rs
  • crates/ff-rdp-cli/tests/e2e/support/mock_server.rs
  • kb/iterations/iteration-53-stability-fixes.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch iter-53/stability-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ractive ractive merged commit b8cc2a0 into main May 6, 2026
6 of 8 checks passed
@ractive ractive deleted the iter-53/stability-fixes branch May 6, 2026 20:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR delivers a set of stability-focused fixes across ff-rdp’s navigation wait logic, daemon connection diagnostics, and screenshot error handling, with accompanying e2e/unit regressions to prevent recurrence.

Changes:

  • Re-resolve the tab target after navigation so navigate --wait-text polls using a fresh console actor (avoids noSuchActor on first navigate).
  • Defer the daemon “registry not found / connecting directly” warning so it’s only emitted when the direct fallback also fails.
  • Detect Firefox’s “Unable to load actor module …/screenshot” failure and surface a clean, actionable version-mismatch message (naming ff-rdp doctor), plus add tests.

Reviewed changes

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

Show a summary per file
File Description
kb/iterations/iteration-53-stability-fixes.md Marks iteration tasks/acceptance criteria as completed.
crates/ff-rdp-cli/tests/e2e/support/mock_server.rs Adds per-method call counters to support new behavioral assertions in e2e tests.
crates/ff-rdp-cli/tests/e2e/screenshot.rs Adds e2e regressions asserting clean screenshot module-load failure messaging (legacy + two-step).
crates/ff-rdp-cli/tests/e2e/navigate.rs Adds e2e regression asserting getTarget is invoked again post-navigate for --wait-text.
crates/ff-rdp-cli/tests/e2e/daemon.rs Adds e2e coverage for deferred-warning behavior (silent on success, visible on dual-failure).
crates/ff-rdp-cli/src/daemon/client.rs Implements deferred-warning propagation via ConnectionTarget::Direct { deferred_warning }.
crates/ff-rdp-cli/src/connection_meta.rs Exposes the remembered Firefox version accessor for improved user-facing error messages.
crates/ff-rdp-cli/src/commands/screenshot.rs Adds module-load failure detection + canonical version-mismatch message across screenshot paths.
crates/ff-rdp-cli/src/commands/navigate.rs Re-resolves target after navigation before polling JS wait conditions.
crates/ff-rdp-cli/src/commands/connect_tab.rs Prints deferred daemon warning only when the direct fallback connect fails.

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

Comment on lines 74 to +79
no_daemon: bool,
) -> ConnectionTarget {
if no_daemon {
return ConnectionTarget::Direct;
return ConnectionTarget::Direct {
deferred_warning: None,
};
Comment on lines +82 to +83
// Display includes both the Firefox `error` code and the `message` text.
err.to_string().contains("Unable to load actor module")
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.

2 participants