Show manual sync-conflict fix instructions in-app instead of deep-linking to Help

NSWorkspace.shared.open() silently drops #fragment anchors on file://
URLs, so "Fix It Myself" always landed on the Help Book index instead
of the relevant section. Replaced with GitSyncManualFixSheet, an
in-app sheet showing the real conflicting filenames and sync path.

Also indent conversation rows one level deeper than their containing
folder in the sidebar and conversation list, so nesting is visible on
the conversations themselves and not just the folder headers.
This commit is contained in:
2026-08-04 12:21:15 +02:00
parent 125e1698f7
commit e2284aba2b
10 changed files with 556 additions and 14 deletions
+13 -9
View File
@@ -206,7 +206,7 @@ struct oAIApp: App {
// Help menu
CommandGroup(replacing: .help) {
Button("Confab Help") { openHelp() }
Button("Confab Help") { Self.openHelpBook() }
.keyboardShortcut("?", modifiers: .command)
Divider()
Button("Read Release Notes") {
@@ -223,14 +223,18 @@ struct oAIApp: App {
}
#if os(macOS)
private func openHelp() {
// Opens the Help Book's index.html directly in the default browser rather than
// through NSHelpManager/Help Viewer see CLAUDE.md's macOS 27 beta note for why
// (Apple's Tips.app replacement for Help Viewer can't resolve anchors on this beta).
// Revisit once macOS 27 reaches RC.
if let helpBookURL = Bundle.main.url(forResource: "Confab.help", withExtension: nil) {
NSWorkspace.shared.open(helpBookURL.appendingPathComponent("Contents/Resources/en.lproj/index.html"))
}
/// Opens the Help Book's index.html directly in the default browser rather than through
/// NSHelpManager/Help Viewer see CLAUDE.md's macOS 27 beta note for why (Apple's Tips.app
/// replacement for Help Viewer can't resolve anchors on this beta). Revisit once macOS 27
/// reaches RC. No anchor/fragment support: NSWorkspace.shared.open() silently drops #fragments
/// for file:// URLs before handing off to the browser (confirmed via location.hash coming back
/// empty in the opened page) deep links into a specific section aren't reliable through this
/// API, so callers needing to point at specific content should show it in-app instead (see
/// GitSyncManualFixSheet for an example) rather than trying to anchor into this Help Book.
nonisolated static func openHelpBook() {
guard let helpBookURL = Bundle.main.url(forResource: "Confab.help", withExtension: nil) else { return }
let url = helpBookURL.appendingPathComponent("Contents/Resources/en.lproj/index.html")
NSWorkspace.shared.open(url)
}
#endif
}