Skip to content

Connection info#146

Open
s0 wants to merge 2 commits into
mainfrom
connection-info
Open

Connection info#146
s0 wants to merge 2 commits into
mainfrom
connection-info

Conversation

@s0

@s0 s0 commented May 20, 2026

Copy link
Copy Markdown
Member

No description provided.

s0 added 2 commits May 20, 2026 14:51
Make IP Address, Connection Type & Loopback status
available in the toolkit connection object
@s0 s0 enabled auto-merge (squash) May 20, 2026 13:51

@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: 342b6c544f

ℹ️ 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".

FrontendComponentRenderer,
FrontendComponentRenderers,
} from '@arcanejs/toolkit-frontend/types';
import { ToolkitConnection } from '@arcanejs/toolkit';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Replace root toolkit import in client simulator

This use client component imports ToolkitConnection from @arcanejs/toolkit root, which violates the /workspace/arcanejs/AGENTS.md rule for docs client code and can pull backend-only dependencies (like Node server modules) into the Next.js client bundle. In environments where that import is emitted, this causes client build/runtime failures; use a client-safe subpath or a type-only/local shape instead.

Useful? React with 👍 / 👎.

const interfaces = os.networkInterfaces();
for (const ifaceList of Object.values(interfaces)) {
for (const iface of ifaceList ?? []) {
if (iface.address === host) {

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 IPv4-mapped addresses before loopback check

The loopback detection compares remoteAddress to os.networkInterfaces() addresses with exact string equality, but dual-stack Node servers commonly report local IPv4 peers as mapped IPv6 (for example ::ffff:127.0.0.1), which will not match interface entries like 127.0.0.1. In that case isLoopback is incorrectly reported as false, so consumers of ToolkitConnection.isLoopback get wrong connection classification.

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