RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Diff/sethrobinson-ugtlive-agents ↔ sethrobinson-ugtlive-cursor-rules-ui-ux-patterns

Comparison

A · AGENTS.md · SethRobinson/UGTLiveB · Cursor rules · SethRobinson/UGTLive
What each file covers, counted
DimensionSharedOnly in AOnly in BOverlap
Sections07440%
Commands0300%
Section tags14411%

What each file covers

Sections

0 shared · 7 only in A · 44 only in B
  • − AGENTS.md
  • − Shared Project Memory
  • − Testing
  • − Cloud LLM Model Maintenance
  • − Feature Index
  • − Security
  • − Git
  • + UI/UX Patterns and Window Management Guide
  • + Window Architecture
  • + Window Types
  • + Keyboard Shortcuts ([src/HotkeyManager.cs](mdc:src/HotkeyManager.cs))
  • + Global Shortcuts
  • + Implementation Pattern
  • + Hotkey Configuration
  • + UI Design Patterns
  • + Window Lifecycle
  • + Common Window Properties
  • + Styling Conventions
  • + ChatBox Customization
  • + Appearance Settings ([src/ChatBoxOptionsWindow.xaml](mdc:src/ChatBoxOptionsWindow.xaml))
  • + Layout Options
  • + Settings Organization
  • + Tab Structure in Settings Window
  • + Settings Pattern
  • + Mouse Interaction ([src/MouseManager.cs](mdc:src/MouseManager.cs))
  • + Region Selection
  • + Window Dragging
  • + Notification Patterns
  • + Status Messages
  • + Error Handling UI
  • + Accessibility Considerations
  • + Keyboard Navigation
  • + Visual Accessibility
  • + Performance UI Guidelines
  • + Responsive Design
  • + Update Patterns
  • + Window State Management
  • + Saving Window State
  • + Multi-Monitor Support
  • + Custom Controls
  • + Draggable Thumb Control
  • + Color Picker Integration
  • + Animation Guidelines
  • + Fade Animations
  • + Smooth Transitions
  • + Service Management UI
  • + Service Installation Dialog
  • + Service Diagnostics
  • + Dialog Patterns
  • + Modal Dialogs
  • + Confirmation Dialogs

Commands

0 shared · 3 only in A · 0 only in B
  • − dotnet build .\UGTLive.sln --configuration Release
  • − git commit
  • − git push

Section tags

1 shared · 4 only in A · 4 only in B
  • − test
  • − git-pr
  • − security
  • − do-not
  • + code-style
  • + architecture
  • + types
  • + ui
  •   performance

Line diff

+296 added−38 removed17 unchanged5.4% identical
SethRobinson/UGTLive · AGENTS.md
@@ −1 @@
1# AGENTS.md
 
 
 
 
2 
3Project operating instructions for AI assistants working in this repository.
4 
5## Shared Project Memory
6 
7- At the start of each new task or thread involving this repository, read this file before inspecting files, running commands, making a plan, or taking any other project action.
8- Treat follow-up replies in the same continuous task as part of that task. Do not reread this file unless the repository or working directory changes, this file is modified, or its instructions are no longer available in context.
9- Treat this file as the shared project memory for AI assistants.
10- Do not rely on vendor-specific, proprietary, or hidden memory systems for project facts, preferences, or operating instructions. (except to remember to ALWAYS read this file first before doing anything. Remember that.)
11- Update this file with important repo-specific information learned during work, including build commands, test commands, conventions, decisions, pitfalls, and current project preferences.
12- Keep this file accurate and current. Remove or correct stale, misleading, or incorrect information when discovered.
13- If information is temporary or uncertain, label it clearly rather than presenting it as permanent fact.
14 
15Scope policy: this file holds cross-cutting rules, workflows, and gotchas that most sessions need, plus a feature index. Keep it around 30 KB. Feature deep-dives live in `docs/<topic>.md`: before working on a feature listed in the index, read its doc; when finishing feature work, update that doc and keep the index entry here to one or two lines (where it lives + the non-obvious constraint). Cross-cutting rules and new gotchas still land here directly. When a change makes anything stale, here or in a linked doc, update it in the same change.
 
 
 
 
16 
17## Testing
 
 
 
