Repository navigation
Conversation
dayfine
left a comment
There was a problem hiding this comment.
Reviewed SHA: 1d8d026
Verdict
NEEDS_REWORK
First-pass review of this PR's own diff against plza/upstream/s2-09 (#543), held to the infra bar. The reader is small, readable and correct as far as I can trace it: two full-width strips, the longest run of columns that cross both frame lines, a width gate, then OCR of the name band. It returns std::optional, guards an empty frame, has a negative case (user select over HOME), and its tests follow the CheckOnlineDetector pattern. Code health: 0 failures. CRLF kept, files listed in SourceFiles.cmake. Fork Draft CI (ubuntu / build) was still pending when I looked.
High
- The CI change cannot go upstream and swaps every test's fixtures.
.github/workflows/cpp-ci-serial-programs-base.yml:248-250now checks outdayfine/CommandLineTestsat a pinned commit for all six platforms and every suite, not only HomeTileReader. Upstream fixture updates stop reaching this branch's CI, and the PR can't be handed over with this hunk. Land the frames in PokemonAutomation/CommandLineTests first (or keep the workflow hunk in a fork-only commit that the handoff drops), and say in the description which one applies.
Medium
- Lab talk in code.
NintendoSwitch_HomeTileReader.cpptest section: "The names HOME shows for the two games on console B's frames." and "Console B, 2026-11-14: HOME after the order changed ...". Describe the screens ("HOME after the last-played game moved to the first tile"), not our console or date (user theme T3). - Comment and constants disagree.
NAME_MINS = 0xff000096,NAME_MAXS = 0xff96ffffkeep red <= 150 and blue >= 150, with green anything (0-255). The comment says "red low, green and blue high". Either constrain green or fix the comment. Also say why 150 (0x96).
Low
- This PR doesn't depend on the AutoStory chain. It includes only CommonFramework/CommonTools/Tests headers. Basing it on
maininstead of #543 would let it go upstream on its own, ahead of the engine. read_selected_home_tile_name():to_blackwhite_rgb32_range(band, true, NAME_MINS, NAME_MAXS)has a baretruefor an existing API. Write/*in_range_black=*/true.HOME_TILE_CASESis a namespace-scopeconst std::vector(non-trivial destructor). Use aconst HomeTileCase[]array as the AutoStory tables do, or a function-local static.HomeTileCase::Expectation::gameuses{}(empty) to mean "no game". Make itstd::optional<std::string_view>to matchtile.MIN_LINE_PIXELS = 3and the 0.18-0.25 width gate need a one-line why (strip height is about 15 px at 1080p; the frame is 0.214 wide, so the gate allows how much scroll or scale?).
…creens The workflow change that pointed every suite at a fork of CommandLineTests is dropped; the HomeTileReader frames come from the separate CommandLineTests change. The colour filter's comment says what it keeps, and the test comments describe the HOME screens instead of our console and date.
|
Review fixes, tip Fixed: 1 (the CI hunk is dropped; the description says the frames come from the separate CommandLineTests PR C1, so the suite fails on a missing file until it lands), 2 (console and date out of the test comments), 3 (the filter comment says red at most 150, blue at least 150, any green). |
|
Empty after the PLZA-minimal S2 cut (HomeTileReader / shared launch stay on the BDSP/FRLG branches). Branch kept as the base of the next PR. |
Depends on #543
Adds HomeTileReader, which reads which game tile HOME has selected from its cyan frame and the game name above the row, so a launch does not depend on the row's order. Its tests use HOME frames that come from the separate CommandLineTests PR (C1); this PR does not change CI's fixture checkout, so the HomeTileReader suite fails with a missing-file error until C1 lands. Fork Draft CI builds it and runs the suite. Part of the re-split of #522/#524/#525 into reviewable steps; review fixes are new commits on the PR that owns each problem, merged up the chain.