Skip to content

feat(desktop): outline in the bot's color around the window it uses - #184

Merged
httpsphl merged 1 commit into
mainfrom
feat/desktop-outline
Oct 5, 2026
Merged

httpsphl merged 1 commit into
mainfrom
feat/desktop-outline

Conversation

@httpsphl

@httpsphl httpsphl commented Oct 5, 2026

Copy link
Copy Markdown
Owner

The owner asked for the window, or the desktop, to show the bot's color the whole time a bot is using it (spec 24.9).

What changes

  • The outline is a new window in platform/desktop/windows/outline.rs:
    • a 3 px ring (at 96 DPI) around the app's DWM frame;
    • layered with a color key, so the inside is see-through;
    • click-through, never takes focus, a tool window so it never shows in the list of windows;
    • placed right above the app in z-order, not topmost, so the owner's own window in front of the app covers it too;
    • hidden while the app is minimized, hidden or gone.
  • The daemon task desktop/outline.rs, spawned in main next to the browser sweep:
    • it listens to desktop.changed (a read, a picture or an action) and bot.state;
    • it follows the window every 250 ms;
    • it hides the outline 3 s after the turn ends, after 60 s without desktop use, or on stop;
    • only one outline shows at a time: the window used last.
  • The notice and the outline share a small overlay.rs facade (notice_*, outline_*). This keeps platform/desktop/mod.rs under 300 lines.

Tests

  • Unit tests for when the outline shows, follows, lingers and goes, including stop/resume and two bots.
  • Real window (draws a window, sends no input): the outline sits around the frame, directly above the app, follows a move, hides while the app is minimized, comes back, and hides on request.

Manual

  • With a real app (Chrome, Notepad), ask a bot to read it and click something. The ring in the bot's color should appear around the window. Bring another window in front of it and the ring should be covered. When the bot finishes, the ring should go about 3 s later.

While a bot reads or acts in a window, the daemon draws a thin ring in
the bot's color around the window's frame on the owner's screen. It is a
click-through, see-through tool window placed right above the app in the
order of windows, so a window of the owner's in front covers it too. It
follows the window every 250 ms, steps aside while it is minimized, and
goes 3 s after the bot's turn ends, after a minute without desktop use,
or when the owner stops the bot. A daemon task follows desktop.changed
and bot.state to decide; the notice and the outline now share a small
overlay facade in the platform module.
@httpsphl
httpsphl enabled auto-merge October 5, 2026 00:40
@httpsphl
httpsphl merged commit a59f6ee into main Oct 5, 2026
7 of 8 checks passed
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