Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 14 additions & 16 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5891,10 +5891,10 @@ func newSetupMenuModel(homeDir, username, organization string) setupMenuModel {
username: username,
organization: organization,
choices: []menuChoice{
{icon: "🔗", name: "Login with GitHub (OAuth)", description: ""},
{icon: "🔑", name: "Login with Personal Access Token", description: ""},
{icon: "📄", name: "Open configuration file", description: ""},
{icon: "", name: "Back", description: ""},
{icon: "", name: "Login with code", description: "Recommended for organization owners"},
{icon: "🔑", name: "Login with PAT", description: "Works without organization ownership"},
{icon: "📝", name: "Advanced", description: "Edit configuration file"},
{icon: "🔙", name: "Back", description: "Esc"},
},
cursor: 0,
width: 80,
Expand Down Expand Up @@ -5966,26 +5966,24 @@ func (m setupMenuModel) View() string {
b.WriteString(renderTitleBar("🔧 Setup", m.username, m.organization, innerWidth) + "\n")
b.WriteString("\n")

// Menu items
// Menu items - same format as Home screen
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
}
line := fmt.Sprintf("%s%s %s", cursor, choice.icon, choice.name)
b.WriteString(style.Render(line) + "\n")
// Pad name to 15 characters for alignment
paddedName := fmt.Sprintf("%-15s", choice.name)
// 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")
b.WriteString("\n\n")
}
}

b.WriteString("\n")

// Help text
b.WriteString(dimStyle.Render("Press Enter to select, Esc to go back") + "\n")

// Create border style
borderStyle := lipgloss.NewStyle().
Border(lipgloss.RoundedBorder()).
Expand Down
23 changes: 10 additions & 13 deletions main.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,26 +111,23 @@ The Setup submenu provides authentication and configuration options:

```
╭────────────────────────────────────────────────────────────────╮
│ GitHub Brain 1.0.0 / 🔧 Setup 👤 Not logged in │
│ │
│ > 🔗 Login with GitHub (OAuth) │
│ 🔑 Login with Personal Access Token │
│ 📄 Open configuration file │
│ ← Back │
│ │
│ Press Enter to select, Esc to go back │
│ GitHub Brain / 🔧 Setup 👤 Not logged in │
│ │
│ ▶ ✨ Login with code Recommended for organization owners │
│ 🔑 Login with PAT Works without organization ownership │
│ 📝 Advanced Edit configuration file │
│ ↩️ Back Esc │
╰────────────────────────────────────────────────────────────────╯
```

### Setup Menu Items

1. **🔗 Login with GitHub (OAuth)** - Runs the OAuth device flow (see [OAuth Login](#oauth-login) section)
2. **🔑 Login with Personal Access Token** - Manually enter a PAT (see [PAT Login](#pat-login) section)
3. **📄 Open configuration file** - Opens `.env` file in default editor
4. ** Back** - Return to main menu
1. ** Login with code** - Recommended for organization owners. Runs the OAuth device flow (see [OAuth Login](#oauth-login) section)
2. **🔑 Login with PAT** - Works without organization ownership. Manually enter a PAT (see [PAT Login](#pat-login) section)
3. **📝 Advanced** - Edit configuration file `{HomeDir}/.env`
4. **↩️ Back** - Return to main menu (Esc)

### Open Configuration File
### Open Configuration File (Advanced)

Opens the `.env` file located at `{HomeDir}/.env` using the system default editor:

Expand Down