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
feat(teams): unr******y teams ii - invite to channel (#7005)
Eric Hayese65d5e39fe40
diff --git a/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsx b/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsxindex 01b6d9362e..7a7ad44d21 100644--- a/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsx+++ b/apps/web/src/features/block-channel/component/NewChannelBlockAdapter.tsx@@ -47,6 +47,7 @@ import {normalizeChannelTab,useChannelTabItems,} from '@channel/Channel/use-channel-tab-items';+import { ChannelInviteButton } from '@channel/channel-invite-button';import { useChannelPictureActions } from '@channel/channel-picture';import { ChannelParticipantsTab } from '@channel/Participants/ChannelParticipantsTab';import { HeaderIsland } from '@components/app/split-layout/components/HeaderIsland';@@ -252,6 +253,13 @@ function NewTop(props: { channelId: string }) {]}/></SplitTitleFileMenu>+ <SplitHeaderRight>+ <ChannelInviteButton+ channelId={props.channelId}+ channelName={channelName() ?? 'New Channel'}+ channelType={channelType()}+ />+ </SplitHeaderRight>{/* Desktop only: on mobile the action lives in the title drawer above. */}<Show when={!isMobile() && askMacroEntity()}>{(entity) => (diff --git a/apps/web/src/features/channel/Channel/ChannelDetail.tsx b/apps/web/src/features/channel/Channel/ChannelDetail.tsxindex 7bf78e1f35..75924160de 100644--- a/apps/web/src/features/channel/Channel/ChannelDetail.tsx+++ b/apps/web/src/features/channel/Channel/ChannelDetail.tsx@@ -10,6 +10,7 @@ import { ChannelCallTab } from '@channel/Call/ChannelCallTab';import { getCallJoinTab } from '@channel/Call/call-tabs';import { useCall } from '@channel/Call/use-call';import { ChannelCallsTab } from '@channel/Calls/ChannelCallsTab';+import { ChannelInviteButton } from '@channel/channel-invite-button';import { ChannelTopIcon } from '@channel/components/ChannelTopIcon';import { ChannelParticipantsTab } from '@channel/Participants/ChannelParticipantsTab';import { useGlobalBlockOrchestrator } from '@components/app/GlobalAppState';@@ -37,6 +38,7 @@ import {on,onCleanup,Show,+ Suspense,Switch,} from 'solid-js';import {@@ -159,6 +161,13 @@ export function ChannelDetailActions(props: ChannelDetailHeaderProps) {return (<div class="header-actions ml-auto flex shrink-0 items-center gap-2"><ChannelLiveIndicators channelId={props.channelId} />+ <Suspense>+ <ChannelInviteButton+ channelId={props.channelId}+ channelName={channelName() ?? 'New Channel'}+ channelType={channelType()}+ />+ </Suspense><Show when={ENABLE_CALLS && !call.isInThisChannel()}><ChannelCallButton channelId={props.channelId} /></Show>diff --git a/apps/web/src/features/channel/CreateChannelModal.tsx b/apps/web/src/features/channel/CreateChannelModal.tsxindex 0088c153f1..d3a94256fe 100644--- a/apps/web/src/features/channel/CreateChannelModal.tsx+++ b/apps/web/src/features/channel/CreateChannelModal.tsx@@ -236,7 +236,6 @@ export function CreateChannelModal() {<Dialogopen={newChannelModalOpen()}onOpenChange={(open) => !open && close()}- position="center"class="w-150"><Panel depth={2} class="rounded-xl *:max-h-[85vh]">diff --git a/apps/web/src/features/channel/channel-invite-button.tsx b/apps/web/src/features/channel/channel-invite-button.tsxnew file mode 100644index 0000000000..7e1b6ac8c0--- /dev/null+++ b/apps/web/src/features/channel/channel-invite-button.tsx@@ -0,0 +1,89 @@+import { useUserId } from '@core/context/user';+import { useCombinedRecipients } from '@core/signal/useCombinedRecipient';+import UserPlusIcon from '@phosphor/user-plus.svg';+import { useChannelParticipantsQuery } from '@queries/channel/channel-participants';+import { useAddParticipantsMutation } from '@queries/channel/participants';+import { useCurrentTeamQuery } from '@queries/team/teams';+import { Button } from '@ui';+import { createSignal, Show, Suspense } from 'solid-js';+import { ChannelInviteModal } from './views/channel-invite-modal';++export function ChannelInviteButton(props: {+ channelId: string;+ channelName: string;+ channelType?: string;+}) {+ const userId = useUserId();+ const participantsQuery = useChannelParticipantsQuery(() => props.channelId);+ const [open, setOpen] = createSignal(false);+ const participants = () =>+ participantsQuery.isSuccess ? (participantsQuery.data ?? []) : [];+ const canInvite = () =>+ (props.channelType === 'team' || props.channelType === 'private') &&+ participants().some((participant) => participant.user_id === userId());++ return (+ <Show when={canInvite()}>+ <Button+ variant="outline"+ size="sm"+ label="Invite people"+ tooltip="Invite people"+ onClick={() => setOpen(true)}+ >+ <UserPlusIcon />+ <span class="hidden sm:inline">Invite</span>+ </Button>+ <Suspense>+ <Show when={open()}>+ <ChannelInviteDialog+ channelId={props.channelId}+ channelName={props.channelName}+ participantIds={participants().map(+ (participant) => participant.user_id+ )}+ participantsReady={participantsQuery.isSuccess}+ onClose={() => setOpen(false)}+ />+ </Show>+ </Suspense>+ </Show>+ );+}++function ChannelInviteDialog(props: {+ channelId: string;+ channelName: string;+ participantIds: string[];+ participantsReady: boolean;+ onClose: () => void;+}) {+ const teamQuery = useCurrentTeamQuery();+ const { users } = useCombinedRecipients();+ const addParticipants = useAddParticipantsMutation();+ const team = () => {+ const data = teamQuery.isSuccess ? teamQuery.data : undefined;+ return data+ ? {+ name: data.team.name,+ memberIds: data.members.map((member) => member.user_id),+ }+ : undefined;+ };++ return (+ <ChannelInviteModal+ {...props}+ team={team()}+ teamLoading={teamQuery.isPending}+ teamError={teamQuery.isError}+ options={users}+ onAdd={(participants) =>+ addParticipants.mutateAsync({+ channelId: props.channelId,+ participants,+ })+ }+ />+ );+}diff --git a/apps/web/src/features/channel/primitives/create-channel-invites.test.ts b/apps/web/src/features/channel/primitives/create-channel-invites.test.tsnew file mode 100644index 0000000000..1965c1e844--- /dev/null+++ b/apps/web/src/features/channel/primitives/create-channel-invites.test.ts@@ -0,0 +1,98 @@+import { createRoot, createSignal } from 'solid-js';+import { describe, expect, it, vi } from 'vitest';+import { createChannelInvites } from './create-channel-invites';++describe('channel invitations', () => {+ it('adds only new, unique recipients and closes after success', async () => {+ const add = vi.fn().mockResolvedValue(undefined);+ const onClose = vi.fn();+ const invitations = createRoot(() =>+ createChannelInvites({+ candidateIds: () => ['existing', 'new', 'new', '[email protected]'],+ existingIds: () => ['existing'],+ ready: () => true,+ add,+ onClose,+ })+ );+ await invitations.addPeople();+ expect(add).toHaveBeenCalledWith(['new', '[email protected]']);+ expect(onClose).toHaveBeenCalledOnce();+ });++ it('waits for membership data and handles everyone already being present', async () => {+ const add = vi.fn();+ const [ready, setReady] = createSignal(false);+ const [existing, setExisting] = createSignal<string[]>([]);+ const invitations = createRoot(() =>+ createChannelInvites({+ candidateIds: () => ['teammate'],+ existingIds: existing,+ ready,+ add,+ onClose: vi.fn(),+ })+ );+ await invitations.addPeople();+ expect(add).not.toHaveBeenCalled();+ setExisting(['teammate']);+ setReady(true);+ expect(invitations.canAdd()).toBe(false);+ await invitations.addPeople();+ expect(add).not.toHaveBeenCalled();+ });++ it('blocks double submissions and closing while an invitation is pending', async () => {+ let resolve: () => void = () => {};+ const add = vi.fn(+ () =>+ new Promise<void>((done) => {+ resolve = done;+ })+ );+ const onClose = vi.fn();+ const invitations = createRoot(() =>+ createChannelInvites({+ candidateIds: () => ['teammate'],+ existingIds: () => [],+ ready: () => true,+ add,+ onClose,+ })+ );+ const submission = invitations.addPeople();+ expect(invitations.pending()).toBe(true);+ await invitations.addPeople();+ invitations.close();+ expect(add).toHaveBeenCalledOnce();+ expect(onClose).not.toHaveBeenCalled();+ resolve();+ await submission;+ expect(onClose).toHaveBeenCalledOnce();+ });++ it('keeps failed invitations available for retry', async () => {+ const add = vi+ .fn()+ .mockRejectedValueOnce(new Error('Unavailable'))+ .mockResolvedValueOnce(undefined);+ const onClose = vi.fn();+ const invitations = createRoot(() =>+ createChannelInvites({+ candidateIds: () => ['teammate'],+ existingIds: () => [],+ ready: () => true,+ add,+ onClose,+ })+ );+ await invitations.addPeople();+ expect(invitations.error()).toContain('Try again');+ expect(invitations.canAdd()).toBe(true);+ expect(onClose).not.toHaveBeenCalled();+ await invitations.addPeople();+ expect(invitations.error()).toBeUndefined();+ expect(add).toHaveBeenNthCalledWith(2, ['teammate']);+ expect(onClose).toHaveBeenCalledOnce();+ });+});diff --git a/apps/web/src/features/channel/primitives/create-channel-invites.ts b/apps/web/src/features/channel/primitives/create-channel-invites.tsnew file mode 100644index 0000000000..fcf34b32c9--- /dev/null+++ b/apps/web/src/features/channel/primitives/create-channel-invites.ts@@ -0,0 +1,48 @@+import { type Accessor, createSignal } from 'solid-js';++export function createChannelInvites(props: {+ candidateIds: Accessor<string[]>;+ existingIds: Accessor<string[]>;+ ready: Accessor<boolean>;+ add: (ids: string[]) => Promise<unknown>;+ onClose: () => void;+}) {+ const [pending, setPending] = createSignal(false);+ const [error, setError] = createSignal<string>();+ const participantIds = () => {+ const existing = new Set(props.existingIds());+ return [...new Set(props.candidateIds())].filter((id) => !existing.has(id));+ };+ const canAdd = () =>+ !pending() && props.ready() && participantIds().length > 0;++ function close() {+ if (!pending()) props.onClose();+ }++ async function addPeople() {+ if (!canAdd()) return;+ const ids = participantIds();+ setPending(true);+ setError(undefined);+ try {+ await props.add(ids);+ } catch {+ setError('Could not add people to this channel. Try again.');+ setPending(false);+ return;+ }+ setPending(false);+ props.onClose();+ }++ return {+ pending,+ error,+ clearError: () => setError(undefined),+ participantIds,+ canAdd,+ close,+ addPeople,+ };+}diff --git a/apps/web/src/features/channel/views/channel-invite-modal.test.tsx b/apps/web/src/features/channel/views/channel-invite-modal.test.tsxnew file mode 100644index 0000000000..86d0c2d188--- /dev/null+++ b/apps/web/src/features/channel/views/channel-invite-modal.test.tsx@@ -0,0 +1,98 @@+/** @vitest-environment jsdom */+import {+ cleanup,+ fireEvent,+ render,+ screen,+ waitFor,+} from '@solidjs/testing-library';+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';+import { ChannelInviteModal } from './channel-invite-modal';++// The shared picker has app providers; these tests exercise modal choice and+// submission behavior. The real picker is used in the live app verification.+vi.mock('@core/component/RecipientSelector', () => ({+ RecipientSelector: () => <input aria-label="People picker" />,+}));+vi.mock('@core/mobile/isMobile', () => ({ isMobile: () => false }));++beforeEach(() => {+ vi.stubGlobal('scrollTo', vi.fn());+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ observe() {}+ unobserve() {}+ disconnect() {}+ }+ );+});+afterEach(() => {+ cleanup();+ vi.unstubAllGlobals();+});++function setup(team = true) {+ const onAdd = vi.fn().mockResolvedValue(undefined);+ const onClose = vi.fn();+ render(() => (+ <ChannelInviteModal+ channelName="Design"+ team={+ team+ ? { name: 'Acme', memberIds: ['existing', 'new-member'] }+ : undefined+ }+ teamLoading={false}+ teamError={false}+ participantsReady+ participantIds={['existing']}+ options={() => []}+ onAdd={onAdd}+ onClose={onClose}+ />+ ));+ return { onAdd, onClose };+}++describe('channel invite modal', () => {+ it('switches between the team option and the specific people picker', async () => {+ const { onAdd, onClose } = setup();+ await screen.findByRole('dialog', { name: 'Invite people to Design' });+ expect(screen.getByRole('textbox', { name: 'People picker' })).toBeTruthy();+ fireEvent.click(screen.getByLabelText('Add all members of Acme'));+ expect(screen.queryByRole('textbox', { name: 'People picker' })).toBeNull();+ expect(onAdd).not.toHaveBeenCalled();+ fireEvent.click(screen.getByLabelText('Add specific people'));+ expect(screen.getByRole('textbox', { name: 'People picker' })).toBeTruthy();+ fireEvent.click(screen.getByRole('button', { name: 'Cancel' }));+ expect(onClose).toHaveBeenCalledOnce();+ expect(onAdd).not.toHaveBeenCalled();+ });++ it('submits current teammates after choosing the team option and clicking Add', async () => {+ const { onAdd, onClose } = setup();+ await screen.findByRole('dialog');+ fireEvent.click(screen.getByLabelText('Add all members of Acme'));+ fireEvent.click(screen.getByRole('button', { name: 'Add' }));+ await waitFor(() => expect(onClose).toHaveBeenCalledOnce());+ expect(onAdd).toHaveBeenCalledWith(['new-member']);+ });++ it('keeps individual invitations available without a team', async () => {+ setup(false);+ await screen.findByRole('dialog');+ expect(+ screen.getByLabelText('Add all members of your team')+ ).toHaveProperty('disabled', true);+ expect(screen.getByLabelText('Add specific people')).toHaveProperty(+ 'checked',+ true+ );+ expect(screen.getByRole('textbox', { name: 'People picker' })).toBeTruthy();+ expect(screen.getByRole('button', { name: 'Add' })).toHaveProperty(+ 'disabled',+ true+ );+ });+});diff --git a/apps/web/src/features/channel/views/channel-invite-modal.tsx b/apps/web/src/features/channel/views/channel-invite-modal.tsxnew file mode 100644index 0000000000..c36266a404--- /dev/null+++ b/apps/web/src/features/channel/views/channel-invite-modal.tsx@@ -0,0 +1,165 @@+import { RecipientSelector } from '@core/component/RecipientSelector';+import { getDestinationFromOptions } from '@core/util/destination';+import XIcon from '@phosphor/x.svg';+import { Button, Dialog, Panel, RadioGroup } from '@ui';+import { type ComponentProps, createSignal, Show } from 'solid-js';+import { createChannelInvites } from '../primitives/create-channel-invites';++export type ChannelInviteTeam = {+ name: string;+ memberIds: string[];+};++type PeoplePickerProps = ComponentProps<+ typeof RecipientSelector<'user' | 'contact'>+>;++export function ChannelInviteModal(props: {+ channelName: string;+ team?: ChannelInviteTeam;+ teamLoading: boolean;+ teamError: boolean;+ participantsReady: boolean;+ participantIds: string[];+ options: PeoplePickerProps['options'];+ onAdd: (participantIds: string[]) => Promise<unknown>;+ onClose: () => void;+}) {+ const [mode, setMode] = createSignal<'team' | 'specific'>('specific');+ const [selected, setSelected] = createSignal<+ PeoplePickerProps['selectedOptions']+ >([]);+ const {+ pending,+ error,+ clearError,+ participantIds,+ canAdd,+ close,+ addPeople,+ } = createChannelInvites({+ candidateIds: () =>+ mode() === 'team'+ ? (props.team?.memberIds ?? [])+ : getDestinationFromOptions(selected()).users,+ existingIds: () => props.participantIds,+ ready: () => props.participantsReady,+ add: props.onAdd,+ onClose: props.onClose,+ });+ const options = () => {+ const existing = new Set(props.participantIds);+ return props.options().filter((option) => !existing.has(option.id));+ };++ return (+ <Dialog open onOpenChange={(open) => !open && close()} class="w-140">+ <Panel depth={2} class="rounded-xl *:max-h-[85vh]">+ <Panel.Body scroll>+ <div class="flex flex-col gap-6 p-6">+ <div class="flex items-start justify-between gap-4">+ <Dialog.Title class="min-w-0 break-words text-xl font-semibold text-ink">+ Invite people to {props.channelName}+ </Dialog.Title>+ <Dialog.CloseButton+ as={Button}+ variant="ghost"+ size="icon-sm"+ label="Close"+ tabIndex={-1}+ disabled={pending()}+ >+ <XIcon />+ </Dialog.CloseButton>+ </div>+ <RadioGroup+ value={mode()}+ onChange={(value) => {+ if (value !== 'team' && value !== 'specific') return;+ setMode(value);+ clearError();+ }}+ disabled={pending()}+ aria-label="People to invite"+ class="gap-4"+ >+ <RadioGroup.Item+ value="team"+ disabled={!props.team}+ class="items-start"+ >+ <RadioGroup.ItemControl class="mt-0.5" />+ <div class="flex min-w-0 flex-col gap-1">+ <RadioGroup.ItemLabel class="text-sm font-medium text-ink">+ Add all members of {props.team?.name ?? 'your team'}+ </RadioGroup.ItemLabel>+ <RadioGroup.ItemDescription class="text-sm text-ink-muted">+ {props.teamLoading+ ? 'Loading your team…'+ : props.teamError+ ? 'Could not load your team. Reopen this dialog to try again.'+ : !props.team+ ? 'You need to belong to a team to use this option.'+ : 'Add current teammates who are not already in this channel.'}+ </RadioGroup.ItemDescription>+ </div>+ </RadioGroup.Item>+ <RadioGroup.Item value="specific">+ <RadioGroup.ItemControl />+ <RadioGroup.ItemLabel class="text-sm font-medium text-ink">+ Add specific people+ </RadioGroup.ItemLabel>+ </RadioGroup.Item>+ </RadioGroup>+ <Show when={mode() === 'specific'}>+ <div class="flex flex-col gap-3">+ <RecipientSelector<'user' | 'contact'>+ options={options}+ selectedOptions={selected()}+ setSelectedOptions={setSelected}+ placeholder="Search people or email addresses"+ disabled={pending()}+ inviteExternalEmails+ class="min-h-12 rounded-full border-edge-frame bg-control px-3 py-2 focus-within:ring-2 focus-within:ring-edge-muted"+ />+ <p class="text-sm text-ink-muted">+ Invite teammates or people outside your team by entering their+ email address.+ </p>+ </div>+ </Show>+ <Show+ when={+ mode() === 'team' &&+ props.team &&+ props.participantsReady &&+ participantIds().length === 0+ }+ >+ <p class="text-sm text-ink-muted">+ All teammates are already in this channel.+ </p>+ </Show>+ <Show when={error()}>+ <p role="alert" class="text-sm text-failure-ink">+ {error()}+ </p>+ </Show>+ <div class="flex justify-end gap-2">+ <Button variant="ghost" onClick={close} disabled={pending()}>+ Cancel+ </Button>+ <Button+ variant="accent"+ onClick={() => void addPeople()}+ disabled={!canAdd()}+ >+ {pending() ? 'Adding…' : 'Add'}+ </Button>+ </div>+ </div>+ </Panel.Body>+ </Panel>+ </Dialog>+ );+}diff --git a/docs/AGENT_GUIDE/channels.md b/docs/AGENT_GUIDE/channels.mdindex 634267e2ff..fc4b890945 100644--- a/docs/AGENT_GUIDE/channels.md+++ b/docs/AGENT_GUIDE/channels.md@@ -613,6 +613,19 @@ shows Connecting and waits for that request before registering again.## Channel tabs+Private and team channels show an `Invite` button on the right of both the+split header and the inline conversation header for current participants.+Click it to open `Invite people to <channel>` using the standard dialog at the+top of the viewport, matching the create menu and create-channel dialog (a+drawer on mobile). Choose `Add all members of <team>` to add current teammates+once, or `Add specific people` to search teammates and enter external email+addresses using the same recipient picker as channel creation. Existing channel+members are excluded. `Add` submits; Cancel, Close, or Escape dismisses without+sending. Failed additions preserve the selection for retry. The team option is+disabled when no team is available. This action does not enable team auto-join.+Check opening and reopening, switching options, keyboard recipient selection,+external email chips, cancellation, and focus restoration before sending invites.+Radio group at the top of the channel pane: `Messages` / `Attachments` / `Calls` / `Participants`,plus `Ask Macro` and `Call` buttons. The `Calls` tab lists recordings for that channel(same rows as the Calls soup view, filtered to this channel). The live `Call` tabdiff --git a/rules/ast-grep/ts-feature-components-presentational.yml b/rules/ast-grep/ts-feature-components-presentational.ymlindex 927a4c9f91..320b178445 100644--- a/rules/ast-grep/ts-feature-components-presentational.yml+++ b/rules/ast-grep/ts-feature-components-presentational.yml@@ -13,6 +13,7 @@ note: |-untyped wire JSON for property-changed rows. In block-agent, `ui/` isthe presentation layer and `component/` is the composition layer.files:+ - apps/web/src/features/channel/components/channel-invite*- apps/web/src/features/block-agent/ui/**- apps/web/src/features/meetings/components/**- apps/web/src/features/block-spreadsheet/components/**diff --git a/rules/ast-grep/ts-feature-core-pure.yml b/rules/ast-grep/ts-feature-core-pure.ymlindex a83bb088cd..196a45cc86 100644--- a/rules/ast-grep/ts-feature-core-pure.yml+++ b/rules/ast-grep/ts-feature-core-pure.yml@@ -15,6 +15,7 @@ note: |-The shared @core/util/base64 codec is also pure and may be reused by email.Block-agent names its rendering layers `ui/` and `component/`.files:+ - apps/web/src/features/channel/core/channel-invite*- apps/web/src/features/block-agent/core/**- apps/web/src/features/meetings/core/**- apps/web/src/features/block-spreadsheet/core/**diff --git a/rules/ast-grep/ts-feature-data-no-ui.yml b/rules/ast-grep/ts-feature-data-no-ui.ymlindex 4df12e04c8..281fe57512 100644--- a/rules/ast-grep/ts-feature-data-no-ui.yml+++ b/rules/ast-grep/ts-feature-data-no-ui.yml@@ -11,6 +11,8 @@ note: |-with fake clients and controllers with fake capabilities; neither importsrendering code, including block-agent’s `ui/` and `component/` layers.files:+ - apps/web/src/features/channel/queries/channel-invite*+ - apps/web/src/features/channel/primitives/create-channel-invites*- apps/web/src/features/block-agent/queries/**- apps/web/src/features/block-agent/primitives/**- apps/web/src/features/meetings/queries/**diff --git a/rules/ast-grep/ts-feature-layers-use-context.yml b/rules/ast-grep/ts-feature-layers-use-context.ymlindex b2949c2900..c038640b7e 100644--- a/rules/ast-grep/ts-feature-layers-use-context.yml+++ b/rules/ast-grep/ts-feature-layers-use-context.yml@@ -15,6 +15,10 @@ note: |-`files` in each ts-/tsx-feature-* rule. Block-agent uses `ui/` forpresentation and `component/` for composition.files:+ - apps/web/src/features/channel/queries/channel-invite*+ - apps/web/src/features/channel/primitives/create-channel-invites*+ - apps/web/src/features/channel/components/channel-invite*+ - apps/web/src/features/channel/views/channel-invite*- apps/web/src/features/block-agent/queries/**- apps/web/src/features/block-agent/primitives/**- apps/web/src/features/block-agent/ui/**diff --git a/rules/ast-grep/tsx-feature-components-presentational.yml b/rules/ast-grep/tsx-feature-components-presentational.ymlindex 1f3d12b51e..153f3ff6c7 100644--- a/rules/ast-grep/tsx-feature-components-presentational.yml+++ b/rules/ast-grep/tsx-feature-components-presentational.yml@@ -13,6 +13,7 @@ note: |-untyped wire JSON for property-changed rows. In block-agent, `ui/` isthe presentation layer and `component/` is the composition layer.files:+ - apps/web/src/features/channel/components/channel-invite*- apps/web/src/features/block-agent/ui/**- apps/web/src/features/meetings/components/**- apps/web/src/features/block-spreadsheet/components/**diff --git a/rules/ast-grep/tsx-feature-core-pure.yml b/rules/ast-grep/tsx-feature-core-pure.ymlindex 97226fedd7..91bef85366 100644--- a/rules/ast-grep/tsx-feature-core-pure.yml+++ b/rules/ast-grep/tsx-feature-core-pure.yml@@ -15,6 +15,7 @@ note: |-The shared @core/util/base64 codec is also pure and may be reused by email.Block-agent names its rendering layers `ui/` and `component/`.files:+ - apps/web/src/features/channel/core/channel-invite*- apps/web/src/features/block-agent/core/**- apps/web/src/features/meetings/core/**- apps/web/src/features/block-spreadsheet/core/**diff --git a/rules/ast-grep/tsx-feature-data-no-ui.yml b/rules/ast-grep/tsx-feature-data-no-ui.ymlindex 13e47c633a..8cf2b7d528 100644--- a/rules/ast-grep/tsx-feature-data-no-ui.yml+++ b/rules/ast-grep/tsx-feature-data-no-ui.yml@@ -11,6 +11,8 @@ note: |-with fake clients and controllers with fake capabilities; neither importsrendering code, including block-agent’s `ui/` and `component/` layers.files:+ - apps/web/src/features/channel/queries/channel-invite*+ - apps/web/src/features/channel/primitives/create-channel-invites*- apps/web/src/features/block-agent/queries/**- apps/web/src/features/block-agent/primitives/**- apps/web/src/features/meetings/queries/**diff --git a/rules/ast-grep/tsx-feature-layers-use-context.yml b/rules/ast-grep/tsx-feature-layers-use-context.ymlindex edb882ed25..a654b51899 100644--- a/rules/ast-grep/tsx-feature-layers-use-context.yml+++ b/rules/ast-grep/tsx-feature-layers-use-context.yml@@ -15,6 +15,10 @@ note: |-`files` in each ts-/tsx-feature-* rule. Block-agent uses `ui/` forpresentation and `component/` for composition.files:+ - apps/web/src/features/channel/queries/channel-invite*+ - apps/web/src/features/channel/primitives/create-channel-invites*+ - apps/web/src/features/channel/components/channel-invite*+ - apps/web/src/features/channel/views/channel-invite*- apps/web/src/features/block-agent/queries/**- apps/web/src/features/block-agent/primitives/**- apps/web/src/features/block-agent/ui/**