Context
The branch-explorer picker now keeps its scope options ("Since {base}", "Since the beginning", working tree) in a fixed position and disables them with a one-line reason when they can't be used, rather than removing them from the layout. This shipped alongside the "Since the beginning" (entire-repo diff) feature.
Removing an affordance shifts the layout and makes the option feel like it doesn't exist. A disabled row with a reason teaches what the option is and why it's currently off, and keeps the layout stable and learnable.
Ask
Audit the rest of the app for affordances that appear/disappear based on state, and convert conditional hiding to disable-with-reason where the option is real but currently unusable. Candidates:
- Header buttons
- Native menu items (
HandleMenuItemClicked)
- Project settings entries
- Remote actions (push/fetch/compare-on-remote)
Out of scope
Options that are genuinely inapplicable (not merely unavailable) should still not render. The goal is a stable layout where nothing real silently vanishes, not showing controls that make no sense in context.
Reference implementation
See the "Since {base}" row in resources/views/livewire/⚡branch-explorer.blade.php and the sinceBaseActionable / sinceBaseReason getters in public/js/branch-explorer.js for the pattern (always render, gate clickability, surface a reason).
Context
The branch-explorer picker now keeps its scope options ("Since {base}", "Since the beginning", working tree) in a fixed position and disables them with a one-line reason when they can't be used, rather than removing them from the layout. This shipped alongside the "Since the beginning" (entire-repo diff) feature.
Removing an affordance shifts the layout and makes the option feel like it doesn't exist. A disabled row with a reason teaches what the option is and why it's currently off, and keeps the layout stable and learnable.
Ask
Audit the rest of the app for affordances that appear/disappear based on state, and convert conditional hiding to disable-with-reason where the option is real but currently unusable. Candidates:
HandleMenuItemClicked)Out of scope
Options that are genuinely inapplicable (not merely unavailable) should still not render. The goal is a stable layout where nothing real silently vanishes, not showing controls that make no sense in context.
Reference implementation
See the "Since {base}" row in
resources/views/livewire/⚡branch-explorer.blade.phpand thesinceBaseActionable/sinceBaseReasongetters inpublic/js/branch-explorer.jsfor the pattern (always render, gate clickability, surface a reason).