Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(daemon): normalize hostname by stripping .local mDNS suffix (#1070)

pradeep71276428a10046bd
diff --git a/Makefile b/Makefile
index fb5fd3ba2f..d1595fb824 100644
--- a/Makefile
+++ b/Makefile
@@ -105,7 +105,7 @@ start:
@echo "Frontend: http://localhost:$(FRONTEND_PORT)"
@bash scripts/ensure-postgres.sh "$(ENV_FILE)"
@echo "Running migrations..."
- cd server && go run ./cmd/migrate up
+ @cd server && go run ./cmd/migrate up
@echo "Starting backend and frontend..."
@trap 'kill 0' EXIT; \
(cd server && go run ./cmd/server) & \
diff --git a/server/internal/daemon/config.go b/server/internal/daemon/config.go
index f14db3282c..f88cd49b46 100644
--- a/server/internal/daemon/config.go
+++ b/server/internal/daemon/config.go
@@ -147,7 +147,13 @@ func LoadConfig(overrides Overrides) (Config, error) {
// Host info
host, err := os.Hostname()
- if err != nil || strings.TrimSpace(host) == "" {
+ if err != nil {
+ host = ""
+ }
+ // Normalize mDNS suffix so daemons started via different methods
+ // (e.g. CLI vs desktop app) always register under the same hostname.
+ host = strings.TrimSuffix(host, ".local")
+ if strings.TrimSpace(host) == "" {
host = "local-machine"
}