Skip to content

Persist command pill position after it is moved #407

@Cheggin

Description

@Cheggin

Problem

When the command pill is moved, it should reopen at its last position. Today it resets back to the same default position, which makes the move feel ignored.

The current implementation appears to recenter the pill on every show via showPill() / computePillBounds() in app/src/main/pill.ts, so any user-moved position is lost.

Expected behavior

  • If the user moves the pill, that position is remembered.
  • Hiding and reopening the pill restores the last user-chosen position.
  • The saved position is clamped to a visible area if displays are disconnected, resized, or moved.

Scope

  • Track user-driven pill movement and persist the last valid bounds/position.
  • Use the saved position on subsequent showPill() calls instead of always recentering.
  • Keep the existing default center-top placement for first launch or invalid saved positions.
  • Account for multi-monitor setups and display scale changes.

Acceptance criteria

  • Moving the pill, hiding it, and reopening it keeps the pill in the moved position.
  • Restarting the app preserves the last position if persistence is intended for this state.
  • Invalid/offscreen saved positions fall back to a visible default.
  • Unit coverage is added around pill position persistence/clamping, likely near app/tests/unit/pillWindow.test.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:uiWindow chrome, menus, side panel, themesbugSomething isn't workingpriority:P2Nice-to-have / Chrome niche

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions