feat(yahweh-widget-app-header): promover header standard de explorers

Iter 16. Patrón con 4 consumers idénticos: nakui-explorer,
nouser-explorer, minga-explorer, brahman-broker-explorer todos
declaraban un header flex_row + flex_grow(label) + theme_switcher
+ bg(panel) + border-bottom + text_size(14) + padding(16/12).
Ahora es 1 línea.

crates/modules/ui_engine/widgets/app-header/:
- pub fn app_header(cx, label: impl Into<SharedString>) -> impl IntoElement.
- pub fn app_header_with(cx, label_child: impl IntoElement) — variante
  para left side no-text.
- 3 tests #[gpui::test].

Migración 4 consumers:
- Cada uno: bloque de ~13 líneas → 1 línea app_header(cx, text).
- Borra dep yahweh-widget-theme-switcher (incluida vía app-header).
- Reemplaza import.

Ahorro ~50 líneas UI hardcoded. Cambios visuales del header (padding,
border, text_size) en un solo lugar.

Decisión: sidebar header del MetaApp NO se migra — es de sidebar,
no de app top, styling distinto. Diferente patrón → diferente widget.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Sergio
2026-05-10 12:40:56 +00:00
parent af7417ce08
commit be3a0e78fc
13 changed files with 183 additions and 69 deletions
Generated
+13 -4
View File
@@ -1243,9 +1243,9 @@ dependencies = [
"brahman-sidecar",
"gpui",
"yahweh-theme",
"yahweh-widget-app-header",
"yahweh-widget-banner",
"yahweh-widget-stat-card",
"yahweh-widget-theme-switcher",
]
[[package]]
@@ -6216,9 +6216,9 @@ dependencies = [
"gpui",
"minga-store",
"yahweh-theme",
"yahweh-widget-app-header",
"yahweh-widget-banner",
"yahweh-widget-stat-card",
"yahweh-widget-theme-switcher",
]
[[package]]
@@ -6486,9 +6486,9 @@ dependencies = [
"uuid",
"yahweh-meta-runtime",
"yahweh-theme",
"yahweh-widget-app-header",
"yahweh-widget-banner",
"yahweh-widget-card",
"yahweh-widget-theme-switcher",
]
[[package]]
@@ -6883,9 +6883,9 @@ dependencies = [
"gpui",
"nouser-card",
"yahweh-theme",
"yahweh-widget-app-header",
"yahweh-widget-banner",
"yahweh-widget-card",
"yahweh-widget-theme-switcher",
]
[[package]]
@@ -13031,6 +13031,15 @@ dependencies = [
"gpui",
]
[[package]]
name = "yahweh-widget-app-header"
version = "0.1.0"
dependencies = [
"gpui",
"yahweh-theme",
"yahweh-widget-theme-switcher",
]
[[package]]
name = "yahweh-widget-banner"
version = "0.1.0"