Commit f865bbb
fix: rebuild commands cache before broadcasting after install/uninstall
The previous fix added broadcastCommandsUpdated() after install, but the
launcher still showed the stale list. Root cause: invalidateCache()
stashes the old list as staleCommandsFallback so getAvailableCommands()
returns it immediately while a background discovery runs — the renderer's
follow-up get-commands fetch lands on that stale fallback and never
re-fetches when the background rebuild finishes. Await refreshCommandsNow()
between invalidate and broadcast so the cache is fresh before the
renderer asks for it.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 1db0781 commit f865bbb
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16195 | 16195 | | |
16196 | 16196 | | |
16197 | 16197 | | |
16198 | | - | |
| 16198 | + | |
| 16199 | + | |
| 16200 | + | |
| 16201 | + | |
16199 | 16202 | | |
| 16203 | + | |
16200 | 16204 | | |
16201 | 16205 | | |
16202 | 16206 | | |
| |||
16214 | 16218 | | |
16215 | 16219 | | |
16216 | 16220 | | |
16217 | | - | |
| 16221 | + | |
| 16222 | + | |
16218 | 16223 | | |
| 16224 | + | |
16219 | 16225 | | |
16220 | 16226 | | |
16221 | 16227 | | |
| |||
0 commit comments