Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CLI/CLI+Hooks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2368,8 +2368,6 @@ extension ProgramaCLI {
return pruned(.table(root))
}



private func codexParseTOML(_ source: String, path: String) throws -> CodexTOMLValue {
let decoder = TOMLDecoder()
decoder.limits = .init(
Expand Down
1 change: 0 additions & 1 deletion Sources/CommandPaletteSearchEngine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1012,4 +1012,3 @@ enum CommandPaletteSearchEngine {
return max(fuzzyScore, titleScore + titleMatchBonus)
}
}

1 change: 0 additions & 1 deletion Sources/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4058,7 +4058,6 @@ struct ContentView: View {
}
}


for target in TerminalDirectoryOpenTarget.commandPaletteShortcutTargets {
registry.register(commandId: target.commandPaletteCommandId) {
if !openFocusedDirectory(in: target) {
Expand Down
1 change: 0 additions & 1 deletion Sources/FileDropOverlayView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import AppKit
import Bonsplit


/// Transparent NSView installed on the window's theme frame (above the NSHostingView) to
/// handle file/URL drags from Finder. Nested NSHostingController layers (created by bonsplit's
/// SinglePaneWrapper) prevent AppKit's NSDraggingDestination routing from reaching deeply
Expand Down
1 change: 0 additions & 1 deletion Sources/GhosttySurfaceScrollView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ final class GhosttySurfaceScrollView: NSView {
}
private(set) var searchFocusTarget: SearchFocusTarget = .searchField


#if DEBUG
private var lastDropZoneOverlayLogSignature: String?
private var lastDragGeometryLogSignature: String?
Expand Down
1 change: 0 additions & 1 deletion Sources/GhosttyTerminalView+Accessibility.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ extension GhosttyNSView {
}
}


override func accessibilitySelectedTextRange() -> NSRange {
selectedRange()
}
Expand Down
2 changes: 0 additions & 2 deletions Sources/Panels/ReviewPanel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ final class ReviewPanel: Panel, ObservableObject {
focusFlashToken += 1
}

// MARK: - Mode

// MARK: - Refresh

/// Kicks off `ReviewDiffProber.diffSnapshot` on a background queue and publishes the
Expand Down
3 changes: 0 additions & 3 deletions Sources/ProgramaConfigExecutor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ struct ProgramaConfigExecutor {
}
}



/// The security decision, isolated from the UI so it can be tested directly.
///
/// | directory | `confirm:` | prompt? |
Expand Down Expand Up @@ -324,7 +322,6 @@ struct ProgramaConfigExecutor {
private static func describeSurface(_ surface: ProgramaSurfaceDefinition) -> String? {
var parts: [String] = []


if let command = surface.command, !command.isEmpty {
parts.append(sanitizeForDisplay(command))
}
Expand Down
1 change: 0 additions & 1 deletion Sources/ProgramaSettingsFileStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,6 @@ final class ProgramaSettingsFileStore {
}
}


private func parseSidebarAppearanceSection(
_ section: [String: Any],
sourcePath: String,
Expand Down
3 changes: 0 additions & 3 deletions Sources/SessionPersistence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ struct SessionTerminalPanelSnapshot: Codable, Sendable {
var scrollback: String?
}


struct SessionMarkdownPanelSnapshot: Codable, Sendable {
var filePath: String
}
Expand Down Expand Up @@ -1002,7 +1001,6 @@ enum SessionPersistenceStore {
}
}


if let markdown = panel.markdown,
!isValidString(
markdown.filePath,
Expand Down Expand Up @@ -1042,7 +1040,6 @@ enum SessionPersistenceStore {
)
}


private static func isValidString(
_ value: String?,
maxBytes: Int = SessionPersistencePolicy.maxMetadataStringBytes
Expand Down
1 change: 0 additions & 1 deletion Sources/SettingsComponents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Darwin
import Bonsplit
import UniformTypeIdentifiers


struct SettingsSectionHeader: View {
let title: String

Expand Down
4 changes: 0 additions & 4 deletions Sources/SettingsModels.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Darwin
import Bonsplit
import UniformTypeIdentifiers


enum WorkspacePresentationModeSettings {
static let modeKey = "workspacePresentationMode"

Expand Down Expand Up @@ -79,8 +78,6 @@ enum AppearanceSettings {
}
}



enum QuitWarningSettings {
static let warnBeforeQuitKey = "warnBeforeQuitShortcut"
static let defaultWarnBeforeQuit = true
Expand Down Expand Up @@ -224,7 +221,6 @@ enum PreferredEditorSettings {
}
}


/// The tabs the settings window is split across.
///
/// Tabs group settings by the
Expand Down
4 changes: 0 additions & 4 deletions Sources/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import UniformTypeIdentifiers
import CoreImage
import CoreImage.CIFilterBuiltins


/// Height tracks the selected tab's content; width is free above a floor derived from
/// the tab labels, so the six segments never truncate.
enum SettingsWindowMetrics {
Expand Down Expand Up @@ -464,7 +463,6 @@ struct SettingsView: View {
}
.managedBySettingsFile(settingsFileStatus.isManaged(MenuBarExtraSettings.showInMenuBarKey))


SettingsCardDivider()

SettingsCardRow(
Expand Down Expand Up @@ -993,7 +991,6 @@ struct SettingsView: View {
shortcutResetToken = UUID()
}


}

/// Which Settings rows settings.json currently controls, and the file's parse error if its last
Expand Down Expand Up @@ -1548,7 +1545,6 @@ private struct ThemePickerRow: View {
}
}


private struct ShortcutSettingRow: View {
let action: KeyboardShortcutSettings.Action
@State private var shortcut: StoredShortcut
Expand Down
70 changes: 2 additions & 68 deletions Sources/SidebarVisuals.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Sidebar visual chrome.
// Holds sidebar footer/help-menu/scrim/blur/material/tint/preset enums,
// Holds sidebar footer/help-menu/blur/material/tint/preset enums,
// visual-effect/backdrop views, and the NSColor extension.
//
// SidebarFooter, SidebarTopScrim, SidebarScrollViewResolver, SidebarEmptyArea,
// SidebarFooter, SidebarScrollViewResolver, SidebarEmptyArea,
// ClearScrollBackground, DraggableFolderIcon, TitlebarLeadingInsetReader, and
// SidebarBackdrop are internal because VerticalTabsSidebar and ContentView
// (in ContentView.swift) construct/reference them.
Expand Down Expand Up @@ -623,71 +623,6 @@ enum SidebarTerminalAppearance {
}
}

struct SidebarTopScrim: View {
let height: CGFloat
@AppStorage("sidebarMatchTerminalBackground") private var matchTerminalBackground = false
@Environment(\.accessibilityReduceTransparency) private var accessibilityReduceTransparency
@State private var terminalColor = Color(nsColor: GhosttyBackgroundTheme.currentColor())

private var usesNativeGlassSidebar: Bool {
WindowGlassEffect.isAvailable && !accessibilityReduceTransparency
}

var body: some View {
Group {
if usesNativeGlassSidebar {
// The glass surface provides its own top treatment; a material
// scrim reads as an opaque gray band on it (Maps has none).
Color.clear
} else if matchTerminalBackground {
// The system material stays light over a terminal-coloured sidebar, which
// reads as a grey wash across the top. Fade the terminal colour instead.
LinearGradient(
colors: [
terminalColor,
terminalColor.opacity(0.85),
terminalColor.opacity(0.4),
Color.clear
],
startPoint: .top,
endPoint: .bottom
)
} else {
SidebarTopBlurEffect()
.mask(
LinearGradient(
colors: [
Color.black.opacity(0.95),
Color.black.opacity(0.75),
Color.black.opacity(0.35),
Color.clear
],
startPoint: .top,
endPoint: .bottom
)
)
}
}
.frame(height: height)
.onReceive(NotificationCenter.default.publisher(for: .ghosttyDefaultBackgroundDidChange)) { _ in
terminalColor = Color(nsColor: GhosttyBackgroundTheme.currentColor())
}
}
}

private struct SidebarTopBlurEffect: NSViewRepresentable {
func makeNSView(context: Context) -> NSVisualEffectView {
let view = NSVisualEffectView()
view.blendingMode = .withinWindow
view.material = .underWindowBackground
view.state = .active
view.isEmphasized = false
return view
}

func updateNSView(_ nsView: NSVisualEffectView, context: Context) {}
}

struct SidebarScrollViewResolver: NSViewRepresentable {
let onResolve: (NSScrollView?) -> Void

Expand Down Expand Up @@ -890,7 +825,6 @@ enum SidebarTrailingAccessoryWidthPolicy {
}
}


struct MiddleClickCapture: NSViewRepresentable {
let onMiddleClick: () -> Void

Expand Down
13 changes: 0 additions & 13 deletions Sources/TabItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ private enum SidebarWorktreeCreationResult: Sendable {
case failure(message: String)
}


// PERF: TabItemView is Equatable so SwiftUI skips body re-evaluation when
// the parent rebuilds with unchanged values. Without this, every TabManager
// or NotificationStore publish causes ALL tab items to re-evaluate (~18% of
Expand Down Expand Up @@ -1586,18 +1585,6 @@ struct TabItemView: View, Equatable {
}
}

private func shortenPath(_ path: String, home: String) -> String {
let trimmed = path.trimmingCharacters(in: .whitespacesAndNewlines)
guard !trimmed.isEmpty else { return path }
if trimmed == home {
return "~"
}
if trimmed.hasPrefix(home + "/") {
return "~" + trimmed.dropFirst(home.count)
}
return trimmed
}

private struct PullRequestStatusIcon: View {
let status: SidebarPullRequestStatus
let color: Color
Expand Down
1 change: 0 additions & 1 deletion Sources/TabManager+UITestHarness.swift
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ extension TabManager {
tab.focusPanel(bottomRight.id)
_ = tab.closePanel(bottomRight.id, force: true)


// Capture final state after Bonsplit/AppKit/Ghostty geometry reconciliation.
// We avoid sleep-based timing and converge over a few main-actor turns.
@MainActor func collectSplitCloseRightState() -> (data: [String: String], settled: Bool) {
Expand Down
8 changes: 0 additions & 8 deletions Sources/TabManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,6 @@ final class NotificationBurstCoalescer {
}
}


@MainActor
class TabManager: ObservableObject {
struct LifecycleResourceSnapshot {
Expand Down Expand Up @@ -2818,20 +2817,13 @@ class TabManager: ObservableObject {
workspace(withId: tabId)?.focusedPanelId
}


/// Returns the focused panel if it's a MarkdownPanel, nil otherwise
var focusedMarkdownPanel: MarkdownPanel? {
guard let tab = selectedWorkspace,
let panelId = tab.focusedPanelId else { return nil }
return tab.panels[panelId] as? MarkdownPanel
}







/// Backwards compatibility: returns the focused surface ID
func focusedSurfaceId(for tabId: UUID) -> UUID? {
focusedPanelId(for: tabId)
Expand Down
Loading
Loading