diff --git a/CHANGELOG.md b/CHANGELOG.md index 91f4814..2e110dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,4 +26,5 @@ All notable changes to this project will be documented in this file. The format ### Fixed +- **workspace:** doubled View menu — "Toggle Reading Mode" (#68) sat in its own `CommandMenu("View")`, putting a second View menu in the menu bar beside the system one; it now joins the system View menu (`CommandGroup(after: .toolbar)`), ⌘R and behavior unchanged (issue #84) - **acp:** mentor pane against adapter 0.21.5 — `session/new` now sends the newly required `mcpServers` list (empty: Museion ships none); its absence was rejected as invalid params and wrongly surfaced as "the mentor engine stopped" when the engine was fine. The advisory version-drift note now compares base versions, so build metadata (`0.21.5+2177.g735e426` recorded vs `0.21.5` reported) no longer fabricates a mismatch on every launch; real drift still fires. diff --git a/Museion/MuseionApp.swift b/Museion/MuseionApp.swift index 193fb12..fc251ba 100644 --- a/Museion/MuseionApp.swift +++ b/Museion/MuseionApp.swift @@ -84,8 +84,8 @@ struct MuseionApp: App { CommandGroup(after: .textEditing) { EditSpellingToggle(gate: gate) } - // #68: View menu reading toggle — reaches the visible editor. - CommandMenu("View") { + // #84: joins the system View menu — CommandMenu("View") would add a second one beside it. + CommandGroup(after: .toolbar) { Button("Toggle Reading Mode") { NotificationCenter.default.post(name: .toggleReadingMode, object: nil) } diff --git a/MuseionTests/MuseionTests.swift b/MuseionTests/MuseionTests.swift index c4c0570..54768fe 100644 --- a/MuseionTests/MuseionTests.swift +++ b/MuseionTests/MuseionTests.swift @@ -5,6 +5,7 @@ // Created by Alexander Kucera on 26.08.26. // +import AppKit @testable import Museion import Testing @@ -12,3 +13,13 @@ import Testing #expect(AppMetadata.name == "Museion") #expect(AppMetadata.tagline == "The Agentic Writing Environment") } + +/// #84: pins one View menu carrying the reading toggle. View items are +/// context-lazy, so the View-titled menu count is the discriminator. +@MainActor +@Test func `single View menu hosts the reading toggle`() throws { + let main = try #require(NSApp.mainMenu) + let viewMenus = main.items.filter { $0.title == "View" } + #expect(viewMenus.count == 1) + #expect((viewMenus.first?.submenu?.items ?? []).contains { $0.title == "Toggle Reading Mode" }) +}