18 
19- When possible, design automated tests for new features and bug fixes.
20- Run relevant automated tests after finishing changes to guard against regressions.
21- If tests cannot be run or do not exist, state that clearly in the handoff and describe any manual verification performed.
22- Always finish project changes by building the Release configuration: `dotnet build .\UGTLive.sln --configuration Release`.
23- If a running UGTLive process prevents the Release build, capture its executable/command line, stop it, complete the build, and restart it afterward. Do not start UGTLive if it was not running before the build.
24 
25Always add automation/test harnesses to test options/buttons/features as needed. Document them.
 
 
 
 
26 
27## Cloud LLM Model Maintenance
 
 
 
28 
29- Cloud and CLI model picker presets live in `src/SettingsWindow.xaml`; their fallback/default values live in `src/ConfigManager.cs`, `src/ConfigManager.Translation.cs`, and `src/SettingsWindow.TranslationSettings.cs`.
30- Subscription-backed CLI providers display as `Anthropic Sub`, `OpenAI Sub`, and `Gemini CLI (Enterprise)`, but their stable internal IDs remain `ClaudeCli`, `CodexCli`, and `GeminiCli`; use `ComboBoxItem.Tag` for the internal ID. Google ended personal/free/AI Pro/AI Ultra access through Gemini CLI on June 18, 2026; do not replace it with Antigravity CLI until `agy -p` reliably exposes captured stdout to Windows parent processes (see `docs/settings-connection-tests.md`).
31- Keep provider-specific capability handling in the matching translation service. In particular, Anthropic model generations use different manual/adaptive thinking request shapes.
32- Verify model IDs and request compatibility against current official provider documentation. Verify OpenRouter-prefixed slugs against its `/api/v1/models` catalog before adding presets.
33 
34## Feature Index
 
35 
36- Settings API/model/voice tests: see `docs/settings-connection-tests.md`. UI buttons and `--test-settings-connection` must continue to call the shared `SettingsConnectionTester` implementation.
37- OpenAI All In One Snap translation: see `docs/openai-all-in-one.md`. It is a Snap-only, visual-only `gpt-image-2` Image Edits path; Auto and realtime processing must remain on the standard OCR pipeline.
 
 
 
 
 
 
 
 
 
 
 
 
38 
 
 
 
 
 
39 
40## Security
 
41 
42- Never commit sensitive data, including credentials, tokens, passwords, private keys, cookies, customer data, personal data, or machine-specific authentication material.
43- If an AI assistant needs authentication data or other secrets for local work, use `agents_secret.md` for those notes.
44- `agents_secret.md` must stay ignored by git and must not be committed.
45- Do not put secrets in commit messages, logs, issue text, pull request descriptions, generated docs, or other tracked files.
46- Configuration logging must pass key names through `ConfigManager.IsSensitiveConfigKey`; never print raw secret values in startup or harness output.
47- Before committing, review staged changes for accidental secrets.
48 
49## Git
50 
51- Never add OpenAI/Codex/Claude etc as a co-author on git commits.
52- NEVER `git commit` unless explicitly told to commit.
53- NEVER `git push` unless explicitly told to push. "Commit" means commit
54 locally only; committing is not permission to push.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55 
SethRobinson/UGTLive · .cursor/rules/ui-ux-patterns.mdc
@@ +1 @@
1---
2description: UI/UX patterns and window management guide
3globs: ["**/*.xaml", "**/*.xaml.cs"]
4alwaysApply: false
5---
6 
7# UI/UX Patterns and Window Management Guide
8 
9## Window Architecture
10 
11### Window Types
12UGTLive uses several specialized windows, each with specific responsibilities:
 
 
 
 
 
