Skip to content

Speaker notes can become misaligned or lost after copying/reordering pages #222

@whjstc

Description

@whjstc

Problem

When copying a slide page or moving pages to a new position, speaker notes can become attached to the wrong page. In some cases the notes appear to be lost.

This is serious during live presentations because the presenter notes no longer match the visible page.

Observed behavior

  • Copy a page that already has speaker notes.
  • Or move a page before/after another page.
  • The visible page order changes, but notes may stay bound to the old array index.
  • A note that belonged to page A can show up on page B, or disappear after the operation.

Expected behavior

  • When a page is copied, its speaker notes should be copied with it.
  • When a page is moved, its speaker notes should move with the page.
  • Page content and notes should be treated as one logical unit during page structure operations.

Likely cause

Speaker notes appear to be indexed by page position, while page copy/reorder operations mutate the export default [...] page array independently from the notes array. After insertion, deletion, duplication, or reorder, positional binding becomes stale.

Suggested fix

Prefer binding notes to a stable page id instead of array index. If notes remain stored as an array, all page copy/reorder/delete/insert operations should update notes atomically with export default [...], preserving order and length invariants.

Environment

  • @open-slide/core: 1.10.0
  • Project uses export const notes = [...] alongside export default [...] satisfies Page[].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions