ReviewOS

craft-native/craft

A Settings convention: default menu item + a small prefs store

#51
Closed glennmichael123 opened this 11 days ago ·
11 days ago

Two gaps every desktop craft app will re-fill by hand:

  1. No Settings… menu item. The default App menu (macos.zig:6157-6162, post-#35) has About/Hide/Quit but no "Settings… ⌘,", which every Mac app has. Suggest: a default item that emits a documented event into the page (craft:menu:action with a well-known id, or a dedicated craft:settings), so an app only has to listen. Apps that call craft.menu.set() keep full control as today.

  2. No preferences storage. storage.zig has an NSUserDefaults suite implementation that is commented out (:234) and unexposed. Apps currently choose between craft.fs.appDataDir() (hand-rolled JSON) and craft.keychain (wrong tool for non-secrets). A tiny craft.prefs.get/set/delete over NSUserDefaults — the platform's actual preferences mechanism, with its free defaults read debuggability — would cover the 90% case.

Context: stacksjs/harness built both halves itself (menu item + event routing + localStorage), and localStorage is the wrong place the moment the same app runs against a remote server from two windows.

🤖 Generated with Claude Code

Sign in to comment on this issue.