Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(layout): add tab titles to split view, fix tab title reconcile bug (#2713)
Seamusba20abf647f3
diff --git a/infra/stacks/web-app/appRouteLambda/index.mjs b/infra/stacks/web-app/appRouteLambda/index.mjsindex 46bcb64e13..c14cafd840 100644--- a/infra/stacks/web-app/appRouteLambda/index.mjs+++ b/infra/stacks/web-app/appRouteLambda/index.mjs@@ -8,6 +8,13 @@ const __dirname = dirname(__filename);const template = readFileSync(join(__dirname, 'index.html'), 'utf-8');const PREVIEW_URL = process.env.PREVIEW_URL;+function escapeHtmlText(value) {+ return String(value ?? '')+ .replace(/&/g, '&')+ .replace(/</g, '<')+ .replace(/>/g, '>');+}+export const handler = async (event) => {const rawPath = event.rawPath;const fileName = rawPath.split('/').pop();@@ -51,7 +58,7 @@ export const handler = async (event) => {// Update the html page title with the document nameconst body = template.replace(/<head[^>]*>/i,- `<head><title>Macro - ${documentTitle}</title>`+ `<head><title data-sm="">Macro - ${escapeHtmlText(documentTitle)}</title>`);// Return the responsediff --git a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsxindex 85bc39d338..50f48361cb 100644--- a/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/soup-view.tsx@@ -203,6 +203,10 @@ export const SoupView = (props: SoupViewProps) => {const soup = useSoup();const panel = useSplitPanelOrThrow();+ createEffect(() => {+ panel.handle.setDisplayName(props.viewName);+ });+useSoupNotificationInvalidators();const component = createMemo(() => {diff --git a/js/app/packages/app/component/split-layout/layoutManager.ts b/js/app/packages/app/component/split-layout/layoutManager.tsindex 128a9c6676..062657e47e 100644--- a/js/app/packages/app/component/split-layout/layoutManager.ts+++ b/js/app/packages/app/component/split-layout/layoutManager.ts@@ -968,6 +968,12 @@ export function createSplitLayout(if (splitAtSameIndex) {newSplit.id = splitAtSameIndex.id;usedIds.add(splitAtSameIndex.id);+ setSplitNamesById(+ produce((map) => {+ delete map[splitAtSameIndex.id];+ return map;+ })+ );}resultSplits.push(newSplit);}