feat: Separate daemon and show UI into their own commands and add additional utility commands #45
No reviewers
Labels
No labels
bug
chore
CI/CD
Code Cleanup
duplicate
DX
enhancement
help wanted
invalid
packaging
question
UI
UX
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Depends on
#37 refactor: Centralize app path configuration and separate dev + prod paths for most configs
waycasthq/waycast
#38 refactor: Create application container
waycasthq/waycast
Reference
waycasthq/waycast!45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/waycast-commands"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces Waycast's implicit "first call starts the daemon, later calls show the UI" behavior with an explicit subcommand-driven CLI. This resolves the previous ambiguity where your keybind to show the launcher could accidentally start the daemon.
What changed
CLI is now subcommand-required (
src/main.rs)commandwent fromOption<Command>to a requiredCommand— running barewaycastno longer does anything implicit.mainnow returnsResult<(), StartupError>and dispatches to handlers in the newcmdmodule.start_waycast()flow — which relied on the singleton lock to decide "start daemon vs. send show" — is gone, along with its TODOs about ownership hacks and latency.New
src/cmd/mod.rsmodule houses one handler per command and ownsStartupError(moved out ofmain.rs, expanded withDaemonNotRunning,TokioRuntimeFailed, andDataErrorvariants).New commands
waycast daemon0.waycast showshow. This is what a keybind should be bound to.waycast statuswaycast cache clearcachetable.waycast configAppConfig(debug format).waycast versioncmd.Supporting changes
src/socket.rs,src/app.rs): newAppMessage::Ping+"ping"socket command; daemon logs receipt. Backsstatus.src/socket.rs): removed the unusedSocketCommandenum; added aSocketErrortype.WaycastSocketCient::new/send_show/send_pingnow returnResultinstead of.expect()-panicking on a missing daemon — the reasonstatuscan cleanly report "not running."src/core/data/cache.rs): addedCacheRepository::clear()(truncate the cache table).modules/home-manager/waycast.nix):ExecStartnow runs<exe> daemoninstead of bare exe, matching the new explicit start.devenv.nix):runscript uses unquoted$@so subcommands/args pass through to the binary.Notes for reviewers
statusreports success once the write succeeds; the daemon never sends a reply back, so "running" really means "socket accepted the write." Good enough for diagnosis, not a true health check..sqlx/query-*.jsonoffline cache file is included for theclearquery.AppErrortypo fix:ApplicationEror→ApplicationError.Depends on #38 being merged first so this can target master.
Closes #18
8e4eb05b03to42cebbf0cdlgmt 🫡