fix(ext/sw): null gitHost on explicit lock (Plan C Phase 6)
The explicit lock message handler nulled state.manifest but left state.gitHost (now carrying the cached lastSyncAt) intact, so a lock then re-unlock within one service-worker lifetime surfaced a stale sync time. Null gitHost here too — symmetric with the session-expiry path (index.ts) and completing Plan C Phase 5's don't-leak-git-host-across-a-lock intent; unlock rebuilds it on demand. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -59,6 +59,9 @@ export async function handle(
|
|||||||
case 'lock':
|
case 'lock':
|
||||||
session.clearCurrent();
|
session.clearCurrent();
|
||||||
state.manifest = null;
|
state.manifest = null;
|
||||||
|
// Don't leak the cached git-host (incl. lastSyncAt) across a lock —
|
||||||
|
// symmetric with the session-expiry path (index.ts); unlock rebuilds it.
|
||||||
|
state.gitHost = null;
|
||||||
return { ok: true };
|
return { ok: true };
|
||||||
|
|
||||||
case 'list_items': {
|
case 'list_items': {
|
||||||
|
|||||||
Reference in New Issue
Block a user