aw-client CLI ignores aw-client.toml host/port

Đang mở
#888 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@TimeToBuildBob đang làm issue này rồi.

Từ ngày 24/11/2026.

  • #896 của @TimeToBuildBob — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
cli

Hướng nghiên cứu

Start in aw-client-rust/src/bin/aw-client.rs at run(), where host/port are resolved and port falls back to 5600/5666. Read the existing config handling and the toml dependency from #753, then mirror Python's [server]/[server-testing] hostname/port lookup in ~/.config/activitywatch/aw-client/aw-client.toml. Done means flags still win when present and the config supplies host/port otherwise. A linked pull request (#896) is open, so check it first.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

The aw-client CLI (aw-client-rust/src/bin/aw-client.rs) ignores the client config file. run() picks the port from --port or hardcodes 5600 (5666 with --testing), and the host comes only from --host. Python's aw-client reads hostname/port from [server] ([server-testing] with testing) in aw-client.toml, so a user with a custom port in their profile config gets the right server from Python and silently talks to the wrong one (or fails to connect) from the Rust CLI.

Expected from the code (not run end to end): set port = "5650" under [server] in ~/.config/activitywatch/aw-client/aw-client.toml, run aw-server-rust on 5650, then aw-client buckets: it connects to 5600.

#740 documented the current defaults, so this is a parity gap, not a regression. Possible fix: read aw-client.toml (the toml dependency from #753 is already there) for host/port when the flags are absent.

Ngôn ngữ chính
Rust
Star
322
Fork
107
Merge trung bình
2 ngày 16 giờ
Pull request đã merge (30 ngày)
25

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ActivityWatch/aw-server-rust

Tất cả issue của ActivityWatch/aw-server-rust

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.