@@ -64,37 +64,34 @@ type PR struct {
6464
6565// App holds the application state.
6666type App struct {
67+ lastSearchAttempt time.Time
6768 lastSuccessfulFetch time.Time
68- lastSearchAttempt time.Time // For rate limiting forced refreshes
69- lastMenuTitles []string // For change detection to prevent unnecessary redraws
7069 startTime time.Time
70+ systrayInterface SystrayInterface
71+ browserRateLimiter * BrowserRateLimiter
72+ blockedPRTimes map [string ]time.Time
73+ currentUser * github.User
74+ stateManager * PRStateManager
7175 client * github.Client
76+ hiddenOrgs map [string ]bool
77+ seenOrgs map [string ]bool
7278 turnClient * turn.Client
73- currentUser * github.User
74- stateManager * PRStateManager // NEW: Centralized state management
75- browserRateLimiter * BrowserRateLimiter
76- targetUser string
77- cacheDir string
79+ previousBlockedPRs map [string ]bool
7880 authError string
79- incoming []PR
81+ cacheDir string
82+ targetUser string
83+ lastMenuTitles []string
8084 outgoing []PR
85+ incoming []PR
8186 updateInterval time.Duration
8287 consecutiveFailures int
8388 mu sync.RWMutex
84- menuInitialized bool
85- initialLoadComplete bool
86- enableAudioCues bool
8789 enableAutoBrowser bool
8890 hideStaleIncoming bool
8991 noCache bool
90- systrayInterface SystrayInterface // For mocking systray operations in tests
91- hiddenOrgs map [string ]bool
92- seenOrgs map [string ]bool
93-
94- // Deprecated: These fields are kept for backward compatibility with tests
95- // The actual state is managed by stateManager
96- previousBlockedPRs map [string ]bool // Deprecated: use stateManager
97- blockedPRTimes map [string ]time.Time // Deprecated: use stateManager
92+ enableAudioCues bool
93+ initialLoadComplete bool
94+ menuInitialized bool
9895}
9996
10097func loadCurrentUser (ctx context.Context , app * App ) {
0 commit comments