fix: Copilot review + release.bat set-version + screenshots - #2
Conversation
…nshots Move version validate/write out of build-release.bat node -e so ! in regex is not eaten by delayed expansion. Refresh docs screenshots.
…electron startup Restore automation self-message filtering (BotManager + RuleEngine). Fix AuthMe kayit ol and TR whisper patterns broken by i18n pass. Clean mixed cancel/build strings. Quit Electron if server fails to start.
There was a problem hiding this comment.
Pull request overview
This PR prepares the project for the v1.0.0 release by tightening chat/automation behavior (preventing self-trigger loops and restoring TR patterns), improving build/release tooling, and aligning app startup flow in Electron.
Changes:
- Prevent automation self-trigger loops by filtering the bot’s own echoed chat and adding “self” guards to follow/attack/goto actions.
- Fix/expand chat parsing and system-message detection (AuthMe “kayıt ol”, TR whisper patterns) and clean up several user-facing strings.
- Improve release workflow by adding
scripts/set-version.mjs, updatingbuild-release.bat, bumping versions to1.0.0, and adjusting Electron startup behavior.
Reviewed changes
Copilot reviewed 14 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| web/package.json | Bumps web workspace version to 1.0.0. |
| server/package.json | Bumps server workspace version to 1.0.0. |
| package.json | Bumps root version to 1.0.0 and reformats electron-builder target block. |
| server/src/types.ts | Clarifies prefix field documentation. |
| server/src/modules/chat/parse.ts | Restores/fixes TR chat parsing patterns and improves system-message detection. |
| server/src/modules/build/storage.ts | Normalizes shulker placement failure error message. |
| server/src/modules/build/index.ts | Normalizes cancel/failure phase messages. |
| server/src/modules/automation/RuleEngine.ts | Adds self-message filtering and prevents self-target actions (attack/follow/goto-player). |
| server/src/core/TaskQueue.ts | Normalizes default cancel reason string. |
| server/src/core/BotManager.ts | Filters bot’s own chat echo before firing automations. |
| server/src/core/BotInstance.ts | Updates system-message comment wording. |
| scripts/set-version.mjs | Adds version-setting helper script for release automation. |
| electron/main.cjs | Only opens window after server starts; quits on server start failure. |
| build-release.bat | Uses set-version.mjs to avoid delayed-expansion issues; ensures node invocations return properly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const files = ["package.json", "server/package.json", "web/package.json"]; | ||
| for (const rel of files) { |
There was a problem hiding this comment.
Applied on master in cb2f008.
- Workspaces are now derived from root package.json workspaces (supports globs like packages/*)
- Root package.json is always included
- Missing paths are skipped with a warning rather than failing silently without logging
| const p = interpolate(String(action.player ?? ctx.player), ctx); | ||
| if (this.isOwnUsername(botId, p)) { | ||
| log.warn("goto-player ignored: target is the bot itself", p); | ||
| return; | ||
| } | ||
| inst.enqueueAction({ type: "goto-player", player: p }); |
There was a problem hiding this comment.
Applied on master in cb2f008.
- After interpolate: .trim()
- Empty or unresolved tokens (e.g. still starts with {) are rejected before enqueueAction
- Same empty-player guard also applied to follow for consistency
- Self-target check kept as before
|
Follow-up on Copilot suggestions (this PR was already merged): both medium findings were fixed on \master\ in commit \cb2f008.
No further action needed for these two items. |
Summary
kayıt oland TR whisper patterns broken by i18n bulk passcancelled, place failures)scripts/set-version.mjsfor release.bat (fixes delayed-expansion!bug)Test plan
npx tsc --noEmitserver + webbuild-release.bat 1.0.0version step no longer throws SyntaxError