Skip to content

Run all dev apps through Turbo TUI - #102

Merged
Gift-Stack merged 1 commit into
mainfrom
codex/dev-suite-tui-ngrok
Sep 20, 2026
Merged

Gift-Stack merged 1 commit into
mainfrom
codex/dev-suite-tui-ngrok

Conversation

@Gift-Stack

Copy link
Copy Markdown
Contributor

Summary

  • launch backend, relayer, checkout, merchant, mobile, and ngrok through Turbo TUI panes from npm run dev
  • force the combined suite onto backend port 8000 and route checkout/merchant proxies there
  • resolve system ngrok instead of Expo bundled ngrok, wait for backend health, and redact auth diagnostics
  • document the combined dev workflow and ngrok setup

Validation

  • node scripts/dev.test.mjs
  • git diff --check HEAD~1 HEAD

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-20T18:36:47.226612Z 5a214ce New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c02b4fb65

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/dev.mjs Outdated
existsSync(path.join(ROOT, "apps/checkout/certs", host + suffix)),
),
);
return host && host !== "pay.xend.global" ? 443 : 5173;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Check the configured port for an explicit pay host

When XEND_CHECKOUT_HOST=pay.xend.global and its certificate exists, vite.config.ts treats the explicitly requested host as port 443, but this branch reports port 5173. The suite therefore aborts if an unrelated process owns 5173, or misses an existing listener on 443 and lets the checkout task fail later; derive the preflight port using the same explicit-host mapping as the Vite configuration.

Useful? React with 👍 / 👎.

Comment thread scripts/dev-backend.mjs Outdated
Comment on lines +12 to +13
for (const signal of ["SIGINT", "SIGTERM"])
process.once(signal, () => child.kill(signal));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Forward termination to the backend process tree

When Turbo terminates this task by signaling the wrapper, child.kill(signal) targets only the intermediate npm process. The lifecycle shell and the nest | tee descendants launched by dev:standalone do not receive that signal, so they can keep the backend bound to port 8000 while the wrapper remains waiting, preventing a clean Ctrl+C or restart; terminate the process group or avoid the nested npm pipeline.

Useful? React with 👍 / 👎.

@Gift-Stack
Gift-Stack force-pushed the codex/dev-suite-tui-ngrok branch from 7c02b4f to 5a214ce Compare September 20, 2026 18:29
@Gift-Stack
Gift-Stack merged commit b942468 into main Sep 20, 2026
3 checks passed
@Gift-Stack
Gift-Stack deleted the codex/dev-suite-tui-ngrok branch September 20, 2026 18:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5a214cef67

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/dev.test.mjs
@@ -0,0 +1,81 @@
import { test } from "node:test";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wire the launcher tests into the test task

The new test file is outside every workspace and no package script or workflow invokes it, so these checks never run in CI. I checked .github/workflows/ci.yml, which only executes npx turbo run lint check-types test; the root test script delegates back to Turbo, and no workspace test script references scripts/dev.test.mjs. Add an explicit test script/root task or CI invocation so regressions in ngrok selection, readiness, and redaction are detected.

Useful? React with 👍 / 👎.

throw new Error("Invalid pilot order");
const upstream = await fetch(
"http://127.0.0.1:8008/v1/payment_intents",
`${process.env.XEND_BACKEND_URL ?? "http://127.0.0.1:8008"}/v1/payment_intents`,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Normalize the backend URL before appending the API path

When a standalone user sets XEND_BACKEND_URL with the common trailing-slash form, such as http://127.0.0.1:8008/, this interpolation requests //v1/payment_intents instead of the registered /v1/payment_intents route, so the local payment pilot receives a 404 even though the backend is healthy. Strip the trailing slash or construct the endpoint with URL-aware joining.

Useful? React with 👍 / 👎.

Comment thread scripts/dev.mjs
Comment on lines +147 to +149
port: Number(
process.env.PORT ?? envValue("apps/relayer/.env", "PORT") ?? 8787,
),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject a relayer port that conflicts with the backend

If apps/relayer/.env configures PORT=8000, which the relayer accepts, this preflight records both the newly forced backend port and the relayer port as 8000 but passes while the port is initially free. The launcher then starts the backend and relayer on that same port, so one task fails and XEND_RELAYER_URL may point back to the backend; detect duplicate requested ports or reserve a distinct suite port for the relayer.

Useful? React with 👍 / 👎.

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