13 
141. **Main Window** ([src/MainWindow.xaml](mdc:src/MainWindow.xaml))
15 - Central control panel
16 - Start/Stop translation
17 - Access to all other windows
18 - System tray integration
19 
202. **Monitor Window** ([src/MonitorWindow.xaml](mdc:src/MonitorWindow.xaml))
21 - Live preview of capture area
22 - Visual OCR feedback
23 - Resizable and movable
24 
253. **ChatBox Window** ([src/ChatBoxWindow.xaml](mdc:src/ChatBoxWindow.xaml))
26 - Translation display overlay
27 - Always-on-top option
28 - Customizable appearance
 
29 
304. **Settings Window** ([src/SettingsWindow.xaml](mdc:src/SettingsWindow.xaml))
31 - Tabbed interface for all settings
32 - API key management
33 - Service configuration
34 - OCR and translation settings
35 
365. **Log Window** ([src/LogWindow.xaml](mdc:src/LogWindow.xaml))
37 - Application log viewer
38 - Real-time log updates
39 - Filtering and search
40 
41## Keyboard Shortcuts ([src/HotkeyManager.cs](mdc:src/HotkeyManager.cs))
 
 
 
42 
43### Global Shortcuts
44All shortcuts are managed through HotkeyManager and configurable via hotkeys.txt:
45 
46| Action | Default | Event |
47|--------|---------|-------|
48| Start/Stop OCR | Shift+S | `StartStopRequested` |
49| Show/Hide Monitor | Shift+M | `MonitorToggleRequested` |
50| Show/Hide ChatBox | Shift+C | `ChatBoxToggleRequested` |
51| Show/Hide Settings | Shift+P | `SettingsToggleRequested` |
52| Show/Hide Log | Shift+L | `LogToggleRequested` |
53| Show/Hide Main Window | Shift+H | `MainWindowVisibilityToggleRequested` |
54| Clear Overlays | Shift+X | `ClearOverlaysRequested` |
55| Passthrough Toggle | Shift+T | `PassthroughToggleRequested` |
56| Overlay Mode Toggle | Shift+O | `OverlayModeToggleRequested` |
57| Listen Toggle | Shift+A | `ListenToggleRequested` |
58| View in Browser | Shift+B | `ViewInBrowserRequested` |
59| Play All Audio | Shift+W | `PlayAllAudioRequested` |
60 
61### Implementation Pattern
62```csharp
63// Register hotkey events
64HotkeyManager.Instance.StartStopRequested += OnStartStopRequested;
65HotkeyManager.Instance.MonitorToggleRequested += OnMonitorToggleRequested;
66 
67// Hotkeys are loaded from hotkeys.txt and can be customized
68```
69 
70### Hotkey Configuration
71Hotkeys are stored in `hotkeys.txt` with format:
72```
73action=key1+key2+key3
74```
 
75 
76## UI Design Patterns
77 
78### Window Lifecycle
791. **Creation**: Windows created once at startup
802. **Visibility**: Show/Hide instead of Create/Destroy
813. **State Persistence**: Position and size saved via ConfigManager
824. **Cleanup**: Proper disposal on application exit
83 
84### Common Window Properties
85```xml
86<!-- Standard window attributes -->
87WindowStyle="None"
88AllowsTransparency="True"
89ResizeMode="CanResize"
90Topmost="{Binding IsAlwaysOnTop}"
91```
92 
93### Styling Conventions
94 
95#### Colors and Themes
96- Dark theme by default
97- Configurable accent colors
98- Semi-transparent backgrounds
99- High contrast text
100 
101#### Standard Controls
102```xml
103<!-- Button Style -->
104<Button Style="{StaticResource ModernButton}"
105 Background="#FF2D2D30"
106 Foreground="White"
107 BorderThickness="0"/>
108 
109<!-- TextBox Style -->
110<TextBox Style="{StaticResource ModernTextBox}"
111 Background="#FF3F3F46"
112 Foreground="White"
113 BorderBrush="#FF007ACC"/>
114```
115 
116## ChatBox Customization
117 
118### Appearance Settings ([src/ChatBoxOptionsWindow.xaml](mdc:src/ChatBoxOptionsWindow.xaml))
119- Background color picker
120- Text color picker
121- Transparency slider (0-100%)
122- Font family and size
123- Border options
124 
125### Layout Options
126- Auto-size to content
127- Maximum width/height
128- Text alignment
129- Padding configuration
130 
131## Settings Organization
132 
133### Tab Structure in Settings Window
1341. **General**: Basic app settings, hotkeys
1352. **OCR**: OCR service selection and config
1363. **Translation**: Service selection and API keys
1374. **ChatBox**: Display preferences
1385. **Audio**: TTS settings and voice selection
1396. **Advanced**: Debug and experimental features
140 
141### Settings Pattern
142```csharp
143// Property in ConfigManager
144public string GetSetting() => GetValue(SETTING_KEY, defaultValue);
145public void SetSetting(string value)
146{
147 SetValue(SETTING_KEY, value);
148 SaveConfig();
149}
150 
151// UI Binding in XAML
152<TextBox Text="{Binding SettingName, Mode=TwoWay}"/>
153```
154 
155## Mouse Interaction ([src/MouseManager.cs](mdc:src/MouseManager.cs))
156 
157### Region Selection
158- Click and drag to select area
159- Visual feedback during selection
160- Escape key to cancel
161- Double-click to confirm
162 
163### Window Dragging
164- Custom title bar implementation
165- Drag from any empty area
166- Snap to screen edges
167 
168## Notification Patterns
169 
170### Status Messages
171- Displayed in main window status bar
172- Auto-fade after 3 seconds
173- Color-coded by type (info, warning, error)
174 
175### Error Handling UI
176```csharp
177// Show error via ErrorPopupManager
178ErrorPopupManager.ShowError("Error Title", "Error message");
179 
180// Or show in UI
181Application.Current.Dispatcher.Invoke(() =>
182{
183 StatusText.Text = $"Error: {message}";
184 StatusText.Foreground = Brushes.Red;
185});
186```
187 
188## Accessibility Considerations
189 
190### Keyboard Navigation
191- Tab order properly set
192- All functions keyboard accessible
193- Tooltips for all controls
194- Keyboard shortcuts documented
195 
196### Visual Accessibility
197- High contrast mode support
198- Configurable font sizes
199- Color customization
200- Clear visual feedback
201 
202## Performance UI Guidelines
203 
204### Responsive Design
205- Async operations for long tasks
206- Progress indicators
207- Non-blocking UI updates
208- Smooth animations
209 
210### Update Patterns
211```csharp
212// UI updates from background thread
213Application.Current.Dispatcher.Invoke(() =>
214{
215 // Update UI elements
216}, DispatcherPriority.Background);
217```
218 
219## Window State Management
220 
221### Saving Window State
222```csharp
223// On window closing
224ConfigManager.Instance.SetWindowPosition(
225 windowName, this.Left, this.Top,
226 this.Width, this.Height);
227 
228// On window loading
229var pos = ConfigManager.Instance.GetWindowPosition(windowName);
230if (pos != null)
231{
232 this.Left = pos.X;
233 this.Top = pos.Y;
234 this.Width = pos.Width;
235 this.Height = pos.Height;
236}
237```
238 
239### Multi-Monitor Support
240- Remember which monitor
241- Handle monitor disconnection
242- Validate window positions
243- Prevent off-screen windows
244 
245## Custom Controls
246 
247### Draggable Thumb Control
248Used for resizing regions and windows:
249```xml
250<Thumb DragDelta="Thumb_DragDelta"
251 Width="10" Height="10"
252 Cursor="SizeNWSE"/>
253```
254 
255### Color Picker Integration
256- Uses standard WPF color dialog
257- Preview of selected color
258- Saves recent colors
259- Hex value display
260 
261## Animation Guidelines
262 
263### Fade Animations
264```xml
265<Storyboard x:Key="FadeIn">
266 <DoubleAnimation
267 Storyboard.TargetProperty="Opacity"
268 From="0" To="1" Duration="0:0:0.3"/>
269</Storyboard>
270```
271 
272### Smooth Transitions
273- 300ms standard duration
274- Ease-in-out timing function
275- Avoid jarring movements
276- Respect reduced motion preference
277 
278## Service Management UI
279 
280### Service Installation Dialog
281- Shows available Python OCR services
282- Installation progress
283- Error handling and diagnostics
284 
285### Service Diagnostics
286- Health check status
287- Port availability
288- Service logs
289- Test image processing
290 
291## Dialog Patterns
292 
293### Modal Dialogs
294```csharp
295var dialog = new SettingsWindow();
296dialog.Owner = this;
297dialog.ShowDialog(); // Blocks until closed
298```
299 
300### Confirmation Dialogs
301```csharp
302var result = MessageBox.Show(
303 "Are you sure you want to delete this?",
304 "Confirm",
305 MessageBoxButton.YesNo,
306 MessageBoxImage.Question);
307 
308if (result == MessageBoxResult.Yes)
309{
310 // Perform action
311}
312```
313 
@@ −1 +1 @@
1−# AGENTS.md
1+---
2+description: UI/UX patterns and window management guide
3+globs: ["**/*.xaml", "**/*.xaml.cs"]
4+alwaysApply: false
5+---
26  
3−Project operating instructions for AI assistants working in this repository.
7+# UI/UX Patterns and Window Management Guide
48  
5−## Shared Project Memory
9+## Window Architecture
610  
7−- At the start of each new task or thread involving this repository, read this file before inspecting files, running commands, making a plan, or taking any other project action.
8−- Treat follow-up replies in the same continuous task as part of that task. Do not reread this file unless the repository or working directory changes, this file is modified, or its instructions are no longer available in context.
9−- Treat this file as the shared project memory for AI assistants.
10−- Do not rely on vendor-specific, proprietary, or hidden memory systems for project facts, preferences, or operating instructions. (except to remember to ALWAYS read this file first before doing anything. Remember that.)
11−- Update this file with important repo-specific information learned during work, including build commands, test commands, conventions, decisions, pitfalls, and current project preferences.
12−- Keep this file accurate and current. Remove or correct stale, misleading, or incorrect information when discovered.
13−- If information is temporary or uncertain, label it clearly rather than presenting it as permanent fact.
11+### Window Types
12+UGTLive uses several specialized windows, each with specific responsibilities:
1413  
15−Scope policy: this file holds cross-cutting rules, workflows, and gotchas that most sessions need, plus a feature index. Keep it around 30 KB. Feature deep-dives live in `docs/<topic>.md`: before working on a feature listed in the index, read its doc; when finishing feature work, update that doc and keep the index entry here to one or two lines (where it lives + the non-obvious constraint). Cross-cutting rules and new gotchas still land here directly. When a change makes anything stale, here or in a linked doc, update it in the same change.
14+1. **Main Window** ([src/MainWindow.xaml](mdc:src/MainWindow.xaml))
15+ - Central control panel
16+ - Start/Stop translation
17+ - Access to all other windows
18+ - System tray integration
1619  
17−## Testing
20+2. **Monitor Window** ([src/MonitorWindow.xaml](mdc:src/MonitorWindow.xaml))
21+ - Live preview of capture area
22+ - Visual OCR feedback
23+ - Resizable and movable
1824  
19−- When possible, design automated tests for new features and bug fixes.
20−- Run relevant automated tests after finishing changes to guard against regressions.
21−- If tests cannot be run or do not exist, state that clearly in the handoff and describe any manual verification performed.
22−- Always finish project changes by building the Release configuration: `dotnet build .\UGTLive.sln --configuration Release`.
23−- If a running UGTLive process prevents the Release build, capture its executable/command line, stop it, complete the build, and restart it afterward. Do not start UGTLive if it was not running before the build.
25+3. **ChatBox Window** ([src/ChatBoxWindow.xaml](mdc:src/ChatBoxWindow.xaml))
26+ - Translation display overlay
27+ - Always-on-top option
28+ - Customizable appearance
2429  
25−Always add automation/test harnesses to test options/buttons/features as needed. Document them.
30+4. **Settings Window** ([src/SettingsWindow.xaml](mdc:src/SettingsWindow.xaml))
31+ - Tabbed interface for all settings
32+ - API key management
33+ - Service configuration
34+ - OCR and translation settings
2635  
27−## Cloud LLM Model Maintenance
36+5. **Log Window** ([src/LogWindow.xaml](mdc:src/LogWindow.xaml))
37+ - Application log viewer
38+ - Real-time log updates
39+ - Filtering and search
2840  
29−- Cloud and CLI model picker presets live in `src/SettingsWindow.xaml`; their fallback/default values live in `src/ConfigManager.cs`, `src/ConfigManager.Translation.cs`, and `src/SettingsWindow.TranslationSettings.cs`.
30−- Subscription-backed CLI providers display as `Anthropic Sub`, `OpenAI Sub`, and `Gemini CLI (Enterprise)`, but their stable internal IDs remain `ClaudeCli`, `CodexCli`, and `GeminiCli`; use `ComboBoxItem.Tag` for the internal ID. Google ended personal/free/AI Pro/AI Ultra access through Gemini CLI on June 18, 2026; do not replace it with Antigravity CLI until `agy -p` reliably exposes captured stdout to Windows parent processes (see `docs/settings-connection-tests.md`).
31−- Keep provider-specific capability handling in the matching translation service. In particular, Anthropic model generations use different manual/adaptive thinking request shapes.
32−- Verify model IDs and request compatibility against current official provider documentation. Verify OpenRouter-prefixed slugs against its `/api/v1/models` catalog before adding presets.
41+## Keyboard Shortcuts ([src/HotkeyManager.cs](mdc:src/HotkeyManager.cs))
3342  
34−## Feature Index
43+### Global Shortcuts
44+All shortcuts are managed through HotkeyManager and configurable via hotkeys.txt:
3545  
36−- Settings API/model/voice tests: see `docs/settings-connection-tests.md`. UI buttons and `--test-settings-connection` must continue to call the shared `SettingsConnectionTester` implementation.
37−- OpenAI All In One Snap translation: see `docs/openai-all-in-one.md`. It is a Snap-only, visual-only `gpt-image-2` Image Edits path; Auto and realtime processing must remain on the standard OCR pipeline.
46+| Action | Default | Event |
47+|--------|---------|-------|
48+| Start/Stop OCR | Shift+S | `StartStopRequested` |
49+| Show/Hide Monitor | Shift+M | `MonitorToggleRequested` |
50+| Show/Hide ChatBox | Shift+C | `ChatBoxToggleRequested` |
51+| Show/Hide Settings | Shift+P | `SettingsToggleRequested` |
52+| Show/Hide Log | Shift+L | `LogToggleRequested` |
53+| Show/Hide Main Window | Shift+H | `MainWindowVisibilityToggleRequested` |
54+| Clear Overlays | Shift+X | `ClearOverlaysRequested` |
55+| Passthrough Toggle | Shift+T | `PassthroughToggleRequested` |
56+| Overlay Mode Toggle | Shift+O | `OverlayModeToggleRequested` |
57+| Listen Toggle | Shift+A | `ListenToggleRequested` |
58+| View in Browser | Shift+B | `ViewInBrowserRequested` |
59+| Play All Audio | Shift+W | `PlayAllAudioRequested` |
3860  
61+### Implementation Pattern
62+```csharp
63+// Register hotkey events
64+HotkeyManager.Instance.StartStopRequested += OnStartStopRequested;
65+HotkeyManager.Instance.MonitorToggleRequested += OnMonitorToggleRequested;
3966  
40−## Security
67+// Hotkeys are loaded from hotkeys.txt and can be customized
68+```
4169  
42−- Never commit sensitive data, including credentials, tokens, passwords, private keys, cookies, customer data, personal data, or machine-specific authentication material.
43−- If an AI assistant needs authentication data or other secrets for local work, use `agents_secret.md` for those notes.
44−- `agents_secret.md` must stay ignored by git and must not be committed.
45−- Do not put secrets in commit messages, logs, issue text, pull request descriptions, generated docs, or other tracked files.
46−- Configuration logging must pass key names through `ConfigManager.IsSensitiveConfigKey`; never print raw secret values in startup or harness output.
47−- Before committing, review staged changes for accidental secrets.
70+### Hotkey Configuration
71+Hotkeys are stored in `hotkeys.txt` with format:
72+```
73+action=key1+key2+key3
74+```
4875  
49−## Git
76+## UI Design Patterns
5077  
51−- Never add OpenAI/Codex/Claude etc as a co-author on git commits.
52−- NEVER `git commit` unless explicitly told to commit.
53−- NEVER `git push` unless explicitly told to push. "Commit" means commit
54− locally only; committing is not permission to push.
78+### Window Lifecycle
79+1. **Creation**: Windows created once at startup
80+2. **Visibility**: Show/Hide instead of Create/Destroy
81+3. **State Persistence**: Position and size saved via ConfigManager
82+4. **Cleanup**: Proper disposal on application exit
83+ 
84+### Common Window Properties
85+```xml
86+<!-- Standard window attributes -->
87+WindowStyle="None"
88+AllowsTransparency="True"
89+ResizeMode="CanResize"
90+Topmost="{Binding IsAlwaysOnTop}"
91+```
92+ 
93+### Styling Conventions
94+ 
95+#### Colors and Themes
96+- Dark theme by default
97+- Configurable accent colors
98+- Semi-transparent backgrounds
99+- High contrast text
100+ 
101+#### Standard Controls
102+```xml
103+<!-- Button Style -->
104+<Button Style="{StaticResource ModernButton}"
105+ Background="#FF2D2D30"
106+ Foreground="White"
107+ BorderThickness="0"/>
108+ 
109+<!-- TextBox Style -->
110+<TextBox Style="{StaticResource ModernTextBox}"
111+ Background="#FF3F3F46"
112+ Foreground="White"
113+ BorderBrush="#FF007ACC"/>
114+```
115+ 
116+## ChatBox Customization
117+ 
118+### Appearance Settings ([src/ChatBoxOptionsWindow.xaml](mdc:src/ChatBoxOptionsWindow.xaml))
119+- Background color picker
120+- Text color picker
121+- Transparency slider (0-100%)
122+- Font family and size
123+- Border options
124+ 
125+### Layout Options
126+- Auto-size to content
127+- Maximum width/height
128+- Text alignment
129+- Padding configuration
130+ 
131+## Settings Organization
132+ 
133+### Tab Structure in Settings Window
134+1. **General**: Basic app settings, hotkeys
135+2. **OCR**: OCR service selection and config
136+3. **Translation**: Service selection and API keys
137+4. **ChatBox**: Display preferences
138+5. **Audio**: TTS settings and voice selection
139+6. **Advanced**: Debug and experimental features
140+ 
141+### Settings Pattern
142+```csharp
143+// Property in ConfigManager
144+public string GetSetting() => GetValue(SETTING_KEY, defaultValue);
145+public void SetSetting(string value)
146+{
147+ SetValue(SETTING_KEY, value);
148+ SaveConfig();
149+}
150+ 
151+// UI Binding in XAML
152+<TextBox Text="{Binding SettingName, Mode=TwoWay}"/>
153+```
154+ 
155+## Mouse Interaction ([src/MouseManager.cs](mdc:src/MouseManager.cs))
156+ 
157+### Region Selection
158+- Click and drag to select area
159+- Visual feedback during selection
160+- Escape key to cancel
161+- Double-click to confirm
162+ 
163+### Window Dragging
164+- Custom title bar implementation
165+- Drag from any empty area
166+- Snap to screen edges
167+ 
168+## Notification Patterns
169+ 
170+### Status Messages
171+- Displayed in main window status bar
172+- Auto-fade after 3 seconds
173+- Color-coded by type (info, warning, error)
174+ 
175+### Error Handling UI
176+```csharp
177+// Show error via ErrorPopupManager
178+ErrorPopupManager.ShowError("Error Title", "Error message");
179+ 
180+// Or show in UI
181+Application.Current.Dispatcher.Invoke(() =>
182+{
183+ StatusText.Text = $"Error: {message}";
184+ StatusText.Foreground = Brushes.Red;
185+});
186+```
187+ 
188+## Accessibility Considerations
189+ 
190+### Keyboard Navigation
191+- Tab order properly set
192+- All functions keyboard accessible
193+- Tooltips for all controls
194+- Keyboard shortcuts documented
195+ 
196+### Visual Accessibility
197+- High contrast mode support
198+- Configurable font sizes
199+- Color customization
200+- Clear visual feedback
201+ 
202+## Performance UI Guidelines
203+ 
204+### Responsive Design
205+- Async operations for long tasks
206+- Progress indicators
207+- Non-blocking UI updates
208+- Smooth animations
209+ 
210+### Update Patterns
211+```csharp
212+// UI updates from background thread
213+Application.Current.Dispatcher.Invoke(() =>
214+{
215+ // Update UI elements
216+}, DispatcherPriority.Background);
217+```
218+ 
219+## Window State Management
220+ 
221+### Saving Window State
222+```csharp
223+// On window closing
224+ConfigManager.Instance.SetWindowPosition(
225+ windowName, this.Left, this.Top,
226+ this.Width, this.Height);
227+ 
228+// On window loading
229+var pos = ConfigManager.Instance.GetWindowPosition(windowName);
230+if (pos != null)
231+{
232+ this.Left = pos.X;
233+ this.Top = pos.Y;
234+ this.Width = pos.Width;
235+ this.Height = pos.Height;
236+}
237+```
238+ 
239+### Multi-Monitor Support
240+- Remember which monitor
241+- Handle monitor disconnection
242+- Validate window positions
243+- Prevent off-screen windows
244+ 
245+## Custom Controls
246+ 
247+### Draggable Thumb Control
248+Used for resizing regions and windows:
249+```xml
250+<Thumb DragDelta="Thumb_DragDelta"
251+ Width="10" Height="10"
252+ Cursor="SizeNWSE"/>
253+```
254+ 
255+### Color Picker Integration
256+- Uses standard WPF color dialog
257+- Preview of selected color
258+- Saves recent colors
259+- Hex value display
260+ 
261+## Animation Guidelines
262+ 
263+### Fade Animations
264+```xml
265+<Storyboard x:Key="FadeIn">
266+ <DoubleAnimation
267+ Storyboard.TargetProperty="Opacity"
268+ From="0" To="1" Duration="0:0:0.3"/>
269+</Storyboard>
270+```
271+ 
272+### Smooth Transitions
273+- 300ms standard duration
274+- Ease-in-out timing function
275+- Avoid jarring movements
276+- Respect reduced motion preference
277+ 
278+## Service Management UI
279+ 
280+### Service Installation Dialog
281+- Shows available Python OCR services
282+- Installation progress
283+- Error handling and diagnostics
284+ 
285+### Service Diagnostics
286+- Health check status
287+- Port availability
288+- Service logs
289+- Test image processing
290+ 
291+## Dialog Patterns
292+ 
293+### Modal Dialogs
294+```csharp
295+var dialog = new SettingsWindow();
296+dialog.Owner = this;
297+dialog.ShowDialog(); // Blocks until closed
298+```
299+ 
300+### Confirmation Dialogs
301+```csharp
302+var result = MessageBox.Show(
303+ "Are you sure you want to delete this?",
304+ "Confirm",
305+ MessageBoxButton.YesNo,
306+ MessageBoxImage.Question);
307+ 
308+if (result == MessageBoxResult.Yes)
309+{
310+ // Perform action
311+}
312+```
55313  
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack