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
import { createSignal } from 'solid-js';
/** Serialize writes without dimming controls on unrelated email rows. */
export function createEmailRowActionState() {
const [pendingRowId, setPendingRowId] = createSignal<string>();
return {
isPending: (rowId: string) => pendingRowId() === rowId,
async run(rowId: string, action: () => Promise<void>) {
if (pendingRowId() !== undefined) return;
setPendingRowId(rowId);
try {
await action();
} finally {
setPendingRowId(undefined);
}
},
};
}