From a4a481eb7f4428c0988ed745a6b76e6089b9ab90 Mon Sep 17 00:00:00 2001 From: Tomas Vesely <448809+wham@users.noreply.github.com> Date: Mon, 29 Dec 2025 22:24:19 -0800 Subject: [PATCH 1/6] Align menu item names by padding to 5 characters for improved readability --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 17b7fe5..6d32f76 100644 --- a/main.go +++ b/main.go @@ -5091,7 +5091,9 @@ func (m mainMenuModel) View() string { cursor = "> " style = selectedStyle } - line := fmt.Sprintf("%s%s %s", cursor, choice.icon, choice.name) + // Pad name to 5 characters for alignment + paddedName := fmt.Sprintf("%-5s", choice.name) + line := fmt.Sprintf("%s%s %s", cursor, choice.icon, paddedName) if choice.description != "" { line += " " + choice.description } From e572fe481bcc061adacc8f0cfbcc9b1ba93ed21e Mon Sep 17 00:00:00 2001 From: Tomas Vesely <448809+wham@users.noreply.github.com> Date: Mon, 29 Dec 2025 22:35:37 -0800 Subject: [PATCH 2/6] =?UTF-8?q?Updated=20pull=20icon=20from=20=F0=9F=93=A5?= =?UTF-8?q?=20to=20=F0=9F=94=84=20for=20consistency=20across=20the=20appli?= =?UTF-8?q?cation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 6 +++--- main.md | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/main.go b/main.go index 6d32f76..b120953 100644 --- a/main.go +++ b/main.go @@ -4814,7 +4814,7 @@ func (m model) View() string { } // Add title as first line of content - leftTitle := fmt.Sprintf("GitHub Brain %s / ๐Ÿ“ฅ Pull", Version) + leftTitle := fmt.Sprintf("GitHub Brain %s / ๐Ÿ”„ Pull", Version) var rightStatus string if m.username != "" { if m.organization != "" { @@ -4961,7 +4961,7 @@ func newMainMenuModel(homeDir string) mainMenuModel { homeDir: homeDir, choices: []menuChoice{ {icon: "๐Ÿ”ง", name: "Setup", description: "Configure authentication and settings"}, - {icon: "๐Ÿ“ฅ", name: "Pull", description: "Sync GitHub data to local database"}, + {icon: "๐Ÿ”„", name: "Pull", description: "Sync GitHub data to local database"}, {icon: "๐Ÿšช", name: "Quit", description: "Exit"}, }, cursor: 0, @@ -5459,7 +5459,7 @@ func (m orgPromptModel) View() string { var b strings.Builder - b.WriteString(titleStyle.Render(fmt.Sprintf("GitHub Brain %s / ๐Ÿ“ฅ Pull", Version)) + "\n") + b.WriteString(titleStyle.Render(fmt.Sprintf("GitHub Brain %s / ๐Ÿ”„ Pull", Version)) + "\n") b.WriteString("\n") b.WriteString(" Enter your GitHub organization:\n") b.WriteString(" " + m.textInput.View() + "\n") diff --git a/main.md b/main.md index b753120..b02c245 100644 --- a/main.md +++ b/main.md @@ -36,7 +36,7 @@ When `github-brain` is run without arguments, display an interactive menu: โ”‚ GitHub Brain 1.0.0 / ๐Ÿ  Home ๐Ÿ‘ค Not logged in โ”‚ โ”‚ โ”‚ โ”‚ > ๐Ÿ”ง Setup Configure authentication and settings โ”‚ -โ”‚ ๐Ÿ“ฅ Pull Sync GitHub data to local database โ”‚ +โ”‚ ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ โ”‚ ๐Ÿšช Quit Exit โ”‚ โ”‚ โ”‚ โ”‚ Press Enter to select, Ctrl+C to quit โ”‚ @@ -51,7 +51,7 @@ After login but no organization configured: โ”‚ GitHub Brain 1.0.0 / ๐Ÿ  Home ๐Ÿ‘ค @wham (no org) โ”‚ โ”‚ โ”‚ โ”‚ > ๐Ÿ”ง Setup Configure authentication and settings โ”‚ -โ”‚ ๐Ÿ“ฅ Pull Sync GitHub data to local database โ”‚ +โ”‚ ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ โ”‚ ๐Ÿšช Quit Exit โ”‚ โ”‚ โ”‚ โ”‚ Press Enter to select, Ctrl+C to quit โ”‚ @@ -66,7 +66,7 @@ After successful login with organization configured: โ”‚ GitHub Brain 1.0.0 / ๐Ÿ  Home ๐Ÿ‘ค @wham (my-org) โ”‚ โ”‚ โ”‚ โ”‚ ๐Ÿ”ง Setup Configure authentication and settings โ”‚ -โ”‚ > ๐Ÿ“ฅ Pull Sync GitHub data to local database โ”‚ +โ”‚ > ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ โ”‚ ๐Ÿšช Quit Exit โ”‚ โ”‚ โ”‚ โ”‚ Press Enter to select, Ctrl+C to quit โ”‚ @@ -98,7 +98,7 @@ User status values: ### Menu Items 1. **๐Ÿ”ง Setup** - Opens the setup submenu (see [Setup Menu](#setup-menu) section) -2. **๐Ÿ“ฅ Pull** - Runs the pull operation (see [pull](#pull) section) +2. **๐Ÿ”„ Pull** - Runs the pull operation (see [pull](#pull) section) 3. **๐Ÿšช Quit** - Exit the application ### Default Selection @@ -388,7 +388,7 @@ Console at the beginning of pull: ``` โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ -โ”‚ GitHub Brain 1.0.0 / ๐Ÿ“ฅ Pull ๐Ÿ‘ค @wham (my-org) โ”‚ +โ”‚ GitHub Brain 1.0.0 / ๐Ÿ”„ Pull ๐Ÿ‘ค @wham (my-org) โ”‚ โ”‚ โ”‚ โ”‚ ๐Ÿ“‹ Repositories โ”‚ โ”‚ ๐Ÿ“‹ Discussions โ”‚ @@ -412,7 +412,7 @@ Console during first item pull: ``` โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ -โ”‚ GitHub Brain 1.0.0 / ๐Ÿ“ฅ Pull ๐Ÿ‘ค @wham (my-org) โ”‚ +โ”‚ GitHub Brain 1.0.0 / ๐Ÿ”„ Pull ๐Ÿ‘ค @wham (my-org) โ”‚ โ”‚ โ”‚ โ”‚ โ ‹ Repositories: 1,247 โ”‚ โ”‚ ๐Ÿ“‹ Discussions โ”‚ @@ -436,7 +436,7 @@ Console when first item completes: ``` โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ -โ”‚ GitHub Brain 1.0.0 / ๐Ÿ“ฅ Pull ๐Ÿ‘ค @wham (my-org) โ”‚ +โ”‚ GitHub Brain 1.0.0 / ๐Ÿ”„ Pull ๐Ÿ‘ค @wham (my-org) โ”‚ โ”‚ โ”‚ โ”‚ โœ… Repositories: 2,847 โ”‚ โ”‚ โ ™ Discussions: 156 โ”‚ @@ -460,7 +460,7 @@ Console when an error occurs: ``` โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ -โ”‚ GitHub Brain 1.0.0 / ๐Ÿ“ฅ Pull ๐Ÿ‘ค @wham (my-org) โ”‚ +โ”‚ GitHub Brain 1.0.0 / ๐Ÿ”„ Pull ๐Ÿ‘ค @wham (my-org) โ”‚ โ”‚ โ”‚ โ”‚ โœ… Repositories: 2,847 โ”‚ โ”‚ โŒ Discussions: 156 (errors) โ”‚ From 88649e62236c0c76559c32e2c58bc478d3ccec83 Mon Sep 17 00:00:00 2001 From: Tomas Vesely <448809+wham@users.noreply.github.com> Date: Mon, 29 Dec 2025 22:45:31 -0800 Subject: [PATCH 3/6] Update quit command description to clarify usage of Ctrl+C --- main.go | 7 +------ main.md | 14 ++++---------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/main.go b/main.go index b120953..a3ac939 100644 --- a/main.go +++ b/main.go @@ -4962,7 +4962,7 @@ func newMainMenuModel(homeDir string) mainMenuModel { choices: []menuChoice{ {icon: "๐Ÿ”ง", name: "Setup", description: "Configure authentication and settings"}, {icon: "๐Ÿ”„", name: "Pull", description: "Sync GitHub data to local database"}, - {icon: "๐Ÿšช", name: "Quit", description: "Exit"}, + {icon: "๐Ÿšช", name: "Quit", description: "Ctrl+C"}, }, cursor: 0, status: "Checking authentication...", @@ -5103,11 +5103,6 @@ func (m mainMenuModel) View() string { } } - b.WriteString("\n") - - // Help text - b.WriteString(dimStyle.Render("Press Enter to select, Ctrl+C to quit")) - // Create border style borderStyle := lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). diff --git a/main.md b/main.md index b02c245..0a67024 100644 --- a/main.md +++ b/main.md @@ -37,9 +37,7 @@ When `github-brain` is run without arguments, display an interactive menu: โ”‚ โ”‚ โ”‚ > ๐Ÿ”ง Setup Configure authentication and settings โ”‚ โ”‚ ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ -โ”‚ ๐Ÿšช Quit Exit โ”‚ -โ”‚ โ”‚ -โ”‚ Press Enter to select, Ctrl+C to quit โ”‚ +โ”‚ ๐Ÿšช Quit Ctrl+C โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ ``` @@ -52,9 +50,7 @@ After login but no organization configured: โ”‚ โ”‚ โ”‚ > ๐Ÿ”ง Setup Configure authentication and settings โ”‚ โ”‚ ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ -โ”‚ ๐Ÿšช Quit Exit โ”‚ -โ”‚ โ”‚ -โ”‚ Press Enter to select, Ctrl+C to quit โ”‚ +โ”‚ ๐Ÿšช Quit Ctrl+C โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ ``` @@ -67,9 +63,7 @@ After successful login with organization configured: โ”‚ โ”‚ โ”‚ ๐Ÿ”ง Setup Configure authentication and settings โ”‚ โ”‚ > ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ -โ”‚ ๐Ÿšช Quit Exit โ”‚ -โ”‚ โ”‚ -โ”‚ Press Enter to select, Ctrl+C to quit โ”‚ +โ”‚ ๐Ÿšช Quit Ctrl+C โ”‚ โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ ``` @@ -99,7 +93,7 @@ User status values: 1. **๐Ÿ”ง Setup** - Opens the setup submenu (see [Setup Menu](#setup-menu) section) 2. **๐Ÿ”„ Pull** - Runs the pull operation (see [pull](#pull) section) -3. **๐Ÿšช Quit** - Exit the application +3. **๐Ÿšช Quit** - Exit the application (Ctrl+C) ### Default Selection From 4d70b75c65f80ed12faf06e5e38e1ce8300b4bcf Mon Sep 17 00:00:00 2001 From: Tomas Vesely <448809+wham@users.noreply.github.com> Date: Mon, 29 Dec 2025 22:48:43 -0800 Subject: [PATCH 4/6] Update setup description to specify GitHub username and organization --- main.go | 6 +++--- main.md | 9 +++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/main.go b/main.go index a3ac939..8e31c5a 100644 --- a/main.go +++ b/main.go @@ -4960,7 +4960,7 @@ func newMainMenuModel(homeDir string) mainMenuModel { return mainMenuModel{ homeDir: homeDir, choices: []menuChoice{ - {icon: "๐Ÿ”ง", name: "Setup", description: "Configure authentication and settings"}, + {icon: "๐Ÿ”ง", name: "Setup", description: "Configure GitHub username and organization"}, {icon: "๐Ÿ”„", name: "Pull", description: "Sync GitHub data to local database"}, {icon: "๐Ÿšช", name: "Quit", description: "Ctrl+C"}, }, @@ -5097,9 +5097,9 @@ func (m mainMenuModel) View() string { if choice.description != "" { line += " " + choice.description } - b.WriteString(style.Render(line) + "\n") + b.WriteString(style.Render(line)) if i < len(m.choices)-1 { - b.WriteString("\n") + b.WriteString("\n\n") } } diff --git a/main.md b/main.md index 0a67024..5d35085 100644 --- a/main.md +++ b/main.md @@ -35,10 +35,9 @@ When `github-brain` is run without arguments, display an interactive menu: โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ GitHub Brain 1.0.0 / ๐Ÿ  Home ๐Ÿ‘ค Not logged in โ”‚ โ”‚ โ”‚ -โ”‚ > ๐Ÿ”ง Setup Configure authentication and settings โ”‚ +โ”‚ > ๐Ÿ”ง Setup Configure GitHub username and organization โ”‚ โ”‚ ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ โ”‚ ๐Ÿšช Quit Ctrl+C โ”‚ -โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ ``` @@ -48,10 +47,9 @@ After login but no organization configured: โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ GitHub Brain 1.0.0 / ๐Ÿ  Home ๐Ÿ‘ค @wham (no org) โ”‚ โ”‚ โ”‚ -โ”‚ > ๐Ÿ”ง Setup Configure authentication and settings โ”‚ +โ”‚ > ๐Ÿ”ง Setup Configure GitHub username and organization โ”‚ โ”‚ ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ โ”‚ ๐Ÿšช Quit Ctrl+C โ”‚ -โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ ``` @@ -61,10 +59,9 @@ After successful login with organization configured: โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ GitHub Brain 1.0.0 / ๐Ÿ  Home ๐Ÿ‘ค @wham (my-org) โ”‚ โ”‚ โ”‚ -โ”‚ ๐Ÿ”ง Setup Configure authentication and settings โ”‚ +โ”‚ ๐Ÿ”ง Setup Configure GitHub username and organization โ”‚ โ”‚ > ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ โ”‚ ๐Ÿšช Quit Ctrl+C โ”‚ -โ”‚ โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ ``` From ad00be918958248f4062073789afd55d0c87afdb Mon Sep 17 00:00:00 2001 From: Tomas Vesely <448809+wham@users.noreply.github.com> Date: Mon, 29 Dec 2025 22:56:13 -0800 Subject: [PATCH 5/6] Refactor title bar rendering to improve layout and clarity of user status and version display --- main.go | 29 ++++++++++++++++++----------- main.md | 26 +++++++++++++------------- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/main.go b/main.go index 8e31c5a..13a4d4d 100644 --- a/main.go +++ b/main.go @@ -76,26 +76,33 @@ var ( // renderTitleBar renders a title bar with left title and right-aligned user status func renderTitleBar(screen, username, organization string, innerWidth int) string { - leftTitle := fmt.Sprintf("GitHub Brain %s / %s", Version, screen) - var rightStatus string + leftTitle := fmt.Sprintf("GitHub Brain / %s", screen) + + // Build right side: @username ยท ๐Ÿข org ยท version + var rightParts []string if username != "" { - if organization != "" { - rightStatus = fmt.Sprintf("๐Ÿ‘ค @%s (%s)", username, organization) - } else { - rightStatus = fmt.Sprintf("๐Ÿ‘ค @%s (no org)", username) - } - } else { - rightStatus = "๐Ÿ‘ค Not logged in" + rightParts = append(rightParts, fmt.Sprintf("๐Ÿ‘ค @%s", username)) + } + if organization != "" { + rightParts = append(rightParts, fmt.Sprintf("๐Ÿข %s", organization)) + } + + // Join parts with separator + rightStatus := strings.Join(rightParts, " ยท ") + if rightStatus != "" { + rightStatus += " ยท " } leftWidth := lipgloss.Width(leftTitle) - rightWidth := lipgloss.Width(rightStatus) + versionText := Version + versionWidth := lipgloss.Width(versionText) + rightWidth := lipgloss.Width(rightStatus) + versionWidth spacing := innerWidth - leftWidth - rightWidth if spacing < 1 { spacing = 1 } - return titleStyle.Render(leftTitle) + strings.Repeat(" ", spacing) + titleStyle.Render(rightStatus) + return titleStyle.Render(leftTitle) + strings.Repeat(" ", spacing) + titleStyle.Render(rightStatus) + dimStyle.Render(versionText) } // Removed ConsoleHandler - not needed with Bubble Tea diff --git a/main.md b/main.md index 5d35085..617b5e9 100644 --- a/main.md +++ b/main.md @@ -33,9 +33,9 @@ When `github-brain` is run without arguments, display an interactive menu: ``` โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ -โ”‚ GitHub Brain 1.0.0 / ๐Ÿ  Home ๐Ÿ‘ค Not logged in โ”‚ +โ”‚ GitHub Brain / ๐Ÿ  Home 1.0.0 โ”‚ โ”‚ โ”‚ -โ”‚ > ๐Ÿ”ง Setup Configure GitHub username and organization โ”‚ +โ”‚ > ๐Ÿ”ง Setup Configure GitHub username and organization โ”‚ โ”‚ ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ โ”‚ ๐Ÿšช Quit Ctrl+C โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ @@ -45,9 +45,9 @@ After login but no organization configured: ``` โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ -โ”‚ GitHub Brain 1.0.0 / ๐Ÿ  Home ๐Ÿ‘ค @wham (no org) โ”‚ +โ”‚ GitHub Brain / ๐Ÿ  Home ๐Ÿ‘ค @wham ยท 1.0.0 โ”‚ โ”‚ โ”‚ -โ”‚ > ๐Ÿ”ง Setup Configure GitHub username and organization โ”‚ +โ”‚ > ๐Ÿ”ง Setup Configure GitHub username and organization โ”‚ โ”‚ ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ โ”‚ ๐Ÿšช Quit Ctrl+C โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ @@ -57,9 +57,9 @@ After successful login with organization configured: ``` โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ -โ”‚ GitHub Brain 1.0.0 / ๐Ÿ  Home ๐Ÿ‘ค @wham (my-org) โ”‚ +โ”‚ GitHub Brain / ๐Ÿ  Home ๐Ÿ‘ค @wham ยท ๐Ÿข my-org ยท 1.0.0 โ”‚ โ”‚ โ”‚ -โ”‚ ๐Ÿ”ง Setup Configure GitHub username and organization โ”‚ +โ”‚ ๐Ÿ”ง Setup Configure GitHub username and organization โ”‚ โ”‚ > ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ โ”‚ ๐Ÿšช Quit Ctrl+C โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ @@ -69,14 +69,14 @@ After successful login with organization configured: The title bar contains: -- Left side: `GitHub Brain / ` -- Right side: `๐Ÿ‘ค ` (right-aligned) +- Left side: `GitHub Brain / ` +- Right side: `๐Ÿ‘ค @ ยท ๐Ÿข ยท ` (right-aligned, version in dim style) -User status values: +Right side components (shown only when available): -- `๐Ÿ‘ค Not logged in` - No GITHUB_TOKEN in .env or token invalid -- `๐Ÿ‘ค @username (no org)` - Token valid but no organization configured -- `๐Ÿ‘ค @username (org)` - Token and organization configured +- `๐Ÿ‘ค @username` - Shown when logged in +- `๐Ÿข org` - Shown when organization is configured +- `` - Always shown, in dim style ### Menu Navigation @@ -1308,7 +1308,7 @@ Download the appropriate archive for your platform from [releases](https://githu ```bash # Specific version -curl -L https://github.com/wham/github-brain/releases/download/v1.2.3/github-brain-darwin-arm64.tar.gz | tar xz +curl -L https://github.com/wham/github-brain/releases/download/v1.2.3/github-brain-darwin-arm64.tar.gz ยท tar xz ``` ## Code Quality From 498de66bc0de68432cce756dec213201a9e7f3a9 Mon Sep 17 00:00:00 2001 From: Tomas Vesely <448809+wham@users.noreply.github.com> Date: Mon, 29 Dec 2025 23:12:03 -0800 Subject: [PATCH 6/6] Highlight current selection with a blue arrow in the menu for improved visibility --- main.go | 14 ++++++-------- main.md | 8 ++++---- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/main.go b/main.go index 13a4d4d..889b607 100644 --- a/main.go +++ b/main.go @@ -5091,20 +5091,18 @@ func (m mainMenuModel) View() string { b.WriteString("\n") // Menu items + selectorStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("12")) // Blue selector for i, choice := range m.choices { cursor := " " - style := dimStyle + descStyle := dimStyle if m.cursor == i { - cursor = "> " - style = selectedStyle + cursor = selectorStyle.Render("โ–ถ") + " " + descStyle = selectedStyle } // Pad name to 5 characters for alignment paddedName := fmt.Sprintf("%-5s", choice.name) - line := fmt.Sprintf("%s%s %s", cursor, choice.icon, paddedName) - if choice.description != "" { - line += " " + choice.description - } - b.WriteString(style.Render(line)) + // Name is always bold (titleStyle), description uses current selection style + b.WriteString(fmt.Sprintf("%s%s %s %s", cursor, choice.icon, titleStyle.Render(paddedName), descStyle.Render(choice.description))) if i < len(m.choices)-1 { b.WriteString("\n\n") } diff --git a/main.md b/main.md index 617b5e9..1b2a36e 100644 --- a/main.md +++ b/main.md @@ -35,7 +35,7 @@ When `github-brain` is run without arguments, display an interactive menu: โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ GitHub Brain / ๐Ÿ  Home 1.0.0 โ”‚ โ”‚ โ”‚ -โ”‚ > ๐Ÿ”ง Setup Configure GitHub username and organization โ”‚ +โ”‚ โ–ถ ๐Ÿ”ง Setup Configure GitHub username and organization โ”‚ โ”‚ ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ โ”‚ ๐Ÿšช Quit Ctrl+C โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ @@ -47,7 +47,7 @@ After login but no organization configured: โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ GitHub Brain / ๐Ÿ  Home ๐Ÿ‘ค @wham ยท 1.0.0 โ”‚ โ”‚ โ”‚ -โ”‚ > ๐Ÿ”ง Setup Configure GitHub username and organization โ”‚ +โ”‚ โ–ถ ๐Ÿ”ง Setup Configure GitHub username and organization โ”‚ โ”‚ ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ โ”‚ ๐Ÿšช Quit Ctrl+C โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ @@ -60,7 +60,7 @@ After successful login with organization configured: โ”‚ GitHub Brain / ๐Ÿ  Home ๐Ÿ‘ค @wham ยท ๐Ÿข my-org ยท 1.0.0 โ”‚ โ”‚ โ”‚ โ”‚ ๐Ÿ”ง Setup Configure GitHub username and organization โ”‚ -โ”‚ > ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ +โ”‚ โ–ถ ๐Ÿ”„ Pull Sync GitHub data to local database โ”‚ โ”‚ ๐Ÿšช Quit Ctrl+C โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ ``` @@ -84,7 +84,7 @@ Right side components (shown only when available): - Press Enter to select - Press Esc to go back (in submenus) - Press Ctrl+C to quit -- Highlight current selection with `>` +- Highlight current selection with `โ–ถ` (blue) ### Menu Items