Skip to content

feat(opds): sharing service lifecycle and Tauri commands - #148

Merged
phildenhoff merged 1 commit into
mainfrom
opds-4-service
Sep 21, 2026
Merged

phildenhoff merged 1 commit into
mainfrom
opds-4-service

Conversation

@phildenhoff

@phildenhoff phildenhoff commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Starting a server is the easy part. The actual problem is a laptop whose networks come and go: if you pick your Wi-Fi interface and then leave the house, sharing must fail closed — wait for that interface to return, never quietly widen to every interface on the machine.

What changed

  • service.rs: start/stop lifecycle with a monitor loop that re-reconciles the listener set against a fresh interface snapshot every 2 seconds.
  • When a selected interface disappears, listeners are torn down and the service reports Waiting — the scope only ever narrows.
  • Status and error taxonomy (OpdsLifecycleState, OpdsErrorCode) shaped for the UI, plus Tauri commands, shared state, and regenerated TS bindings.

The monitor is a poll rather than an OS event subscription. At a 2s interval that's a deliberate simplicity trade — it needs to be right, not instant.

Validation

Covered by service tests in the diff; full workspace suite (348 tests) green at the stack tip, including 62 citadel-opds tests.

Part of the OPDS v1 stack (above #146 → #147; #149 → #150 → #151 → #152 → #153 → #154 → #155 build on top).

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 79.96%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 79.96%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 79.96%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 80.16%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 80.16%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 80.16%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 80.16%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 80.16%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

Base automatically changed from opds-3-network to main September 19, 2026 06:50
@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 80.16%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@phildenhoff
phildenhoff marked this pull request as ready for review September 19, 2026 07:19
@github-actions

Copy link
Copy Markdown

libcalibre Test Coverage Report

Overall coverage: 80.16%

📊 Download HTML Report

Coverage breakdown available in the artifacts.

@phildenhoff
phildenhoff merged commit 6b3e9fc into main Sep 21, 2026
7 checks passed
@phildenhoff
phildenhoff deleted the opds-4-service branch September 21, 2026 22:41
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