Skip to content

Harden explicit Firefox window targeting#5

Open
Nek-12 wants to merge 5 commits into
mainfrom
FFCLI-1
Open

Harden explicit Firefox window targeting#5
Nek-12 wants to merge 5 commits into
mainfrom
FFCLI-1

Conversation

@Nek-12

@Nek-12 Nek-12 commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

  • Add route-level selector dimensions with protocol and CLI enforcement.
  • Reject unsupported selectors and negative IDs before dispatch, including batch argv.
  • Add two-window routing, invalid-target, console, screenshot, and focus regressions.
  • Align CLI help, spec, command docs, and skill guidance.

Verification

  • bun run check
  • Focused CLI/protocol/extension target suites
  • git diff --check

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Nek-12, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 27 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cce9687b-119a-4c6a-a3df-932dbd70ac06

📥 Commits

Reviewing files that changed from the base of the PR and between b7eb49a and abfaa2e.

📒 Files selected for processing (27)
  • .kent/plans/FFCLI-1.md
  • docs/commands.md
  • docs/firefox-cli-spec.md
  • packages/cli/src/argv-contracts.ts
  • packages/cli/src/cli-tabs-targets.test.ts
  • packages/cli/src/cli-target-contract.test.ts
  • packages/cli/src/help.ts
  • packages/cli/src/route-registry.test.ts
  • packages/cli/src/route-registry.ts
  • packages/cli/src/runner.ts
  • packages/extension/src/browser-commands-targets.test.ts
  • packages/protocol/src/browser/output.ts
  • packages/protocol/src/metadata.ts
  • packages/protocol/src/protocol-metadata-behavior.test.ts
  • packages/protocol/src/protocol-request.test.ts
  • packages/protocol/src/protocol-test-support.ts
  • packages/protocol/src/registry/actions.ts
  • packages/protocol/src/registry/browsing.ts
  • packages/protocol/src/registry/content.ts
  • packages/protocol/src/registry/core.ts
  • packages/protocol/src/registry/define.ts
  • packages/protocol/src/registry/index.ts
  • packages/protocol/src/registry/pairing.ts
  • packages/protocol/src/registry/phase8.ts
  • packages/protocol/src/registry/registry.test.ts
  • packages/protocol/src/target.ts
  • skills/firefox-cli/SKILL.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch FFCLI-1

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: abfaa2ef79

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

export const windowTargetParamsSchema = z
.object({
target: targetSelectorSchema,
target: windowTargetSelectorSchema,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fix implicit batch defaults for window commands

When an argv batch step such as ["window", "close"] or ["window", "select"] omits an explicit target, stripImplicitBatchTarget removes the CLI's active target so the protocol batch default can be applied. That fallback in batchStepParamsWithDefaultTarget still injects target: { window: active, tab: active }, but this stricter windowTargetSelectorSchema rejects the extra tab key, so implicit window batch steps that should default to the active window are now rejected during batch validation.

Useful? React with 👍 / 👎.

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.

1 participant