Documentation
¶
Index ¶
- func FormatReviewSummaryForMenu(summary *pullrequest.ReviewSummary) string
- type IgnoreMenuHandler
- type MenuAdapter
- func (m *MenuAdapter) ClearWaitingState()
- func (m *MenuAdapter) RegisterIgnoreHandler(handler IgnoreMenuHandler)
- func (m *MenuAdapter) SetThemeIcons(darkIcon, lightIcon []byte)
- func (m *MenuAdapter) Setup()
- func (m *MenuAdapter) SetupWaitingState(configFilePath string)
- func (m *MenuAdapter) Shutdown()
- func (m *MenuAdapter) UpdateDisplay(requestedReviewPRs, userCreatedPRs []*pullrequest.PullRequest, ...)
- type MenuItemPair
- type SystemThemeProvider
- type ThemeProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatReviewSummaryForMenu ¶
func FormatReviewSummaryForMenu(summary *pullrequest.ReviewSummary) string
FormatReviewSummaryForMenu returns a formatted string for display in the system tray menu. Groups reviewers by state:
- (✅ Joe, Mike | ❌ Alice) — approved and changes requested
- (✅ Joe) — only approved
- (💬 Bob) — only commented
Types ¶
type IgnoreMenuHandler ¶
type IgnoreMenuHandler func()
IgnoreMenuHandler is a callback for when the Ignore Rules menu item is clicked.
type MenuAdapter ¶
type MenuAdapter struct {
// contains filtered or unexported fields
}
MenuAdapter adapts the systray menu to the MenuPort interface
func NewMenuAdapter ¶
func NewMenuAdapter(maxNumberOfRepos, maxNumberOfPRs int, themeProvider ThemeProvider, authenticatedUser string) *MenuAdapter
NewMenuAdapter creates a new menu adapter
func (*MenuAdapter) ClearWaitingState ¶
func (m *MenuAdapter) ClearWaitingState()
ClearWaitingState hides the waiting-mode menu items so the normal PR menu can take over. Called when a valid config is detected.
func (*MenuAdapter) RegisterIgnoreHandler ¶
func (m *MenuAdapter) RegisterIgnoreHandler(handler IgnoreMenuHandler)
RegisterIgnoreHandler stores the callback to invoke when "Configuration > Ignore Rules" is clicked. It must be called before the first UpdateDisplay so that initializeMenuStructure can wire up the menu item at the right position.
func (*MenuAdapter) SetThemeIcons ¶
func (m *MenuAdapter) SetThemeIcons(darkIcon, lightIcon []byte)
SetThemeIcons sets the dark and light icons
func (*MenuAdapter) SetupWaitingState ¶
func (m *MenuAdapter) SetupWaitingState(configFilePath string)
SetupWaitingState shows a minimal systray menu indicating the app is waiting for a valid configuration. It displays the config file path and a quit button.
func (*MenuAdapter) UpdateDisplay ¶
func (m *MenuAdapter) UpdateDisplay(requestedReviewPRs, userCreatedPRs []*pullrequest.PullRequest, prTrackingRepo pullrequest.PRTrackingRepository)
UpdateDisplay implements the UIPort interface for systray menu display This adapter specifically renders PRs as a system tray menu with dropdowns
type MenuItemPair ¶
MenuItemPair represents a parent menu item with its children
type SystemThemeProvider ¶
type SystemThemeProvider struct{}
SystemThemeProvider implements ThemeProvider using system detection
func NewSystemThemeProvider ¶
func NewSystemThemeProvider() *SystemThemeProvider
NewSystemThemeProvider creates a new system theme provider
func (*SystemThemeProvider) GetSystemTheme ¶
func (p *SystemThemeProvider) GetSystemTheme() string
GetSystemTheme detects the system theme (dark or light) across platforms
type ThemeProvider ¶
type ThemeProvider interface {
GetSystemTheme() string
}
ThemeProvider provides the current system theme