Added the ability to bookmark the extension, along with some visual adjustments

This commit is contained in:
2026-10-30 14:48:00 -03:00
parent 00bcfdc42e
commit 9cdb46b6c2
39 changed files with 1566 additions and 137 deletions

View File

@@ -67,7 +67,7 @@ function createFusionCrmServiceRequests({ isCurrentPeriodRequest,
throw new Error("CRM service request pagination did not advance.");
}
items.push(...data.items);
onProgress(items.length, Number.isFinite(data.totalResults) && data.totalResults >= items.length ? data.totalResults : null);
onProgress(items.length, Number.isFinite(data.totalResults) && data.totalResults >= items.length ? data.totalResults : null, items.slice());
if (!data.hasMore) return items;
offset = current + received;
attempt = 1;

View File

@@ -9,7 +9,6 @@ function createFusionOpportunities({
getOpportunityTypeValues,
readResponseBodyForDebug,
resetDebugRequests = () => {},
loadServiceRequests = async () => {},
environment
}) {
const { fetch } = environment;
@@ -40,9 +39,6 @@ function createFusionOpportunities({
// One history per query, preserving all pages of the same result set.
if (page === 1) {
resetDebugRequests();
// SR queries do not depend on opportunity or product IDs. Keep their
// diagnostics in this query's history and reuse the loaded SR state later.
try { await loadServiceRequests(token, requestVersion); } catch { /* SR failure must not block opportunities. */ }
if (!isCurrentPeriodRequest(requestVersion)) return null;
}
const requestEntry = logRequestStart({