refactor(match2): esports match summary too - #8007
Merged
Merged
Conversation
hjpalpha
approved these changes
Aug 24, 2026
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The new createGame implementation can error by dereferencing game.extradata.link even though extradata is optional (table?).
Pull request overview
Refactors the esports wiki MatchSummary implementation to align with the newer MatchSummary/Base customization surface by removing the custom body builder and switching to a createGame hook.
Changes:
- Removes the custom
createBodyimplementation (and its related imports). - Renames/replaces the per-game row generator with
CustomMatchSummary.createGame. - Updates type annotations to
Renderable/Renderable?.
File summaries
| File | Description |
|---|---|
| lua/wikis/esports/MatchSummary.lua | Drops custom body creation and migrates to a createGame implementation used by MatchSummary/Base. |
Review details
Suppressed comments (1)
lua/wikis/esports/MatchSummary.lua:41
MatchGroupUtilGame.extradatais typed as optional (table?), but this code dereferencesgame.extradata.linkunconditionally when the game is not finished. Ifextradatais absent, this will throw a Lua error. Safer to normalize withlocal extradata = game.extradata or {}and readextradata.link.
if gamePhase ~= 'finished' then
if game.extradata.link == nil then
return MatchSummaryWidgets.Row{
children = MatchSummaryWidgets.GameCenter{children = 'Voting opening soon!'}
}
end
return MatchSummaryWidgets.Row{
children = MatchSummaryWidgets.GameCenter{children = Button{
link = game.extradata.link,
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
refactor esports wiki match summary too
How did you test this change?
trivial