Skip to content

update plus+ and internal addr in search - #43

Merged
aledefra merged 2 commits into
mainfrom
develop
May 20, 2026
Merged

update plus+ and internal addr in search#43
aledefra merged 2 commits into
mainfrom
develop

Conversation

@aidamian

Copy link
Copy Markdown
Contributor

No description provided.

@aidamian
aidamian requested a review from aledefra May 20, 2026 10:30
@aledefra
aledefra requested a review from Copilot May 20, 2026 10:55
@aledefra
aledefra merged commit 16dceb6 into main May 20, 2026
5 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the search result “node” shape to optionally include an internal (Ratio1) address, populates it in both server/client search implementations, and renders it in the search results UI. It also adds a “CSP Level” column to the CSP list/card UI, and adjusts release/build workflows.

Changes:

  • Add optional internalAddress to node search results, populate it in search/clientSearch, and display it in SearchResultsList.
  • Add “CSP Level” to CSP list header and CSP cards.
  • Reformat GitHub Actions workflows and change semantic-version matching patterns; add a TS “type check” file under typedefs/.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
typedefs/search-result-types.test.ts Adds a compile-time type usage file for SearchResult / internalAddress.
typedefs/general.ts Extends SearchResult node variant with optional internalAddress.
lib/utils.tsx Populates internalAddress in clientSearch results (node lookup + active nodes listing).
lib/actions.ts Populates internalAddress in server search results (node lookup + active nodes listing).
app/server-components/SearchResultsList.tsx Renders both ETH and internal addresses for node search results.
app/server-components/CPSs/CSPsList.tsx Adds a “CSP Level” column in the list header.
app/server-components/CPSs/CSPCard.tsx Displays cspTier (“CSP Level”) in each CSP card row.
.github/workflows/release.yml Re-indents workflow and changes semantic-version patterns.
.github/workflows/build_testnet_mainnet.yml Changes semantic-version patterns for build workflow.
Comments suppressed due to low confidence (2)

lib/utils.tsx:327

  • ratio1Addr is cast to types.R1Address, but the key type coming from Object.entries(response.result.nodes) is a plain string at runtime (and types.R1Address currently doesn’t match the 0xai_... format used elsewhere). Consider fixing R1Address to match the actual internal address format and/or adding a runtime guard before treating arbitrary keys as internal addresses.
                    Object.entries(response.result.nodes).forEach(([ratio1Addr, node]) => {
                        resultsArray.push({
                            type: 'node',
                            nodeAddress: node.eth_addr,
                            internalAddress: ratio1Addr as types.R1Address,
                            alias: node.alias,
                            isOnline: parseInt(node.last_seen_ago.split(':')[2]) < 60,

lib/actions.ts:159

  • ratio1Addr is cast to types.R1Address, but the key type coming from Object.entries(response.result.nodes) is a plain string at runtime (and types.R1Address currently doesn’t match the 0xai_... format used elsewhere). Consider fixing R1Address to match the actual internal address format and/or adding a runtime guard before treating arbitrary keys as internal addresses.
                    Object.entries(response.result.nodes).forEach(([ratio1Addr, node]) => {
                        resultsArray.push({
                            type: 'node',
                            nodeAddress: node.eth_addr,
                            internalAddress: ratio1Addr as types.R1Address,
                            alias: node.alias,
                            isOnline: parseInt(node.last_seen_ago.split(':')[2]) < 60,
                        });

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread typedefs/general.ts
| {
type: 'node';
nodeAddress: types.EthAddress;
internalAddress?: types.R1Address;
Comment thread lib/utils.tsx
Comment on lines 256 to 262
resultsArray.push({
type: 'node',
nodeAddress: nodeResponse.node_eth_address,
internalAddress: nodeResponse.node as types.R1Address,
alias: nodeResponse.node_alias,
isOnline: nodeResponse.node_is_online,
});
Comment thread lib/actions.ts
Comment on lines 87 to 93
resultsArray.push({
type: 'node',
nodeAddress: nodeResponse.node_eth_address,
internalAddress: nodeResponse.node as types.R1Address,
alias: nodeResponse.node_alias,
isOnline: nodeResponse.node_is_online,
});
Comment on lines +27 to +28
major_pattern: "/MAJOR/"
minor_pattern: "/feat:/"
Comment on lines +27 to +28
major_pattern: "/MAJOR/"
minor_pattern: "/feat:/"
Comment on lines +1 to +18
import * as types from './blockchain';
import { SearchResult } from './general';

const ethAddress = '0x1111111111111111111111111111111111111111' as types.EthAddress;
const internalAddress = '0xai_11111111111111111111111111111111111111111111' as types.R1Address;

const nodeSearchResult: SearchResult = {
type: 'node',
nodeAddress: ethAddress,
internalAddress,
alias: 'smart0',
isOnline: true,
};

if (nodeSearchResult.type === 'node') {
const copiedAddress: types.R1Address | undefined = nodeSearchResult.internalAddress;
void copiedAddress;
}
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.

3 participants