[Windows] Persist the user-selected pet activity tray side across relaunch

Open 💬 0 comments Opened Aug 2, 2026 by crono2250

Summary

Please persist the user's preferred side for the floating pet activity tray (above or below the pet) across app restarts.

The tray side can currently be changed by dragging the pet until the pointer reaches a screen edge:

  • touching the bottom edge moves the activity tray above the pet
  • touching the top edge moves the activity tray below the pet

That interaction is useful, but the last user-selected side is not reliably preserved. The tray can return to the other side after relaunch or after later automatic layout calculations.

Steps to reproduce

  1. Enable a floating pet in Codex Desktop for Windows.
  2. Drag the pet so the pointer touches the bottom edge; verify that the activity tray moves above the pet.
  3. Quit and relaunch Codex Desktop.
  4. Trigger a progress message/activity notification.
  5. Observe that the tray may appear below the pet again instead of retaining the selected side.

The inverse direction can be reproduced by touching the top edge to move the tray below the pet.

Current behavior

The pet window position is persisted, but the user's explicit activity-tray side preference is not treated as durable preference state. Automatic geometry resolution can replace it.

Expected behavior

The last side explicitly selected by the existing edge gesture should be restored on relaunch:

  • bottom-edge gesture → prefer activity tray above the pet
  • top-edge gesture → prefer activity tray below the pet

If the preferred side temporarily does not fit on screen, Codex may render the tray on the opposite side for that notification, but it should not overwrite the saved user preference.

Proposed implementation

Keep user intent separate from computed layout, for example:

  • preferredActivityTraySide: "auto" | "top" | "bottom"
  • effectivePlacement: the placement selected for the current display geometry and tray size

Suggested behavior:

  1. Default to auto for existing users.
  2. Save an edge-gesture selection as the preferred side.
  3. Restore it on app launch, preferably per display with a suitable fallback.
  4. Compute an effective placement for each tray presentation.
  5. When screen bounds require a temporary flip, preserve the preferred side.
  6. Continue allowing automatic start/end alignment independently of the top/bottom preference.

This avoids persisting an automatically calculated result as though it were an explicit user choice.

Acceptance criteria

  • The side chosen with the existing edge gesture survives a full app restart.
  • A temporary geometry fallback does not change the stored preference.
  • The preference behaves predictably when the pet is moved between displays.
  • Existing users retain the current automatic behavior until they explicitly choose a side.
  • Both short and long activity messages honor the preferred side when space permits.

Related issue

  • #34012 concerns the Windows pet notification badge becoming unclickable after moving it to the bottom-right. This request is distinct: it concerns persistence of the activity tray's above/below placement.

View original on GitHub ↗