Skip to content

Commit 2259b1f

Browse files
committed
fix: browser action parity
1 parent 558ad0a commit 2259b1f

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

src/commands/browser/action.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ pub struct SnapshotArgs {
423423
#[derive(Parser)]
424424
pub struct ScreenshotArgs {
425425
/// Capture the full scrollable page
426-
#[arg(long, alias = "full")]
426+
#[arg(short = 'f', long, alias = "full")]
427427
pub full_page: bool,
428428
/// Output file path
429429
#[arg(short, long, default_value = "screenshot.png")]

src/commands/describe.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,7 @@ pub async fn run(args: Args) -> Result<()> {
8383

8484
// ── Command resolution ──────────────────────────────────────────────
8585

86-
fn resolve_command(
87-
root: &clap::Command,
88-
path: &[String],
89-
) -> Result<(clap::Command, Vec<String>)> {
86+
fn resolve_command(root: &clap::Command, path: &[String]) -> Result<(clap::Command, Vec<String>)> {
9087
let mut current = root.clone();
9188
let mut resolved_path = vec![root.get_name().to_string()];
9289

tests/browser_flag_parity.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,17 @@ const FLAG_PARITY: &[FlagParity] = &[
9090
FlagParity {
9191
command: "screenshot",
9292
steel_path: &["screenshot"],
93-
// Screenshot flags are global in agent-browser (Flags struct),
94-
// so they won't appear in the screenshot match arm.
95-
inline_covered: &[],
93+
// --full and -f now appear inline in agent-browser's screenshot match arm.
94+
// Steel maps these via --full-page with alias --full.
95+
inline_covered: &[("--full", "full-page"), ("-f", "full-page")],
9696
inline_skipped: &[],
9797
global_covered: &[
98-
("--full", "full-page"),
9998
("--annotate", "annotate"),
10099
("--screenshot-format", "format"),
101100
("--screenshot-quality", "quality"),
102101
],
103-
// -f is the global short for --full in agent-browser; in Steel's
104-
// subcommand architecture we use --full as alias instead.
105102
// --screenshot-dir: not exposed as CLI flag (hardcoded to None).
106-
global_skipped: &["-f", "--screenshot-dir"],
103+
global_skipped: &["--screenshot-dir"],
107104
},
108105
FlagParity {
109106
command: "navigate",

0 commit comments

Comments
 (0)