fix(CarrouselButton): broken meta return value #45

Merged
abart27 merged 1 commit from fix-carrousel-button-meta-return into main 2026-02-28 12:00:30 +00:00
abart27 commented 2026-02-28 11:41:41 +00:00 (Migrated from github.com)

Fixes carrousel_button having a broken meta return value.

Fixes `carrousel_button` having a broken `meta` return value.
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2026-02-28 11:43:55 +00:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull request overview

Fixes ugui.carrousel_button returning an incorrectly shaped meta value, and updates tests to validate meta.signal_change transitions.

Changes:

  • Fix carrousel_button to return meta as a Meta table (instead of an array-wrapped table).
  • Extend carrousel_button tests to assert signal_change state progression across frames.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/ugui/controls/carrousel_button.lua Fixes the meta return shape to match the Meta type and other controls.
test/carrousel_button.lua Adds assertions for meta.signal_change across frames for decrement/increment click scenarios.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

## Pull request overview Fixes `ugui.carrousel_button` returning an incorrectly shaped `meta` value, and updates tests to validate `meta.signal_change` transitions. **Changes:** - Fix `carrousel_button` to return `meta` as a `Meta` table (instead of an array-wrapped table). - Extend `carrousel_button` tests to assert `signal_change` state progression across frames. ### Reviewed changes Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment. | File | Description | | ---- | ----------- | | `src/ugui/controls/carrousel_button.lua` | Fixes the `meta` return shape to match the `Meta` type and other controls. | | `test/carrousel_button.lua` | Adds assertions for `meta.signal_change` across frames for decrement/increment click scenarios. | --- 💡 <a href="/mupen64/ugui/new/main?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026-02-28 11:43:55 +00:00

meta is not declared local in this test (index, meta = ...), so Lua will treat it as a global. This can leak state across tests and make results flaky; declare local meta near local index = 2 (as done in left_click_decrements_index).

`meta` is not declared local in this test (`index, meta = ...`), so Lua will treat it as a global. This can leak state across tests and make results flaky; declare `local meta` near `local index = 2` (as done in `left_click_decrements_index`).
Sign in to join this conversation.
No description provided.