Skip to content

Working desk-pets: hover to reveal which session it is - #78

Open
rounakdatta wants to merge 1 commit into
mainfrom
working-bot-tooltip
Open

Working desk-pets: hover to reveal which session it is#78
rounakdatta wants to merge 1 commit into
mainfrom
working-bot-tooltip

Conversation

@rounakdatta

Copy link
Copy Markdown
Owner

Summary

The grey working bots (left edge) were pure presence — no way to tell which session each one is. Now hovering a working bot pops a small pill to its right naming the session, and the bot holds still while you inspect it.

What it shows

The tmux window name (+ pane index when known) and the ~-abbreviated cwd, e.g. byoc (2) · ~/work/byoc. Long labels are middle-truncated so both the name (start) and the cwd leaf (end) survive.

Details

  • Working bots get enter/exit mouse events (no click added). A single shared pill canvas is reused across bots — only one is hovered at a time — sized to its text via the monospace advance so it hugs the label.
  • The hovered bot stops vibrating so the pill stays put and the small (26px) target doesn't slip out from under the cursor.
  • The pill follows its bot each frame if the working column re-centers (another session starts/stops), and is hidden if the session ends and the bot slides away mid-hover.
  • M.tipOwner guards against a stale bot's mouseExit hiding a pill another bot just showed.

Verified

  • Lua 5.4 parse-check on the rendered init.lua; the darwin system builds; NixOS still evaluates (the module no-ops on Linux).

Apply

sudo nix run nix-darwin/nix-darwin-25.11#darwin-rebuild -- switch --flake .

Auto-reloads on switch — hover a grey bot on the left edge.

🤖 Generated with Claude Code

The grey working bots were presence-only, with no way to tell which session
each one is. Give them an enter/exit hover handler that pops a small dark pill
to the bot's right naming the session — the tmux window name (+ pane index)
and the ~-abbreviated cwd, e.g. "byoc (2)  ·  ~/work/byoc" — middle-truncated
so both the name and the cwd leaf survive. The hovered bot stops vibrating and
holds still so the pill sits put and the small target doesn't slip from under
the cursor; the pill follows the bot if the column re-centers and is torn down
if the session ends mid-hover.

One shared pill canvas, reused across bots (only one hovered at a time), sized
to its text via the monospace advance. M.tipOwner guards a stale mouseExit from
hiding a pill another bot just showed. No click behaviour added.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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