import { VersionInfo } from '@start9labs/start-sdk'

export const v_0_2_75 = VersionInfo.of({
  version: '0.2.75:0',
  releaseNotes: {
    en_US:
      'Three coordinated changes to the relay-mode summarize UX, all operator-visible. (1) Per-window sections now actually STREAM into the topics pane as each analyze window completes — previously the relay-mode branch sent sections_partial SSE events with a `partialSections` payload but the browser handler read `data.chunks`, so streaming silently no-op\'d and the operator saw zero topics until the very end. Root cause was that the server didn\'t have the parsed transcript entries available at the moment window_complete fired (analyze starts after transcribe but the entries hadn\'t been parsed yet on the Recap side). Fixed by adding an onTranscribeComplete callback to providers/relay.js — fires the instant the relay\'s transcribe_complete SSE event arrives, gives the Recap server the transcript text, which gets parsed into entries and cached BEFORE any window_complete callback fires. onWindowComplete then builds full { title, summary, entries, startTime } chunk objects and emits them under `data.chunks` matching the browser\'s expectation. Net effect: topics now appear in the right pane one-by-one as the model finishes each analyze window, exactly like the non-relay-mode path. (2) Video iframe no longer flickers when sections stream in. Pre-0.2.75 the sections_partial handler called render() which rebuilt root.innerHTML — destroying the YouTube #yt-player div and forcing the YT IFrame API to re-mount the player on every window completion, producing a visible flash. Replaced with a surgical applyStreamingChunksUpdate() function that finds the existing .chunks-scroll container, regenerates JUST its innerHTML from state.chunks, and updates the streaming-counter text. Iframe outside the container is untouched. Scroll position inside the container is preserved across the swap so the "I was reading the third section" view doesn\'t jump to top on each window. (3) New 4-stage pizza-tracker breadcrumb in the top row, matching the relay operator dashboard\'s style. Compact "Downloading → Transcribing → Analyzing → Done" indicator with a pulsing active-stage dot. Stage derived from state.currentStep + state.streaming so it advances automatically through the pipeline. Visible only while state.streaming || state.loading; hidden when idle or after job completion. Hidden on narrow viewports (<880px) where the toolbar already crowds the row. The breadcrumb updates surgically via updateProcessingBreadcrumb() called from applyStreamingChunksUpdate so the per-window section streaming also nudges the breadcrumb forward without a full re-render.',
  },
  migrations: {
    up: async ({ effects }) => {},
    down: async ({ effects }) => {},
  },
})
