Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

chg: show localhost port # in tab title (#2566)

Peter Chinmanbd3a916e719f
diff --git a/js/app/packages/core/signal/tabTitle.ts b/js/app/packages/core/signal/tabTitle.ts
index 516cfbca6d..e85124e705 100644
--- a/js/app/packages/core/signal/tabTitle.ts
+++ b/js/app/packages/core/signal/tabTitle.ts
@@ -3,7 +3,16 @@ import { DEV_MODE_ENV, LOCAL_ONLY } from '@core/constant/featureFlags';
export const tabTitleSignal = createSignal<string | undefined>();
-const ENV_PREFIX = LOCAL_ONLY ? '[L] ' : DEV_MODE_ENV ? '[D] ' : '';
+function getEnvPrefix(): string {
+ if (LOCAL_ONLY) {
+ const port = window.location.port;
+ if (port && port !== '3000') return `[L:${port.slice(-1)}] `;
+ return '[L] ';
+ }
+ return DEV_MODE_ENV ? '[D] ' : '';
+}
+
+const ENV_PREFIX = getEnvPrefix();
export function formatTabTitle(title: string | undefined) {
if (title) return `${ENV_PREFIX}Macro - ${title}`;