refactor: rebuild Welcome as Xcode-style launcher with HIG-correct primitives#1055
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
… in NativeSearchField; resize Welcome to 800x480
…field width, deterministic multi-select, deinit cleanup, file rename
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this exists
The Welcome window's runtime behavior is launcher-shaped: open the window, pick a connection, the connection opens in its own window, the launcher is dismissed/backgrounded. Apple's documented analogue is Xcode's Welcome window. PR #1052 picked the Mail/Notes-style
NavigationSplitView+ toolbar-search frame, which fixed the white-search-on-vibrancy bug correctly using documented APIs but forced a "sidebar isn't really a sidebar" mismatch (Apple HIG: sidebar = navigation; the Welcome left column is branding + a primary CTA).This PR reverses the structural choice while keeping the API hygiene from #1052 and folds in audit findings (drop
DoubleClickDetector, drop per-row.contextMenu, single sheet path for license activation, search debounce, single filter source, localization gaps, comments).Architecture
HStack { WelcomeActionsPanel, Divider, ConnectionsPanel }. NoNavigationSplitView. No structural sidebar.820x500,.windowResizability(.contentSize),.windowStyle(.hiddenTitleBar). Launcher exception per HIGLaunchingpage..regularMaterial): app icon + version + license + three action buttons (Create Connection prominent, Try Sample, Import Connections) + sync indicator + keyboard hints. Localized version line and Check-for-Updates link.controlBackgroundColor): inline header with+/ "New Group" buttons +NativeSearchField+ connection list. Search field renders correctly because the panel background is opaque, not vibrancy.HIG-correct primitives
Windowscene +.windowResizability(.contentSize)NSSearchFieldviaNativeSearchFieldwrapper, on opaque background.onKeyPress(characters: .init(charactersIn: "f"))on connections panel setsfocus = .searchcontextMenu(forSelectionType: UUID.self, menu:, primaryAction:)on the List, identical pattern toFavoritesTabView.swift:145vm.activeSheet = .activation;SyncStatusIndicatoraccepts a callbackTaskcancellation; immediate rebuild on entering/leaving search.buttonStyle(.link)(system link cursor) instead of customNSCursor.push/popAudit cleanups
DoubleClickDetectorfrom welcome surfaces (WelcomeConnectionRow.swift, linked-folder row)..contextMenuinTreeRowsView. Replaced by container-levelcontextMenu(forSelectionType:).vm.filteredConnections(dual filter source); empty-state checksvm.treeItems.isEmpty && vm.linkedConnections.isEmpty.searchText.didSet { rebuildTree() }synchronous path; replaced with debouncedscheduleRebuildTree.SyncStatusIndicator's local.sheet. Routes through callback.SyncStatusIndicator.swift:5-6header,WelcomeConnectionRow.swift:108-113doc,WelcomeViewModel.swift:156-157planning note.Version %@,Check for Updates...,Pro,Activate License,New,Settings.License expired — sync pausedwithLicense expired, sync paused(em-dash removed per CLAUDE.md style).hasGroupscomputed inTreeRowsViewto replace inlineif case .group = $0predicate.Out of scope
DoubleClickDetectorcallers (SidebarView.swift:196,DatabaseSwitcherSheet.swift:254,DatabaseTypeChooserSheet.swift:78,QuickSwitcherView.swift:171). Each warrants its own selection-type-driven refactor in a follow-up.DatabaseConnectionhas nolastUsedAt; data-model change first.WindowChromeConfigurator/WindowOpenerBridgeNSViewRepresentablebridges. SwiftUI has no first-class API for hiding individual standard window buttons; these are unavoidable.CHANGELOG
No entry. The Welcome SwiftUI scene rework is already in
[Unreleased]Changed; this PR refines that unreleased work, which CLAUDE.md says not to double-log. Same logic as #1052.Source material
docs/refactor/welcome-hig-research.mdanddocs/refactor/welcome-hig-synthesis.md(already on a separate branch / not staged).contextMenu(forSelectionType:menu:primaryAction:).Test plan
+and "New Group" inline buttons, search field renders without white box bezel.primaryAction).primaryAction.