Repository navigation
🐛 fix: 修正 YPM TUI 远程播放健康状态 - #34
Conversation
显式把 HTTPS 上游代理主机作为 TLS SNI,避免目标请求的 Host 头污染证书校验。
将远程 playing 与当前播放器就绪代绑定,无真实 PCM 时不再向外发布模拟频谱。播放失败保留可重试位置,seek 失败保持非致命;第二个 TUI 实例会明确退出,避免控制错误实例。
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d70c5204a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| method: request.method, | ||
| path: target.upstreamPath, | ||
| headers, | ||
| ...(net.isIP(upstreamHost) === 0 ? { servername: upstreamHost } : {}), |
There was a problem hiding this comment.
Handle IP-literal HTTPS proxy identities explicitly
When the configured HTTPS upstream is an IPv4 or IPv6 literal, this branch leaves servername unset; https.request can then derive the TLS server name from the forwarded Host header, which belongs to the destination rather than the proxy. Consequently, ordinary HTTP absolute-form requests through an IP-addressed HTTPS proxy present/verify the destination hostname and fail certificate validation even when the configured CA trusts the proxy's IP certificate. Explicitly suppress SNI while preserving verification against upstreamHost, rather than omitting the option.
Useful? React with 👍 / 👎.
| self.ticks = self.ticks.wrapping_add(1); | ||
| let real = capture.latest(FFT_SAMPLES); | ||
| let live = playing && !real.is_empty(); | ||
| self.using_captured_samples = live; |
There was a problem hiding this comment.
Clear simulated analyzer state before exporting captured frames
When playback first has no captured samples, tick feeds simulated samples into the smoothed analyzer while keeping using_captured_samples false; as soon as even silent captured PCM arrives, this assignment flips the flag without clearing those simulated bins. Because the analyzer decays old values gradually, remote_bins() then exports nonzero simulated energy for multiple frames despite the captured input being silent, so public consumers still receive the fake spectrum this change is intended to exclude. Reset the analyzer/bins on the simulated-to-captured transition or analyze public PCM independently.
Useful? React with 👍 / 👎.
| if std::os::unix::net::UnixStream::connect(path).is_ok() { | ||
| return Ok(None); | ||
| return Err(error); | ||
| } | ||
| std::fs::remove_file(path)?; |
There was a problem hiding this comment.
Make stale-socket takeover exclusive
When two TUI processes start together while ctl.sock is stale, both can fail this live-owner probe before either removes the path. One process can then remove and rebind it, after which the other can unlink that newly live socket and bind its own; alternatively, the loser can receive NotFound, which the caller only warns about before continuing without a control socket. Both paths leave two TUIs running despite the new single-owner behavior, so stale recovery needs an atomic ownership lock or a retry/re-probe around unlinking and binding.
Useful? React with 👍 / 👎.
问题
YPM TUI 在播放器尚未真正启动或已经失败时,远程状态仍可能报告
playing: true,公开频谱也会把本地模拟动画当成真实音频输出。dsh 音乐条因此会表现为歌曲卡在 0:00、声音没有播放,但频谱仍在跳动。第二个 YPM TUI 实例还可能在没有拿到控制 socket 时继续运行,让远程控制落到另一个实例。修复
Started后才向远程报告正在播放验证
bun test:439 pass / 0 failbun run typecheckbun run build:tauri:renderercargo test --workspacecargo clippy --workspace --all-targetscargo fmt --all -- --checkgit diff --checkseekable: true,dsh 播放条与真实频谱同步恢复未改版本号、未打 tag、未发布。