Skip to content

refactor(log): parse economy from chat, scan General only, and enforce scan cancel gates - #58

Open
Good627 wants to merge 3 commits into
EdenGuild:masterfrom
Good627:refactor/manage-log-and-scan-cancel
Open

Good627 wants to merge 3 commits into
EdenGuild:masterfrom
Good627:refactor/manage-log-and-scan-cancel

Conversation

@Good627

@Good627 Good627 commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Chat-based economy tracking: Add EconomyMessageFilter.parse(...) (reusing the hideEconomyMessages matching/normalization logic) and relay matched lines via BridgeWebSocketClient.sendGuildEconomy(text, seq) keyed with OccurrenceSequencer (gated by OutboundPolicy, guild-only). In ClientPacketListenerMixin, still invoke mod.handleSystemChat(...) before cancelling hidden economy lines so chat filtering does not drop events.
  • General-only Guild Log scans: Restrict GuildLogSync.scanWholeLog to the General category (FULL_SCAN_TOTAL_PAGES = 5 instead of 30) and remove GuildLogEvent.Text, KNOWN_FILTERS, header filter selection, and GuildLogTextCategoryTest.
  • Cancel button & strict state gates: Keep the Cancel button enabled on /eden logscan and post-gift scans (GiftProgressScreen wired to guildLogSync::requestCancel / postRunLogScanCancel), abort GuildLogSync waits cleanly when cancelled without recording lastScanFinishedAt, prevent postRunLogScan from running unless the gift/payout completed uncancelled and unaborted with confirmed units, and reset cancelRequested cleanly on subsequent runs/scans.
  • Tests: Update EconomyMessageFilterTest, GuildLogFilterButtonTest, and OutboundPolicyTest ("guildEconomy" in GUILD_ONLY).

Verification

  • .\gradlew.bat test build: BUILD SUCCESSFUL (474 tests total: 470 passed, 4 skipped, 0 failed; :spotlessCheck and :check passed)

@imol-ai imol-ai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  • don't remove the code for scanning all log pages please, it might come in handy later
  • don't change the behaviour of the post gift reconciliation logscan - no cancel button, and must execute on cancelled gifts aswell; only add a cancel to the general logscan

@imol-ai imol-ai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks good!

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.

2 participants