Skip to content

refactor(match2): esports match summary too - #8007

Merged
Rathoz merged 1 commit into
mainfrom
esports-m2-summary-refact
Sep 9, 2026
Merged

refactor(match2): esports match summary too#8007
Rathoz merged 1 commit into
mainfrom
esports-m2-summary-refact

Conversation

@Rathoz

@Rathoz Rathoz commented Aug 24, 2026

Copy link
Copy Markdown
Member

Summary

refactor esports wiki match summary too

How did you test this change?

trivial

@Rathoz
Rathoz requested a lite review from Copilot September 9, 2026 10:06
@Rathoz
Rathoz marked this pull request as ready for review September 9, 2026 10:06
@Rathoz
Rathoz requested review from a team as code owners September 9, 2026 10:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 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 createBody implementation (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.extradata is typed as optional (table?), but this code dereferences game.extradata.link unconditionally when the game is not finished. If extradata is absent, this will throw a Lua error. Safer to normalize with local extradata = game.extradata or {} and read extradata.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.

@Rathoz
Rathoz merged commit 3a8ba53 into main Sep 9, 2026
9 checks passed
@Rathoz
Rathoz deleted the esports-m2-summary-refact branch September 9, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants