picoclaw/scripts
SiYue b4a5965602 refactor(onboard,api): harden copydir repo-root detection and use platform-neutral proc attrs naming
Address latest review comments from sky5454 in PR #2654.

scripts/copydir.go:

- Improve repository root detection in a safer, more deterministic way.

- Prefer locating repo root from the script source path via runtime.Caller(), then fallback to upward search from current working directory.

- Replace .git-only root detection with repository anchor validation: go.sum, LICENSE, and .github must exist.

- Keep \ placeholder expansion and existing in-repo path guards.

- Preserve destination safety check to prevent deleting/copying to repo root.

web/backend/api:

- Rename applyLauncherWindowsProcAttrs() to applyLauncherProcAttrs() to expose a platform-independent interface name.

- Keep platform-specific behavior split by build tags: windows keeps HideWindow SysProcAttr setup, non-windows remains no-op.

- Update gateway startup path to call the renamed helper.

Why:

- Follow reviewer feedback to avoid relying on .git detection alone and prefer runtime/file-anchor based repository location.

- Improve naming clarity by making cross-platform interfaces generic while preserving OS-specific implementation details internally.

Validation:

- go test ./cmd/picoclaw/internal/onboard

- go test ./web/backend/api
2026-04-25 00:31:36 +08:00
..
build-macos-app.sh implement create dmg for macOS 10.11 & above (#2252) 2026-04-01 23:56:46 +08:00
copydir.go refactor(onboard,api): harden copydir repo-root detection and use platform-neutral proc attrs naming 2026-04-25 00:31:36 +08:00
icon.icns feat(web): implement macOS app feature and file logger (#1723) 2026-03-18 14:43:58 +08:00
lint-docs.sh chore(docs): add docs layout lint target and contributor guidance 2026-04-17 14:00:45 +08:00
setup.iss feat(web): implement macOS app feature and file logger (#1723) 2026-03-18 14:43:58 +08:00
test-docker-mcp.sh fix: improve MCP tool name collision safety and registry overwrite warning 2026-03-01 12:00:26 +08:00
test-irc.sh feat(channels): add IRC channel integration 2026-03-05 11:48:17 +01:00