Skip to content

[E-OWL-2] Roll history panel #974

@alxjrvs

Description

@alxjrvs

Part of #945

Phase 2: Roll history panel

Scope

A roll history panel inside the Owlbear extension showing the last N rolls for the current session. Persisted in localStorage — no Owlbear room state API, no backend. Stateless per session (resets on browser close).

Acceptance Criteria

  • Roll history panel displays the last 20 rolls (configurable constant, not hardcoded)
  • Each history entry shows: notation, total, and timestamp
  • History persists across panel closes and reopens within the same browser session (localStorage)
  • History resets on browser close (session storage is an acceptable alternative if localStorage is unavailable in the iframe sandbox)
  • "Clear history" button empties the list
  • Panel is scrollable and remains usable at 320px width with a long history list
  • Depends on Phase 1

Implementation Notes

  • Use localStorage keyed by a fixed extension ID — no user auth needed
  • If Owlbear's iframe sandbox blocks localStorage, fall back to in-memory state (log the limitation in the README)
  • Phase 2 shared roll log (visible to all players via OBR.room.setMetadata) is explicitly deferred — this phase is local-only history
  • When Phase 3 shared log is eventually designed, evaluate OBR.room.setMetadata as the persistence layer (purpose-built for per-room state, no backend needed)

Out of Scope

  • Shared roll log visible to other players in the room (Phase 3)
  • Game system selector
  • Owlbear room state API

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphaseA phase within an epic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions