Skip to content

Bump to 1.2.0 and add Core/UI/Commands/Shard/Minimap/Migration module split#3

Closed
milestorme wants to merge 5 commits into
mainfrom
codex/perform-code-review-for-autojunkdestroyer
Closed

Bump to 1.2.0 and add Core/UI/Commands/Shard/Minimap/Migration module split#3
milestorme wants to merge 5 commits into
mainfrom
codex/perform-code-review-for-autojunkdestroyer

Conversation

@milestorme

Copy link
Copy Markdown
Owner

Motivation

  • Align runtime behavior with the code-review recommendations by splitting the large single-file addon into focused modules for clearer responsibilities and easier follow-ups.
  • Correct command/documentation drift by adding explicit resume/status actions and exporting core actions for use by a dedicated command router.
  • Improve robustness around AceDB logout sanitization and add lightweight automated checks to catch locale/syntax regressions earlier.

Description

  • Renamed AutoJunkDestroyer_Commands.lua to Commands.lua and added a slash-command router that delegates into a runtime table at _G.AutoJunkDestroyerRuntime.
  • Added the requested module layout files: Core.lua, UI.lua, Minimap.lua, Shard.lua, and Migration.lua, and wired them to call into the runtime exports where appropriate.
  • Updated AutoJunkDestroyer.lua to expose runtime exports (AJD.Print, AJD.SetThreshold, AJD.TogglePause, AJD.Resume, AJD.PrintStatus, AJD.HandleButtonCommand, AJD.HandleMinimapCommand, etc.), hardened the AceDB pre-logout wrapper with a compatibility guard and debug path, and removed a redundant Print expression.
  • Updated TOC files to bump the version to 1.2.0 and include the new module files, added localized keys across all Locales/*.lua files for parity, and added CI/scripts: scripts/check_locale_parity.py, scripts/check_lua_syntax.sh, and .github/workflows/ci.yml.

Testing

  • Ran ./scripts/check_locale_parity.py which returned Locale key parity OK across 11 files (success).
  • Ran python -m py_compile scripts/check_locale_parity.py which completed successfully (syntax OK for the parity script).
  • Attempted ./scripts/check_lua_syntax.sh in this environment and it could not run because luac is not installed (CI workflow will run luac -p on GitHub Actions).

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c0f8d0c78b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Commands.lua Outdated
msg = (msg or ""):lower()

if msg == "pause" then
(AJD.Core and AJD.Core.TogglePause and AJD.Core.TogglePause() or AJD.TogglePause())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Replace and/or dispatch that double-calls command handlers

The dispatch expression here executes both branches in normal builds because AJD.Core.TogglePause() (and the analogous UI/minimap wrappers) returns nil; in Lua, a and b() or c() evaluates c() when b() is falsy. With Core.lua loaded from the TOC, /ajd pause toggles twice (net no state change) and /ajd toggle also cancels itself, so key slash commands appear broken. Please switch to an explicit if ... then ... else ... end dispatch so only one handler runs.

Useful? React with 👍 / 👎.

@milestorme milestorme closed this Feb 14, 2026
@milestorme milestorme deleted the codex/perform-code-review-for-autojunkdestroyer branch March 5, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant