From f16cb88a3218ac7bb32e43f0e0a2542d35c7a01b Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 17 Jun 2026 00:28:16 +0000
Subject: [PATCH] =Working on the Options Meta still. Group fields also needed some changes

---
 assets/js/concise/Queue.js |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/assets/js/concise/Queue.js b/assets/js/concise/Queue.js
index 5623e5e..2b8d3b6 100644
--- a/assets/js/concise/Queue.js
+++ b/assets/js/concise/Queue.js
@@ -17,6 +17,7 @@
 		this.items = new Map();
 		this.subscribers = new Set();
 		this.loadFromStorage = false;
+		this.failedFetches = 0;
 
 		this.api = jvbSettings.api;
 		this.endpoint = 'queue';
@@ -30,6 +31,7 @@
 		this.initElements();
 		this.initListeners();
 		this.initStore();
+
 		if (this.canUpdateUI && this.ui.panel) {
 			this.popup = window.jvbPopup.registerPopup({
 				popup: this.ui.panel,
@@ -407,6 +409,7 @@
 	 OPERATIONS
 	****************************************************************************/
 	addToQueue(operation) {
+		console.log(operation, 'Adding to queue:');
 		const item = {
 			id: `u${this.user}_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`,
 			endpoint: null,
@@ -615,18 +618,18 @@
 					body: requestBody
 				}
 			);
-			console.log('Sending request with data: ', req);
+			// console.log('Sending request with data: ', req);
 			const result = await response.json();
 			if (skip) {
 				operation.data = {};
 			}
-			console.log('Result: ', result);
+			// console.log('Result: ', result);
 			if (response.ok && result.success) {
 				this.notify('sent-to-server', req);
 				if (result.id && operation.id !== result.id) {
 					operation = await this.handleServerMerge(operation, result);
 				} else {
-					operation.status = result.status??'failed';
+					operation.status = result.status??'pending';
 					operation.serverData = result;
 					this.updateOperationStatus(operation.id, operation.status);
 				}
@@ -801,6 +804,8 @@
 				return;
 			}
 		} catch (error) {
+			this.stopPolling();
+			this.updatePanel('synced');
 			console.error('Polling error:', error);
 		}
 

--
Gitblit v1.10.0