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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Welcome window, connection form, and feedback panel now remember their position and size across launches. Previously these always reopened centered on screen because `setFrameAutosaveName` was never set on the underlying `NSWindow`/`NSPanel`. They now use the same native AppKit frame autosave mechanism the main editor and Settings windows already used.
- MCP: GET `/mcp` now opens a real SSE notification stream. Previously the GET path was routed through the request dispatcher, which had no handler for it, so the connection was closed immediately and `notifications/progress` events were dropped.
- MCP: concurrent tool calls no longer serialize at the dispatcher loop. Each exchange is dispatched in its own child task while session-state guards still serialize per-session work.
- MCP: server validates the `protocolVersion` requested in `initialize` against a supported set and rejects unknown versions with `-32600 invalid_request` instead of silently echoing back whatever the client sent.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import SwiftUI
@MainActor
internal enum ConnectionFormWindowFactory {
private static let baseIdentifier = "connection-form"
private static let autosaveName: NSWindow.FrameAutosaveName = "ConnectionFormWindow"

internal static func openOrFront(connectionId: UUID? = nil) {
if let existing = existingWindow(for: connectionId) {
Expand Down Expand Up @@ -53,8 +54,8 @@ internal enum ConnectionFormWindowFactory {
window.standardWindowButton(.zoomButton)?.isEnabled = false
window.styleMask.remove(.miniaturizable)
window.collectionBehavior.insert(.fullScreenNone)
window.center()
window.isReleasedWhenClosed = false
window.applyAutosaveName(autosaveName)
return window
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ internal final class TabWindowController: NSWindowController, NSWindowDelegate {
window.identifier = NSUserInterfaceItemIdentifier("main")
window.minSize = NSSize(width: 720, height: 480)
window.isRestorable = false
window.setFrameAutosaveName("MainEditorWindow")
window.applyAutosaveName("MainEditorWindow")
window.toolbarStyle = .unified
// Hide the window title ("Query 1 / TablePro") embedded in the unified
// toolbar — otherwise it claims leading space and pushes our navigation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import SwiftUI
@MainActor
internal enum WelcomeWindowFactory {
private static let identifier = NSUserInterfaceItemIdentifier("welcome")
private static let autosaveName: NSWindow.FrameAutosaveName = "WelcomeWindow"
private static let contentSize = NSSize(width: 700, height: 450)

internal static func openOrFront() {
Expand Down Expand Up @@ -48,8 +49,8 @@ internal enum WelcomeWindowFactory {
window.standardWindowButton(.zoomButton)?.isHidden = true
window.collectionBehavior.insert(.fullScreenNone)
window.setContentSize(contentSize)
window.center()
window.isReleasedWhenClosed = false
window.applyAutosaveName(autosaveName)
return window
}
}
15 changes: 15 additions & 0 deletions TablePro/Extensions/NSWindow+FrameAutosave.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// NSWindow+FrameAutosave.swift
// TablePro
//

import AppKit

extension NSWindow {
func applyAutosaveName(_ name: NSWindow.FrameAutosaveName) {
setFrameAutosaveName(name)
if !setFrameUsingName(name) {
center()
}
}
}
3 changes: 2 additions & 1 deletion TablePro/Views/Feedback/FeedbackWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import SwiftUI
@MainActor
final class FeedbackWindowController {
static let shared = FeedbackWindowController()
private static let autosaveName: NSWindow.FrameAutosaveName = "FeedbackWindow"
private var panel: NSPanel?
private var closeObserver: NSObjectProtocol?
private let viewModel = FeedbackViewModel()
Expand Down Expand Up @@ -42,7 +43,7 @@ final class FeedbackWindowController {
panel.standardWindowButton(.miniaturizeButton)?.isHidden = true
panel.standardWindowButton(.zoomButton)?.isHidden = true
panel.contentView = hostingView
panel.center()
panel.applyAutosaveName(Self.autosaveName)
panel.makeKeyAndOrderFront(nil)
self.panel = panel

Expand Down
Loading