Skip to content

Fix: Keep text visible after WPM auto-scroll reaches the end#30

Open
ecwilsonaz wants to merge 3 commits intof:masterfrom
ecwilsonaz:fix/keep-text-visible-after-wpm-scroll
Open

Fix: Keep text visible after WPM auto-scroll reaches the end#30
ecwilsonaz wants to merge 3 commits intof:masterfrom
ecwilsonaz:fix/keep-text-visible-after-wpm-scroll

Conversation

@ecwilsonaz
Copy link
Copy Markdown

Summary

Fixes #29

In Classic and Voice-Activated (silence-paused) modes, the overlay would immediately switch to a "Done!" screen and auto-dismiss 1 second after the auto-scroll reached the last word. This made timed mode unusable because speakers typically finish talking 10–20 seconds after the scroll ends.

Now in timer-based modes (Classic/Voice-Activated), when the scroll reaches the end on the last page:

  • The prompter text stays visible instead of switching to "Done!"
  • The overlay does not auto-dismiss
  • The speaker can close manually via the X button or Esc key

Word Tracking mode behavior is unchanged (auto-dismiss is appropriate there since it knows when the speaker actually finishes).

Changes

  • NotchOverlayController.swift — Gate doneView and auto-dismiss on listeningMode == .wordTracking in both NotchOverlayView and FloatingOverlayView
  • ExternalDisplayController.swift — Same fix for ExternalDisplayView (fullscreen and external display)
  • BrowserServer.swift — Suppress isDone in the WebSocket state for classic/silencePaused on the last page; also stop timerWordProgress from advancing after scroll completes

Test plan

  • Classic mode, single page: auto-scroll reaches end → text stays visible, dismiss manually with X or Esc
  • Classic mode, multi-page: auto-scroll reaches end → "Next Page" button appears as before
  • Voice-Activated mode, single page: same as Classic
  • Word Tracking mode: behavior unchanged — auto-dismiss after 1s on last page
  • Fullscreen mode: text stays visible in Classic/Voice-Activated
  • Browser source (if enabled): prompter text stays visible in Classic/Voice-Activated

In Classic and Voice-Activated modes, the overlay would immediately
switch to a "Done" screen and auto-dismiss 1 second after the
auto-scroll reached the last word. This made timed mode unusable
because speakers typically finish talking 10-20 seconds after the
scroll ends.

Now in timer-based modes (Classic/Voice-Activated), when the scroll
reaches the end on the last page:
- The prompter text stays visible instead of switching to "Done"
- The overlay does not auto-dismiss
- The speaker can close manually via the X button or Esc key

Word Tracking mode behavior is unchanged (auto-dismiss is appropriate
there since it knows when the speaker actually finishes).

Fixes f#29
Address code review findings:
- ExternalDisplayView: gate doneView and speechRecognizer.stop() on
  wordTracking mode, matching NotchOverlayView/FloatingOverlayView
- BrowserServer: suppress isDone in classic/silencePaused modes on
  last page so browser clients keep showing prompter text
- Revert accidental DEVELOPMENT_TEAM change in project.pbxproj
The timerWordProgress was incrementing unboundedly after the scroll
reached the end, unlike the SwiftUI views which guard with !isDone.
Add a scrollDone check before incrementing to stop wasting CPU on
the 100ms broadcast timer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improvement: Do not end speech after wpm auto-scroll mode reaches the last line.

1 participant