Skip to content

Cleanup: comments in BuildMenu and error messages in worker.worker#3233

Merged
DevelopingTom merged 2 commits intomainfrom
workerworker-errors
Feb 18, 2026
Merged

Cleanup: comments in BuildMenu and error messages in worker.worker#3233
DevelopingTom merged 2 commits intomainfrom
workerworker-errors

Conversation

@VariableVince
Copy link
Contributor

@VariableVince VariableVince commented Feb 18, 2026

Description:

PR 1/x in effort to break up PR #3220. Precedes #3234.
Please see if these can be merged for v30.

  • BuildMenu: remove one redundant comment about replacing an icon (which has been done long ago already). And fix typo in one other comment.
  • Worker.worker: correct some existing error messages.

Please complete the following:

  • I have added screenshots for all UI updates
  • I process any text displayed to the user through translateText() and I've added it to the en.json file
  • I have added relevant tests to the test directory
  • I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced

Please put your Discord username so you can be contacted if a bug or regression is found:

tryout33

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

Walkthrough

Updated error logging messages in the Worker to be more descriptive. Changed generic "Failed to check borders:" messages to context-specific messages: "Failed to get actions:" and "Failed to get profile:" for their respective code paths.

Changes

Cohort / File(s) Summary
Error Message Clarity
src/core/worker/Worker.worker.ts
Replaced generic error message with specific context-aware messages for player actions and profile retrieval failures.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐛 When errors spoke in riddles, they confused us all,
Now messages ring clearer, answering the call,
"Check actions!" "Check profile!" no more unclear—
The worker logs its truth, concise and near.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title mentions both BuildMenu comments cleanup and worker.worker error messages, but the changeset only contains updates to worker.worker error messages with no BuildMenu changes present. Update the title to focus solely on the actual change: 'Fix: worker.worker error messages' or 'Cleanup: worker.worker error messages'. Remove reference to BuildMenu changes that are not in this PR.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description clearly relates to the changeset, explaining the correction of error messages in Worker.worker and other improvements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 18, 2026
@VariableVince VariableVince changed the title Fix: worker.worker error messages Cleanup: comments in BuildMenu and error messages in worker.worker Feb 18, 2026
Copy link
Contributor

@DevelopingTom DevelopingTom left a comment

Choose a reason for hiding this comment

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

Thanks!

@github-project-automation github-project-automation bot moved this from Triage to Final Review in OpenFront Release Management Feb 18, 2026
@DevelopingTom DevelopingTom added this pull request to the merge queue Feb 18, 2026
Merged via the queue into main with commit f4f7ae3 Feb 18, 2026
15 checks passed
@DevelopingTom DevelopingTom deleted the workerworker-errors branch February 18, 2026 20:23
@github-project-automation github-project-automation bot moved this from Final Review to Complete in OpenFront Release Management Feb 18, 2026
github-merge-queue bot pushed a commit that referenced this pull request Feb 18, 2026
## Description:

PR 3/x in effort to break up PR
#3220. Follows on already
merged #3233 and
#3234.

Please see if these can be merged for v30.

- **ClientGameRunner**: removed two redundant myPlayer===null checks
since that was already done right above, instead use !.
- **BuildMenu**: just like in UnitDisplay, assign public PlayerActions
default value of null. So that in canCreateOrBuild, where we already do
a === null check on it btw, we can safely skip the assignment to const
buildableUnits and just directly loop over
this.playerActions.buildableUnits.
- **RadialMenuElements**: don't call canBuildOrUpgrade 3x in
CreateMenuElements for the .map on flattenedBuildTable, instead do it
once and re-use outcome.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:

tryout33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix Fixes a bug

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

2 participants

Comments