Skip to content

feat(island): six places, moved by dragging the pill or from Settings - #49

Merged
ChrisPlayer merged 5 commits into
mainfrom
feat/place
Oct 18, 2026
Merged

ChrisPlayer merged 5 commits into
mainfrom
feat/place

Conversation

@ChrisPlayer

Copy link
Copy Markdown
Contributor

The island can live at six places: the top or the bottom of the screen, each at the left, the centre or the right. Top centre stays the default, and saved prefs without a place parse to it.

Moving it

  • Drag the pill. A press on the collapsed pill that moves 4 px carries the island (lib/island/move.svelte.ts).
    • While it is carried, the window spans the screen's work area (island_span), the six places show as dashed targets, and the nearest one is filled.
    • Let go, the island goes to the nearest place on the usual spring, and the place is saved. The window then shrinks around it again.
    • A click without movement does what it did. The click that ends a drag opens nothing.
  • Pull the robot out by its face. That still sets it loose on the desktop (companion_drag with detach). Dropped near the island, wherever the island is, it docks back in (island::docks now measures from the island's edge and side).
  • Settings > Place > Island position. A 3 × 2 picture of the screen with its taskbar, keyboard-reachable (arrows, Home, End). The chosen place's name is written under it, so colour is never the only cue.

At the bottom

  • The island sits against the taskbar, using the monitor's work area, so a taskbar on any side is left out. It mirrors the top island: rounded on its top corners only, the drops' necks rising from the edge.
  • The deck, the peek, the ask and permission cards, the settings panel and the music and timer drops open upward. The deck's content keeps its order.

At the left or right

  • The island is aligned on its side with a 16 px margin, and the drops move to its inner side.
  • On a 1366 px screen, the 860 px deck stays fully on screen.

Rust

  • island_frame, docks, follow and island_place take the place (companion_window::Anchor and Edge, reused). Moving to another screen keeps the place.
  • New command island_span, in acl.rs and bots.toml.
  • Tests cover negative monitor coordinates, scale factors 1.25, 1.5 and 2, a taskbar on the left, top and right, and a 1366 px laptop.

Demo

place=top-left|top-center|top-right|bottom-left|bottom-center|bottom-right in the pose (lib/island/pose.ts), with a fake taskbar for the bottom places. Fixed on the way: poseMusic rewrote the prefs and lost the demo's place.

Checks

  • bun run check: 0 errors, 0 warnings.
  • vitest: 72 files, 524 tests (place.test.ts covers the nearest-place snap and the prefs migration).
  • cargo test: 86 tests.
  • Dragged and dropped in the browser demo: the island lands bottom right and the place is saved.
  • Not yet tried in the real window on Windows.

@ChrisPlayer
ChrisPlayer merged commit bbf299f into main Oct 18, 2026
3 checks passed
@ChrisPlayer
ChrisPlayer deleted the feat/place branch October 18, 2026 12:46
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