fix: address remaining review feedback

- Use base-path-relative manifest URL (no leading slash) so PWA works
  under non-root base paths
- Classify push.web.* methods in WRITE_SCOPE so they work for operator
  sessions without admin scope
- Refresh webPushPermission in the finally block of handleWebPushSubscribe
  so denied permission is immediately reflected in the UI
This commit is contained in:
eduardocruz
2026-03-13 00:54:44 -03:00
committed by Val Alexander
parent 8858c3cf01
commit b079b36677
2 changed files with 8 additions and 0 deletions

View File

@@ -146,6 +146,10 @@ const METHOD_SCOPE_GROUPS: Record<OperatorScope, readonly string[]> = {
"doctor.memory.repairDreamingArtifacts",
"doctor.memory.dedupeDreamDiary",
"push.test",
"push.web.vapidPublicKey",
"push.web.subscribe",
"push.web.unsubscribe",
"push.web.test",
"node.pending.enqueue",
],
[ADMIN_SCOPE]: [

View File

@@ -984,6 +984,10 @@ export class OpenClawApp extends LitElement {
this.lastError = String(err);
} finally {
this.webPushLoading = false;
// Always refresh permission state — catches denied prompts too.
if ("Notification" in window) {
this.webPushPermission = Notification.permission;
}
}
}