Add configurable connection targets - #10
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThis PR centralizes connection-target resolution (mode, relay, daemon), adds EXPO_PUBLIC_AIMUX_CONNECTION_MODE and NODE_ENV getters, routes API calls via relay when appropriate, enforces auth config for relay, adjusts MessageBlock image resolution for relay mode, and updates scripts/docs/tests for both modes. ChangesConnection Mode Configuration and Relay Routing
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/deployment.md (1)
122-122: 💤 Low valueOptional: Consider rephrasing for clarity.
The sentence begins with the variable name, which reads as a fragment. Consider rephrasing to:
-`AIMUX_RELAY_URL` may also be set in the environment as an override; it defaults to `wss://relay.aimux.app`. +The relay URL may also be overridden by setting `AIMUX_RELAY_URL` in the environment; it defaults to `wss://relay.aimux.app`.🤖 Prompt for 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. In `@docs/deployment.md` at line 122, The sentence fragment starting with the environment variable name (AIMUX_RELAY_URL) is unclear; rephrase the line so it reads as a full sentence—for example, "You can optionally set the AIMUX_RELAY_URL environment variable to override the default wss://relay.aimux.app."—so that AIMUX_RELAY_URL and the default value are clearly described in one coherent sentence.
🤖 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.
Nitpick comments:
In `@docs/deployment.md`:
- Line 122: The sentence fragment starting with the environment variable name
(AIMUX_RELAY_URL) is unclear; rephrase the line so it reads as a full
sentence—for example, "You can optionally set the AIMUX_RELAY_URL environment
variable to override the default wss://relay.aimux.app."—so that AIMUX_RELAY_URL
and the default value are clearly described in one coherent sentence.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 498042ac-1418-4a47-83c6-50a2ff25c613
📒 Files selected for processing (22)
app/.env.exampleapp/components/MessageBlock.test.tsapp/components/MessageBlock.tsxapp/environment.d.tsapp/lib/api.test.tsapp/lib/api.tsapp/lib/auth.tsxapp/lib/connection-targets.test.tsapp/lib/connection-targets.tsapp/lib/daemon-url.tsapp/lib/env.tsapp/lib/envContract.jsapp/lib/envRuntime.tsapp/package.jsonapp/stores/relay.tsbin/aimux-devdocs/deployment.mddocs/dev-runtime.mdpackage.jsonsrc/connection-targets.test.tssrc/connection-targets.tssrc/login-flow.ts
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/deployment.md (1)
75-77: 💤 Low valueConsider clarifying when to set these optional environment variables.
The documentation marks these variables as optional with defaults, but shows them set to their default values without explaining when or why a user would override them. This pattern might confuse readers about whether they need to set these variables.
Consider one of these approaches:
- Comment out the example values to show they're optional
- Add a note explaining scenarios where you'd override the defaults (e.g., "Set
EXPO_PUBLIC_AIMUX_RELAY_URLto point to a staging relay or self-hosted instance")- Move these to a separate "Advanced Configuration" subsection
🤖 Prompt for 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. In `@docs/deployment.md` around lines 75 - 77, The docs currently show EXPO_PUBLIC_AIMUX_CONNECTION_MODE and EXPO_PUBLIC_AIMUX_RELAY_URL set to their defaults which can confuse readers; update the docs to clearly mark these as optional by either commenting out the example assignments or moving them into an "Advanced Configuration" subsection and add a short note explaining when to override EXPO_PUBLIC_AIMUX_RELAY_URL (e.g., to point to a staging relay or a self-hosted relay) and when to change EXPO_PUBLIC_AIMUX_CONNECTION_MODE from the default "relay"; keep the environment variable names (EXPO_PUBLIC_AIMUX_CONNECTION_MODE, EXPO_PUBLIC_AIMUX_RELAY_URL) in the text so users can find and modify them easily.
🤖 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.
Nitpick comments:
In `@docs/deployment.md`:
- Around line 75-77: The docs currently show EXPO_PUBLIC_AIMUX_CONNECTION_MODE
and EXPO_PUBLIC_AIMUX_RELAY_URL set to their defaults which can confuse readers;
update the docs to clearly mark these as optional by either commenting out the
example assignments or moving them into an "Advanced Configuration" subsection
and add a short note explaining when to override EXPO_PUBLIC_AIMUX_RELAY_URL
(e.g., to point to a staging relay or a self-hosted relay) and when to change
EXPO_PUBLIC_AIMUX_CONNECTION_MODE from the default "relay"; keep the environment
variable names (EXPO_PUBLIC_AIMUX_CONNECTION_MODE, EXPO_PUBLIC_AIMUX_RELAY_URL)
in the text so users can find and modify them easily.
Summary
Verification
Summary by CodeRabbit
New Features
Chores
Documentation
Tests