Conversation
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Bug: Type Mismatch Breaks Countdown Persistence
The countdown flag persistence uses .includes(696969) and .push(696969) with a primitive number, but notifiedItems now stores objects with { id, locationId } structure. This creates a type mismatch that breaks countdown state persistence, mixing primitives with objects in the array.
archipelagoHelper.js#L145-L149
Chatipelago/archipelagoHelper.js
Lines 145 to 149 in 2233672
| notifiedItems.push(Number(i.id) + 100000); | ||
| } else { | ||
| notifiedItems.push(Number(i.id)) } | ||
| const itemKey = { id: Number(i.id), locationId: Number(i.locationId) }; |
There was a problem hiding this comment.
| { customEventResponse: true } | ||
| ); | ||
| console.debug('ResponseCustomEventResponseArgs:', response.customEventResponseArgs); | ||
| return response.customEventResponseArgs.randomUser0 || "Chat"; |
There was a problem hiding this comment.
Bug: Regression: Unsafe Data Access Causes Errors
The code accesses response.customEventResponseArgs.randomUser0 without null-checking customEventResponseArgs first. The previous implementation had null-checking (if (response.customEventResponseArgs && ...)). If customEventResponseArgs is undefined, this will throw TypeError instead of returning the "Chat" fallback.
|
|
||
| function myCallback() { | ||
| console.debug(`Saved ${jsonItems}`); | ||
| console.debug(`Saved ${jsonItems.length} items.`); |
There was a problem hiding this comment.
Bug: Misleading Item Count in Debug Output
The debug message uses jsonItems.length which returns the character count of the JSON string, not the number of items. Since jsonItems is assigned JSON.stringify(collectedItems) on line 111, the logged value represents string length rather than item count as the message "items" suggests.
Merge pull request #37 from lallaria/upstream
Fixed #29 and #36
Note
De-duplicates Archipelago item notifications using id+location and updates Streamer.bot trap action to return a random timed-out user via custom event response; bumps version to 1.2.7.
{id, locationId}keys instead of id offsets; persist and logLocationId.timedOutUser: "Chat", requestscustomEventResponse, and returnscustomEventResponseArgs.randomUser0 || "Chat".saveItemscallback logs the number of saved items.package.jsonto1.2.7.Written by Cursor Bugbot for commit 2233672. This will update automatically on new commits. Configure here.