Skip to content

fix(island): a loose robot docks at any place, a robot-only pill moves the island - #54

Merged
ChrisPlayer merged 2 commits into
mainfrom
fix/dock
Oct 24, 2026
Merged

ChrisPlayer merged 2 commits into
mainfrom
fix/dock

Conversation

@ChrisPlayer

Copy link
Copy Markdown
Contributor

Two gesture fixes for the island and its robot.

A loose robot docks at any place

Before, a robot dropped on the desktop went back into the island only near the island's saved place. With the island saved at the bottom left, a robot brought back to the top stayed loose.

  • island::dock_place(area, scale, centre, current) returns the place a dropped robot docks into. The island's own place is tried first, so a drop where it docked before keeps the island put. Otherwise, a drop within DOCK_REACH of the top or bottom edge docks there, and the left, middle or right third of that edge picks the side. A drop in the middle of the screen docks nowhere.
  • Dropped.docked is now that place instead of a yes or no. The page saves robots: 'island' and the place, plus the screen when it changed (landPatch).
  • Tests: the six places, the island's own place winning, a screen at negative x at 125 %, a 150 % screen with a top taskbar, taskbars on the left and right, a drop in the middle.

A robot-only pill moves the island

With Settings showing the robot alone at rest, the collapsed pill is almost all face, so nearly every drag pulled the robot out instead of moving the island.

  • Pill with words: unchanged. A drag on the face pulls the robot out, elsewhere it moves the island.
  • Robot-only pill (pillRest: "robot", or idle with no words): a drag anywhere moves the island. A still press of 400 ms (under 4 px) arms the pull: the robot grows to 114 % (transform only, no animation with reduced motion), and the drag that follows pulls it out. Let go after arming without dragging, nothing happens.
  • The deck's top-left character takes the same long press, so a drag there no longer sets the robot loose by accident. Its click still swaps agents.
  • lib/island/hold.svelte.ts, tested.

Checks

  • bun run check: 0 errors, 0 warnings.
  • vitest: 77 files, 556 tests.
  • cargo test: 93 tests.
  • Not tried in the real window on two screens.

@ChrisPlayer
ChrisPlayer merged commit 614008b into main Oct 24, 2026
3 checks passed
@ChrisPlayer
ChrisPlayer deleted the fix/dock branch October 24, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant