Skip to content

Show3D: hide empty frames from playback and add keyboard shortcuts for review curation #152

Description

@bobleesj

Scientific review problem

When a Show3D report combines pages/panels with unequal real frame counts, the global playback range follows the padded maximum. In the current BF/DF/SSB review, one page has 91 frames while another has 62. Playback can therefore advance into frames that have no real scientific content for the shorter page/panel. The UI may still show a global count such as x/91 even though the panel label reports x/62, leaving blank or misleading states during review.

Scientists also need to curate a time series while it plays without repeatedly reaching for small star/hide controls.

Requested behavior

  • Respect panel_real_frames (or an equivalent per-page/per-panel validity mask) in the frame slider and playback loop.
  • Never present padded placeholders as real acquisitions.
  • Skip hidden/invalid frames during forward, reverse, loop, and bounce playback.
  • Provide an explicit hidden/excluded state distinct from starred/best.
  • Make hidden frames recoverable through a visible filter or “show hidden” action.
  • Keep the displayed current/total counts scientifically honest for the active page and panels.

Keyboard shortcuts

Suggested scope:

  • S: toggle star on the current frame.
  • H: toggle hidden/excluded on the current frame.
  • Shift+S: toggle star on the current page.
  • Shift+H: toggle hidden/excluded on the current page.
  • Show the shortcuts in tooltips/help and ignore them while focus is in an input, select, or editable field.

Avoid Cmd/Ctrl+S as the primary shortcut because browsers reserve it for Save Page. If a modifier is needed, document and test the browser behavior explicitly.

Acceptance criteria

  1. Create two Show3D pages with unequal real frame counts, for example 62 and 91, padded only for serialization.
  2. On the 62-frame page, the slider and playback stop at 62 and never expose frames 63–91.
  3. H excludes the current frame immediately; playback skips it in every playback mode.
  4. S toggles the current-frame star without interrupting playback.
  5. Page-level shortcuts affect only the active page and are visually distinguishable from frame state.
  6. Hidden frames can be restored without rebuilding the widget.
  7. Shortcuts do not fire while typing in controls and do not interfere with arrow-key scrubbing.
  8. Add tests for unequal page lengths, hidden-frame playback, shortcut focus guards, and state serialization/export.

Reproduction context

Observed in an exported Show3D scientific screening report containing two pages and three panels (BF, DF, SSB), where the page lengths are 62 and 91 and panel_real_frames/panel_frame_labels are supplied. The issue matters for acquisition screening and ptychography candidate selection because blank/padded frames can be mistaken for failed measurements.

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