feat: add troubleshooting side panel and advanced queue controls
- Implemented a global toggle to enable/disable background queue processing. - Added a Side Panel (Sidebar.html) to view pending edits. - Added per-item controls: 'Delete' to remove from queue, 'Push' to force update. - Updated 'onEditQueue.ts' with robust error handling for batch processing. - Updated documentation (README, ARCHITECTURE) to reflect new features. - Fixed 'clasp' deployment issues by cleaning up manifest management.
This commit is contained in:
@ -66,3 +66,17 @@ Triggers are managed programmatically via `src/triggers.ts`. Running `reinstallT
|
||||
- `onEdit` -> `matchProductToShopifyOnEditHandler`
|
||||
- `onEdit` -> `onEditQueue`
|
||||
- `TimeBased (1 min)` -> `processBatchedEdits`
|
||||
|
||||
### 5. Troubleshooting Panel (`src/sidebar.ts`, `src/Sidebar.html`)
|
||||
|
||||
A dedicated side panel provides visibility into the background queue system.
|
||||
|
||||
- **Backend (`src/sidebar.ts`)**:
|
||||
- `getQueueStatus()`: Returns the current state of the queue and global toggle.
|
||||
- `setQueueEnabled()`: Toggles the global `queueEnabled` script property.
|
||||
- `deleteEdit()` / `pushEdit()`: Manages specific items in the queue with safety checks.
|
||||
|
||||
- **Frontend (`src/Sidebar.html`)**:
|
||||
- Displays pending edits with timestamps.
|
||||
- Provides controls to globally enable/disable processing.
|
||||
- Allows manual intervention (delete/push) for individual items.
|
||||
|
||||
@ -21,10 +21,23 @@
|
||||
|
||||
3. **Clasp Login**
|
||||
Authenticate with Google to allow pushing code.
|
||||
```bash
|
||||
|
||||
```powershell
|
||||
clasp login
|
||||
```
|
||||
|
||||
4. **Initialize Project**
|
||||
You must either create a new Apps Script project or clone an existing one.
|
||||
- **Option A: New Project**
|
||||
```bash
|
||||
clasp create --type sheets --title "Product Inventory" --rootDir ./dist
|
||||
```
|
||||
- **Option B: Existing Project**
|
||||
```bash
|
||||
clasp clone <scriptId> --rootDir ./dist
|
||||
```
|
||||
*Note: The `--rootDir ./dist` flag is crucial so that clasp knows where to look for files.*
|
||||
|
||||
## Google Sheets Configuration
|
||||
|
||||
1. **Create a Google Sheet** (or use existing).
|
||||
|
||||
Reference in New Issue
Block a user