Fix 4 P1 and 2 P2 code review findings for FRE-4576

P1 fixes:
- Fix import paths in background/index.ts (./ -> ../lib/)
- Fix Promise-in-string bug in api-client.ts authenticate()
- Add missing background/service_worker key to manifest
- Copy HTML to public/ so Vite places them in dist

P2 fixes:
- Add notifications permission to manifest
- Make showWarningNotification async with proper await

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-05-10 11:53:25 -04:00
parent 4a2f6cf0fd
commit 35e9f7e812
5 changed files with 481 additions and 18 deletions

View File

@@ -88,7 +88,8 @@ export class ShieldApiClient {
async authenticate(apiKey: string): Promise<{ userId: string; tier: SubscriptionTier } | null> {
try {
const response = await fetch(`${settingsManager.get().then(s => s.apiBaseUrl)}/extension/auth`, {
const settings = await settingsManager.get();
const response = await fetch(`${settings.apiBaseUrl}/extension/auth`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',