Skip to content

feat(pub): persist like identity so cancel/duplicate clicks are per viewer #72

Description

@waterbro-8

Summary

Follow-up to #59.

Likes on published documents are counted in PubDoc.thumbUpCount and gated only by localStorage in the browser. Reloading on another device, clearing site data, or calling the increase endpoint twice still increments. #59 persists the decrement; it does not define a viewer.

Expected

  • A successful like is associated with a stable viewer identity (session, signed-in user, or documented anonymous token).
  • Duplicate increase from the same viewer is idempotent.
  • Cancel only succeeds if that viewer currently holds a like.
  • Counts stay nonnegative and survive reload.

Non-goals

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions