From a39364b61236fd7037afc4d5b1ec63ac1501e9ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Fri, 23 Oct 2026 18:07:30 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20runner=20register=20com?= =?UTF-8?q?mand=20reads=20one=20flag=20per=20line=20and=20the=20branch=20s?= =?UTF-8?q?heet=20gets=20a=20backdrop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The register command is shown one flag per line with shell line continuations, so it reads well and still pastes as one command. Its Copy button copies the same text, since the code box keeps newlines. On phones the branch switcher sheet casts the popover's shadow on its top edge and dims the page behind it. Its filter, tabs and note keep the 16px side gutter. --- crates/forge-web/src/pages/admin_runners.rs | 11 ++++++----- style/main.scss | 11 +++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/crates/forge-web/src/pages/admin_runners.rs b/crates/forge-web/src/pages/admin_runners.rs index 9b4da5c..d1c55a1 100644 --- a/crates/forge-web/src/pages/admin_runners.rs +++ b/crates/forge-web/src/pages/admin_runners.rs @@ -264,10 +264,11 @@ fn back_to_list(notice: &str) -> SeeOther { see_other(format!("/admin/runners?notice={}", enc(notice))) } -/// The command a new runner runs. The base URL comes from the server config. +/// The command a new runner runs, one flag per line with shell line continuations so it reads well +/// and still pastes as a single command. The base URL comes from the server config. fn register_command(base_url: &str, token: &str) -> String { format!( - "forge runner register --url {} --token {token} --name --labels linux,x86_64 --config ~/.config/forge-runner/runner.toml", + "forge runner register \\\n --url {} \\\n --token {token} \\\n --name \\\n --labels linux,x86_64 \\\n --config ~/.config/forge-runner/runner.toml", base_url.trim_end_matches('/') ) } @@ -1523,7 +1524,7 @@ mod tests { let cmd = register_command("https://forge.example/", "tok123"); assert_eq!( cmd, - "forge runner register --url https://forge.example --token tok123 --name --labels linux,x86_64 --config ~/.config/forge-runner/runner.toml" + "forge runner register \\\n --url https://forge.example \\\n --token tok123 \\\n --name \\\n --labels linux,x86_64 \\\n --config ~/.config/forge-runner/runner.toml" ); } @@ -1623,9 +1624,9 @@ mod tests { .await; assert_eq!(status, 200); let token = token_from(&created); - assert!(created.contains("forge runner register --url")); + assert!(created.contains("forge runner register \\\n --url")); assert!( - created.contains("--name <name> --labels linux,x86_64 --config ~/.config/forge-runner/runner.toml"), + created.contains("--name <name> \\\n --labels linux,x86_64 \\\n --config ~/.config/forge-runner/runner.toml"), "placeholder is escaped" ); assert_eq!( diff --git a/style/main.scss b/style/main.scss index 4fb6bd2..7e93cb8 100644 --- a/style/main.scss +++ b/style/main.scss @@ -1942,6 +1942,17 @@ code { max-width: none; max-height: 75vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; + // The top edge casts the same shadow as the desktop popover; the huge spread dims the page + // behind the sheet while it is open. Clicks outside still close it through the dropdown handler. + box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12), 0 0 0 100vmax rgba(0, 0, 0, 0.4); + } + + .ref-top { + padding: 8px 16px; + } + + .ref-note { + margin: 8px 16px; } .ref-filter {