fix(web): replace whitespace in new ref names with dashes - #6270
All clear
All clear
Details
Note
Your check run agent prompt is: .macroscope/check-run-agents/ui-consistency.md
More information about how Check Run Agents work can be found in our Help Center.
🔍 Agent activity — reasoning, no tool calls
💭 I'm looking at the changed files to evaluate the UI consistency check, focusing on the "Create new ref" label change and examining the BranchToolbarBranchSelector component for any potential issues. I'm checking edge cases around the branch name sanitization—when the input is whitespace-only, trimming handles it correctly by producing an empty string that prevents branch creation. The sanitized name should always be non-empty if the trimmed query is non-empty, so the UI label displaying the sanitized name should stay consistent. Now I need to verify whether the picker's filtering logic properly handles the create branch item—specifically whether
shouldIncludeBranchPickerItemalways includes it regardless of the query, and whethercreateBranchItemValueuses the raw or sanitized query. I should check if the trimmed branch query is displayed anywhere else in the UI—like in empty states or other components that might echo back the user's input. Let me trace through where this value appears, particularly in places like the branch toolbar or other "create new ref" flows, to ensure consistency in how we handle the sanitization. I should verify how the createRef function handles the sanitized name parameter around that section of the code. The behavioral approach checks out. From a UI consistency angle, I'm noticing thathasExactBranchMatchpulls frombranchByNamewhich comes from deferred refs, whilenewRefNameuses the non-deferredtrimmedBranchQuery—but that's how it was before, so it's consistent with the existing pattern. I should also check if there are other places relying ondeferredTrimmedBranchQuerythat might have similar empty-state issues. Looking at the filtered items,normalizedDeferredBranchQueryis being used to sanitize the logic properly. The styling is essentially unchanged except for label text, so that's clear. The create item displays the sanitized name while keeping the raw query as the value, which isn't a UI consistency problem. The sanitize regex handles whitespace and control characters appropriately—Git will surface any other invalid names as errors anyway. I should scan for other places in BranchToolbar where unsanitized names might be displayed, like in a worktree selector's create item. There's a conflict between the instruction to output exactly "All clear" and the requirement to respond with JSON. I'll resolve this by putting "All clear" as the title field in the JSON response to satisfy both constraints.
Agent Credits: 35 credits