Skip to content

Non-blocking service start, add .local to URLs, and fallback when config is missing#8

Open
justyn-clark wants to merge 1 commit intomainfrom
codex/fix-issues-before-v0.1-release
Open

Non-blocking service start, add .local to URLs, and fallback when config is missing#8
justyn-clark wants to merge 1 commit intomainfrom
codex/fix-issues-before-v0.1-release

Conversation

@justyn-clark
Copy link
Copy Markdown
Owner

Motivation

  • Avoid blocking the CLI when launching a service so ports start <service> returns immediately.
  • Produce mDNS-friendly LAN URLs by ensuring hostnames end with .local when not provided explicitly.
  • Make commands usable before a config file exists by treating a missing config as an empty config.

Description

  • Updated start_service to use Command::spawn() (non-blocking) and emit a println! confirmation instead of waiting on status() in src/lib.rs.
  • Added load_config_or_empty(path: &Path) -> Result<Config> and used it for the List, Tui, Doctor, and Urls code paths so the CLI handles a missing config file gracefully.
  • Normalized the default hostname in Urls to append .local when the derived hostname does not already end with .local.
  • Ran cargo fmt, resulting in minor formatting adjustments in a few modules.

Testing

  • Ran cargo fmt --check, which passed in this environment.
  • Attempted cargo test, which failed to run due to crates.io index/network access errors in the execution environment (dependency fetch failed with HTTP 403).
  • Attempted cargo test --offline, which failed because required dependencies were not present in the local cache so tests could not be executed here.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant