Skip to content

Omit configs excepts dock items#8

Merged
5ouma merged 1 commit intomainfrom
feat-internal-omit-config
Dec 31, 2025
Merged

Omit configs excepts dock items#8
5ouma merged 1 commit intomainfrom
feat-internal-omit-config

Conversation

@5ouma
Copy link
Owner

@5ouma 5ouma commented Dec 31, 2025

Others are finally not needed anymore.

Others are finally not needed anymore.
@5ouma 5ouma self-assigned this Dec 31, 2025
@5ouma 5ouma added 🎉 New Feature A new feature 🧨 Breaking Change Includes breaking changes labels Dec 31, 2025
@5ouma 5ouma merged commit c0d695b into main Dec 31, 2025
3 of 4 checks passed
@5ouma 5ouma deleted the feat-internal-omit-config branch December 31, 2025 08:47
@coderabbitai
Copy link

coderabbitai bot commented Dec 31, 2025

Caution

Review failed

Failed to post review comments

Walkthrough

This change represents a significant architectural shift from a LaunchPad/SQLite database model to a dock-plist based system. Multiple public types, helper functions, and entire modules are removed. Config structure is simplified to focus exclusively on dock items, with Apps, Widgets, and Desktop configurations eliminated. Legacy database reconciliation and page/folder manipulation code is removed.

Changes

Cohort / File(s) Summary
Dock-plist system migration
internal/command/command.go
Replaces launcher-page parsing and DefaultOrg logic with dock-plist based flow. Removes parsePages, DefaultOrg, and extensive LaunchPad/SQLite operations. SaveConfig and LoadConfig now operate around dock plist data path. Reworked error handling and guard paths for empty dock configurations. Removed usage of external utilities, explicit desktop wallpaper handling, and database lifecycle management.
Database utility removal
internal/command/utils.go
Removed removeOldDatabaseFiles function (SQLite file deletion logic) and split generic helper function.
Config structure simplification
internal/database/config.go
Removed public fields Apps, Widgets, Desktop from Config struct; only Dock retained. Changed Folder field types from custom enums (DisplayFolderDisplay, ViewFolderView, SortFolderSort) to primitive ints. Removed multiple public types: Apps, Page, AppFolder, FolderPage, Desktop, FolderDisplay, FolderView, FolderSort, and associated constants. Removed LoadConfig verification step.
Database schema and methods cleanup
internal/database/database.go
Removed GetMissing method and public helpers GetMaxAppID and GetMaxWidgetID. Deleted large blocks of legacy code: FlattenApps, AddRootsAndHoldingPages, createNewPage, createNewFolder, createNewFolderPage, updateItem, ApplyConfig, and related helpers. Minor wording fix in error messages. Reduced imports accordingly.
Model type simplification
internal/database/model.go
Removed ApplicationType, DownloadingAppType, and WidgetType constants. Removed public App and Widget types. Removed dbApps and confApps fields from LaunchPad. Removed App and Widget foreign-key fields from Item; added Group foreign-key relation.
Desktop integration removal
internal/desktop/background.go, internal/desktop/background_test.go
Removed entire background.go file eliminating macOS AppleScript integration: SetDesktopImage and Tell exported functions, plus all supporting helper utilities. Removed corresponding unit test file background_test.go.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive The description 'Others are finally not needed anymore' is vague and generic. While it broadly relates to the removal of non-dock configuration items, it does not convey meaningful information about the specific changes made in the changeset, such as the removal of Apps, Widgets, Desktop types, database functions, or AppleScript integration. Provide a more descriptive summary of the changes, such as: 'Remove Apps, Widgets, and Desktop configurations; simplify Config struct to only Dock; remove database and AppleScript utilities no longer needed.'
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Omit configs excepts dock items' is partially related to the changeset. It mentions omitting configs and focusing on dock items, which aligns with the primary changes of removing Apps, Widgets, Desktop configurations while retaining Dock. However, the title contains a grammatical error ('excepts' should be 'except') and is somewhat vague about the scope of changes, such as the removal of database-related functions and desktop AppleScript functionality.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-internal-omit-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

This was referenced Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧨 Breaking Change Includes breaking changes 🎉 New Feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant