Skip to content

Tooltips, menu hygiene, referral & 30SC manual admin flows; play-button unification and smoke/test enhancements - #105

Merged
gamblecodezcom merged 2 commits into
mainfrom
codex/perform-full-audit-and-implementation-for-runewager-bot-uk8twu
Feb 26, 2026
Merged

Tooltips, menu hygiene, referral & 30SC manual admin flows; play-button unification and smoke/test enhancements#105
gamblecodezcom merged 2 commits into
mainfrom
codex/perform-full-audit-and-implementation-for-runewager-bot-uk8twu

Conversation

@gamblecodezcom

@gamblecodezcom gamblecodezcom commented Feb 26, 2026

Copy link
Copy Markdown
Owner

User description

Motivation

  • Harden menu/navigation UX and make Play routing deterministic between browser vs mini-app modes.
  • Add onboarding referral flow with 7-day 2× giveaway boost and prevent post-onboarding/self-referral abuse.
  • Move 30 SC bonus to a manual-review workflow with admin audit logging and safer admin controls.
  • Add a system tooltip pipeline (deployable JSON) and document required runtime env vars for production runs.

Description

  • Introduced helpers for deterministic links and play-mode routing: unwrapTelegramUrl, getDiscordLink, getPlayMode, getBrowserLink, getStartAppLink, getPlayLink, getPlayButton, and playButtonMarkup, and replaced ad-hoc play buttons with playButtonMarkup across menus.
  • Implemented menu/card hygiene and persistent-menu helpers: callback-query middleware to delete source callback cards, clearOldMenus, replyMenu, and replyMenu usage in main/settings/persistent menus to avoid stacked menus.
  • Added pending-action timeout handling and human-friendly labels via ACTION_LABELS and evaluatePendingActionTimeout with exact-15-minute boundary semantics (15:00 stays valid; expiration after crossing 15:00).
  • Added referral onboarding path: onboarding asks Were you referred by a friend?, applyOnboardingReferralCode enforces one-time entry during onboarding, prevents self-referral, applies mutual 7-day boosts, and stores referral records.
  • Converted the 30 SC bonus to a manual-review flow: checkBonusEligibility now follows a manual-review policy, submitBonusRequest appends admin audit entries via appendBonusAdminLog, and an admin submenu (w30_admin_menu) plus log sink /var/www/html/Runewager/logs/bonus_admin.log were added.
  • Added Group Linking Tools under Settings for linking/viewing/removing/testing linked groups (handlers: settings_group_linking_tools, group_link_start, group_link_view, group_link_remove_menu, group_link_test_permissions), and supporting UI/keyboard helpers.
  • Tooltips: added load_tooltips.sh to seed /var/www/html/Runewager/data/tooltips.json and runtime loadHelpfulMessages now prefers that system JSON path.
  • Environment docs and examples: updated .env.example to document BOT_PRIVACY_MODE, HTTPS cert/key paths, TELEGRAM_*_LINK entries, and reordered keys used by runtime checks.
  • Admin/ops docs: expanded CLAUDE.md and synchronized RUNEWAGER_FUNCTIONALITY_MAP.md with new behaviors (single-active-menu rule, referral rules, pending-action boundary, smoke/test requirements, tooltip pipeline notes).
  • Tests: enhanced test/smoke.test.js and test/unit.test.js to cover new helpers, catch-all regex filtering, play-button helpers, pending-action boundary, referral flows, group linking tools, load_tooltips.sh presence, and testall summary formatting.

Testing

  • Ran the repository test suite covering test/smoke.test.js and test/unit.test.js (via the project test runner / npm test which uses node:test), which were updated to validate the new link/play helpers, pending-action semantics, menu hygiene, referral and bonus admin flows, and load_tooltips.sh expectations; tests passed.
  • Executed the smoke diagnostics (/testall emulation in tests) to verify registered commands, callback coverage (literal + regex handling), environment expectations (BOT_PRIVACY_MODE), and final summary formatting; checks succeeded.
  • Verified load_tooltips.sh creates and validates /var/www/html/Runewager/data/tooltips.json in CI-like environments via unit test assertions (script content & output path checks succeeded).

Codex Task


CodeAnt-AI Description

Use python3 for JSON validation in tooltip loader script

What Changed

  • The tooltip loader script now runs JSON validation with python3 instead of python, ensuring the validation step succeeds on systems where "python" is Python 2 or not present.
  • Success message remains the same and will appear after successful JSON validation and write.

Impact

✅ Fewer tooltip load failures during deployment
✅ Shorter tooltip deployment debugging
✅ Clearer validation success when loading tooltips

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai

codeant-ai Bot commented Feb 26, 2026

Copy link
Copy Markdown

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai

coderabbitai Bot commented Feb 26, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@gamblecodezcom has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 6 minutes and 58 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 82e5fb1 and 012094c.

📒 Files selected for processing (1)
  • load_tooltips.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/perform-full-audit-and-implementation-for-runewager-bot-uk8twu

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.

@gamblecodezcom
gamblecodezcom merged commit 12e0b58 into main Feb 26, 2026
2 checks passed
@gamblecodezcom
gamblecodezcom deleted the codex/perform-full-audit-and-implementation-for-runewager-bot-uk8twu branch February 26, 2026 23:43
@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Feb 26, 2026
@codeant-ai

codeant-ai Bot commented Feb 26, 2026

Copy link
Copy Markdown

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Interpreter assumption
    The script invokes python3 directly. Some target systems may not have python3 on PATH (or may only have python). Add a fallback or explicit dependency check to avoid runtime failure on systems where python3 isn't installed.

@codeant-ai

codeant-ai Bot commented Feb 26, 2026

Copy link
Copy Markdown

CodeAnt AI finished reviewing your PR.

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

Labels

codex size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant