mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #683] [MERGED] Add weighted random macro choices #4729
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4729
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/683
Author: @Xelvanis
Created: 5/11/2026
Status: ✅ Merged
Merged: 5/11/2026
Merged by: @SpicyMarinara
Base:
main← Head:feature/weighted-random-macros📝 Commits (1)
a4a5056Add weighted random macros📊 Changes
5 files changed (+187 additions, -2 deletions)
View changed files
📝
README.md(+1 -0)📝
docs/FRONTEND.md(+1 -1)➕
docs/MACROS.md(+79 -0)📝
packages/server/test/macro-engine.test.ts(+42 -0)📝
packages/shared/src/utils/macro-engine.ts(+64 -1)📄 Description
Linked issue
No linked GitHub issue. This came from a community feature request / compatibility discussion outside GitHub; maintainers may want a follow-up issue if project-board tracking is required.
Why this change
{{random::...}}choices more or less likely without duplicating entries.{{random::A::B::C}}behavior intact.What changed
@numbersuffixes, including decimal weights like@0.5.1, so unweighted choices still have equal probability.docs/MACROS.mdand linked it from README/docs references.Validation
AI-run local validation for reviewer context; checklist items below are intentionally left unchecked for human verification per repo guidance.
Commands run locally:
git diff --checkpnpm --filter @marinara-engine/shared buildpnpm --filter @marinara-engine/server exec tsx --import ./test/setup-env.ts --test test/macro-engine.test.tspnpm checkResults:
Focused macro-engine tests passed: 9 tests passing.
pnpm checkpassed with the existing unrelatedAvatarCropWidget.tsxunused eslint-disable warning.git diff --checkreported no whitespace errors; only normal LF-to-CRLF working-copy warnings.pnpm checkpasses locallyContainer (Docker / Podman) built and ran without issue
Ran the app, clicked through the changes manually
Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
Above manual verification completed (describe below)
Read and followed
CONTRIBUTING.mdManual verification notes
C:\Users\Melis\AppData\Local\MarinaraEngineTESTfor manual app testing.Docs and release impact
Docs changed:
docs/MACROS.mdREADME.mddocs/FRONTEND.mdNo version or release metadata changed.
UI evidence (if applicable)
Not applicable; this is macro-engine behavior and documentation, with no UI surface change.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.