From 93324279a6d752a0223a48c91fd8beff0376c05d Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Fri, 8 May 2026 05:07:49 -0400 Subject: [PATCH] slab/menuband: drop orphaned presentation-toggle plumbing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The expand/collapse button on the floating panel was removed earlier, but Esteban's overlay-controls refinement reintroduced the `onTogglePresentationMode` ivar and Verovio merge kept the matching `togglePresentationMode()` / `expandFromStrip()` chain in the window delegate. Nothing wires or fires them now — the only entry into the expanded panel is the popover's mini-visualizer click. This deletes the dead callback ivar, the toggle method, and `expandFromStrip` so future readers don't chase a code path that no caller can reach. `collapseToStrip` stays — it's still called from `dockOnMenu`. Co-Authored-By: Claude Opus 4.7 --- .../PianoWaveformViewController.swift | 1 - .../PianoWaveformWindowDelegate.swift | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/slab/menuband/Sources/MenuBand/PianoWaveformWindow/PianoWaveformViewController.swift b/slab/menuband/Sources/MenuBand/PianoWaveformWindow/PianoWaveformViewController.swift index c034fe6ea6..d59281c4c4 100644 --- a/slab/menuband/Sources/MenuBand/PianoWaveformWindow/PianoWaveformViewController.swift +++ b/slab/menuband/Sources/MenuBand/PianoWaveformWindow/PianoWaveformViewController.swift @@ -23,7 +23,6 @@ final class PianoWaveformViewController: NSViewController { private let closeButtonCornerInset: CGFloat = 3 var onClose: (() -> Void)? - var onTogglePresentationMode: (() -> Void)? var onStepBackward: (() -> Void)? { get { collapsedView.onStepBackward } diff --git a/slab/menuband/Sources/MenuBand/PianoWaveformWindow/PianoWaveformWindowDelegate.swift b/slab/menuband/Sources/MenuBand/PianoWaveformWindow/PianoWaveformWindowDelegate.swift index 2604c02b7c..8ec97b70f5 100644 --- a/slab/menuband/Sources/MenuBand/PianoWaveformWindow/PianoWaveformWindowDelegate.swift +++ b/slab/menuband/Sources/MenuBand/PianoWaveformWindow/PianoWaveformWindowDelegate.swift @@ -450,15 +450,6 @@ final class PianoWaveformWindowDelegate: NSObject, NSWindowDelegate { }) } - private func togglePresentationMode() { - switch presentationState { - case .collapsed: - expandFromStrip() - case .expanded: - collapseToStrip() - } - } - private func dockOnMenu() { collapsedCustomOrigin = nil persistOrigin(nil, xKey: Self.collapsedOriginXKey, yKey: Self.collapsedOriginYKey) @@ -509,11 +500,6 @@ final class PianoWaveformWindowDelegate: NSObject, NSWindowDelegate { } } - private func expandFromStrip() { - transitionToExpanded() - showExpanded(restoringTo: nil) - } - private func installMonitors() { if keyMonitor == nil { keyMonitor = NSEvent.addLocalMonitorForEvents(matching: [.keyDown, .keyUp]) { [weak self] event in -- 2.51.2