Skip to content

Self-hosted workflows for coding-agent delivery. Orchestrate CodeBuddy, Codex and Claude Code with scripts and human approval gates. Includes Local workflows for coding assistants.

fix(web): keep runner command boxes from jumping on hover (#544)

fx-kurumi17bdb29dc17c
diff --git a/web/product-v4.css b/web/product-v4.css
index 99c5e425..6eb1d0f4 100644
--- a/web/product-v4.css
+++ b/web/product-v4.css
@@ -2703,9 +2703,17 @@ html[data-theme="dark"] #runnersView{--rv-term:#0a0a0b;--rv-codex:#3f3f46}
#runnersView .runner-steps b{display:block;color:var(--rv-text);font-size:13px;font-weight:500}
#runnersView .runner-steps small{display:block;color:var(--rv-muted);font-size:12px}
#runnersView .runner-command-box{display:flex;align-items:center;gap:12px;padding:6px 6px 6px 16px;border:0;border-radius:10px;background:var(--rv-term)}
-#runnersView .runner-command-box pre{flex:1;min-width:0;margin:0;padding:8px 0;overflow-x:auto;overflow-y:hidden;white-space:nowrap;word-break:normal;border:0;background:transparent;color:var(--rv-term-text);font:12.5px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;scrollbar-width:none}
-#runnersView .runner-command-box pre::-webkit-scrollbar{display:none}
-#runnersView .runner-command-box:hover pre{scrollbar-width:thin;scrollbar-color:#3f3f46 transparent}
+#runnersView .runner-command-box pre{flex:1;min-width:0;margin:0;padding:8px 0;overflow-x:auto;overflow-y:hidden;white-space:nowrap;word-break:normal;border:0;background:transparent;color:var(--rv-term-text);font:12.5px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace}
+/* The scrollbar track is always reserved and only the thumb colour changes on hover:
+ toggling scrollbar-width on :hover resized the box under the pointer and made the page jump (#193). */
+#runnersView .runner-command-box pre::-webkit-scrollbar{height:6px}
+#runnersView .runner-command-box pre::-webkit-scrollbar-track{background:transparent}
+#runnersView .runner-command-box pre::-webkit-scrollbar-thumb{border-radius:3px;background:transparent}
+#runnersView .runner-command-box:hover pre::-webkit-scrollbar-thumb{background:#3f3f46}
+@supports not selector(::-webkit-scrollbar){
+ #runnersView .runner-command-box pre{scrollbar-width:thin;scrollbar-color:transparent transparent}
+ #runnersView .runner-command-box:hover pre{scrollbar-color:#3f3f46 transparent}
+}
#runnersView .runner-command-box pre::before{content:"$ ";color:var(--rv-term-dim);user-select:none}
#runnersView #bindToken{color:var(--rv-accent)}
#runnersView .runner-command-box .button{flex:none;justify-content:center;min-width:84px;height:28px;padding:0 10px;border:1px solid #fff;border-radius:7px;background:#fff;color:#252529;font-size:12px;font-weight:500;box-shadow:none;transition:background-color .16s,border-color .16s,color .16s}
diff --git a/web/runner_command_scrollbar_test.go b/web/runner_command_scrollbar_test.go
new file mode 100644
index 00000000..63f10f2f
--- /dev/null
+++ b/web/runner_command_scrollbar_test.go
@@ -0,0 +1,59 @@
+package web
+
+import (
+ "os"
+ "regexp"
+ "strings"
+ "testing"
+)
+
+// The install / uninstall command boxes on the runners page used to hide their
+// horizontal scrollbar and switch it on with :hover. With classic (always
+// visible) scrollbars that made the box grow under the pointer and the page
+// jump (#193). Hovering may only recolour the scrollbar, never resize it.
+func TestRunnerCommandScrollbarDoesNotResizeOnHover(t *testing.T) {
+ data, err := os.ReadFile("product-v4.css")
+ if err != nil {
+ t.Fatal(err)
+ }
+ css := regexp.MustCompile(`(?s)/\*.*?\*/`).ReplaceAllString(string(data), "")
+
+ rule := regexp.MustCompile(`([^{}]+)\{([^{}]*)\}`)
+ sizing := regexp.MustCompile(`(?:^|;)\s*(?:scrollbar-width|height|width|display|padding[a-z-]*)\s*:`)
+ var webkitTrack, webkitHoverThumb string
+ for _, m := range rule.FindAllStringSubmatch(css, -1) {
+ selector, body := strings.TrimSpace(m[1]), m[2]
+ if i := strings.LastIndex(selector, "{"); i >= 0 {
+ selector = strings.TrimSpace(selector[i+1:])
+ }
+ if !strings.Contains(selector, ".runner-command-box") {
+ continue
+ }
+ if strings.Contains(selector, ":hover") && strings.Contains(selector, "pre") && sizing.MatchString(body) {
+ t.Errorf("%s { %s } changes the command scrollbar size on hover", selector, strings.TrimSpace(body))
+ }
+ if strings.Contains(selector, "pre") && regexp.MustCompile(`scrollbar-width\s*:\s*none`).MatchString(body) {
+ t.Errorf("%s hides the command scrollbar, so it can only appear by resizing the box", selector)
+ }
+ switch selector {
+ case "#runnersView .runner-command-box pre::-webkit-scrollbar":
+ webkitTrack = body
+ case "#runnersView .runner-command-box:hover pre::-webkit-scrollbar-thumb":
+ webkitHoverThumb = body
+ }
+ }
+ if !regexp.MustCompile(`height\s*:\s*\d+px`).MatchString(webkitTrack) || strings.Contains(webkitTrack, "display") {
+ t.Errorf("WebKit command scrollbar must reserve a fixed height, got %q", webkitTrack)
+ }
+ if !strings.Contains(webkitHoverThumb, "background") {
+ t.Errorf("hovering a command box should only reveal the WebKit thumb colour, got %q", webkitHoverThumb)
+ }
+
+ fallback := supportsBlock(t, css, "@supports not selector(::-webkit-scrollbar)")
+ if !regexp.MustCompile(`#runnersView \.runner-command-box pre\s*\{[^}]*scrollbar-width:\s*thin`).MatchString(fallback) {
+ t.Error("non-WebKit fallback must reserve scrollbar-width: thin on the command box without :hover")
+ }
+ if !regexp.MustCompile(`#runnersView \.runner-command-box:hover pre\s*\{[^}]*scrollbar-color:`).MatchString(fallback) {
+ t.Error("non-WebKit fallback should reveal the command scrollbar by colour on hover")
+ }
+}