Skip to content

Fix changelog dialog crash#7117

Merged
BlackYps merged 1 commit into
developfrom
changelog-dialog-fix
May 13, 2026
Merged

Fix changelog dialog crash#7117
BlackYps merged 1 commit into
developfrom
changelog-dialog-fix

Conversation

@BlackYps
Copy link
Copy Markdown
Contributor

@BlackYps BlackYps commented May 13, 2026

Previously the filename in the version field would be interpreted as a global variable and crash the changelog dialog in the lobby.

Summary by CodeRabbit

  • Chores
    • Updated internal changelog metadata formatting to improve consistency in version field generation.

Review Change Stack

@github-actions github-actions Bot marked this pull request as draft May 13, 2026 12:14
@BlackYps BlackYps marked this pull request as ready for review May 13, 2026 12:15
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

📝 Walkthrough

Walkthrough

The changelog overview script now formats the Lua Version field as a quoted string instead of an unquoted value. The process_markdown_file function wraps the markdown file stem in quotes when generating the version entry in the Lua table output.

Changes

Changelog Version Formatting

Layer / File(s) Summary
Version field quoting in Lua output
.github/workflows/scripts/python/changelog_overview.py
The process_markdown_file function now formats the Version field as a quoted string in generated Lua table entries, changing the emitted metadata format.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

A version string wrapped in quotes so bright,
Now Lua tables render just right,
The rabbit approves this format so neat,
One little change, the fix is complete! 🐰✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The pull request description is incomplete and does not follow the required template structure. Add sections for 'Testing done on the proposed changes' and 'Additional context', and ensure all checklist items are addressed before merging. Document the changelog snippet per project guidelines and request 2-3 reviewers.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main fix: adding quotes to prevent a changelog dialog crash caused by variable interpretation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch changelog-dialog-fix

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/scripts/python/changelog_overview.py (1)

46-46: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Critical: Version string still unquoted in the normal code path.

The normal case (4-part filename) assigns version = file_name_parts[3] without quotes. When this version contains non-numeric characters (e.g., "v3747", "patch-1.2.3"), line 67 outputs Version = v3747, in Lua, which Lua interprets as a variable reference, causing the same crash this PR aims to fix.

This is the original bug location that was not addressed by the change on line 56.

Recommended comprehensive fix

The correct approach is to keep version without embedded quotes and add quotes in the f-string template on line 67. Apply these changes:

Line 46: Keep version unquoted

 version = file_name_parts[3]

Line 56: Remove embedded quotes (fix separately below)

-        version = f'"{markdown_file.stem}"'
+        version = markdown_file.stem

Line 67: Add quotes in the template

-            Version = {version},
+            Version = "{version}",

This ensures:

  • Lua always receives a quoted string for the Version field
  • The URL on line 70 remains valid (no embedded quotes breaking string syntax)
  • Both normal and error code paths are handled consistently
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/scripts/python/changelog_overview.py at line 46, The code
assigns version = file_name_parts[3] without quotes but later emits it into the
Lua output unquoted; fix by keeping version as-is (no embedded quotes in the
value) and instead wrap the {version} placeholder in quotes inside the Lua
output f-string/template (the string that writes the "Version = ..." line), and
also remove any embedded quotes previously added elsewhere (the other change
that modified version assignment) so both normal and error paths consistently
emit Version as a quoted Lua string.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/scripts/python/changelog_overview.py:
- Line 56: The version string currently includes embedded quotes (version =
f'"{markdown_file.stem}"'), which breaks the generated Lua URL; change the
assignment to store the raw stem (version = markdown_file.stem) and then when
emitting the Lua output wrap the Version value in quotes (e.g., use
f'"{version}"' only in the Lua template/format for the Version field) while
using the raw version variable when constructing the URL so the URL remains
valid.

---

Outside diff comments:
In @.github/workflows/scripts/python/changelog_overview.py:
- Line 46: The code assigns version = file_name_parts[3] without quotes but
later emits it into the Lua output unquoted; fix by keeping version as-is (no
embedded quotes in the value) and instead wrap the {version} placeholder in
quotes inside the Lua output f-string/template (the string that writes the
"Version = ..." line), and also remove any embedded quotes previously added
elsewhere (the other change that modified version assignment) so both normal and
error paths consistently emit Version as a quoted Lua string.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a9e776d7-c9ae-4810-8729-6cea52549c3c

📥 Commits

Reviewing files that changed from the base of the PR and between ff8f01f and 5a5e4cc.

📒 Files selected for processing (1)
  • .github/workflows/scripts/python/changelog_overview.py

Comment thread .github/workflows/scripts/python/changelog_overview.py Outdated
@BlackYps BlackYps force-pushed the changelog-dialog-fix branch from 5a5e4cc to 0b4bb3c Compare May 13, 2026 13:12
@BlackYps BlackYps merged commit 74bebb4 into develop May 13, 2026
8 checks passed
@BlackYps BlackYps deleted the changelog-dialog-fix branch May 13, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant