Skip to content

Auto-detect STREAM endpoint and remove admin input#5

Open
soyuz-dev wants to merge 1 commit into
mainfrom
codex/remove-stream-endpoint-field
Open

Auto-detect STREAM endpoint and remove admin input#5
soyuz-dev wants to merge 1 commit into
mainfrom
codex/remove-stream-endpoint-field

Conversation

@soyuz-dev
Copy link
Copy Markdown
Contributor

Motivation

  • The admin panel previously required a manually-entered STREAM sender endpoint stored in settings, which is error-prone and redundant when a sensible default can be derived from the app environment or host.
  • The change aims to simplify admin UX and ensure the payout flow always has a valid STREAM endpoint without manual configuration.

Description

  • Removed the persisted streamEndpoint field from AdminSettings and removed the editable STREAM endpoint input in the Admin UI in webApp/src/components/App/App.tsx.
  • Added detectStreamEndpoint() which first uses VITE_STREAM_SENDER_ENDPOINT if present, otherwise derives http(s)://<host>:3000/stream/send (with a small special-case when the current origin is already on port 3000).
  • Updated createInterledgerClient() and payout flow to use the auto-detected endpoint via detectStreamEndpoint() instead of reading it from admin settings, and removed the admin-side validation error that required a manually-entered endpoint.
  • Replaced the admin form input with informational text that displays the auto-detected endpoint to admins.

Testing

  • Ran npm --prefix webApp run build which completed successfully and produced a production build.
  • Launched the local dev server and exercised the Admin panel; a Playwright run using Firefox loaded the app, logged into the Admin panel, and captured a screenshot showing the auto-detected endpoint (artifact generated).
  • A Playwright Chromium run crashed in this environment with a browser SIGSEGV, which is an environment-level failure and not related to the code changes, while the Firefox-based run succeeded.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant