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.

feat(tasks): flag off task tabs in prod (#575)

Seamusc83985bbe98e
diff --git a/js/app/packages/app/component/Launcher.tsx b/js/app/packages/app/component/Launcher.tsx
index 3ede94fa75..6beddbf39f 100644
--- a/js/app/packages/app/component/Launcher.tsx
+++ b/js/app/packages/app/component/Launcher.tsx
@@ -523,10 +523,23 @@ const LauncherInner = (props: LauncherInnerProps) => {
}, 0);
});
+ // horrible but tailwind requires the full strings
+ const gridColsClass = () => {
+ const length = CREATABLE_BLOCKS.length;
+ if (length >= 8) return 'xl:grid-cols-8';
+ if (length >= 7) return 'xl:grid-cols-7';
+ if (length >= 6) return 'xl:grid-cols-6';
+ if (length >= 5) return 'xl:grid-cols-5';
+ return '';
+ };
+
return (
<div>
<div
- class="relative grid grid-cols-2 sm:grid-cols-4 xl:grid-cols-8 gap-3 p-6 isolate bg-menu border border-edge-muted suppress-css-brackets"
+ class="relative grid grid-cols-2 sm:grid-cols-4 gap-3 p-6 isolate bg-menu border border-edge-muted suppress-css-brackets"
+ classList={{
+ [gridColsClass()]: true,
+ }}
ref={ref}
>
<div class="absolute pointer-events-none size-full inset-0"></div>
diff --git a/js/app/packages/app/component/UnifiedListView.tsx b/js/app/packages/app/component/UnifiedListView.tsx
index b48a348296..ae80eaf0c3 100644
--- a/js/app/packages/app/component/UnifiedListView.tsx
+++ b/js/app/packages/app/component/UnifiedListView.tsx
@@ -22,6 +22,7 @@ import {
import {
ENABLE_PROPERTY_DISPLAY_CONTROL,
ENABLE_SOUP_FROM_FILTER,
+ ENABLE_TASKS_TABS,
} from '@core/constant/featureFlags';
import { useEmailLinksStatus } from '@core/email-link';
import { registerHotkey } from '@core/hotkey/hotkeys';
@@ -1323,11 +1324,13 @@ export function UnifiedListView(props: UnifiedListViewProps) {
setFilter={setEntityTypeFilter}
type="channel"
/>
- <EntityTypeToggle
- filter={entityTypeFilter}
- setFilter={setEntityTypeFilter}
- type="task"
- />
+ <Show when={ENABLE_TASKS_TABS}>
+ <EntityTypeToggle
+ filter={entityTypeFilter}
+ setFilter={setEntityTypeFilter}
+ type="task"
+ />
+ </Show>
<EntityTypeToggle
filter={entityTypeFilter}
setFilter={setEntityTypeFilter}
diff --git a/js/app/packages/app/component/ViewConfig.tsx b/js/app/packages/app/component/ViewConfig.tsx
index 31128b1b31..72345440d0 100644
--- a/js/app/packages/app/component/ViewConfig.tsx
+++ b/js/app/packages/app/component/ViewConfig.tsx
@@ -1,3 +1,4 @@
+import { ENABLE_TASKS_TABS } from '@core/constant/featureFlags';
import {
DEFAULT_VIEWS,
type DefaultView,
@@ -12,7 +13,6 @@ import {
queryKeys,
type WithNotification,
} from '@macro-entity';
-
import {
markNotificationsForEntityAsDone,
type NotificationSource,
@@ -270,9 +270,10 @@ const ALL_VIEWCONFIG_DEFAULTS = {
} satisfies Record<DefaultView, Omit<DeepPartial<ViewConfigEnhanced>, 'id'>>;
export const VIEWCONFIG_DEFAULTS = Object.fromEntries(
- Object.entries(ALL_VIEWCONFIG_DEFAULTS).filter(([key]) =>
- DEFAULT_VIEWS.includes(key as DefaultView)
- )
+ Object.entries(ALL_VIEWCONFIG_DEFAULTS).filter(([key]) => {
+ if (key === 'tasks') return ENABLE_TASKS_TABS;
+ return DEFAULT_VIEWS.includes(key as DefaultView);
+ })
) as Record<DefaultView, Omit<ViewConfigEnhanced, 'id'>>;
export const VIEWCONFIG_DEFAULTS_IDS = Object.keys(
diff --git a/js/app/packages/app/component/command/KonsoleItem.tsx b/js/app/packages/app/component/command/KonsoleItem.tsx
index 8e7ffedb8b..420bcf9815 100644
--- a/js/app/packages/app/component/command/KonsoleItem.tsx
+++ b/js/app/packages/app/component/command/KonsoleItem.tsx
@@ -9,7 +9,10 @@ import { StaticMarkdown } from '@core/component/LexicalMarkdown/component/core/S
import { Message } from '@core/component/Message';
import { UserIcon } from '@core/component/UserIcon';
import { fileTypeToBlockName } from '@core/constant/allBlocks';
-import { ENABLE_GMAIL_BASED_CONTACTS } from '@core/constant/featureFlags';
+import {
+ ENABLE_GMAIL_BASED_CONTACTS,
+ ENABLE_TASKS_TABS,
+} from '@core/constant/featureFlags';
import { HotkeyTags } from '@core/hotkey/constants';
import {
type CommandWithInfo,
@@ -105,7 +108,7 @@ const DEFAULT_CATEGORIES = [
{ name: 'Channels', visible: true },
{ name: 'DMs', visible: true },
{ name: 'Notes', visible: true },
- { name: 'Tasks', visible: true },
+ { name: 'Tasks', visible: ENABLE_TASKS_TABS },
{ name: 'Documents', visible: true },
{ name: 'Chats', visible: true },
{ name: 'Folders', visible: true },
diff --git a/js/app/packages/core/constant/featureFlags.ts b/js/app/packages/core/constant/featureFlags.ts
index 5a57bd591e..71afa12502 100644
--- a/js/app/packages/core/constant/featureFlags.ts
+++ b/js/app/packages/core/constant/featureFlags.ts
@@ -131,3 +131,4 @@ export const ENABLE_CUSTOM_CURSOR = false;
export const ENABLE_CUSTOM_CURSOR_TEXT_GLYPH_DETECTION = true;
export const ENABLE_CREATE_TASK = DEV_MODE_ENV;
+export const ENABLE_TASKS_TABS = DEV_MODE_ENV;