@@ -76,26 +76,33 @@ var (
7676
7777// renderTitleBar renders a title bar with left title and right-aligned user status
7878func renderTitleBar (screen , username , organization string , innerWidth int ) string {
79- leftTitle := fmt .Sprintf ("GitHub Brain %s / %s" , Version , screen )
80- var rightStatus string
79+ leftTitle := fmt .Sprintf ("GitHub Brain / %s" , screen )
80+
81+ // Build right side: @username · 🏢 org · version
82+ var rightParts []string
8183 if username != "" {
82- if organization != "" {
83- rightStatus = fmt .Sprintf ("👤 @%s (%s)" , username , organization )
84- } else {
85- rightStatus = fmt .Sprintf ("👤 @%s (no org)" , username )
86- }
87- } else {
88- rightStatus = "👤 Not logged in"
84+ rightParts = append (rightParts , fmt .Sprintf ("👤 @%s" , username ))
85+ }
86+ if organization != "" {
87+ rightParts = append (rightParts , fmt .Sprintf ("🏢 %s" , organization ))
88+ }
89+
90+ // Join parts with separator
91+ rightStatus := strings .Join (rightParts , " · " )
92+ if rightStatus != "" {
93+ rightStatus += " · "
8994 }
9095
9196 leftWidth := lipgloss .Width (leftTitle )
92- rightWidth := lipgloss .Width (rightStatus )
97+ versionText := Version
98+ versionWidth := lipgloss .Width (versionText )
99+ rightWidth := lipgloss .Width (rightStatus ) + versionWidth
93100 spacing := innerWidth - leftWidth - rightWidth
94101 if spacing < 1 {
95102 spacing = 1
96103 }
97104
98- return titleStyle .Render (leftTitle ) + strings .Repeat (" " , spacing ) + titleStyle .Render (rightStatus )
105+ return titleStyle .Render (leftTitle ) + strings .Repeat (" " , spacing ) + titleStyle .Render (rightStatus ) + dimStyle . Render ( versionText )
99106}
100107
101108// Removed ConsoleHandler - not needed with Bubble Tea
@@ -4814,7 +4821,7 @@ func (m model) View() string {
48144821 }
48154822
48164823 // Add title as first line of content
4817- leftTitle := fmt .Sprintf ("GitHub Brain %s / 📥 Pull" , Version )
4824+ leftTitle := fmt .Sprintf ("GitHub Brain %s / 🔄 Pull" , Version )
48184825 var rightStatus string
48194826 if m .username != "" {
48204827 if m .organization != "" {
@@ -4960,9 +4967,9 @@ func newMainMenuModel(homeDir string) mainMenuModel {
49604967 return mainMenuModel {
49614968 homeDir : homeDir ,
49624969 choices : []menuChoice {
4963- {icon : "🔧" , name : "Setup" , description : "Configure authentication and settings " },
4964- {icon : "📥 " , name : "Pull" , description : "Sync GitHub data to local database" },
4965- {icon : "🚪" , name : "Quit" , description : "Exit " },
4970+ {icon : "🔧" , name : "Setup" , description : "Configure GitHub username and organization " },
4971+ {icon : "🔄 " , name : "Pull" , description : "Sync GitHub data to local database" },
4972+ {icon : "🚪" , name : "Quit" , description : "Ctrl+C " },
49664973 },
49674974 cursor : 0 ,
49684975 status : "Checking authentication..." ,
@@ -5084,28 +5091,23 @@ func (m mainMenuModel) View() string {
50845091 b .WriteString ("\n " )
50855092
50865093 // Menu items
5094+ selectorStyle := lipgloss .NewStyle ().Foreground (lipgloss .Color ("12" )) // Blue selector
50875095 for i , choice := range m .choices {
50885096 cursor := " "
5089- style := dimStyle
5097+ descStyle := dimStyle
50905098 if m .cursor == i {
5091- cursor = "> "
5092- style = selectedStyle
5099+ cursor = selectorStyle . Render ( "▶" ) + " "
5100+ descStyle = selectedStyle
50935101 }
5094- line := fmt .Sprintf ("%s%s %s" , cursor , choice .icon , choice .name )
5095- if choice .description != "" {
5096- line += " " + choice .description
5097- }
5098- b .WriteString (style .Render (line ) + "\n " )
5102+ // Pad name to 5 characters for alignment
5103+ paddedName := fmt .Sprintf ("%-5s" , choice .name )
5104+ // Name is always bold (titleStyle), description uses current selection style
5105+ b .WriteString (fmt .Sprintf ("%s%s %s %s" , cursor , choice .icon , titleStyle .Render (paddedName ), descStyle .Render (choice .description )))
50995106 if i < len (m .choices )- 1 {
5100- b .WriteString ("\n " )
5107+ b .WriteString ("\n \n " )
51015108 }
51025109 }
51035110
5104- b .WriteString ("\n " )
5105-
5106- // Help text
5107- b .WriteString (dimStyle .Render ("Press Enter to select, Ctrl+C to quit" ))
5108-
51095111 // Create border style
51105112 borderStyle := lipgloss .NewStyle ().
51115113 Border (lipgloss .RoundedBorder ()).
@@ -5457,7 +5459,7 @@ func (m orgPromptModel) View() string {
54575459
54585460 var b strings.Builder
54595461
5460- b .WriteString (titleStyle .Render (fmt .Sprintf ("GitHub Brain %s / 📥 Pull" , Version )) + "\n " )
5462+ b .WriteString (titleStyle .Render (fmt .Sprintf ("GitHub Brain %s / 🔄 Pull" , Version )) + "\n " )
54615463 b .WriteString ("\n " )
54625464 b .WriteString (" Enter your GitHub organization:\n " )
54635465 b .WriteString (" " + m .textInput .View () + "\n " )
0 commit comments