Skip to content

Show different feedback when a named pin is created vs overwritten #79

@djdcks12

Description

@djdcks12

Description

PinStore.TrySet supports both creating a new pin and replacing an existing pin with the same name. This behavior is useful, but the current user feedback can make both cases look identical.

If a user pins a different object as player, existing Watch expressions using player immediately start resolving against the new object. That is correct, but it can be surprising if the UI only says "Pinned as player."

Why

Pin overwrites are a meaningful state change. A small wording difference helps users understand why watch values changed after pinning.

Suggested Fix

Make the pin set flow distinguish between create and update.

Possible API shape:

  • Add PinStore.Has(name) check before TrySet.
  • Or have TrySet return an enum/result indicating Created vs Updated.

Suggested output messages:

  • New pin: Pinned as player — reference it in Code / Watch as player.
  • Existing pin updated: Updated pin player — Code / Watch now resolve player to this value.

No confirmation dialog is required unless future feedback suggests accidental overwrites are common.

Acceptance Criteria

  • Creating a new pin and updating an existing pin show different messages.
  • Existing overwrite behavior remains supported.
  • Watch refresh behavior after pin update remains unchanged.
  • README does not need a major update for this unless desired.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions