fix(app): fold reading toggle into the system View menu (#84)
CommandMenu("View") created a second View menu beside the system
one. CommandGroup(after: .toolbar) puts Toggle Reading Mode into
the system View menu; ⌘R and the .toggleReadingMode notification
are unchanged. Hosted test pins exactly one View-titled menu.
Closes #84
This commit is contained in:
1 parent
4e8865e660
commit
997607b9d3
3 files changed
+14
-2
No files matched your search
@@ -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.
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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" })
|
||||
}
|
||||
Reference in new issue
Block a user