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

未关闭
#888 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@TimeToBuildBob 已经在做这个了。

开始于 2026年11月24日。

  • #896 来自 @TimeToBuildBob —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
rust
领域
cli

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Rust
星标
322
派生
107
平均合并
2 天 16 小时
30 天内合并 PR
25

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ActivityWatch/aw-server-rust 的其他 Issue

查看 ActivityWatch/aw-server-rust 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。