Skip to content

Merging upstream#37

Merged
lallaria merged 3 commits intomainfrom
upstream
Nov 13, 2025
Merged

Merging upstream#37
lallaria merged 3 commits intomainfrom
upstream

Conversation

@lallaria
Copy link
Copy Markdown
Owner

@lallaria lallaria commented Nov 13, 2025

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.

  • Archipelago / Items:
    • De-duplicate received items using {id, locationId} keys instead of id offsets; persist and log LocationId.
  • Streamer.bot / Webhook:
    • Trap flow now passes timedOutUser: "Chat", requests customEventResponse, and returns customEventResponseArgs.randomUser0 || "Chat".
  • Logging:
    • saveItems callback logs the number of saved items.
  • Version:
    • Bump package.json to 1.2.7.

Written by Cursor Bugbot for commit 2233672. This will update automatically on new commits. Configure here.

@lallaria lallaria merged commit 9b8af7a into main Nov 13, 2025
5 checks passed
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

loadCache(); //make sure the cache is loaded
if (notifiedItems.includes(696969)){
return;
} else {
notifiedItems.push(696969)

Fix in Cursor Fix in Web


notifiedItems.push(Number(i.id) + 100000);
} else {
notifiedItems.push(Number(i.id)) }
const itemKey = { id: Number(i.id), locationId: Number(i.locationId) };
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Data Mismatch Breaks Countdown State

The countdown flag check uses .includes(696969) with a primitive number, but notifiedItems now stores objects with { id, locationId } structure. This check will always fail since .includes() compares objects by reference, breaking countdown state tracking.

Fix in Cursor Fix in Web

{ customEventResponse: true }
);
console.debug('ResponseCustomEventResponseArgs:', response.customEventResponseArgs);
return response.customEventResponseArgs.randomUser0 || "Chat";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web


function myCallback() {
console.debug(`Saved ${jsonItems}`);
console.debug(`Saved ${jsonItems.length} items.`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

lallaria added a commit that referenced this pull request Nov 13, 2025
Merge pull request #37 from lallaria/upstream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

traps/filler are only being shown to chat once

1 participant