on main help sign in
chore(ui): hypercrush small type treatment
commitd5b5a9e1ccfdb2e764ecd1444fafe12dbf7999b7 authorChristian Rocha <christian@rocha.is> dateFri 1 May 2026, 10:46 (6 months ago) parenta93277f
3 files changed+26−7
internal/ui/logo/logo.go+12−4 internal/ui/model/header.go+11−2 internal/ui/model/sidebar.go+3−1
internal/ui/logo/logo.go+12−4
@@ -148,10 +148,18 @@ func Render(base lipgloss.Style, version string, compact bool, o Opts) string {
148148
149149// SmallRender renders a smaller version of the Crush logo, suitable for
150150// smaller windows or sidebar usage.
151−func SmallRender(t *styles.Styles, width int) string {
152− title := t.Logo.SmallCharm.Render("Charm™")
153− title = fmt.Sprintf("%s %s", title, styles.ApplyBoldForegroundGrad(t.Logo.GradCanvas, "Crush", t.Logo.SmallGradFromColor, t.Logo.SmallGradToColor))
154− remainingWidth := width - lipgloss.Width(title) - 1 // 1 for the space after "Crush"
151+func SmallRender(t *styles.Styles, width int, o Opts) string {
152+ name := "Crush"
153+ if o.Hyper {
154+ name = "HYPERCRUSH"
155+ }
156+ charm := "Charm™"
157+ if !o.Hyper {
158+ charm = " " + charm
159+ }
160+ title := t.Logo.SmallCharm.Render(charm)
161+ title = fmt.Sprintf("%s %s", title, styles.ApplyBoldForegroundGrad(t.Logo.GradCanvas, name, t.Logo.SmallGradFromColor, t.Logo.SmallGradToColor))
162+ remainingWidth := width - lipgloss.Width(title) - 1 // 1 for the space after the name
155163 if remainingWidth > 0 {
156164 lines := strings.Repeat("╱", remainingWidth)
157165 title = fmt.Sprintf("%s %s", title, t.Logo.SmallDiagonals.Render(lines))
internal/ui/model/header.go+11−2
@@ -45,8 +45,17 @@ func newHeader(com *common.Common) *header {
4545// after the theme changes.
4646func (h *header) refresh() {
4747 t := h.com.Styles
48− h.compactLogo = t.Header.Charm.Render("Charm™") + " " +
49− styles.ApplyBoldForegroundGrad(t.Header.LogoGradCanvas, "CRUSH", t.Header.LogoGradFromColor, t.Header.LogoGradToColor) + " "
48+ isHyper := h.com.IsHyper()
49+ charm := "Charm™"
50+ if !isHyper {
51+ charm = " " + charm
52+ }
53+ name := "CRUSH"
54+ if isHyper {
55+ name = "HYPERCRUSH"
56+ }
57+ h.compactLogo = t.Header.Charm.Render(charm) + " " +
58+ styles.ApplyBoldForegroundGrad(t.Header.LogoGradCanvas, name, t.Header.LogoGradFromColor, t.Header.LogoGradToColor) + " "
5059 // Force drawHeader to re-render the wide logo on the next frame.
5160 h.width = 0
5261 h.logo = ""
internal/ui/model/sidebar.go+3−1
@@ -142,7 +142,9 @@ func (m *UI) drawSidebar(scr uv.Screen, area uv.Rectangle) {
142142 cwd := common.PrettyPath(t, m.com.Workspace.WorkingDir(), width)
143143 sidebarLogo := m.sidebarLogo
144144 if height < logoHeightBreakpoint {
145− sidebarLogo = logo.SmallRender(m.com.Styles, width)
145+ sidebarLogo = logo.SmallRender(m.com.Styles, width, logo.Opts{
146+ Hyper: m.com.IsHyper(),
147+ })
146148 }
147149 blocks := []string{
148150 sidebarLogo,