Skip to content

The card that switched under the cursor: a hover bug in Shelf-Made Tycoon

6 min readBy Eduardo Orellana ·

In the demo of Shelf-Made Tycoon, Flockbay’s own game, you could sign the wrong client without ever clicking on them. The cursor crossed another ticket for a tenth of a second, the card under it switched, and Sign signed that offer instead. This is how it was fixed, and why every test that jumps the cursor passes it.

AppImage, x86_64. Ubuntu 22.04, Debian 12, Fedora 39 or newer.

Intel or AMD Chromebook, with Linux turned on.

Download for macOSDownload for WindowsDownload for Linux

Sign signed the wrong client

Shelf-Made Tycoon is a tycoon game about growing a tiny warehouse into a logistics empire. It is Flockbay’s own game, built in Flockbay on Godot 4.7.2, and it is on Steam. Work arrives on the offers board as tickets, one per client’s offer. Touch a ticket and its card opens beside it, with the offer and a Sign button.

Here is the demo as it was on 25 October 2026. You rest the cursor on the Gull Street Firm’s ticket and its card opens. You move towards Sign. On the way, the cursor crosses Lumen Textiles’ ticket for 100 ms. That is enough: Lumen’s card replaces the Firm’s, Sign is still under the cursor, and you press it. You have signed Lumen’s offer.

Two more bugs shipped beside it. A confirm named another client’s truck, so it read as a question about the wrong offer. And Wishlist on Steam and Email your feedback handed an address out of the game and showed nothing else, so a player whose browser never opened was left pressing a button that did nothing they could see. A person found all three by hand, in minutes.

Every test that jumps the cursor passes it

The obvious reading is that a test suite would have caught this. It would not, and the reason is how such tests move. A scripted test puts the cursor on Sign in one step: it never crosses another ticket, so the card never switches.

It also judges by the game’s state, not the screen. A confirm that names the wrong client is still a confirm, and the offer it signs is the one the state says it signs. And on macOS or in Steam’s Big Picture, a game is told the store page opened whether it did or not, so a link button reports success either way.

All three bugs live in the gap between what the code does and what a hand on a mouse sees. That gap is where a person found them, and it is where the fixes had to work.

A card that opens on hover is a submenu, and submenus have had this bug for as long as they have existed. Ben Kamens described the fix in 2013, in a post about Amazon’s mega dropdown: draw a triangle from where the cursor was to the near edge of the open submenu. While the cursor moves inside that triangle, it is heading for the submenu, so the items it crosses on the way do not take over.

The offers board now does the same. When the cursor comes onto a ticket while another ticket’s card is open, the game checks whether it is inside the triangle from its last position to the card’s near edge. If it is, the new card waits. It opens only if the cursor rests on that ticket for 0.25 s, more than twice the 100 ms the playtester’s hand-timed path below spent crossing one. From scripts/ui/hud.gd, shortened:

GDScript
## How long the cursor rests on a ticket it came onto on its way to the open card before that
## ticket's card opens instead. A hand crossing a ticket on its way is off it well within this.
const AIM_WAIT := 0.25

func _hover_ticket(key: String, anchor: Control) -> void:
	if detail.visible and key != detail_key and _aiming_at_card():
		_hover_next = {"key": key, "anchor": anchor, "wait": AIM_WAIT}
		return
	_hover_next = {}
	_open_detail(key, anchor)

## Whether the cursor, from where it was a frame ago, is heading for the open card: inside the
## triangle from that point to the card's near edge, as a submenu stays open on the way to it.
func _aiming_at_card() -> bool:
	var mouse := root.get_global_mouse_position()
	var card := detail.get_global_rect()
	if _aim_from.x >= card.position.x or mouse.is_equal_approx(_aim_from):
		return false
	return Geometry2D.point_is_inside_triangle(mouse, _aim_from, card.position, Vector2(card.position.x, card.end.y))

A button that only hands out an address is a dead button

The link buttons had the opposite problem: they worked, as far as the code could tell. OS.shell_open can report success when no browser appears, as it does on macOS and in Steam’s Big Picture. So after every press the button now shows the address with a Copy button under it, and says why. Shortened:

GDScript
if opened != OK:
	_link_note(wishlist, tr("Couldn't open your browser."), Playtest.STORE_URL)
elif not in_overlay:
	_link_note(wishlist, tr("Didn't open? Copy the address:"), Playtest.STORE_URL)

The playtester had to move like a hand

A person found these bugs. The harder question was whether an agent could, on the build before the fixes, and stay quiet on the build after. So the three bugs became the test for Flockbay’s playtester.

It moves the cursor the way a hand does: from where it is to the target, one motion event a frame, straight through whatever lies between, timed by Fitts’s law (about 1 s for 600 px to a 40 px button), and it rests 120 ms before it presses. Each press records what the screen said before it and what changed after it, and four rules flag it: no_change for a dead control, exit_only for a press that only hands an address out of the game, panel_switched when the panel under the press is about another item than the one the cursor set out from, and names_differ when a dialog names something its panel does not.

It ran in two rounds on 25 October 2026, on Windows with Godot 4.7.2, headless and timed in physics ticks, from the title screen, with no game state set, against the build before the fixes and the build after them. In the first round, on the build before, the path from the Gull Street Firm’s ticket to Sign crossed Lumen Textiles’ ticket for 100 ms, the card switched, and the press flagged panel_switched with both names. In the second round, with the playtester’s tools as they ship in the Windows app, a Sign anyway on Pike & Daughters’ card opened a confirm that named Brightwire Electronics’ truck: names_differ. Wishlist and Email your feedback flagged exit_only.

On the build after the fixes, the same path crossed Mossgate’s ticket for 100 ms; the card stayed the Firm’s and Sign signed the Firm. The top ticket’s Sign on three boards, the confirm and both link buttons flagged nothing. The second round wrote 142 press records across the two builds, with no error line in any record’s log and no script error in any run.

A person still found them first

It is tempting to read this as an agent that playtests. It is narrower than that. A person noticed the bugs; the agent then reproduced them, flagged them on the broken build and passed the fixed one. That is QA, and it is worth having on every change, but it is not watching a stranger play.

It has limits of its own. These runs were headless, so each record is text, not a frame. names_differ is a hint for a read of the copy, not a verdict. And the game seeds its companies from the clock, so the exact board where the bug was first seen never came up again; the same bug with other clients did.

What carries over to your own game is the method. If your UI opens on hover, test it with a cursor that travels, not one that teleports. If a button leaves the game, show the player where it tried to go.

Flockbay’s agent plays your Godot game with real input events, reads Godot’s output, and reports what a player would trip on.

Download Flockbay free

AppImage, x86_64. Ubuntu 22.04, Debian 12, Fedora 39 or newer.

Intel or AMD Chromebook, with Linux turned on.

Download for macOSDownload for WindowsDownload for Linux

Flockbay

The free AI game maker for Windows, macOS and Linux.