Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(ui): localize wizard eyebrows; redirect after UI host/port change

cyh29e20d6b8f33
diff --git a/ui/src/components/settings/SettingsServicePage.tsx b/ui/src/components/settings/SettingsServicePage.tsx
index 42120f99f..05a101291 100644
--- a/ui/src/components/settings/SettingsServicePage.tsx
+++ b/ui/src/components/settings/SettingsServicePage.tsx
@@ -52,6 +52,44 @@ export const SettingsServicePage: React.FC = () => {
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ host: uiPayload.setup_host, port: uiPayload.setup_port }),
});
+ // If the UI server's bind host or port changed, the current page is on
+ // the old origin and may become unreachable. Redirect (or surface the
+ // new origin) so the user is not stranded.
+ const currentHostname = window.location.hostname;
+ const currentPort =
+ window.location.port || (window.location.protocol === 'https:' ? '443' : '80');
+ const targetPort = String(uiPayload.setup_port);
+ const isBindAll =
+ uiPayload.setup_host === '0.0.0.0' ||
+ uiPayload.setup_host === '::' ||
+ uiPayload.setup_host === '';
+ const targetHostname = isBindAll ? currentHostname : uiPayload.setup_host;
+ const newOrigin = `${window.location.protocol}//${targetHostname}:${targetPort}`;
+ const originChanged = targetHostname !== currentHostname || targetPort !== currentPort;
+ if (originChanged) {
+ // Only auto-redirect when the new hostname is something the current
+ // browser can reasonably reach. If the user changed the bind to a
+ // loopback-only host while accessing remotely, surface the new URL
+ // instead of bouncing them somewhere they cannot reach.
+ const targetIsLoopback =
+ targetHostname === '127.0.0.1' ||
+ targetHostname === '::1' ||
+ targetHostname === 'localhost';
+ const browserOnLoopback =
+ currentHostname === '127.0.0.1' ||
+ currentHostname === '::1' ||
+ currentHostname === 'localhost';
+ if (!targetIsLoopback || browserOnLoopback) {
+ setUiMessage(t('settings.consoleServerRedirecting', { origin: newOrigin }));
+ // Give the UI server a moment to actually rebind before we navigate.
+ window.setTimeout(() => {
+ window.location.replace(newOrigin);
+ }, 1500);
+ return;
+ }
+ setUiMessage(t('settings.consoleServerRelocated', { origin: newOrigin }));
+ return;
+ }
setUiMessage(t('dashboard.uiRestartMessage'));
} catch {
setUiMessage(t('common.saveFailed'));
diff --git a/ui/src/components/steps/AgentDetection.tsx b/ui/src/components/steps/AgentDetection.tsx
index a606e6376..de81930ea 100644
--- a/ui/src/components/steps/AgentDetection.tsx
+++ b/ui/src/components/steps/AgentDetection.tsx
@@ -373,7 +373,7 @@ export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, on
<WizardCard className="gap-6">
<div className="flex flex-wrap items-center justify-between gap-4">
<div className="space-y-2">
- <EyebrowBadge tone="mint">Backends</EyebrowBadge>
+ <EyebrowBadge tone="mint">{t('agentDetection.eyebrow')}</EyebrowBadge>
<h2 className="text-[28px] font-bold leading-tight tracking-[-0.4px] text-foreground">
{t('agentDetection.title')}
</h2>
diff --git a/ui/src/components/steps/ChannelList.tsx b/ui/src/components/steps/ChannelList.tsx
index 58e8baf2b..232bd99ec 100644
--- a/ui/src/components/steps/ChannelList.tsx
+++ b/ui/src/components/steps/ChannelList.tsx
@@ -769,7 +769,7 @@ export const ChannelList: React.FC<ChannelListProps> = ({ data = {}, onNext, onB
<div className="flex w-full justify-center">
<WizardCard className="gap-6">
<div className="space-y-2">
- <EyebrowBadge tone="mint">Groups</EyebrowBadge>
+ <EyebrowBadge tone="mint">{t('channelList.eyebrow')}</EyebrowBadge>
<h2 className="text-[28px] font-bold leading-tight tracking-[-0.4px] text-foreground">
{t('channelList.title')}
</h2>
@@ -1305,7 +1305,7 @@ export const ChannelList: React.FC<ChannelListProps> = ({ data = {}, onNext, onB
<Wrapper>
<div className={clsx('space-y-4', !isPage && 'space-y-2')}>
<div>
- {!isPage && <EyebrowBadge tone="mint">Groups</EyebrowBadge>}
+ {!isPage && <EyebrowBadge tone="mint">{t('channelList.eyebrow')}</EyebrowBadge>}
<h2
className={clsx(
'font-bold tracking-[-0.4px] text-foreground',
diff --git a/ui/src/components/steps/DiscordConfig.tsx b/ui/src/components/steps/DiscordConfig.tsx
index 70e8460aa..f10dccf54 100644
--- a/ui/src/components/steps/DiscordConfig.tsx
+++ b/ui/src/components/steps/DiscordConfig.tsx
@@ -456,7 +456,7 @@ export const DiscordConfig: React.FC<DiscordConfigProps> = ({ data, onNext, onBa
<WizardCard className="gap-6">
<div className="flex flex-wrap items-center justify-between gap-4">
<div className="space-y-2">
- <EyebrowBadge tone="mint">Discord</EyebrowBadge>
+ <EyebrowBadge tone="mint">{t('discordConfig.eyebrow')}</EyebrowBadge>
<h2 className="text-[28px] font-bold leading-tight tracking-[-0.4px] text-foreground">
{t('discordConfig.title')}
</h2>
diff --git a/ui/src/components/steps/LarkConfig.tsx b/ui/src/components/steps/LarkConfig.tsx
index 03ae55dfc..20d401b32 100644
--- a/ui/src/components/steps/LarkConfig.tsx
+++ b/ui/src/components/steps/LarkConfig.tsx
@@ -537,7 +537,7 @@ export const LarkConfig: React.FC<LarkConfigProps> = ({ data, onNext, onBack, em
<WizardCard className="gap-6">
<div className="flex flex-wrap items-center justify-between gap-4">
<div className="space-y-2">
- <EyebrowBadge tone="mint">Lark / Feishu</EyebrowBadge>
+ <EyebrowBadge tone="mint">{t('larkConfig.eyebrow')}</EyebrowBadge>
<h2 className="text-[28px] font-bold leading-tight tracking-[-0.4px] text-foreground">
{t('larkConfig.title')}
</h2>
diff --git a/ui/src/components/steps/SlackConfig.tsx b/ui/src/components/steps/SlackConfig.tsx
index be082d3c2..c1c80485e 100644
--- a/ui/src/components/steps/SlackConfig.tsx
+++ b/ui/src/components/steps/SlackConfig.tsx
@@ -376,7 +376,7 @@ export const SlackConfig: React.FC<SlackConfigProps> = ({ data, onNext, onBack,
<WizardCard className="gap-6">
<div className="flex flex-wrap items-center justify-between gap-4">
<div className="space-y-2">
- <EyebrowBadge tone="mint">04 — Slack</EyebrowBadge>
+ <EyebrowBadge tone="mint">{t('slackConfig.eyebrow')}</EyebrowBadge>
<h2 className="text-[28px] font-bold leading-tight tracking-[-0.4px] text-foreground">
{t('slackConfig.title')}
</h2>
diff --git a/ui/src/components/steps/Summary.tsx b/ui/src/components/steps/Summary.tsx
index 6665e129b..de6c808df 100644
--- a/ui/src/components/steps/Summary.tsx
+++ b/ui/src/components/steps/Summary.tsx
@@ -244,7 +244,7 @@ export const Summary: React.FC<SummaryProps> = ({ data, onBack }) => {
<Check size={36} strokeWidth={2.4} />
</div>
<div className="space-y-2">
- <EyebrowBadge tone="mint">Summary</EyebrowBadge>
+ <EyebrowBadge tone="mint">{t('summary.eyebrow')}</EyebrowBadge>
<h2 className="text-[38px] font-bold leading-tight tracking-[-0.7px] text-foreground">
{t('summary.title')}
</h2>
diff --git a/ui/src/components/steps/TelegramConfig.tsx b/ui/src/components/steps/TelegramConfig.tsx
index d42197703..e775d9163 100644
--- a/ui/src/components/steps/TelegramConfig.tsx
+++ b/ui/src/components/steps/TelegramConfig.tsx
@@ -428,7 +428,7 @@ export const TelegramConfig: React.FC<TelegramConfigProps> = ({ data, onNext, on
<WizardCard className="gap-6">
<div className="flex flex-wrap items-center justify-between gap-4">
<div className="space-y-2">
- <EyebrowBadge tone="mint">Telegram</EyebrowBadge>
+ <EyebrowBadge tone="mint">{t('telegramConfig.eyebrow')}</EyebrowBadge>
<h2 className="text-[28px] font-bold leading-tight tracking-[-0.4px] text-foreground">
{t('telegramConfig.title')}
</h2>
diff --git a/ui/src/components/steps/WeChatConfig.tsx b/ui/src/components/steps/WeChatConfig.tsx
index 5a542aad2..39cb670c2 100644
--- a/ui/src/components/steps/WeChatConfig.tsx
+++ b/ui/src/components/steps/WeChatConfig.tsx
@@ -401,7 +401,7 @@ export const WeChatConfig: React.FC<WeChatConfigProps> = ({ data, onNext, onBack
<WizardCard className="gap-6">
<div className="flex flex-wrap items-center justify-between gap-4">
<div className="space-y-2">
- <EyebrowBadge tone="mint">WeChat</EyebrowBadge>
+ <EyebrowBadge tone="mint">{t('wechatConfig.eyebrow')}</EyebrowBadge>
<h2 className="text-[28px] font-bold leading-tight tracking-[-0.4px] text-foreground">
{t('wechatConfig.title')}
</h2>
diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.json
index 98cc56dec..f79c605f7 100644
--- a/ui/src/i18n/en.json
+++ b/ui/src/i18n/en.json
@@ -73,6 +73,8 @@
"statusNow": "Current state",
"consoleServerTitle": "Console server",
"consoleServerHint": "Saving these values restarts only the Web UI server.",
+ "consoleServerRedirecting": "UI server moved. Redirecting to {{origin}}...",
+ "consoleServerRelocated": "UI server now listens on {{origin}}. Open this URL to continue.",
"serviceNotesTitle": "Operational notes",
"serviceNotesSubtitle": "Keep the local service healthy before moving on to platform and routing work.",
"serviceNote1": "Remote access is now part of Service because it changes how this machine exposes the local admin UI.",
@@ -238,6 +240,7 @@
}
},
"discordConfig": {
+ "eyebrow": "Discord",
"title": "Discord Configuration",
"subtitle": "Create a Discord app, invite the bot, then add your token.",
"botToken": "Bot Token",
@@ -289,6 +292,7 @@
"dmTroubleshoot3": "Ensure you didn't block the bot account."
},
"telegramConfig": {
+ "eyebrow": "Telegram",
"title": "Telegram Configuration",
"subtitle": "Create a Telegram bot, validate the token, then finish the group setup in a few guided steps.",
"step1Title": "Create Bot with BotFather",
@@ -342,6 +346,7 @@
"forumAutoTopicHint": "For forum-enabled supergroups, new top-level messages can automatically create a new topic that becomes the session container. This requires the bot to have admin or topic-management rights in that chat."
},
"larkConfig": {
+ "eyebrow": "Lark / Feishu",
"title": "Configure Lark",
"subtitle": "Set up your Lark/Feishu bot in a few steps",
"domainLabel": "Platform Region",
@@ -414,6 +419,7 @@
"step5OpenLink": "Open Version Management"
},
"wechatConfig": {
+ "eyebrow": "WeChat",
"title": "WeChat Setup",
"subtitle": "Scan the QR code with your WeChat to connect.",
"stepStart": "Start",
@@ -441,6 +447,7 @@
"rebind": "Rebind Account"
},
"slackConfig": {
+ "eyebrow": "04 — Slack",
"title": "Slack Configuration",
"saasDescription": "Authorize the official Slack app and wait for workspace binding.",
"selfHostDescription": "Create a Slack app and configure tokens for Socket Mode.",
@@ -488,6 +495,7 @@
"step4Tip": "You can also right-click a channel and select 'Add apps'."
},
"agentDetection": {
+ "eyebrow": "Backends",
"title": "Agent Configuration",
"subtitle": "Detect local CLI paths and choose enabled backends.",
"defaultBackend": "Default Backend",
@@ -503,6 +511,7 @@
"showOutput": "Show details"
},
"channelList": {
+ "eyebrow": "Groups",
"title": "Group Settings",
"subtitle": "Enable groups and configure routing for each group.",
"refreshList": "Refresh List",
@@ -576,6 +585,7 @@
"platformDisabled": "Platform disabled — enable it in Settings to see groups."
},
"summary": {
+ "eyebrow": "Summary",
"title": "Review & Finish",
"subtitle": "Confirm settings and start Vibe Remote.",
"mode": "Mode",
diff --git a/ui/src/i18n/zh.json b/ui/src/i18n/zh.json
index 3b3616a35..0cedea89a 100644
--- a/ui/src/i18n/zh.json
+++ b/ui/src/i18n/zh.json
@@ -73,6 +73,8 @@
"statusNow": "当前状态",
"consoleServerTitle": "控制台服务",
"consoleServerHint": "保存这些值只会重启 Web UI 服务,不会重启主服务。",
+ "consoleServerRedirecting": "UI 服务地址已变更,正在跳转到 {{origin}}...",
+ "consoleServerRelocated": "UI 服务现在监听 {{origin}},请打开该地址继续。",
"serviceNotesTitle": "运维说明",
"serviceNotesSubtitle": "先把本地服务运行状态稳定下来,再继续配置平台和路由。",
"serviceNote1": "远程访问已经并入 Service,因为它本质上决定的是这台机器如何暴露本地管理 UI。",
@@ -238,6 +240,7 @@
}
},
"discordConfig": {
+ "eyebrow": "Discord",
"title": "Discord 配置",
"subtitle": "创建 Discord 应用、邀请机器人加入服务器,然后填写令牌。",
"botToken": "机器人令牌",
@@ -289,6 +292,7 @@
"dmTroubleshoot3": "确认你没有屏蔽该机器人账号。"
},
"telegramConfig": {
+ "eyebrow": "Telegram",
"title": "Telegram 配置",
"subtitle": "按步骤创建 Telegram 机器人、验证令牌,并完成群组侧配置。",
"step1Title": "用 BotFather 创建机器人",
@@ -342,6 +346,7 @@
"forumAutoTopicHint": "对启用了 forum 的 supergroup,新顶层消息可以自动创建新的 topic,并把它作为 session 容器。这个功能要求 bot 在该群里有管理员或管理 topic 的权限。"
},
"larkConfig": {
+ "eyebrow": "Lark / 飞书",
"title": "配置飞书",
"subtitle": "几步完成飞书/Lark 机器人的配置",
"domainLabel": "平台区域",
@@ -414,6 +419,7 @@
"step5OpenLink": "打开版本管理"
},
"wechatConfig": {
+ "eyebrow": "微信",
"title": "微信设置",
"subtitle": "使用微信扫描二维码以连接。",
"stepStart": "开始",
@@ -441,6 +447,7 @@
"rebind": "重新绑定"
},
"slackConfig": {
+ "eyebrow": "04 — Slack",
"title": "Slack 配置",
"saasDescription": "授权官方 Slack 应用并等待工作区绑定",
"selfHostDescription": "创建 Slack 应用并配置 Socket Mode 所需的令牌",
@@ -488,6 +495,7 @@
"step4Tip": "也可以右键点击频道,选择「添加应用」。"
},
"agentDetection": {
+ "eyebrow": "后端",
"title": "Agent 配置",
"subtitle": "检测本地 CLI 路径并选择启用的后端",
"defaultBackend": "默认后端",
@@ -503,6 +511,7 @@
"showOutput": "显示详情"
},
"channelList": {
+ "eyebrow": "群组",
"title": "群组设置",
"subtitle": "启用群组并配置每个群组的路由",
"refreshList": "刷新列表",
@@ -576,6 +585,7 @@
"platformDisabled": "平台未启用 — 请在设置中启用后再查看群组。"
},
"summary": {
+ "eyebrow": "概览",
"title": "检查并完成",
"subtitle": "确认设置并启动 Vibe Remote",
"mode": "模式",