Skip to content

fix sv network banner to always show#6087

Open
JYC11 wants to merge 4 commits into
canton-network:mainfrom
JYC11:jaeyoon/fix-sv-network-banner-always-show
Open

fix sv network banner to always show#6087
JYC11 wants to merge 4 commits into
canton-network:mainfrom
JYC11:jaeyoon/fix-sv-network-banner-always-show

Conversation

@JYC11

@JYC11 JYC11 commented Jun 23, 2026

Copy link
Copy Markdown

fixes: #534

Always show the "You are on " banner in the SV UI, including on clusters where it was previously hidden.
The network name is derived from the scan node's public URL: MainNet/TestNet/DevNet/ScratchNet from the cluster subdomain, LocalNet for localhost, and a capitalized fallback otherwise (Unknown Network when no scan URL is available).

The banner in the Layout component has been changed to always show. For networks outside of the known networks, it will default to this color: colors.neutral.30

screenshot:
Screenshot From 2026-06-23 12-08-52

@JYC11 JYC11 force-pushed the jaeyoon/fix-sv-network-banner-always-show branch from 1247c2a to 4c6b159 Compare June 23, 2026 03:46
@JYC11 JYC11 force-pushed the jaeyoon/fix-sv-network-banner-always-show branch from 4c6b159 to fdc9384 Compare June 25, 2026 00:58
@JYC11 JYC11 force-pushed the jaeyoon/fix-sv-network-banner-always-show branch from fdc9384 to 987b1c0 Compare June 25, 2026 04:39
@JYC11 JYC11 force-pushed the jaeyoon/fix-sv-network-banner-always-show branch from 987b1c0 to d443441 Compare June 30, 2026 01:38
@pawelperek-da

Copy link
Copy Markdown
Contributor

hey @JYC11, thanks for the contribution! I'm going to review it in the closest future

@pawelperek-da pawelperek-da self-requested a review July 1, 2026 11:26
@JYC11 JYC11 force-pushed the jaeyoon/fix-sv-network-banner-always-show branch from d443441 to df5110f Compare July 2, 2026 06:03

@pawelperek-da pawelperek-da 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.

Hi @JYC11, thanks for the contribution! Please remove the config.spliceInstanceNames.networkName branch and add special LocalNet handling and we are good to go

userEvent.setup();
render(<AppWithConfig />);

await screen.findByText('You are on ScratchNet');

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.

The text here should stay You are on ScratchNet, because the test mocks scratchnetb

const config = useSvConfig();
const dsoInfosQuery = useDsoInfos();

const configured = config.spliceInstanceNames.networkName;

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.

We cannot use spliceInstanceNames.networkName, as it's product branding (e.g. Splice) rather than a cluster name (e.g. ScratchNet), and it's intentionally the same across all clusters.

}

return networkName;
return network.charAt(0).toUpperCase() + network.slice(1);

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.

👍
I think it covers all the clusters apart of LocalNet (i.e. localhost:3211), so that will need a separate branch

const knownColors = ['mainnet', 'testnet', 'devnet', 'scratchnet'];
const networkInstanceNameColor = knownColors.includes(networkInstanceName.toLowerCase())
? `colors.${networkInstanceName.toLowerCase()}`
: 'colors.neutral.30';

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.

I'm gonna consult the design team about the colourings

JYC11 added 3 commits July 3, 2026 03:31
Signed-off-by: Jaeyoon Cho <jaeyoon.cho@obsidian.systems>
Signed-off-by: JYC11 <jaeyoon.c@gmail.com>
Signed-off-by: JYC11 <jaeyoon.c@gmail.com>
Signed-off-by: JYC11 <jaeyoon.c@gmail.com>
@JYC11 JYC11 force-pushed the jaeyoon/fix-sv-network-banner-always-show branch from 416b876 to f29dfa2 Compare July 3, 2026 03:34
Signed-off-by: JYC11 <jaeyoon.c@gmail.com>
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.

Include the UI banner in ci networks

6 participants