Skip to content

fix: laser video aspect, stop visibility, test port isolation - #18

Merged
Yukikaze2233 merged 4 commits into
mainfrom
develop
Aug 2, 2026
Merged

Yukikaze2233 merged 4 commits into
mainfrom
develop

Conversation

@Yukikaze2233

@Yukikaze2233 Yukikaze2233 commented Aug 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Laser stage: video is letterboxed by the actual texture aspect instead of a fixed 16:9, so non-16:9 camera frames are no longer stretched
  • Laser Stop button stays visible when an external laser daemon is detected (FIFO present), not only for egui-managed processes
  • RadarApp tests use dedicated ZMQ ports (5657/5658) so a running radar-egui instance does not collide

Verification

  • cargo fmt --all --check: pass
  • cargo check: pass
  • cargo test: 94 unit + 8 runtime tests passed, 1 hardware-dependent test ignored

Summary by CodeRabbit

  • 功能改进
    • 激光脚本状态显示现在会同时反映脚本活动状态和 daemon 可用状态;无活动脚本时将显示“daemon”或“Idle”。
    • 视频区域会根据实际内容比例自动进行适配,减少画面变形。
    • ZMQ 发布服务支持使用可配置端口启动,提升运行环境兼容性。

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@Yukikaze2233, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 8 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a612f8fa-4e90-4fcc-a1e7-6cc4096f4730

📥 Commits

Reviewing files that changed from the base of the PR and between c6d47ba and fb1677c.

📒 Files selected for processing (1)
  • src/app/laser_process_controls.rs
📝 Walkthrough

Walkthrough

本次变更更新激光 daemon 状态显示、视频纹理的宽高比布局,并为 ZMQ 发布运行时增加可配置端口。测试应用改用专用端口,默认构造函数仍使用 55575558

Changes

运行时与界面更新

Layer / File(s) Summary
激光状态显示
src/app/laser_process_controls.rs
激光状态现在同时检查受管控状态和 daemon 可用状态。无活动脚本时,daemon 可用则显示 "daemon",否则显示 "Idle"
视频宽高比布局
src/app/laser_stage.rs
存在纹理时,视频区域使用纹理的实际宽高比。无纹理时继续使用默认 VIDEO_ASPECT
ZMQ 发布端口配置
src/app/mod.rs
新增 new_with_zmq_pub_ports 构造函数。ZMQ 发布运行时根据传入端口生成绑定地址。测试应用使用 56575658

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: yukikaze223344

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了视频宽高比、停止按钮可见性和测试端口隔离这三项主要变更。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/app/laser_process_controls.rs`:
- Around line 12-21: 修正 daemon 提示的条件判断:在相关提示逻辑中不要使用已包含 snapshot.daemon_available
的 running 来判断无活动状态,而应根据 snapshot.laser.active_laser 是否为空来决定;确保 daemon
存活且没有活动脚本时仍显示 daemon 提示,同时保留活动脚本存在时的现有行为。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2254a167-da3f-474d-b468-2d8d365264ee

📥 Commits

Reviewing files that changed from the base of the PR and between 95dd2dc and c6d47ba.

📒 Files selected for processing (3)
  • src/app/laser_process_controls.rs
  • src/app/laser_stage.rs
  • src/app/mod.rs

Comment thread src/app/laser_process_controls.rs
@Yukikaze2233
Yukikaze2233 merged commit 59a262a into main Aug 2, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant