Commit 2d007b1
fix(usage-analysis): prevent blank page on cold start and improve error handling (#661)
* fix(usage-analysis): prevent blank page on cold start and improve error handling
Fixes #658 — Usage Analysis tab could show nothing (stuck on loading
spinner or blank page) when:
- Background stats calculation failed with no feedback to the webview
- sanitizeStats dropped fields needed for rendering (locale, matrix,
missed potential, workspace paths, suppressed tools)
- bootstrap() had no error handling (blank page if toolkit import fails)
- No timeout for the loading state (spinner forever)
Changes:
- extension.ts: send updateStatsError to webview on calculation failure;
guard against stale async results posting into a recreated panel
- webview/usage/main.ts: sanitizeStats now validates and passes through
all fields; handle updateStatsError and null sanitization with error
message + refresh button; bootstrap wraps in .catch() with fallback;
30s non-fatal loading timeout with refresh hint
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(discovery): scan GitHub.copilot storage path for VS Code 1.117+ sessions
Starting with Copilot 1.117+, chat sessions are stored under
workspaceStorage/<hash>/GitHub.copilot/chatSessions/ instead of the
older GitHub.copilot-chat/chatSessions/ path. Users on the unified
Copilot extension (e.g. v0.45.x) had zero session data discovered.
Add GitHub.copilot and github.copilot (case-sensitive variant) to:
- workspaceStorage candidate list in discover()
- globalStorage recursive scan
- isCopilotChatSessionPath() path predicate
- Module doc comment discovery scope list
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent ebe5a5d commit 2d007b1
3 files changed
Lines changed: 112 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
247 | 250 | | |
248 | 251 | | |
249 | 252 | | |
250 | | - | |
| 253 | + | |
251 | 254 | | |
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
255 | 258 | | |
256 | 259 | | |
257 | 260 | | |
258 | | - | |
259 | | - | |
| 261 | + | |
| 262 | + | |
260 | 263 | | |
261 | 264 | | |
262 | 265 | | |
| |||
373 | 376 | | |
374 | 377 | | |
375 | 378 | | |
376 | | - | |
| 379 | + | |
377 | 380 | | |
378 | 381 | | |
379 | 382 | | |
| |||
383 | 386 | | |
384 | 387 | | |
385 | 388 | | |
| 389 | + | |
| 390 | + | |
386 | 391 | | |
387 | 392 | | |
388 | 393 | | |
| |||
418 | 423 | | |
419 | 424 | | |
420 | 425 | | |
421 | | - | |
422 | | - | |
| 426 | + | |
| 427 | + | |
423 | 428 | | |
424 | 429 | | |
425 | 430 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4137 | 4137 | | |
4138 | 4138 | | |
4139 | 4139 | | |
| 4140 | + | |
| 4141 | + | |
| 4142 | + | |
4140 | 4143 | | |
4141 | | - | |
| 4144 | + | |
4142 | 4145 | | |
4143 | 4146 | | |
4144 | 4147 | | |
| |||
4155 | 4158 | | |
4156 | 4159 | | |
4157 | 4160 | | |
| 4161 | + | |
| 4162 | + | |
| 4163 | + | |
| 4164 | + | |
| 4165 | + | |
| 4166 | + | |
4158 | 4167 | | |
4159 | 4168 | | |
4160 | 4169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
124 | 152 | | |
125 | 153 | | |
126 | 154 | | |
| |||
421 | 449 | | |
422 | 450 | | |
423 | 451 | | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
424 | 459 | | |
425 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
426 | 474 | | |
427 | 475 | | |
428 | 476 | | |
| |||
1446 | 1494 | | |
1447 | 1495 | | |
1448 | 1496 | | |
| 1497 | + | |
1449 | 1498 | | |
1450 | 1499 | | |
1451 | 1500 | | |
| |||
1458 | 1507 | | |
1459 | 1508 | | |
1460 | 1509 | | |
| 1510 | + | |
| 1511 | + | |
1461 | 1512 | | |
1462 | 1513 | | |
1463 | 1514 | | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
1464 | 1519 | | |
1465 | 1520 | | |
1466 | 1521 | | |
| |||
2008 | 2063 | | |
2009 | 2064 | | |
2010 | 2065 | | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
2011 | 2084 | | |
2012 | 2085 | | |
2013 | 2086 | | |
| |||
2027 | 2100 | | |
2028 | 2101 | | |
2029 | 2102 | | |
2030 | | - | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
0 commit comments