Commit 1e6cb7e
authored
* feat: add authentication scope management for API and provisioning keys
* feat: refactor authentication scope management to use property accessors
* feat: enhance API key and provisioning key validation with improved error handling and UI feedback
* feat: update authentication handling to unify API and provisioning key fields with improved loading feedback
* feat: implement UI updates and event listeners for authentication scope changes and proxy settings
* feat: improve null safety and error handling in activity data processing and UI components
* feat: implement PKCE authentication flow with code exchange for API key
* feat: add OAuth app name constant for improved authorization flow clarity
* test: add comprehensive authentication tests for OpenRouterService
- Add PKCE auth code exchange tests
- Add API key validation tests
- Add provisioning key validation tests
- Add network error handling tests
- Use MockWebServer for realistic HTTP testing
These tests verify the authentication flow and error handling
that was refactored into helper classes.
refactor: integrate helper classes into SetupWizardDialog
- Replace inline PKCE logic with PkceAuthHandler (156 lines removed)
- Replace inline error handling with SetupWizardErrorHandler
- Replace PluginLogger calls with SetupWizardLogger
- Replace magic numbers with SetupWizardConfig constants
- Add proper cleanup in dispose() method
This integration reduces SetupWizardDialog from 1,194 to 1,048 lines
while improving maintainability and testability.
refactor: extract PKCE, error handling, logging, and config from SetupWizardDialog
- Extract PkceAuthHandler: 199-line dedicated OAuth/PKCE flow handler
- Extract SetupWizardConfig: centralize magic numbers and configuration
- Extract SetupWizardErrorHandler: standardize error handling with user-friendly messages
- Extract SetupWizardLogger: provide controlled logging with different levels
- Make OpenRouterService open and add baseUrlOverride for testability
This refactoring reduces complexity and improves maintainability while
maintaining all existing functionality. The original SetupWizardDialog
will be updated to use these helpers in a follow-up commit.
* feat: refactor endpoint methods in OpenRouterService for dynamic URL generation
* feat: add key validation for current auth scope and centralized error messages
* refactor: remove deprecated key validation methods and update endpoint logging
* feat: update auth scope to REGULAR and enhance logging for PKCE exchange process
* feat: synchronize authentication settings in OpenRouterSettingsPanel and enhance welcome notification formatting
* feat: release version 0.4.0 with OAuth/PKCE authentication flow, enhanced key validation, and UI improvements
* feat: implement settings migration for provisioning keys and update version to 0.4.0
* feat: implement dynamic plugin support with resource cleanup and lifecycle management
feat: add dynamic plugin support with resource cleanup and lifecycle management
* feat: refactor activity cost calculation and improve tooltip formatting in status bar
* feat: enhance dynamic plugin support tests with mocked dependencies and improved cleanup verification
1 parent 2db9859 commit 1e6cb7e
File tree
41 files changed
+3816
-577
lines changed- src
- main
- kotlin/org/zhavoronkov/openrouter
- constants
- listeners
- models
- proxy/servlets
- services
- settings
- settings
- startup
- statusbar
- toolwindow
- ui
- utils
- resources/META-INF
- test/kotlin/org/zhavoronkov/openrouter
- services
- settings
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
41 files changed
+3816
-577
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
8 | 99 | | |
9 | 100 | | |
10 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | 57 | | |
63 | 58 | | |
64 | 59 | | |
65 | 60 | | |
66 | | - | |
67 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
68 | 65 | | |
69 | 66 | | |
70 | 67 | | |
71 | | - | |
72 | | - | |
73 | 68 | | |
74 | 69 | | |
75 | 70 | | |
| |||
79 | 74 | | |
80 | 75 | | |
81 | 76 | | |
82 | | - | |
| 77 | + | |
83 | 78 | | |
84 | 79 | | |
85 | 80 | | |
86 | 81 | | |
87 | 82 | | |
88 | 83 | | |
89 | 84 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
95 | 91 | | |
96 | 92 | | |
97 | 93 | | |
| |||
142 | 138 | | |
143 | 139 | | |
144 | 140 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
149 | 145 | | |
150 | 146 | | |
151 | 147 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | 148 | | |
158 | 149 | | |
159 | 150 | | |
160 | | - | |
161 | | - | |
| 151 | + | |
| 152 | + | |
162 | 153 | | |
163 | 154 | | |
164 | 155 | | |
| |||
173 | 164 | | |
174 | 165 | | |
175 | 166 | | |
176 | | - | |
| 167 | + | |
177 | 168 | | |
178 | 169 | | |
179 | 170 | | |
| |||
183 | 174 | | |
184 | 175 | | |
185 | 176 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
193 | 207 | | |
194 | 208 | | |
195 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments