Skip to content

Remove legacy SettingsView and isRedesignEnabled flag#422

Merged
FuJacob merged 1 commit into
mainfrom
chore/remove-legacy-settings-view
May 30, 2026
Merged

Remove legacy SettingsView and isRedesignEnabled flag#422
FuJacob merged 1 commit into
mainfrom
chore/remove-legacy-settings-view

Conversation

@FuJacob

@FuJacob FuJacob commented May 30, 2026

Copy link
Copy Markdown
Owner

Summary

The redesigned sidebar Settings (SettingsContainerView) has been the default since #407 and covers every legacy control. This deletes the 955-line legacy SettingsView and the isRedesignEnabled rollback escape hatch, and strips now-stale "lifted from the legacy SettingsView" comments on the redesigned panes.

Net change: ~1013 lines removed, no behavior change for users who were on the redesign (everyone, unless they had manually opted out via defaults write).

Validation

xcodebuild -project Cotabby.xcodeproj -scheme Cotabby -destination 'platform=macOS' build
# ** BUILD SUCCEEDED **

swiftlint lint --quiet
# 0 issues

xcodegen generate was run after deleting Cotabby/UI/SettingsView.swift so the committed project drops the stale build input. The XcodeGen CI check should pass on the regenerated project.

Linked issues

Refs #407 (the redesign that this flag was gating), #411, #421 (the About support copy churn that exposed how stale the legacy path was).

Risk / rollout notes

  • Anyone who set defaults write com.jacobfu.tabby cotabbySettingsRedesignEnabled -bool NO is silently moved onto the redesign. The flag is the entire rollback path being removed, so this is the intended effect.
  • The stale cotabbySettingsRedesignEnabled UserDefaults key on existing installs becomes ignored; harmless, can be reaped in a later release if desired.
  • Window autosave name CotabbySettingsWindowV4 is preserved exactly, so users keep their saved frame.
  • Shared components (TickMarkSlider, CustomRulesEditor, LanguageTagsEditor, KeyRecorderView, DownloadableModelCatalogView, HuggingFaceModelBrowserView, TagChip, AcceptanceModePickerView) are all retained — they are used by the redesigned panes and/or Welcome.
  • No test coverage for the deleted view existed, so no tests removed.

Greptile Summary

Removes the 955-line legacy SettingsView and the isRedesignEnabled UserDefaults flag that gated the rollback path, now that SettingsContainerView has been the universal default since #407. SettingsCoordinator is simplified to unconditionally open the redesigned window, and stale "lifted from legacy" doc comments are pruned across the pane files.

  • SettingsView.swift deleted: all functionality is covered by the existing redesigned panes (AppsPaneView, ShortcutsPaneView, WritingPaneView, etc.) and their shared components.
  • SettingsCoordinator simplified: the if isRedesignEnabled branch and its associated static key are removed; window frame, min size, and autosave name are now plain constants.
  • project.pbxproj updated: xcodegen generate was run after the file deletion, so the build input references are clean and the XcodeGen CI check should pass.

Confidence Score: 5/5

Safe to merge — this is a straightforward dead-code removal with no behavioral change for the current user population.

The only active path through SettingsCoordinator already pointed at SettingsContainerView, so deleting the unused branch and the legacy view it called is low-risk. The project file was regenerated via xcodegen, the autosave name is preserved, and all shared components referenced by the redesigned panes are retained. The stale UserDefaults key on existing installs becomes a no-op, which is the intended outcome.

No files require special attention. The coordinator simplification and the project file regeneration are the two most load-bearing changes, and both look correct.

Important Files Changed

Filename Overview
Cotabby/App/Coordinators/SettingsCoordinator.swift Removes the isRedesignEnabled computed property and redesignEnabledDefaultsKey constant; simplifies showSettings to unconditionally instantiate SettingsContainerView with hardcoded V4 frame, minSize, and autosaveName.
Cotabby/UI/SettingsView.swift Deleted entirely — 955-line legacy single-form settings view; all functionality lives in the redesigned panes under Cotabby/UI/Settings/.
Cotabby.xcodeproj/project.pbxproj Removes SettingsView.swift PBXBuildFile, PBXFileReference, and group membership entries; project file matches the deleted source file after xcodegen regeneration.
Cotabby/UI/Settings/SettingsContainerView.swift Removes stale comment noting the view was designed to match the legacy SettingsView's dependency graph; no functional change.
Cotabby/UI/Settings/Components/AcceptanceModePickerView.swift Comment updated to drop the reference to the deleted SettingsView.shortcutsSection; no logic change.
Cotabby/UI/Settings/Panes/AppsPaneView.swift Stale "Lifted from the legacy SettingsView.appsSection" phrase removed from the doc comment; no logic change.
Cotabby/UI/Settings/Panes/ShortcutsPaneView.swift Stale "Lifted from the legacy SettingsView.shortcutsSection" phrase removed from the doc comment; no logic change.
Cotabby/UI/Settings/Panes/WritingPaneView.swift Stale "Lifted from the legacy SettingsView.writingSection" phrase removed from the doc comment; no logic change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User opens Settings] --> B[SettingsCoordinator.showSettings]
    B --> C{isRedesignEnabled?\nREMOVED}
    C -->|true - BEFORE| D[SettingsContainerView\nwith V4 frame / autosave]
    C -->|false - BEFORE| E[SettingsView DELETED\nwith legacy frame]
    B --> F[SettingsContainerView\nwith V4 frame / autosave\nAFTER - always]
    style C fill:#f99,stroke:#c33,color:#000
    style E fill:#f99,stroke:#c33,color:#000
    style F fill:#9f9,stroke:#393,color:#000
Loading

Reviews (1): Last reviewed commit: "Remove legacy SettingsView and isRedesig..." | Re-trigger Greptile

The redesigned sidebar Settings (SettingsContainerView) has been the default
since #407 and covers every legacy control. Drop the rollback escape hatch
and the 955-line legacy view that nothing else referenced. Also strip the
'lifted from the legacy SettingsView' comments on the panes since the
lineage they pointed at no longer exists.

Users who opted out via 'defaults write ... cotabbySettingsRedesignEnabled
-bool NO' are silently moved onto the redesign. The stale UserDefaults key
becomes ignored and can be reaped later.
@FuJacob
FuJacob merged commit eaf69e2 into main May 30, 2026
4 checks passed
@FuJacob
FuJacob deleted the chore/remove-legacy-settings-view branch May 30, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant