Skip to content

Select QRcode interface#96

Merged
jayvdb merged 1 commit into
mainfrom
hotspot-qr-code
Jul 21, 2026
Merged

Select QRcode interface#96
jayvdb merged 1 commit into
mainfrom
hotspot-qr-code

Conversation

@jayvdb

@jayvdb jayvdb commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Improved WebSocket server startup information with reachable network addresses and more accurate QR-code links.
    • Added support for selecting a preferred network interface for advertised server access.
    • Added an offline hotspot demo task for running the WebSocket server without external telemetry or file-watching restarts.
  • Bug Fixes

    • Improved handling when no usable network address is available, including clearer warnings and localhost fallback.
  • Tests

    • Added coverage for address filtering, interface preference, ranking, and unavailable interfaces.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 202e4e84-2ece-4ce1-bd38-643e7db35a36

📥 Commits

Reviewing files that changed from the base of the PR and between 15131c3 and 019f257.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (9)
  • .mise/config.toml
  • .mise/config.zig.toml
  • config/ast-grep/rules/doc-summary-ends-with-period.yaml
  • services/ws-server/Cargo.toml
  • services/ws-server/src/config.rs
  • services/ws-server/src/lib.rs
  • services/ws-server/src/main.rs
  • services/ws-server/src/net.rs
  • services/ws-server/tests/net.rs

📝 Walkthrough

Walkthrough

The WebSocket server now selects and ranks usable IPv4 interfaces, supports NET_LOG_INTERFACE, logs reachable addresses, and uses the selected address in startup URLs and QR codes. Hotspot and clang-tidy Mise tasks are updated, with expanded AST-grep coverage and a new thiserror dependency.

Changes

WebSocket network advertisement

Layer / File(s) Summary
Configurable IPv4 candidate selection
services/ws-server/Cargo.toml, services/ws-server/src/config.rs, services/ws-server/src/net.rs, services/ws-server/src/lib.rs
Adds NetConfig, NetError, candidate enumeration, IPv4 filtering, interface ranking, and preferred-interface validation.
Startup advertisement and hotspot task
services/ws-server/src/main.rs, .mise/config.toml, config/ast-grep/rules/doc-summary-ends-with-period.yaml
Uses ranked addresses for startup URLs and reachability logs, adds an offline hotspot task, and expands the documentation-rule allowlist.
Network selection tests
services/ws-server/tests/net.rs
Tests filtering, ranking priority, stable ordering, preferred interfaces, and error handling.

Portable development tooling

Layer / File(s) Summary
POSIX clang-tidy argument forwarding
.mise/config.zig.toml
Updates wasm32 clang-tidy check and fix tasks to use POSIX positional parameters instead of shell arrays.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: pierre-tenedero

✨ 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 hotspot-qr-code

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
config/ast-grep/rules/doc-summary-ends-with-period.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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

@deepsource-io

deepsource-io Bot commented Jul 21, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 15131c3...019f257 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Coverage  

Code Review Summary

Analyzer Status Updated (UTC) Details
C# Jul 21, 2026 10:00a.m. Review ↗
C & C++ Jul 21, 2026 10:00a.m. Review ↗
Docker Jul 21, 2026 10:00a.m. Review ↗
Java Jul 21, 2026 10:00a.m. Review ↗
JavaScript Jul 21, 2026 10:00a.m. Review ↗
Python Jul 21, 2026 10:00a.m. Review ↗
Rust Jul 21, 2026 10:00a.m. Review ↗
Secrets Jul 21, 2026 10:00a.m. Review ↗
Code coverage Jul 21, 2026 10:24a.m. Review ↗

Code Coverage Summary

Language Line Coverage (New Code) Line Coverage (Overall)
Aggregate
80.8%
57.2%
Python -
69.7%
Rust
80.8%
56.6%

➟ Additional coverage metrics may have been reported. See full coverage report ↗


Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 28 complexity · 0 duplication

Metric Results
Complexity 28
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.84615% with 11 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
services/ws-server/src/net.rs 82.00% 9 Missing ⚠️
services/ws-server/src/main.rs 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@jayvdb
jayvdb marked this pull request as ready for review July 21, 2026 12:04
@jayvdb
jayvdb merged commit 49edf37 into main Jul 21, 2026
35 of 41 checks passed
@jayvdb
jayvdb deleted the hotspot-qr-code branch July 21, 2026 12:04
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.

2 participants