Latest icon indicating copy to clipboard operation
Latest copied to clipboard

Add resident automation and replace the storyboard Settings window

Open moreaki opened this issue 8 months ago • 3 comments

Summary

This branch adds resident automation for update checks and supported in-app upgrades, keeps Latest optionally available from the menu bar after the main window closes, and rewrites the active Settings experience in code so the new controls can be maintained sanely.

The biggest architectural change is the Settings window rewrite. I removed the active Settings window flow from Main.storyboard and replaced it with a code-driven SettingsWindowController plus code-built tab content. The storyboard version had become too complicated and brittle to make the new controls and layout work reliably, especially once the window needed dynamic sizing, a menu bar resident mode, and the additional settings sections.

What changed

Resident automation and runtime behavior

  • Adds schedule-based automatic update checks while Latest is running.
  • Adds schedule-based automatic installation for updates that Latest can already install directly.
  • Runs automatic checks again after wake when the configured schedule is due.
  • Prevents overlapping update-check runs.
  • Adds a resident mode so closing the main window can keep Latest alive in the menu bar.
  • Adds a Show Latest in the Dock while hidden option and keeps Dock/menu bar badges in sync from the app-level runtime.
  • Adds a Settings item to the menu bar menu.

Settings window rewrite

  • Replaces the old storyboard-backed Settings window with a code-driven window controller and code-driven tabs.
  • Splits the UI into General, Automation, and Locations tabs.
  • Rebuilds the General and Automation tabs from reusable AppKit section/row components.
  • Removes the dormant Settings scenes from Main.storyboard and cleans up the now-dead localized storyboard strings.

Locations improvements

  • Redesigns the Locations tab with a cleaner list layout.
  • Adds inline remove actions so deleting a folder no longer depends on selecting a row first.
  • Aligns the count badges and improves the row metadata.
  • Allows removing standard folders by persisting them as excluded defaults.

Startup integration

  • Adds Open Latest at login in General settings.
  • Uses SMAppService.mainApp on macOS 13+ so the login-item behavior is native to macOS.
  • Leaves the control disabled on older systems where that API is unavailable.

Notes

  • Automation still works only while Latest is running. This branch does not introduce a launchd agent or other out-of-process scheduler.
  • The new Settings window was moved out of the storyboard intentionally because the storyboard setup was too hard to evolve safely for these behaviors and layouts.

Validation

Built successfully with:

xcodebuild -project Latest.xcodeproj -scheme Latest -configuration Debug -destination 'platform=macOS,arch=arm64' CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY='' build

I also manually verified:

  • Settings opens from both Cmd-, and the menu bar menu.
  • The menu bar resident mode keeps Latest available after the main window closes.
  • The redesigned Locations tab supports inline removal, including standard folders.
  • The Open Latest at login toggle is present and wired up on macOS 13+.

Addresses #547.

moreaki avatar Mar 14 '26 23:03 moreaki

Reworked the Settings Component:

image image image

Made sure the "keep in" Dock and Menubar work regarding main window close, are configurable and show the proper badge:

Dock Menubar
image image

Menubar allows for Settings to be opened: image

Automation has some default settings:

image image

moreaki avatar Mar 14 '26 23:03 moreaki

Any updates since 0.2.0-dev?

dtoub avatar May 09 '26 19:05 dtoub

Still getting crashes with 0.2.0-dev. Any updates? Thanks.

dtoub avatar May 27 '26 16:05 dtoub

Dead silence here. ????? I keep getting crashes overnight with Latest 0.2.0-dev. IS ANYTHING PROGRESSING??? Otherwise, I may just delete it and move on. Too many unsupported apps anyway, but at least with the autoupdate for this version, it was better than what is officially released for Latest.

dtoub avatar Jul 08 '26 16:07 dtoub