fix(ci): install firefox in e2e-headless and fix admin list race condition

- Update .github/workflows/ci.yml to install firefox for e2e-headless job
- Update js/adminListStore.js to await nostrClient.initPromise if pool is not ready, preventing race conditions during app startup

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-22 19:05:27 +00:00
1 parent 4bfe605fed
commit 7a8c738a09
2 files changed
+25 -1

No files matched your search

+1 -1
View File
@@ -478,7 +478,7 @@ jobs:
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
run: npx playwright install --with-deps chromium firefox
- name: Run headless E2E tests
run: npm run test:e2e
+24
View File
@@ -523,6 +523,18 @@ function extractNpubsFromEvent(event) {
async function fetchLatestListEvent(filter, contextLabel = "admin-list") {
const nostrClient = requireNostrClient();
if (!nostrClient.pool && nostrClient.initPromise) {
try {
await nostrClient.initPromise;
} catch (error) {
devLogger.warn(
`[adminListStore] Awaiting nostrClient init failed during ${contextLabel} fetch:`,
error,
);
}
}
const relays = ensureNostrReady();
const kind = (Array.isArray(filter?.kinds) && filter.kinds.length)
@@ -827,6 +839,18 @@ function publishListWithFirstAcceptance(pool, relays, event, options = {}) {
async function persistNostrState(actorNpub, updates = {}) {
const nostrClient = requireNostrClient();
if (!nostrClient.pool && nostrClient.initPromise) {
try {
await nostrClient.initPromise;
} catch (error) {
devLogger.warn(
"[adminListStore] Awaiting nostrClient init failed during persist:",
error,
);
}
}
ensureNostrReady();
const permissionResult = await requestDefaultExtensionPermissions();
if (!permissionResult.ok) {