Skip to content

refactor(desktop): share relay request construction - #7667

Merged
bradseiler merged 1 commit into
mainfrom
coder0/pr0-relay-http-request
Sep 16, 2026
Merged

bradseiler merged 1 commit into
mainfrom
coder0/pr0-relay-http-request

Conversation

@bradseiler

Copy link
Copy Markdown
Contributor

Summary

This is a behavior-preserving refactor that gives the desktop relay HTTP bridge one helper for authenticated request construction. It moves the repeated Authorization, JSON content type, optional x-auth-tag, body, and timeout setup into build_authenticated_relay_request.

The helper uses the final URL, auth header, and body bytes passed by the caller. It does not sign, reserialize, normalize, send, parse, classify errors, choose a client, or handle rate limits.

Excluded paths: media, WebSocket, Git, agents, mobile, and NIP-FI. The query send helper only routes through the new request builder so the timeout and x-auth-tag behavior are covered by the same seam.

Related issue

None found. This prepares for the enterprise identity follow-up to be smaller than #7663.

Testing

  • cargo fmt --manifest-path desktop/src-tauri/Cargo.toml --check passed at 356676a2f70f6bdf80cfdcb9084f1f7548359ecb.
  • cargo test --manifest-path desktop/src-tauri/Cargo.toml relay::tests::authenticated -- --nocapture passed at 356676a2f70f6bdf80cfdcb9084f1f7548359ecb.
  • just desktop-tauri-check passed at 356676a2f70f6bdf80cfdcb9084f1f7548359ecb.
  • just desktop-tauri-test passed at 356676a2f70f6bdf80cfdcb9084f1f7548359ecb.
  • just desktop-tauri-clippy passed at 356676a2f70f6bdf80cfdcb9084f1f7548359ecb.

Generated with Codex

Signed-off-by: coder 0 <d97ebdbb198c7237c94f84ea8bb8a73583ea067407eebd0062abbb3962527fb1@buzz.block.builderlab.xyz>
@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is c507a4d488ca27796e78d876b9c24ee38442cc1b...356676a2f70f6bdf80cfdcb9084f1f7548359ecb.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review 356676a2f70f6bdf80cfdcb9084f1f7548359ecb to authorize a new review.
Any previous review applies only to its recorded range.

@bradseiler
bradseiler marked this pull request as ready for review September 16, 2026 04:05
@bradseiler
bradseiler requested a review from a team as a code owner September 16, 2026 04:05
@bradseiler
bradseiler merged commit 6d1f488 into main Sep 16, 2026
68 checks passed
@bradseiler
bradseiler deleted the coder0/pr0-relay-http-request branch September 16, 2026 13:48
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