@synod-ai/extension-feedback 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -254,7 +254,7 @@ cloudflared tunnel --url http://localhost:8787
254
254
 
255
255
  ## Context JSON
256
256
 
257
- The `context_json` object captures browser context for each finding. All fields are optional; the gateway enforces a **10KB total budget** (`MAX_CONTEXT_JSON_BYTES = 10_240`).
257
+ The `context_json` object captures browser context for each finding. All fields are optional; the SDK enforces a **64KB total budget** (`MAX_CONTEXT_JSON_BYTES = 65_536`), of which the screenshot may consume up to 32KB (`MAX_SCREENSHOT_BYTES`).
258
258
 
259
259
  | Field | Type | Description |
260
260
  |---|---|---|
package/dist/index.js CHANGED
@@ -115,7 +115,7 @@ function validateConfig(input) {
115
115
  maxRetries: input.maxRetries ?? DEFAULT_MAX_RETRIES
116
116
  };
117
117
  }
118
- var MAX_CONTEXT_JSON_BYTES = 10240;
118
+ var MAX_CONTEXT_JSON_BYTES = 65536;
119
119
  function isContextJsonValid(contextJson) {
120
120
  const serialized = JSON.stringify(contextJson);
121
121
  return new TextEncoder().encode(serialized).length <= MAX_CONTEXT_JSON_BYTES;
@@ -1871,7 +1871,7 @@ function calculateFlippedPosition(targetRect, elementSize, viewport, margin = MI
1871
1871
  }
1872
1872
 
1873
1873
  // src/utils/screenshot.ts
1874
- var MAX_SCREENSHOT_BYTES = 8192;
1874
+ var MAX_SCREENSHOT_BYTES = 32768;
1875
1875
  async function capture(element) {
1876
1876
  try {
1877
1877
  const mod = await import("modern-screenshot");
@@ -2562,6 +2562,21 @@ var QueuePanel = class {
2562
2562
  }
2563
2563
  }
2564
2564
  }
2565
+ /**
2566
+ * Public entry point for callers outside QueuePanel (notably the IssueForm's
2567
+ * "Send now" flow in interaction/setup.ts) to surface a BatchResult through
2568
+ * the same toast/banner path as the bulk-send button. Without this, send-now
2569
+ * awaited sendBatch() silently and showed no confirmation.
2570
+ */
2571
+ reportSendResult(result) {
2572
+ this.handleSendResult(result);
2573
+ }
2574
+ /**
2575
+ * Public entry point matching reportSendResult for the error path.
2576
+ */
2577
+ reportSendError(err) {
2578
+ this.handleSendError(err);
2579
+ }
2565
2580
  handleSendResult(result) {
2566
2581
  const total = result.created.length + result.errors.length;
2567
2582
  if (result.errors.length === 0 && result.created.length > 0) {
@@ -3036,10 +3051,12 @@ function ensureVisibleUI() {
3036
3051
  manager.queue(finding);
3037
3052
  issueForm?.hide();
3038
3053
  try {
3039
- await manager.sendBatch();
3054
+ const batchResult = await manager.sendBatch();
3055
+ queuePanel?.reportSendResult(batchResult);
3040
3056
  updateBadgeCount();
3041
3057
  deactivateSelection();
3042
- } catch {
3058
+ } catch (err) {
3059
+ queuePanel?.reportSendError(err);
3043
3060
  updateBadgeCount();
3044
3061
  toggleQueuePanel();
3045
3062
  }