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(marketing): refresh product pages and interactive demos (#8396)
Chaitanya Agarwald81d66b5a389
diff --git a/apps/marketing/README.md b/apps/marketing/README.mdindex 0b47ec46a6..2ae9930684 100644--- a/apps/marketing/README.md+++ b/apps/marketing/README.md@@ -11,6 +11,55 @@ palette. `features/setup/cream-preview.css` owns the light palette; the sharedrouter applies it across navigation, and each HTML entry applies it beforefirst paint. Sample workspace styles read that HTML palette before route coderuns. Check both palettes when changing a shared demo or surface.+Cream slab typography adds 45 to the base font weight; utility-class slab text+uses weight 360, and the Tasks founder heading uses 445.+Slab display copy uses warm near-black (`#1d1c1a`) in the cream palette.++Public calls to action use the shared `site-nav-start` treatment: warm white,+soft pill corners, a fine border, and a 2px arrow shift on hover. `Book a demo` is a+soft grey secondary action; the header's `Open app` uses a warm-white fill with+near-black text, a fine border, and no arrow. Its fill fades with the header label during+the footer transition. As it lands in the footer, the same link reveals the+original wider white pill, glass rim, and arrow. It follows the existing scroll+animation and fits within phone widths. Its header label fades out completely+before the footer presentation fades in, so the two labels never overlap.+The homepage primary adds a subtle satin gradient and inset edge, a quieter+18px arrow, and a 1px hover lift; it remains a single link.+Feedback uses 140ms CSS transitions, respects reduced motion, and does not+track the pointer. Mobile header actions retain 44px touch targets. The homepage scroll cue is a+16px arrow inside a 44px button, inset 20px from the bottom while respecting safe areas.++The homepage keeps the original colored constellation and grainy demo backdrop,+with “with Macro” in the unification heading. The original sample workspace is+embedded at `/demo?embedded=true`; shared UI fixes and corrected sample names+remain in place. Compact arrows and dots sit above the original, fuller captions+at the bottom of the frame. Slide selection is manual: arrows, dots, caption+swipes, and page-level left/right keys. There is no timed cycling or oversized+side-arrow treatment. The existing scroll entrance, reduced-motion behavior,+and interaction boundary remain. The primary button keeps its larger satin+finish but has no looping glimmer. Cream typography from PR #8299 is preserved.++The homepage feature sections retain the original centered headings, descriptions,+conversations, and demos, with rules beside the descriptions. The CRM section+uses the original standalone pipeline illustration and corrected fictional company names.+A shared Learn more label and styled product links open the full product pages in+the same tab. Email and Chat link separately to `/email` and `/channels`, as do+Documents and Tasks to their routes. Agents and CRM each have one link. Sheets+has no dedicated product page, so it has no extra link. These are normal anchors,+with browser Back and modifier-click behavior; the homepage no longer opens+product pages in side panels or iframes.++Marketing demos use `DemoInteractionBoundary`: wheel and touch gestures scroll+the surrounding page until the visitor clicks or enters with the keyboard. The+preview contents stay mounted but inert, preventing internal scroll capture and+automatic focus jumps. The first click activates the demo without triggering an+underlying action. Keep this gate invisible, with an accessible keyboard entry+but no activation badge or extra visible button. Escape (after closing any native menu), clicking outside, or+moving keyboard focus outside returns to preview mode and preserves demo state.+Nested previews share one boundary; the standalone `/demo` route uses+`DemoInteractionScope` and remains immediately interactive. Apply this shared+boundary to new marketing demos rather than adding custom wheel handlers.+The homepage carousel advances only when the visitor selects a highlight.## Ownership and dependency boundary@@ -40,16 +89,22 @@ sync, direct agent edits, indexed email search, bidirectional references, orchannel-based sharing. Verify claims against the implementation. Avoid vague“context,” “move work forward,” and “all in one place” headlines, demo narrationas feature prose, and unqualified superiority claims. Explain technical terms-once in plain language; keep demo disclosures in captions and relevant FAQs.+once in plain language; keep demo disclosures in relevant FAQs. Omit small explanatory captions below+product demos, including changing walkthrough narration inside their footer+controls; retain useful keyboard shortcuts and controls.Write it the way the founder talks to another founder: plain words, “we,” thecompetitor by name when the comparison is specific, and why we built it.Demos are faithful to the signed-in app: its labels, layout, icons, andhover-only controls (the message toolbar appears on hover, as in the app).Don't invent chrome such as step chips or explanatory labels inside a mock, and-don't show features the app doesn't have. Every animated cursor is-`DemoCursor`, the homepage CRM pipeline's pointer and name tag: label it-“Claude” when an agent acts and with the person's first name otherwise. Size+don't show features the app doesn't have. Operating pointers use `DemoCursor`+and `primitives/createDemoPointer`: a standard 20px dark mouse arrow with a stable hotspot,+restrained click feedback, and element-relative positioning. Keep its last+position when a target disappears; changing content or opening a menu must not+remount the pointer. Use actor labels only when they explain who is editing,+and use the caret variant for collaborator text insertion. Background agent+updates do not need a simulated mouse. Sizeeach `ProductDemo` to its scene with `height`/`mobileHeight` so a window isnever mostly empty, and seed enough content that the first frame alreadyreads as a real workspace.@@ -58,9 +113,39 @@ Product stories live in their feature's `components/*/*Stories.tsx` files.They reuse frozen product presentation and local workspace data. Call recordsand GitHub review details port the smallest presentation needed from the app;they do not initialize calls, run checks, post GitHub comments, or merge code.-`createProductWalkthrough` runs once while visible, pauses when the document is-hidden, shows the completed result for reduced motion, and permanently gives-control to the visitor after pointer or keyboard input. Interaction tests cover+`createProductWalkthrough` and `createEmailWalkthrough` share the same clock:+start when the configured portion is visible, preserve the remaining step delay+while offscreen or hidden, and show a useful static result for reduced motion.+`observeDemoTakeover` pauses the current scene when the visitor enters or edits it.+Preserve edits while the demo is visible or a control inside it has focus.+`DemoInteractionBoundary` may recreate an interacted demo after 30 seconds fully+offscreen and unfocused; returning sooner cancels the reset. Hidden tabs do not+run that timer. Use its `render` factory so scene state, timers, and cursors are+recreated together. Standalone `/demo` visits keep manual control. Page scrolling+alone does not enter a demo. The default start threshold is half the frame;+scenes targeting a composer can require that input area to be fully visible.+Repeatable feature stories use `loop` with a 6–10 second result hold (the short+keyboard and folder tours use 5.5 seconds). Reset content, menus, selections,+outputs, and scroll positions together before the next sequence. Never animate+completed work backward. Hide the operating pointer during the result hold;+retain it between actions within a sequence. Live-call previews and static+workspace heroes remain available for exploration without automatic resets.+Use `demoTypingActions` for new human-authored input: reveal one character at a+time with short word and punctuation pauses, then hold briefly before sending.+Schedule typing on the scene's shared clock so offscreen pauses, takeover, and+resets apply to every character. Preserve existing conversation history and+loaded records; incoming messages and values copied by a control are not human+typing. Keep agent-generated content distinct from human input.+Express scene steps as ordered actions with reading time before each action.+Every automated mouse action must show the shared pointer before changing the+UI, including account connection, inbox selection, Share, and Send. On phones,+open the actual inbox menu before selecting its controls. Keep the pointer above+local menu surfaces; keyboard shortcuts and background agent updates do not+simulate mouse input.+Approach a real control, click, show its menu, approach an option, select it, and+hold the result. Share the local controls and save handlers with manual input;+prevent menu autofocus during playback only. The task-creation scene is the+reference for this sequence. Interaction tests coverthat handoff, source links, thread replies, access selection, Sent drafts,transcript selection, and review filters. All changes stay local.@@ -93,6 +178,20 @@ release, and supports arrow keys/Home/End. Repeat with reduced motion, whichstarts finished but permits manual scrubbing. Below 768px the existing compactlayout continues to hide the timeline.+Homepage email playback waits until at least 20% of its scene is visible and+pauses again below that threshold. The landing-page CRM uses a compact,+three-stage Kanban without a sidebar or database toolbar. Its visible-only+walkthrough moves two deals, opens a company record and its email history,+then returns to the board. Pointer or keyboard interaction stops playback;+reduced motion presents the updated board without animating. Visitors can move+cards and open records themselves. Desktop lanes fit the frame; phones scroll+only the three stages. There is no wallpaper, replay button, or status caption.+The CRM product+page retains its separate animated walkthrough. Enabling reduced motion+mid-playback settles an untouched document at its completed state. After visitor+takeover, the current document/history position stays intact. Manual history+scrubbing remains available. Scroll-driven entrances keep their native pacing.+## Develop and validateFrom this directory:@@ -171,45 +270,174 @@ app deployment does not automatically publish `apps/marketing/dist/`; the publicneeds its own deployment step. Website development and builds do not requirechanges to application routes, components, or providers.+`vite preview` uses the same directory-index mapping for extensionless public+URLs as the production CDN. `/crm` must serve `dist/crm/index.html`, never the+homepage hydration entry. Unknown preview routes return 404. The build smoke+check verifies phone touch entry and exit for every product demo, in addition+to homepage hydration and initial styling in dark and cream palettes.+## Feature-page pattern-`/email` establishes the public feature-page pattern in-`src/features/marketing/components/FeaturePage.tsx`: homepage slab headings and-rules, Inter body copy, and the onboarding security section’s reading measure-and FAQ disclosures. Website UI utilities and the frozen dark palette are-scoped to `.feature-page`, preserving the surrounding public-page styles.--The email page reuses `HomepageEmailCompose`. Its other local demos freeze the-presentation of the application’s `EmailSidebar`, `SearchBar`, entity email row-layouts, `MessageCard`, share form, channel composer, and linked email cards. They-use website assets and local fixtures; they do not import those app modules.-To verify the page: filter accounts, search and open an inbox thread, move an-update to Noise and undo, share the example into the launch channel, and open-its linked thread. The composer, sharing, and edits stay local. No demo sends-mail or changes a workspace. Playback pauses offscreen and when the page is-hidden; reduced-motion mode shows the completed share. The animations run once-without playback controls. Test opening a shared email, plus typing and sending-a local channel message.--The email sharing walkthrough measures its controls to position an animated mouse-pointer. Manual pointer or keyboard interaction stops it. Email, channel, and-new-reply views share a fixed-height viewport with internal scrolling, so the-section below stays in place.--The four feature links have inline SVG illustrations. Full app frames use a-raised rim and a bottom mask into the page background; keep interactive controls-above the faded tail. `HomepageEmailCompose` uses the frozen app composer chrome-on the email page while retaining the existing homepage appearance.+`FeaturePageSection` in `src/features/marketing/components/FeaturePage.tsx`+provides the lower demo chapters on Tasks, Email, Chat, Docs, Calls, CRM, Agents,+and GitHub. Follow the original Linear-inspired chapter layout: full-width+rules between sections, generous top and bottom spacing, a large slab heading+beside a full explanatory paragraph, the existing native demo, and descriptive feature cards. Give every heading two explicit lines using its title+tuple. Keep both lines short enough to fit at phone widths without shrinking+the type or clipping words.++Use only the feature cards needed for the specific demo, each with a concrete+action label, a required short summary, and an adjacent arrow. All eight+subpages use the same soft card layout; vary the content and count with the+workflow rather than repeating generic benefits.+Keep cards at the three-column width with equal gaps, centering rows with one+or two cards. Wrap at narrow widths without stretching the final row; stack+full-width cards on phones. Allow height to grow when text needs more room.++`SiteHeader` keeps the top-left mark as a normal `href="/"` link with+`target="_self"`, so clicking returns to the landing page instead of signup.+Mouse hover opens the navigation and preserves the existing logo morph; keep the+hover path connected across the gap to the dropdown. Delay hover dismissal by+350ms and cancel it on re-entry; keep navigation open while its links have focus.+Outside clicks and Escape dismiss immediately. ArrowDown opens and focuses+navigation from the home link. Touch and narrow layouts have a separate menu+toggle, so tapping the mark still goes home. Escape returns focus to the opener.++Feature chapters rely on their heading, description, and working demo. Do not+reintroduce unused feature-card guides or duplicate explanatory drawers.++Desktop chapters use a 1160px maximum measure and shared typography: two+heading lines and three description lines share a height, with a wider+description column. Let shorter or longer copy wrap naturally without clipping,+fixed heights, or copy changes to force a line count. Below 1200px the intro+stacks; phone layouts keep the page gutters. Email stages share the chapter alignment+without an extra inset. This pattern only applies to lower subpage sections;+leave the homepage, product heroes, and wallpaper demos unchanged.+FAQ disclosures retain the onboarding security section’s reading measure.+Use “Questions about Macro [product]” for every product FAQ title, matching the+page’s product name (Mail, Chat, Docs, Tasks, Calls, CRM, Agents, or for GitHub).+Put FAQ questions directly below that title without an introduction or second+heading. Order questions by setup and compatibility, core capabilities, sharing+and permissions, practical limitations, then pricing. Lead each answer with the+answer, keep useful detail in the relevant question, and link to the specific+Macro product, setup guide, migration page, privacy policy, or pricing page.+Verify permissions and availability against current app guides before making+claims; distinguish pipeline fields from company properties, and channel-call+team sharing from standalone meeting access.+Website UI utilities and the frozen dark palette are scoped to `.feature-page`,+preserving the surrounding public-page styles.++Shared `ChannelComposer` sizing follows the app's compact-width measurement,+not a character cutoff. Measure an inert copy, update the live height only when+it changes, and ignore height-only resize notifications. Keep textarea and rich+mention inputs on that same sizing path.++`HomepageMention` is a clickable link, without a descriptive hover popup.+Email draft citations open the existing document and call viewers beside the+agent (or in place on phones), keeping the draft mounted. The sample PDF link+opens the Documents page in a new tab until a real sample PDF is supplied.+Existing sample documents can open directly through `/demo?document=<id>`;+the generated rollout-plan link uses the `rollout` fixture.++The email page reuses `HomepageEmailCompose` and frozen presentation from+`EmailInboxSelector`, `EmailSidebar`, `SearchBar`, entity email rows, `MessageCard`,+the share form, and channel composer. Keep headings and descriptions unchanged+in demo-only passes. These demos use local fixtures, with no live account, email,+sharing, or agent requests.++`email-demo-story.ts` supplies 31 emails for the hero and multi-account story,+with Macro, Gmail, and Outlook sample addresses. `EmailAccountsDemo` adds two+sample accounts, one per connection click. It stays in All inboxes, focuses an+individual account, then returns to the combined list. Do not click All inboxes+while it is already selected. Google authorization is deliberately omitted from this local demonstration;+the requested Outlook address is illustrative, not an implemented Outlook connector. Account, Signal/Noise, tag, and search filters+remain interactive. Keyboard triage uses 14 messages and demonstrates selection,+reading, returning, and archiving in that order.++`createEmailWalkthrough` starts each finite story only when enough of its frame+is visible. Pause offscreen, in hidden tabs, and when entering a demo or using its+controls. Reduced motion shows the usable final state. Do not add replay buttons,+animated cursors, explanatory captions, or decorative backgrounds.++Sharing shows the customer email and channel as two app splits on desktop, then+adds the linked email and a later reply. Wait two seconds after Valentina’s+email reply before showing Julia’s channel response. Reduced motion shows both+immediately. Below 800px, show one pane at a time;+opening the email reference and going back preserves the channel conversation.+Keep message objects stable across walkthrough steps; only newly appended messages+should mount and animate, preserving existing bubbles, controls, and composer state.+The agent story shows the request, its call/document context, and the editable+draft in the actual chat order. Rich sample links use the existing composer’s+optional `bodyContent`; ordinary drafts and the homepage keep their current behavior.+Use one neutral surface, fixed-height frames, scoped vertical scrolling, and short+opacity transitions. Test both palettes and mobile account selection, plus local+sharing, draft edits, keyboard scope, reduced motion, and timer cleanup.`/crm` follows the same reading width, left-aligned slab headings, glass edges,-and homepage closing animation. `WorkspaceDesktopDemo` supplies the shared Mac-window and desktop background for both email and CRM. CRM demonstrates message-driven+and homepage closing animation. `WorkspaceDesktopDemo` supplies the shared+hero dimensions, wallpaper, padding, and shadows on CRM as on the other product pages.+CRM passes `windowChrome={false}` to omit the simulated browser bar; the content+uses that space so the outer frame stays the same height. Do not add CRM-specific+hero background or sizing overrides. CRM demonstrates message-drivenrecord updates using the shared company UI, company enrichment, an editable customer record, company-mentions in documents and chat, and an agent updating the pipeline. Keep these demos local and check the record interactions-at both desktop and mobile widths.--FAQ answers and the collapsed comparison are rendered in the initial HTML.-The comparison uses a native `details` disclosure for both people and crawlers.+mentions in documents and chat, and an agent preparing a follow-up. The hero+uses `CrmPipelineScene` with CRM navigation, board/table switching, and record search.+`CrmCaptureDemo` turns the completed @Claude name into the native inline user+mention while the rest of the request types, without a dropdown. Preserve that+mention node until sending or resetting, and stop typing on visitor input.+`CrmRecordDemo` tours Emails, Calls, Files, and Tasks before returning to the+company discussion. It shares the follow-up fixtures so the evidence matches.+Keep the record populated with readable emails, documents, and tasks across+multiple statuses. Task rows use the native ListChecks entity icon; status+symbols belong in the group headings. Open the selected source by its own ID.+The final section defers `CrmFollowupDemo` until it approaches the viewport:+its automatic walkthrough stays in the agent chat, showing source reads before+presenting an editable email and concrete next steps. Use the real record tabs; do not invent Chat or PR+tabs on the company. Linked items reuse the existing source viewers, and returning+to the agent preserves draft edits. In the compact email source row, align the+sender, envelope, unread dot, and time on the first line; keep the subject and+truncated snippet together beneath it at desktop and phone widths.+Company-call and task rows accept optional+open handlers so this story can navigate locally without changing other records.+The sample PR is merged but its production check remains open; the draft must not+promise availability. Keep the evidence, reply, and next steps consistent in+`crm-followup-data.ts`. Source links open one full-width viewer only on request, on desktop and phones;+returning restores the chat. Do not automatically open a second workspace.+Playback stops on interaction and shows the result immediately for reduced motion.+`createCrmDemoWorkspace` supplies the same fictional accounts throughout the page.+The CRM hero opts into `CrmPipelineScene`'s `hero` fixtures: New business,+Studio partnerships, Q4 renewals, and Team expansion, plus three populated+company lists. Pipeline edits are scoped to the selected pipeline, and lists+show their actual membership counts. `CrmHeroSidebar` follows the CRM sidebar+and collapsible section spacing at GitHub commit+`682c26541e6d8d89904e58266c06b99ab6c2f56c`. Its 32px rows, icon slots, and+section insets use the shared sidebar tokens. On phones, use the existing+navigation toggle; selecting a pipeline or list closes the sidebar.+Keep these fixtures and spacing scoped to the hero; compact landing scenes+retain their three-stage story.+The hero plays once after half the scene becomes visible: hold the board for+three seconds, move Miller & Rowe from Lead to Qualified with the operating pointer,+show All records for three seconds, then return to the board. On narrow screens,+the board scrolls to reveal the destination lane. The first activation click,+pointer input, or keyboard focus stops playback for the current visit and clears the cursor;+reduced motion shows the settled board. The animation uses the shared+`createProductWalkthrough` lifecycle and `pipeline-transfer.css`.+`CompanyPipelineEntry` follows `crm/components/pipeline-entry-cards` and appears+between the company header and Discussion. Pipeline edits remain separate from+company properties. The CRM update example types and sends through the company+Discussion composer, shows Claude acknowledging the request, updates Stage and+Owner, then posts the completion reply. Agent actions do not use a simulated+mouse. Render agent mentions such as `@Claude` and `@Cursor` as person mentions,+never document links or sparkle chips. The follow-up example holds its source+summary, email draft, and next steps separately so the draft is readable before+scrolling. Narrow email panes preserve the sender name; message details expose+the recipient information.+Verify board/table switching, moving a deal, editing its+pipeline entry from a record, and the mobile Back control. Keep these demos local+and check the record interactions at both desktop and mobile widths.++FAQ answers and the always-visible comparison are rendered in the initial HTML.+The CRM comparison appears above the FAQ, using the shared product table styling.Retain FAQ class markers so prerendering emits matching FAQPage structured data.## Paid-social landing page@@ -268,9 +496,9 @@ build; a correctly styled standalone `/demo` does not prove the iframe boots.A benefit carousel fades the live preview into slab-serif headlines. The firsthighlight opens an email inside Home’s mixed activity feed; subsequent highlightsshow Chat, Docs, CRM, Tasks, and Agents. Arrows, dots, left/right keys, and swiping-the caption select highlights without reloading the frame. Horizontal drags-capture the pointer; vertical gestures keep scrolling the page. There is no autoplay.-The workspace is always interactive. Clicking or typing inside it keeps the fade,+the caption select highlights without reloading the frame. Page-level left/right keys work while at least 35% of the carousel is visible, without first focusing an arrow. Editors, other focused controls, open dialogs, modified keys, and keys inside the iframe keep their native behavior. Horizontal drags+capture the pointer; vertical gestures keep scrolling the page. The carousel never advances on a timer.+The shared interaction boundary keeps the page scrollable until entry. Clicking or typing inside it keeps the fade,headline, controls, and layout intact. Sidebar navigation updates the activehighlight without overriding the visitor’s navigation. Slab headlines sit directlybelow the blue indicator and chevrons, without small category headers. Verify direct@@ -400,17 +628,47 @@ FAQs, and the overview's horizontal scrolling.## Product comparisons-`core/feature-comparisons.ts` owns the fact-checked boolean rows and maintainer-source URLs. `FeatureComparisons` renders one always-visible table above each FAQ, without a heading or dropdown:-Superhuman/Gmail on Email; Notion on Docs; Linear/Jira on Tasks; Slack on Chat. ClickUp+Use the framed comparison layout across the six existing product tables: a+category title (Compare CRMs, Compare Task Managers, etc.), a continuous Features+header, readable rows, and plain competitor names with the standard Macro mark.+Keep checks for verifiable capabilities and horizontal dashes labeled Partial for partial support.+Give partial cells a concise accessible description explaining the difference.+Keep pricing disclaimers off the tables and show only legend symbols used in+that table. Lead with concrete workflow and setup differences, retain useful+shared capabilities and competitor strengths, and remove generic filler or+repetitive rows. A partial mark must identify a real scope, setup, or platform difference;+never downgrade a competitor based on an unmeasured quality or speed claim.+For Gmail, distinguish shortcut navigation from a searchable command menu.+Credit all three email clients for managing multiple accounts; do not equate+that with a single combined feed while Superhuman’s sources conflict. For+Notion, credit task databases, sprints, and CRM templates while distinguishing+them from dedicated task and CRM tools. Paid features+and supported integrations count unless a row explicitly says built-in. A check+indicates availability, not equivalent depth. Keep dated source notes with the+comparison data and recheck claims before changing cells.++`core/feature-comparisons.ts` owns the fact-checked availability rows and maintainer+source URLs. `FeatureComparisons` renders one always-visible table above each FAQ, with a category heading and no subtitle or dropdown:+Superhuman/Gmail on Email; Notion on Docs; Linear/Jira on Tasks; Slack on Chat;+Google Meet/Granola on Calls. CRM uses the same visible layout and legend, with+Salesforce, HubSpot, and Attio. Omit generic records/email-history rows and end+with the native workspace distinction;+sales reporting is checked for those CRMs and partial for Macro’s agent summaries.+Connected collaboration tools receive partial credit alongside Macro’s native workspace.+Credit Macro’s Granola connection for reading captured notes, not for native+recording of other meeting apps or every feature of the connected product. ClickUpstays in the migration overview. Overview links scroll to the matching product-comparison; verify both initial-load and client-side navigation hashes. Keep-cells to Yes/No and labels precise about-built-in tools. Retain detailed article links when an article exists. Source URLs+comparison; verify both initial-load and client-side navigation hashes. Keep cells to checks, crosses, or explained partial marks and label built-in tools explicitly. Retain detailed article links when an article exists. Source URLsare not shown in the UI. Icon-only comparison tables are not exported as proseFAQ answers. Verify table columns, keyboard focus, scrolling, and existingfunctional FAQs after moving or adding a comparison.+Match each comparison’s outer edges to the 1160px demo chapter above it and+use the same mobile gutters. Keep horizontal overflow inside the keyboard-focusable+table. Use neutral check marks, text, and competitor marks with the standard Macro+logo; white on dark pages and dark ink on cream pages. Comparison accent tokens+are scoped to product tables so legacy migration tables retain their styling.+## Agents page and shared agent sample@@ -420,8 +678,14 @@ functional FAQs after moving or adding a comparison.- A personal agent progressively checks the calendar, reads the email and call,then presents its findings and creates the brief. Visitors can inspect thosesources. Reduced motion shows the finished brief; interaction stops playback.-- Macro produces a mockup from the client brief; the person then says only- “@Cursor, build this.” The attachment uses FolderComposerMockup, a static copy+- The hero includes Macro’s source summary, a specific request to Cursor, and+ Julia’s follow-up so both people and agents participate in the same channel.+- Macro produces a folder-upload mockup from the client brief. Julia asks to+ preserve nested folders; Macro clarifies the design before Jacob asks Cursor+ to build it. Cursor returns one completed PR card, and Julia checks+ the preview. The sequence stops on interaction and completes without motion+ when reduced motion is enabled. The attachment uses FolderComposerMockup,+ a static copyof the app’s FolderComposer/EntityComposer presentation, not a hand-drawn SVG.The agent identity in that follow-up is a user mention, without a sparkle icon.@@ -484,7 +748,17 @@ command. The closing FAQ answers model, access, review, and background-work ques## Docs page walkthrough`/documents` introduces collaborative writing, then agent edits, source splits,-and folders and tags. Offline editing and CRDT merging are explained in the FAQ. All examples use a page-owned Website brief,+and folders and tags. The hero's `DocumentProjectDemo teamEditing` variant puts+Julia and Jacob's simultaneous insertions in the first paragraph, followed by+a brief text selection and bold formatting. Start only when half the document+is visible, hold the completed edits for eight seconds before replaying, and clear+remote carets on the first activation or edit.+This is a local illustrative walkthrough, not a live CRDT session or a latency+benchmark; the visitor can type directly in its existing editable document.+The homepage retains the original checklist sequence. Keep the speed message+in the hero copy and the Edit together card, rather than adding a fourth+section. Agent editing, linked sources, and organization retain their own demos.+The FAQ explains offline editing and simultaneous edits in plain language. All examples use a page-owned Website brief,Pricing changes email, Update pricing page task, and #website conversation.`DocumentOrganizationDemo` adapts the app folder list and tag-filtered search:one folder location, several tags, and one persistent document when reopened.@@ -503,8 +777,8 @@ Verified against `block-project/component/Block.tsx`,`property/tags/tagNavigation.ts`, `block-md/component/MarkdownDocument.tsx`, and`crates/projects/src/inbound/toolset/move_to_project.rs` at e2bd582d.Folders and tags are separate organization mechanisms, not multiple physical-copies or nested docs. Notion supports subpages, backlinks, and database views;-the FAQ compares the organization model without claiming it lacks flexibility.+copies or nested docs. Keep competitor comparisons in the comparison table;+the FAQ leads with writing, importing, collaboration, and sharing in Macro.Verify folder and tag navigation, search, source open/close with Escape and focusrestoration, edits surviving navigation, local sharing, tool inspection,@@ -525,14 +799,17 @@ The start-call story replays on returning to view until the visitor interacts;it never loops while visible or replays for reduced motion. The sequence briefly holdsthe chat, then an unnamed pointer moves to Call and clicks. Connecting andparticipants follow, completing in about eight and a half seconds. Interaction cancels the-staged transition and hides the pointer. Other Calls demos have no animated cursor.+staged transition and hides the pointer. The saved-call walkthrough also uses the+same pointer for hanging up, opening the record, and selecting a transcript line;+it rests between those actions. Agent follow-up updates do not simulate a mouse.`/calls` follows a simple Thursday training handoff across a live call, saved record,and agent-assisted task update. Calls-only fixtures live in `calls/call-fixtures.ts`and `calls/call-project.ts`; shared workspace data stays unchanged. The hero'sIn the call / After the call controls sit outside the product frame. The hero-stays in the call until the visitor switches scenes or leaves. Other walkthroughs-run once while visible and stop permanently on visitor interaction. Participants are illustrative; playback is+stays in the call until the visitor switches scenes or leaves. The follow-up and+saved-record walkthroughs hold their result for nine seconds before replaying;+visitor interaction stops them until the shared offscreen reset. Participants are illustrative; playback islocal and has no call audio or network effects.The hero shows camera-off participants and call controls, with no screen-share@@ -591,10 +868,23 @@ waits 1.4 seconds before each agent reply and holds the first result for 2.2seconds before the follow-up. It starts when the main composer is fully visible.Composer handles and explicit reply state drive playback; no synthetic input orReply/Cancel button clicks are used. Keep composer geometry stable during typing. Visitor input stops typing and preserves the draft.-The context demo types its final sharing instruction, opens the mention picker-at @, selects #sales, and stops with the link inserted. It starts only when the-line is visible; the picker opens above the line to stay inside the demo.-Visitor input stops playback permanently;+The message-to-task walkthrough first scrolls its request into view. Its persistent+pointer opens the task composer, selects High from the real priority menu, creates+the task, opens its linked brief, and returns through the inline task mention.+Do not mark a freshly created task complete just to finish the animation.+Use `DocMention`, `TaskMention inline`, and the editable `WorkspaceDocuments` viewer here;+generic boxed entity buttons do not match mentions inside a document.+Menu presentation and saves are shared with the interactive controls; only+automatic menu opens suppress focus.+The context demo types and inserts the Customer brief, Proposal request email,+and #sales references using three mention-menu selections. The picker opens+above the typed mention, clamped to the editor width to stay inside the demo.+Mark these owned editors with `data-demo-mentions="off"` so the global demo+mention menu cannot open a second picker or intercept Enter. Keep inline icons+and underline offsets proportional to the editor font, as in DocumentMention.+Hold all three completed references+without a parked pointer, then reset all three together for the next loop.+Visitor input stops playback until the shared offscreen reset;reduced motion shows the result. Inline task mentions open their linked documents, emails, and conversations. PR playback updates status, never the task’s checklist. Focused task-detailframes grow to fit the discussion and composer above the decorative fade; verifyno inner scrolling or horizontal clipping at desktop and phone widths. The full@@ -621,8 +911,10 @@ available content width equally among all open panes; widths below 240px perpane switch to one active pane. Each pane keeps its own selection and edits.Smaller frames show one active pane at a time;Back to channel retains open items, while Close removes only that pane. Email-uses the full workspace email view and an original two-message thread. Share uses the document Share UI and-shows the channel's grant, separately from public-link access. The agent story+uses the full workspace email view and an original two-message thread. Share types and selects #launch in the document Share UI, sends a short message,+shows the channel's access grant, then opens the delivered file from the channel.+Autoplay and manual sharing use the same form actions. Reset both the grant and+the delivered message between untouched loops; public-link access stays separate. The agent storycontinues from Macro creating Julia’s task to Julia mentioning Cursor and Cursorinvestigating in the same thread with one response. Keep Julia as owner while work starts.The final catch-up demo focuses on inline replies in a full-width channel,@@ -641,8 +933,12 @@ playback begins unsplit, opens the inline PR, then opens Changes; interactionstops playback. Narrow panes show the active view, and Back/Escape return to thechannel without discarding its conversation. The task demo links the PR beforemoving to In Review, illustrates a confirmed merge, and updates Completed without-changing checklist items. Inbox playback holds the opened request until the-visitor marks it done. Cursor contributes one result with a session and PR link.+changing checklist items. Inbox playback holds the opened request for 8.5 seconds+before resetting its pending/read state; marking an item done stops the loop.+Keep Julia’s coding request and Cursor’s single completed result under the+original bug thread. Show the report and reproduction before the PR arrives.+Do not add a separate acknowledgment or duplicate prose reply from Cursor; the+completed agent card retains its session and PR link.GitHub presentation follows `block-pr/PrDetail` and `features/changes` at`e2bd582d5f991896bbc69921ee2447def7360636`. Diffs are frozen Pierre renderer output,@@ -688,3 +984,23 @@ an attendee. Turning sharing off leaves his list empty. Manual input pausesautomation; reduced motion opens the saved summary. Verify the checkbox,recording navigation, transcript seeking, and phone layout. CRM linking remainson the CRM page; this scene demonstrates channel-call team sharing only.++On the landing page, Valentina is an external contact at `coparse.com` and+Julia’s Cc address is `[email protected]`. Spreadsheet and pipeline contacts use+their company’s domain; fictional companies use reserved `.example` domains.++Homepage feature dividers align with the heading text, above the description; coding agent logos sit in a separate row above the dividers. The document animation renders saved scheduling links as calendar mentions with a short label, matching Macro’s booking link presentation.++### Linked homepage spreadsheet cells++The company and person cells in `HomepageSpreadsheet` use the editor’s mention+presentation. They open a local company record or its Team section through+`SpreadsheetRecordPreview`, leaving the sheet selection and edits in place.+Closing restores focus to the mention. Editing a linked cell into plain text+removes its reference; undo restores it. Check mouse and keyboard opening,+Escape/close, and phone-width record tabs.++The email-sharing result uses an inline email icon and linked subject from+`DocMention`. Do not add a custom preview card, Live badge, sender summary,+or reply-count footer. Opening the mention shows the complete sample thread,+including subsequent replies.diff --git a/apps/marketing/scripts/standaloneDev.ts b/apps/marketing/scripts/standaloneDev.tsindex 065f2c5476..abcbbd0ce8 100644--- a/apps/marketing/scripts/standaloneDev.ts+++ b/apps/marketing/scripts/standaloneDev.ts@@ -1,4 +1,4 @@-import { readFileSync } from 'node:fs';+import { existsSync, readFileSync } from 'node:fs';import path from 'node:path';import type { Plugin } from 'vite';@@ -7,6 +7,36 @@ export function standaloneDev(): Plugin {return {name: 'standalone-website-routes',apply: 'serve',+ configurePreviewServer(server) {+ const directory = path.resolve(+ server.config.root,+ server.config.build.outDir+ );+ server.middlewares.use((request, response, next) => {+ const url = new URL(request.url ?? '/', 'http://localhost');+ const pathname = url.pathname;+ if (+ !['GET', 'HEAD'].includes(request.method ?? '') ||+ path.extname(pathname) ||+ pathname === '/app' ||+ pathname.startsWith('/app/')+ )+ return next();+ const filename = path.resolve(directory, `.${pathname}`, 'index.html');+ if (+ !filename.startsWith(`${directory}${path.sep}`) ||+ !existsSync(filename)+ ) {+ response.statusCode = 404;+ response.end('Not found');+ return;+ }+ // Match the production CDN's directory-index rewrite, rather than+ // Vite's SPA fallback to the homepage's separate hydration entry.+ request.url = `${pathname.replace(/\/$/, '')}/index.html${url.search}`;+ next();+ });+ },configureServer(server) {server.middlewares.use(async (request, response, next) => {const pathname = new URL(request.url ?? '/', 'http://localhost')diff --git a/apps/marketing/scripts/standalonePreview.test.ts b/apps/marketing/scripts/standalonePreview.test.tsnew file mode 100644index 0000000000..862edd6eaf--- /dev/null+++ b/apps/marketing/scripts/standalonePreview.test.ts@@ -0,0 +1,45 @@+// @vitest-environment node+import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises';+import os from 'node:os';+import path from 'node:path';+import { preview } from 'vite';+import { expect, it } from 'vitest';+import { standaloneDev } from './standaloneDev';++it('serves each prerendered product page for extensionless navigation', async () => {+ const root = await mkdtemp(path.join(os.tmpdir(), 'marketing-preview-'));+ for (const route of ['', 'crm', 'email', 'channels']) {+ const directory = path.join(root, 'dist', route);+ await mkdir(directory, { recursive: true });+ await writeFile(+ path.join(directory, 'index.html'),+ `<h1>${route || 'Homepage'}</h1>`+ );+ }+ const server = await preview({+ configFile: false,+ root,+ plugins: [standaloneDev()],+ preview: { host: '127.0.0.1', port: 0 },+ });+ try {+ const address = server.httpServer.address();+ if (!address || typeof address === 'string')+ throw new Error('No preview port');+ const origin = `http://127.0.0.1:${address.port}`;+ for (const route of ['crm', 'email', 'channels']) {+ for (const suffix of ['', '/', '?theme=cream']) {+ const response = await fetch(`${origin}/${route}${suffix}`);+ expect(response.status).toBe(200);+ expect(await response.text()).toBe(`<h1>${route}</h1>`);+ }+ }+ expect(await (await fetch(origin)).text()).toBe('<h1>Homepage</h1>');+ expect((await fetch(`${origin}/does-not-exist`)).status).toBe(404);+ } finally {+ await new Promise<void>((resolve, reject) =>+ server.httpServer.close((error) => (error ? reject(error) : resolve()))+ );+ await rm(root, { recursive: true, force: true });+ }+});diff --git a/apps/marketing/scripts/verifyDemo.ts b/apps/marketing/scripts/verifyDemo.tsindex 13d58b0b04..152d2e8354 100644--- a/apps/marketing/scripts/verifyDemo.ts+++ b/apps/marketing/scripts/verifyDemo.ts@@ -52,7 +52,7 @@ export async function verifyDemo(})).toHaveCSS('color',- theme === 'cream' ? 'rgb(0, 0, 0)' : 'oklch(1 0 21)'+ theme === 'cream' ? 'rgb(29, 28, 26)' : 'oklch(1 0 21)');const rail = page.locator('[data-ui="sidebar-rail"]');await expect(diff --git a/apps/marketing/scripts/verifyHomepage.ts b/apps/marketing/scripts/verifyHomepage.tsindex 9f40564526..aa5dfd2a6f 100644--- a/apps/marketing/scripts/verifyHomepage.ts+++ b/apps/marketing/scripts/verifyHomepage.ts@@ -1,6 +1,7 @@import path from 'node:path';import { chromium, expect } from '@playwright/test';import { verifyDemo } from './verifyDemo';+import { verifyProductPages } from './verifyProductPages';/** Verify the prerendered homepage keeps its first paint while becoming interactive. */export async function verifyHomepage(directory: string): Promise<void> {@@ -37,6 +38,7 @@ export async function verifyHomepage(directory: string): Promise<void> {viewport,colorScheme,isMobile: viewport.width < 768,+ hasTouch: viewport.width < 768,reducedMotion: 'reduce',});let releaseScripts!: () => void;@@ -116,17 +118,29 @@ export async function verifyHomepage(directory: string): Promise<void> {);await heading.dispose();- await page- .getByRole('button', { name: 'Open navigation', exact: true })- .click();+ if (viewport.width >= 768)+ await page+ .getByRole('link', { name: 'Macro home', exact: true })+ .hover();+ else+ await page+ .getByRole('button', { name: 'Open navigation', exact: true })+ .tap();await page.getByRole('navigation', { name: 'Main navigation' }).waitFor({ state: 'visible' });- await page- .getByRole('button', { name: 'Close navigation', exact: true })- .click();+ if (viewport.width >= 768) await page.keyboard.press('Escape');+ else+ await page+ .getByRole('button', { name: 'Close navigation', exact: true })+ .tap();if (viewport.width >= 800) {await page.locator('#interactive-demo').scrollIntoViewIfNeeded();+ await page+ .getByRole('button', {+ name: /^Interact with Macro sample workspace/,+ })+ .click();const workspace = page.frameLocator('iframe[title="Embedded Macro sample workspace"]');@@ -151,6 +165,14 @@ export async function verifyHomepage(directory: string): Promise<void> {await page.locator('[data-email-demo-body]').waitFor({ state: 'visible' });+ const entry = page.getByRole('button', {+ name: /^Interact with Email and chat/,+ });+ if (viewport.width < 768) await entry.tap();+ else await entry.click();+ await expect(+ page.getByRole('textbox', { name: 'Email body', exact: true })+ ).toBeEditable();if (errors.length)throw new Error(`Homepage demo failed (${label}): ${errors.join('; ')}`@@ -163,6 +185,7 @@ export async function verifyHomepage(directory: string): Promise<void> {await page.close();}}+ await verifyProductPages(browser, origin);} finally {await browser?.close();server.stop(true);diff --git a/apps/marketing/scripts/verifyProductPages.ts b/apps/marketing/scripts/verifyProductPages.tsnew file mode 100644index 0000000000..83e1f1ac55--- /dev/null+++ b/apps/marketing/scripts/verifyProductPages.ts@@ -0,0 +1,76 @@+import { type Browser, expect } from '@playwright/test';++/** Exercise touch entry and exit for every product demo in the built site. */+export async function verifyProductPages(browser: Browser, origin: string) {+ for (const route of [+ '/email',+ '/tasks',+ '/channels',+ '/documents',+ '/calls',+ '/crm',+ '/agents',+ '/github',+ ]) {+ const page = await browser.newPage({+ viewport: { width: 390, height: 844 },+ isMobile: true,+ hasTouch: true,+ reducedMotion: 'reduce',+ colorScheme: 'dark',+ });+ const errors: string[] = [];+ page.on('pageerror', (error) => errors.push(error.message));+ await page.route('**/*', async (request) => {+ if (new URL(request.request().url()).origin !== origin)+ await request.abort();+ else await request.continue();+ });+ try {+ await page.goto(`${origin}${route}`, { waitUntil: 'load' });+ const heading = page.locator('.feature-page-hero h1');+ await expect(heading).toBeVisible();+ const demos = page.locator('.demo-interaction-boundary').filter({+ has: page.locator(':scope > .demo-interaction-activate'),+ });+ const count = await demos.count();+ expect(count, `${route}: product demos are present`).toBeGreaterThan(0);+ // All boundaries return to preview mode after tapping the heading, so+ // their order stays stable while the deferred demo content loads.+ for (let index = 0; index < count; index++) {+ const demo = demos.nth(index);+ const boundary = await demo.elementHandle();+ if (!boundary) throw new Error(`${route}: demo ${index} disappeared`);+ await demo.locator(':scope > .demo-interaction-activate').tap();+ // Hold the clicked boundary: activation removes its entry button.+ expect(await boundary.getAttribute('data-demo-active')).toBe('true');+ expect(+ await boundary.evaluate((element) =>+ element+ .querySelector(':scope > .demo-interaction-content')+ ?.hasAttribute('inert')+ )+ ).toBe(false);+ await heading.tap();+ await expect(+ page.locator(+ '.demo-interaction-boundary[data-demo-interacted="true"][data-demo-active="true"]'+ )+ ).toHaveCount(0);+ await boundary.dispose();+ }+ const overflow = await page.evaluate(+ () => document.documentElement.scrollWidth > window.innerWidth + 1+ );+ expect(overflow, `${route}: no page-level horizontal overflow`).toBe(+ false+ );+ expect(errors, `${route}: no browser errors`).toEqual([]);+ console.log(+ `[prerender] ${route}: ${count} mobile demos accept touch entry and return to page scrolling`+ );+ } finally {+ await page.close();+ }+ }+}diff --git a/apps/marketing/src/app/components/featureGraphics/ChannelsGraphics.tsx b/apps/marketing/src/app/components/featureGraphics/ChannelsGraphics.tsxindex 97fae6e79d..c06539de6b 100644--- a/apps/marketing/src/app/components/featureGraphics/ChannelsGraphics.tsx+++ b/apps/marketing/src/app/components/featureGraphics/ChannelsGraphics.tsx@@ -756,9 +756,12 @@ export function HeroChannelWindow() {// shared files, and its members.const [activeTab, setActiveTab] = createSignal(0);const attachments = [- { name: 'Q3 launch plan.pdf', meta: 'Gabriel Birman · Jun 12 · 2.4 MB' },+ {+ name: 'Website launch plan.pdf',+ meta: 'Gabriel Birman · Jun 12 · 2.4 MB',+ },{ name: 'posthog-flags.png', meta: 'Rahul · 4:38 PM · 184 KB' },- { name: 'deploy-logs.txt', meta: 'Dana Cole · 4:41 PM · 12 KB' },+ { name: 'deploy-logs.txt', meta: 'Valentina · 4:41 PM · 12 KB' },];const participants: {name: string;@@ -774,7 +777,12 @@ export function HeroChannelWindow() {color: 'var(--b3)',},{ name: 'Rahul', role: 'Member', initials: 'R', color: 'var(--b4)' },- { name: 'Dana Cole', role: 'Member', initials: 'DC', color: 'var(--b3)' },+ {+ name: 'Valentina',+ role: 'Member',+ initials: 'V',+ color: 'var(--b3)',+ },{name: 'Julia Westphal',role: 'Member',@@ -1179,7 +1187,7 @@ export function HeroChannelWindow() {gap: '8px',}}>- <span style={nameStyle}>Dana Cole</span>+ <span style={nameStyle}>Valentina</span><span style={timeStyle}>4:41 PM</span></div><p style={msgText}>@@ -1756,7 +1764,7 @@ function ChatHeroEmailCard(props: { compact: boolean }) {'white-space': 'nowrap',}}>- Email thread · Dana Wells · 6 messages+ Email thread · Valentina · 6 messages</span></div></div>@@ -2729,7 +2737,7 @@ export function SharingGraphic() {>Plan lives in{' '}<span class="sharing-mention-1" style={mentionWrap}>- <MentionPill kind="doc" label="Q3 launch plan" brand />+ <MentionPill kind="doc" label="Website launch plan" brand /></span>, tracked in{' '}<span class="sharing-mention-2" style={mentionWrap}>@@ -3533,7 +3541,7 @@ function CohesionDocPane(props: { compact: boolean }) {'white-space': 'nowrap',}}>- Q3 launch plan+ Website launch plan</span><spanstyle={{@@ -3569,7 +3577,7 @@ function CohesionDocPane(props: { compact: boolean }) {margin: 0,}}>- Q3 launch plan+ Website launch plan</h3><p style={body}>Ship the new workspace to general availability the week of{' '}@@ -3966,7 +3974,11 @@ export function ChannelCohesionGraphic() {'vertical-align': 'middle',}}>- <MentionPill kind="doc" label="Q3 launch plan" brand />+ <MentionPill+ kind="doc"+ label="Website launch plan"+ brand+ />{/* synthetic click ring */}<Show when={clickPulse() > 0 && clickPulse() < 1}><span@@ -4045,13 +4057,15 @@ export function ChannelCohesionGraphic() {{heading: 'Documents',items: [- { kind: 'doc', label: 'Q3 launch plan' },+ { kind: 'doc', label: 'Website launch plan' },{ kind: 'doc', label: 'Q3 metrics dashboard' },],},{heading: 'Tasks',- items: [{ kind: 'task', label: 'Q3 launch checklist' }],+ items: [+ { kind: 'task', label: 'Website launch checklist' },+ ],},]}>@@ -4205,7 +4219,11 @@ export function ChannelCohesionGraphic() {</span></Show><Show when={showPill()}>- <MentionPill kind="doc" label="Q3 launch plan" brand />+ <MentionPill+ kind="doc"+ label="Website launch plan"+ brand+ /></Show><spanaria-hidden="true"@@ -4396,7 +4414,7 @@ export function ChannelCohesionGraphic() {'font-size': compact() ? '12px' : '12.5px',}}>- Q3 launch plan · everyone now has access+ Website launch plan · everyone now has access</span></div></div>diff --git a/apps/marketing/src/app/components/featureGraphics/DocsMarkdownScene.test.tsx b/apps/marketing/src/app/components/featureGraphics/DocsMarkdownScene.test.tsxnew file mode 100644index 0000000000..c59647d7d7--- /dev/null+++ b/apps/marketing/src/app/components/featureGraphics/DocsMarkdownScene.test.tsx@@ -0,0 +1,13 @@+import { cleanup, render } from '@solidjs/testing-library';+import { afterEach, expect, it } from 'vitest';+import { DEMO_BOOKING_URL } from '../../../features/marketing/core/navigation';+import { DocsMarkdownScene, REST_T } from './DocsMarkdownScene';++afterEach(cleanup);++it('renders a named scheduling link instead of exposing its raw URL', () => {+ const view = render(() => <DocsMarkdownScene t={() => REST_T} />);+ const booking = view.getByRole('link', { name: 'Team check-in' });+ expect(booking.getAttribute('href')).toBe(DEMO_BOOKING_URL);+ expect(view.queryByText(DEMO_BOOKING_URL)).toBeNull();+});diff --git a/apps/marketing/src/app/components/featureGraphics/DocsMarkdownScene.tsx b/apps/marketing/src/app/components/featureGraphics/DocsMarkdownScene.tsxindex 5dbc4a1149..f51fdfcb98 100644--- a/apps/marketing/src/app/components/featureGraphics/DocsMarkdownScene.tsx+++ b/apps/marketing/src/app/components/featureGraphics/DocsMarkdownScene.tsx@@ -17,6 +17,7 @@ import IconChannel from '../../../assets/icons/icon-channels.svg';import IconEmail from '../../../assets/icons/icon-email.svg';import IconTask from '../../../assets/icons/icon-tasks.svg';import IconArrowUp from '../../../assets/icons/phosphor/arrow-up.svg';+import IconCalendar from '../../../assets/icons/phosphor/calendar-blank.svg';import IconChatTeardrop from '../../../assets/icons/phosphor/chat-teardrop.svg';import IconClock from '../../../assets/icons/phosphor/clock.svg';import IconLink from '../../../assets/icons/phosphor/link.svg';@@ -130,7 +131,7 @@ type Seg =* `trigger` is @ for the workspace search and ; for snippets -- the two* keys this editor gives you, and the reason the calendar link arrives* whole rather than being typed out: it is a saved fragment, inserted by- * name. `insert` says what lands: a chip for an object, a link for a+ * name. `insert` says what lands: a chip for an object, a booking mention for a* snippet whose body is a URL.** `above` opens the menu over the line rather than under it, which is what@@ -176,7 +177,7 @@ const MENU_EVERYTHING: MenuSection[] = [{title: 'Documents, Agents, & Tasks',count: 10199,- rows: [{ icon: 'doc', label: 'Q3 launch plan' }],+ rows: [{ icon: 'doc', label: 'Website launch plan' }],},{title: 'Channels',@@ -191,12 +192,7 @@ const MENU_EVERYTHING: MenuSection[] = [{ title: 'Dates', count: 5, rows: [{ icon: 'date', label: 'Friday' }] },];-/**- * What ; offers: saved fragments, inserted by name. The calendar link in the- * recording arrives this way rather than being typed -- which is the point,- * because a forty-three character URL is exactly the thing nobody types- * twice.- */+/** A saved scheduling URL resolves to the app’s labeled booking mention. */const SNIPPETS: MenuSection[] = [{title: 'Snippets',@@ -208,7 +204,7 @@ const SNIPPETS: MenuSection[] = [},];-const DOC_TITLE = 'Q3 launch plan';+const DOC_TITLE = 'Website launch plan';const SCRIPT: Block[] = [{@@ -271,7 +267,7 @@ const SCRIPT: Block[] = [title: 'Documents, Agents, & Tasks',count: 74,rows: [- { icon: 'doc', label: 'Q3 launch notes' },+ { icon: 'doc', label: 'Website launch notes' },{icon: 'task',label: 'Prepare the launch checklist',@@ -302,13 +298,12 @@ const SCRIPT: Block[] = [kind: 'p',md: '',segs: [- { k: 'text', text: 'Team check-in: ' },{k: 'at',trigger: ';',insert: 'link',query: '',- label: DEMO_BOOKING_URL,+ label: 'Team check-in',wide: SNIPPETS,narrow: SNIPPETS,},@@ -361,7 +356,7 @@ const SCRIPT: Block[] = [{kind: 'li',md: '',- segs: [{ k: 'text', text: 'Share the plan with Dana' }],+ segs: [{ k: 'text', text: 'Share the plan with Valentina' }],},{ kind: 'h2', md: '## ', segs: [{ k: 'text', text: 'Context' }] },{@@ -445,7 +440,7 @@ const SCRIPT: Block[] = [];/** The run the comment lands on, and the comment itself. */-const COMMENT_TEXT = 'Please check the date against Dana’s email.';+const COMMENT_TEXT = 'Please check the date against Valentina’s email.';/** Which block carries the highlight and the badge -- the "Agenda" heading. */const COMMENT_BLOCK = 4;@@ -1467,13 +1462,10 @@ export function DocsMarkdownScene(props: { t: Accessor<number> }) {letter-spacing: -0.04em;line-height: 1;}- /* What a snippet leaves in the line: the URL it holds, as a link. */- .mds-link {- color: var(--a0);- text-decoration-color: color-mix(in srgb, var(--a0) 70%, transparent);- text-decoration-line: underline;- text-underline-offset: 0.14em;- }+ /* Frozen BookingLinkMention presentation from the app. */+ .mds-booking-link { display: inline-flex; max-width: 100%; align-items: baseline; color: var(--c1); }+ .mds-booking-link svg { position: relative; top: .125em; width: 1em; height: 1em; flex: none; margin-inline: .25em; color: var(--a0); }+ .mds-booking-link > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 20%, transparent); text-decoration-thickness: max(1px, .1em); text-underline-offset: 2px; }.mds-avatar { border-radius: 999px; display: inline-block; flex: none; object-fit: cover; vertical-align: -0.14em; }.mds-rowface { height: 1.2em; width: 1.2em; }.mds-initials { font-size: 0.55em; height: 2.18em; width: 2.18em; }@@ -1791,7 +1783,15 @@ export function DocsMarkdownScene(props: { t: Accessor<number> }) {/>}>- <span class="mds-link">{seg.label}</span>+ <a+ class="mds-booking-link"+ href={DEMO_BOOKING_URL}+ target="_blank"+ rel="noreferrer"+ >+ <IconCalendar aria-hidden="true" />+ <span>{seg.label}</span>+ </a>{tail()}</Show></span>diff --git a/apps/marketing/src/app/components/featureGraphics/DocumentsGraphics.tsx b/apps/marketing/src/app/components/featureGraphics/DocumentsGraphics.tsxindex 3915dcc0a4..12c2d38f72 100644--- a/apps/marketing/src/app/components/featureGraphics/DocumentsGraphics.tsx+++ b/apps/marketing/src/app/components/featureGraphics/DocumentsGraphics.tsx@@ -846,7 +846,7 @@ export function HeroDocWindow() {'white-space': 'nowrap',}}>- Q3 launch plan+ Website launch plan</span><spanstyle={{@@ -935,7 +935,7 @@ export function HeroDocWindow() {margin: '0',}}>- Q3 launch plan+ Website launch plan</h3><divstyle={{@@ -3617,12 +3617,13 @@ export function DocsAgentTeammateGraphic(}`}</style><DocCropBand- label="Q3 launch plan: agents correct the launch date to Thursday and check it against Dana’s email"+ label="Website launch plan: agents correct the launch date to Thursday and check it against Valentina’s email"peak={46}><p style={cropLine(true)}>- Q3 launch plan. Gabriel owns the checklist, Teo is checking the invite- flow, and Dana is waiting for the final plan before the team call.+ Website launch plan. Gabriel owns the checklist, Teo is checking the+ invite flow, and Valentina is waiting for the final plan before the+ team call.</p><p style={cropLine()}>The team will run through onboarding before we share the plan. Every@@ -3635,7 +3636,10 @@ export function DocsAgentTeammateGraphic({cropShort('Thursday, 9:00 AM', 'Thursday')}</AgentSelection></CropFocus>- {cropShort(', matching the email sent to Dana', ', per Dana’s email')}+ {cropShort(+ ', matching the email sent to Valentina',+ ', per Valentina’s email'+ )}<Show when={!props.launchReview}><CropFocus><AgentCaretMark name="Reviewer" color={COLLAB_B} />@@ -3661,8 +3665,9 @@ export function DocsAgentTeammateGraphic(. Invited teammates should land in onboarding with their team intact.</p><p style={cropLine(true)}>- Share the updated plan in the launch channel. Send Dana the link once- the invite check is complete, keeping the original email attached.+ Share the updated plan in the launch channel. Send Valentina the link+ once the invite check is complete, keeping the original email+ attached.</p></DocCropBand></>diff --git a/apps/marketing/src/app/components/featureGraphics/EmailGraphics.tsx b/apps/marketing/src/app/components/featureGraphics/EmailGraphics.tsxindex cbb1547006..bb30253710 100644--- a/apps/marketing/src/app/components/featureGraphics/EmailGraphics.tsx+++ b/apps/marketing/src/app/components/featureGraphics/EmailGraphics.tsx@@ -980,11 +980,11 @@ type ComposeFrame = {const COMPOSE_RECIPIENT: ComposePill = {kind: 'person',- label: 'Dana Whitfield',- initials: 'DW',+ label: 'Valentina',+ initials: 'V',};const COMPOSE_PDF: ComposePill = { kind: 'doc', label: 'Pitch memo.pdf' };-const COMPOSE_DOC: ComposePill = { kind: 'ref', label: 'Q3 launch plan' };+const COMPOSE_DOC: ComposePill = { kind: 'ref', label: 'Website launch plan' };// The app's per-kind object hues (--color-note / --color-pdf in the editor):// the accent with its lightness and chroma kept, rotated to violet for a@@ -1629,7 +1629,7 @@ export function ComposeMentionGraphic() {<divref={frameEl}role="img"- aria-label="A Macro email being composed: typing an @mention adds Dana Whitfield to the recipients, and two more @mentions attach a document and a PDF inline, before the message is sent."+ aria-label="A Macro email being composed: typing an @mention adds Valentina to the recipients, and two more @mentions attach a document and a PDF inline, before the message is sent."><ComposeMentionScene t={t} /></div>@@ -2468,7 +2468,7 @@ const inboxItems: InboxItem[] = [unread: true,primary: 'Owen Bales',lead: 'mentioned you in',- boldSecondary: 'Q3 launch plan',+ boldSecondary: 'Website launch plan',time: '9:14',},},@@ -2765,7 +2765,7 @@ const unifiedItems: UItem[] = [{kind: 'row',type: 'pr',- who: 'Dana Whitfield',+ who: 'Valentina',subject: 'Adapt dark theme and input focus styling for mobile #4158',preview:'adapts the dark-theme tokens and input focus rings so they hold up on smaller screens',@@ -3520,7 +3520,11 @@ const kbRows: {},{ who: 'Marcus Lee', subject: 'Re: Q3 roadmap draft', time: 'Jun 15' },{ who: 'Mom', subject: 'dinner sunday?', time: 'Jun 14', unread: true },- { who: 'Dana Whitfield', subject: 'Contract countersigned', time: 'Jun 9' },+ {+ who: 'Valentina',+ subject: 'Contract countersigned',+ time: 'Jun 9',+ },{ who: 'Rachel Beckerman', subject: 'Letters to the kids', time: 'Jun 8' },];diff --git a/apps/marketing/src/app/components/sections/ChannelsUiGrid.tsx b/apps/marketing/src/app/components/sections/ChannelsUiGrid.tsxindex 7682f23d11..d5652b6799 100644--- a/apps/marketing/src/app/components/sections/ChannelsUiGrid.tsx+++ b/apps/marketing/src/app/components/sections/ChannelsUiGrid.tsx@@ -400,7 +400,7 @@ function SharingSpotlight() {'font-size': '12.5px',}}>- Q3 launch plan · everyone now has access+ Website launch plan · everyone now has access</span></div></div>diff --git a/apps/marketing/src/app/components/sections/ComparisonTable.tsx b/apps/marketing/src/app/components/sections/ComparisonTable.tsxindex 1b8b1b0856..fbaf73e3d3 100644--- a/apps/marketing/src/app/components/sections/ComparisonTable.tsx+++ b/apps/marketing/src/app/components/sections/ComparisonTable.tsx@@ -23,6 +23,7 @@ export type ComparisonColumn = {export type ComparisonRow = {feature: JSX.Element;cells: readonly ComparisonCellValue[];+ cellNotes?: readonly (string | undefined)[];};export type ComparisonTableProps = {columns: readonly ComparisonColumn[];@@ -32,6 +33,7 @@ export type ComparisonTableProps = {sortRows?: boolean;valueWrap?: 'normal' | 'nowrap';scrollLabel?: string;+ presentation?: 'framed';};function isPriceRow(row: ComparisonRow) {@@ -81,7 +83,7 @@ export function CheckMark() {<pathd="M1.5 6.5 L5.8 11 L14.5 1.6"fill="none"- stroke="var(--a0)"+ stroke="var(--comparison-accent, var(--a0))"stroke-width="2.4"stroke-linecap="round"stroke-linejoin="round"@@ -90,16 +92,20 @@ export function CheckMark() {);}-export function PartialMark() {+export function PartialMark(props: { description?: string } = {}) {return (<spanaria-label="Partial"+ aria-description={props.description}+ title={props.description}+ tabIndex={props.description ? 0 : undefined}role="img"style={{'background-color': 'color-mix(in srgb, var(--c4) 55%, transparent)','border-radius': '999px',display: 'block',- height: '4px',+ height: 'var(--comparison-partial-height, 4px)',+ transform: 'var(--comparison-partial-transform, none)',width: '14px',}}/>@@ -162,6 +168,7 @@ function ComparisonCell(props: {value: ComparisonCellValue;macro: boolean;valueWrap: 'normal' | 'nowrap';+ description?: string;}) {const textValue = () =>typeof props.value === 'string' && props.value !== 'partial';@@ -182,7 +189,7 @@ function ComparisonCell(props: {when={props.value === true}fallback={<Show when={props.value === 'partial'} fallback={<CrossMark />}>- <PartialMark />+ <PartialMark description={props.description} /></Show>}>@@ -192,7 +199,9 @@ function ComparisonCell(props: {><spanstyle={{- color: props.macro ? 'var(--a0)' : 'var(--c2)',+ color: props.macro+ ? 'var(--comparison-accent, var(--a0))'+ : 'var(--c2)','font-family': "'Inter', body",'font-size': mobile() ? '10px' : '11px','font-weight': '400',@@ -246,18 +255,25 @@ function ComparisonHeader(props: { column: ComparisonColumn; macro: boolean }) {</Show>}>- <MacroMarkIcon- aria-hidden="true"- style={{- color: 'var(--a0)',- display: 'block',- fill: 'currentColor',- flex: 'none',- height: mobile() ? '13px' : '15px',- overflow: 'visible',- stroke: 'none',- }}- />+ <Show+ when={props.column.icon}+ fallback={+ <MacroMarkIcon+ aria-hidden="true"+ style={{+ color: 'var(--comparison-accent, var(--a0))',+ display: 'block',+ fill: 'currentColor',+ flex: 'none',+ height: mobile() ? '13px' : '15px',+ overflow: 'visible',+ stroke: 'none',+ }}+ />+ }+ >+ {props.column.icon}+ </Show></Show><span>{props.column.label}</span></span>@@ -294,6 +310,7 @@ export function ComparisonTable(props: ComparisonTableProps) {return (<divclass="comparison-table-scroll"+ data-presentation={props.presentation}tabIndex={props.scrollLabel ? 0 : undefined}role={props.scrollLabel ? 'region' : undefined}aria-label={props.scrollLabel}@@ -314,15 +331,18 @@ export function ComparisonTable(props: ComparisonTableProps) {'min-width': mobile()? `${props.mobileMinWidth ?? Math.max(480, 132 + columns().length * (props.mobileCellWidth ?? 58))}px`: 'auto',- overflow: 'hidden',+ overflow: props.presentation === 'framed' ? 'visible' : 'hidden',}}><divstyle={{- 'background-color': 'transparent',+ 'background-color': 'var(--comparison-header-bg, transparent)','border-bottom': `1px solid ${GRID_LINE}`,}}- />+ class="comparison-feature-label"+ >+ {props.presentation === 'framed' ? 'Features' : null}+ </div><For each={columns()}>{(column, index) => {const macro = () => isMacro(column, index());@@ -330,28 +350,50 @@ export function ComparisonTable(props: ComparisonTableProps) {<divstyle={{'align-items': 'center',- 'background-color': 'transparent',+ 'background-color':+ 'var(--comparison-header-bg, transparent)','border-bottom': `1px solid ${GRID_LINE}`,- 'border-left': `1px solid ${GRID_LINE}`,+ 'border-left':+ props.presentation === 'framed'+ ? '0'+ : `1px solid ${GRID_LINE}`,'border-right':+ props.presentation !== 'framed' &&index() === columns().length - 1? `1px solid ${GRID_LINE}`: '0',- 'border-top': `1px solid ${GRID_LINE}`,- color: macro() ? 'var(--a0)' : 'var(--c2)',+ 'border-top':+ props.presentation === 'framed'+ ? '0'+ : `1px solid ${GRID_LINE}`,+ color: macro()+ ? 'var(--comparison-accent, var(--a0))'+ : 'var(--c2)',display: 'flex','font-family': "'Inter', body",- 'font-size': mobile() ? '9px' : '11px',+ 'font-size': `var(--comparison-header-size, ${mobile() ? '9px' : '11px'})`,'font-weight': '400','justify-content': 'center','letter-spacing': '0.04em','line-height': 1.1,- padding: mobile() ? '10px 6px' : '12px',+ padding: `var(--comparison-header-padding, ${mobile() ? '10px 6px' : '12px'})`,'text-align': 'center',- 'text-transform': macro() ? 'uppercase' : 'none',+ 'text-transform': macro()+ ? 'var(--comparison-macro-case, uppercase)'+ : 'none',}}>- <ComparisonHeader column={column} macro={macro()} />+ <Show+ when={props.presentation === 'framed'}+ fallback={+ <ComparisonHeader column={column} macro={macro()} />+ }+ >+ <span class="comparison-inline-brand">+ {column.icon}+ {column.label}+ </span>+ </Show></div>);}}@@ -365,13 +407,16 @@ export function ComparisonTable(props: ComparisonTableProps) {'background-color':rowIndex() % 2 === 1 ? ROW_TINT : 'var(--b0)','border-bottom': `1px solid ${GRID_LINE}`,- 'border-left': `1px solid ${GRID_LINE}`,+ 'border-left':+ props.presentation === 'framed'+ ? '0'+ : `1px solid ${GRID_LINE}`,color: 'var(--c2)',display: 'flex',- 'font-size': mobile() ? '10px' : '12px',+ 'font-size': `var(--comparison-row-size, ${mobile() ? '10px' : '12px'})`,left: mobile() ? '0' : 'auto','line-height': 1.25,- padding: mobile() ? '9px 12px 9px 14px' : '10px 20px',+ padding: `var(--comparison-label-padding, ${mobile() ? '9px 12px 9px 14px' : '10px 20px'})`,position: mobile() ? 'sticky' : 'static','z-index': mobile() ? 1 : 'auto',}}@@ -386,18 +431,23 @@ export function ComparisonTable(props: ComparisonTableProps) {'background-color':rowIndex() % 2 === 1 ? ROW_TINT : 'var(--b0)','border-bottom': `1px solid ${GRID_LINE}`,- 'border-left': `1px solid ${GRID_LINE}`,+ 'border-left':+ props.presentation === 'framed'+ ? '0'+ : `1px solid ${GRID_LINE}`,'border-right':+ props.presentation !== 'framed' &&cellIndex() === row.cells.length - 1? `1px solid ${GRID_LINE}`: '0',display: 'flex','justify-content': 'center',- padding: mobile() ? '9px 6px' : '10px 12px',+ padding: `var(--comparison-cell-padding, ${mobile() ? '9px 6px' : '10px 12px'})`,}}><ComparisonCellvalue={cell}+ description={row.cellNotes?.[cellIndex()]}macro={isMacro(columns()[cellIndex()]!, cellIndex())}valueWrap={props.valueWrap ?? 'nowrap'}/>diff --git a/apps/marketing/src/app/components/sections/TasksLifecycleScene.tsx b/apps/marketing/src/app/components/sections/TasksLifecycleScene.tsxindex 9d77ecfdf4..1fd5e142d4 100644--- a/apps/marketing/src/app/components/sections/TasksLifecycleScene.tsx+++ b/apps/marketing/src/app/components/sections/TasksLifecycleScene.tsx@@ -487,13 +487,13 @@ const THREAD: Msg[] = [{who: 'teo',time: '2:54 PM',- text: 'Do we have the launch date and owners confirmed? Dana asked for the plan before the team call.',+ text: 'Do we have the launch date and owners confirmed? Valentina asked for the plan before the team call.',reaction: true,},{who: 'aidan',time: '3:00 PM',- text: 'The Q3 launch plan is updated. Thursday at 9, and Dana has the email. We just need to check invites.',+ text: 'The Website launch plan is updated. Thursday at 9, and Valentina has the email. We just need to check invites.',},{who: 'teo',diff --git a/apps/marketing/src/app/routes/RouteCrm.tsx b/apps/marketing/src/app/routes/RouteCrm.tsxindex c09bc00314..d4ba0c9015 100644--- a/apps/marketing/src/app/routes/RouteCrm.tsx+++ b/apps/marketing/src/app/routes/RouteCrm.tsx@@ -13,53 +13,86 @@ import {DeferredDemo,DemoPlaceholder,} from '../../features/marketing/components/DeferredDemo';+import { DemoInteractionBoundary } from '../../features/marketing/components/DemoInteractionBoundary';import {FeaturePageFaq,FeaturePageSection,} from '../../features/marketing/components/FeaturePage';import { HomepageClosing } from '../../features/marketing/components/HomepageClosing';-import { HomepageConversation } from '../../features/marketing/components/HomepageConversation';import {ProductHero,ProductPage,- ProductProse,} from '../../features/marketing/components/product/ProductPage';import { WorkspaceDesktopDemo } from '../../features/marketing/components/WorkspaceDesktopDemo';+import { DEMO_BOOKING_URL } from '../../features/marketing/core/navigation';import { setPageSeo } from '../utils/utilSeo';import '../../features/marketing/components/crm/crm-page.css';+import '../../features/marketing/components/homepage-pipeline-demo.css';const loadPipeline = () =>- import('../../features/marketing/components/HomepageCrm');+ import('../../features/marketing/components/homepage/CrmPipelineScene');const PipelineDemo = lazy(loadPipeline);+const loadFollowup = async () => ({+ default: (+ await import('../../features/marketing/components/crm/CrmFollowupDemo')+ ).CrmFollowupDemo,+});+const FollowupDemo = lazy(loadFollowup);const faqItems = [{- q: 'How are companies and contacts created?',- a: 'From your email. When someone on your team emails a person at a new domain, Macro creates the contact and the company, and groups everyone from that domain under it. Personal addresses like Gmail don’t become companies. You can also add companies by hand or import a CSV.',+ q: 'How do I start using CRM?',+ a: 'Open Customers in Macro. Your team needs CRM enabled; a new team can enable it from CRM settings. You can then add companies, contacts, and pipelines.',},{- q: 'What is automatic enrichment?',- a: 'When Macro creates a company, it looks up the domain and adds a short description from public sources, so you know who they are without opening another tab. Stage, owner, revenue, and everything else you know about the deal are yours to fill in.',+ q: 'How are companies and contacts added?',+ a: 'Macro creates company and contact records from your team’s primary connected email accounts. You can also add records manually or import a CSV. Personal email domains do not become companies.',},{- q: 'Can I update records myself?',- a: 'Yes. Drag a company to a new stage on the board, or open it and change Stage, Owner, Revenue, or any custom property you’ve added. Agents edit the same properties, so their changes and yours end up in the same place.',+ q: 'Can I track deals in a board or table?',+ a: 'Yes. Create a pipeline and use table or kanban views. Drag a card between stages or edit its fields directly. Pipeline stages, owners, and revenue are separate from the company record’s properties.',},{- q: 'Where does the team discuss a customer?',- a: 'On the company. Every company has a Discussion that works like a thread in a channel: reply, react, and @mention people, docs, or tasks. The pricing conversation stays with the customer instead of scrolling away in #sales.',+ q: 'What does automatic enrichment add?',+ a: 'Macro uses a company’s domain to add public company information. Deal details such as stage, owner, and revenue come from you or your agents.',},{- q: 'Can I mention a company in a document or channel?',- a: 'Yes. Type @ and pick it from Companies. The mention links to the company’s record, and opening it follows the record’s normal access rules.',+ q: 'What customer context can my agent use?',+ a: (+ <>+ Agents can read accessible customer emails, calls, chats, files, and+ tasks to draft follow-ups and identify next steps. They can also update+ CRM fields. See <a href="/agents">Macro Agents</a> or{' '}+ <a href="https://docs.macro.com/AI/mcp/overview">+ connect an AI client through MCP+ </a>+ .+ </>+ ),+ },+ {+ q: 'Where can my team discuss a customer?',+ a: (+ <>+ Use the company’s Discussion to keep notes and replies with the record.+ Mention teammates, files, or tasks, and link the company from a{' '}+ <a href="/channels">channel</a> or <a href="/documents">document</a>.+ </>+ ),},{- q: 'What can agents do with the CRM?',- a: 'Agents can list companies, read a record with its contacts and properties, and set Stage, Owner, Revenue, or your custom properties. @mention Claude in a company’s Discussion, or ask in a channel after your sales sync. The same tools are on our MCP server, so Claude, ChatGPT, and Cursor can use them too.',+ q: 'Who can see a pipeline I share?',+ a: 'Share a pipeline with your team, specific people, or a channel and choose their access level. Viewers can read it; editors can update it. Review the Share dialog before sharing customer information.',},{- q: 'Is CRM available for my account?',- a: 'We’re rolling it out. If you don’t see Customers in your sidebar yet, it hasn’t reached your account. And being open source doesn’t make your data public: Macro’s code is AGPLv3, but your companies, contacts, and emails stay private to your team.',+ q: 'Where can I check pricing and CRM access?',+ a: (+ <>+ See <a href="/pricing">Macro’s current plans and limits</a>. If you need+ help enabling CRM for your team,{' '}+ <a href={DEMO_BOOKING_URL}>talk to us</a>.+ </>+ ),},];@@ -74,18 +107,26 @@ export function RouteCrm() {<ProductPage><ProductHeroproduct="CRM"- title={['The CRM that', 'updates itself.']}+ title={['The CRM connected', 'to your team’s work.']}description={[- 'Built from your email and calls, kept current by agents.',- 'Right in your workspace, so there’s no separate tool to check.',+ 'Agents update customer records',+ 'from emails, calls, chats, and tasks.',]}cta="crm_hero_get_started"/><WorkspaceDesktopDemoheroFrame+ windowChrome={false}view="crm"label="Explore Macro CRM"- caption="A sample pipeline. Drag a company to a new stage or open its record."+ render={() => (+ <DeferredDemo+ preload={loadPipeline}+ fallback={<DemoPlaceholder label="Sales pipeline" />}+ >+ <PipelineDemo hero />+ </DeferredDemo>+ )}/><navclass="feature-page-jump-links crm-feature-links"@@ -118,120 +159,57 @@ export function RouteCrm() {</nav><FeaturePageSectionid="crm-from-email"- title="Nobody has to update the CRM."- description={- 'Tell @Claude what happened on the call and it updates the stage, owner, and notes.\nOr let it read the email thread and work it out.'- }+ title={['Keep your CRM', 'up to date with agents.']}+ description="Your agent can read customer emails, calls, and chats, then update stages, owners, and next steps in your CRM.">- <div class="feature-page-visual">- <CrmCaptureDemo />- </div>- <ProductProse>- <p>- Every CRM is useful when it’s up to date, and every keystroke it- takes to get there is a chore. That’s why most of them go stale.- Auto-updating CRMs like Attio and Lightfield help, but they’re still- another tool someone has to check. Macro’s CRM lives in the same- workspace as your email, calls, and chat, and agents keep it current- from those conversations.- </p>- </ProductProse>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <CrmCaptureDemo />}+ /></FeaturePageSection><FeaturePageSectionid="crm-enrichment"- title="Every company, already researched."- description={- 'New companies show up from your email with a description from public sources.\nYour team adds what only you know.'- }+ title={['Automatically add and', 'enrich new contacts.']}+ description="When you email someone new, Macro creates the contact and company from their domain. Public company details fill in the record, so you have a starting point before the first meeting.">- <div class="feature-page-visual">- <CrmEnrichmentDemo />- </div>- <ProductProse>- <p>- When you email someone new, Macro creates the contact and the- company from their domain and fills in what’s publicly known about- them. You don’t start from a blank record, and you don’t need a- separate enrichment tool to do it.- </p>- </ProductProse>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <CrmEnrichmentDemo />}+ /></FeaturePageSection><FeaturePageSectionid="crm-context"- title="The whole relationship in one record."- description={- 'Emails, calls, files, and tasks for every company, one tab away.\nComments are threaded like chat, so notes don’t get lost in Slack.'- }+ title={['Connect calls, emails, and', 'tasks to each customer.']}+ description="Open a company to see the people, emails, calls, files, and tasks behind the relationship. Keep notes on the record so your team understands what happened and what comes next.">- <div class="feature-page-visual">- <CrmRecordDemo />- </div>- <ProductProse>- <p>- Open a company and it’s all there: the people you talk to, every- email thread, every call, the files you’ve sent, and the tasks in- flight. The discussion on each record works like a channel thread,- so the note about pricing lives on the customer instead of somewhere- in #sales. Mention the company in a doc or channel and it links- straight back here.- </p>- </ProductProse>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <CrmRecordDemo />}+ /></FeaturePageSection><FeaturePageSectionid="crm-agents"- title="Your agents get the same CRM."- description={- 'Agents can read companies and their contacts and update company properties with the same tools you see in the app.\nUse them for outbound, research, or keeping the pipeline current.'- }+ title={['Draft follow-ups and plan', 'next steps with your agent.']}+ description="Your agent can read the full customer relationship across emails, calls, chats, files, tasks, and GitHub pull requests. Use that context to draft better follow-up emails and move deals forward.">- <div class="feature-page-visual crm-agent-scene">- <HomepageConversation- messages={[- {- person: 'valentina',- text: (- <>- <span class="homepage-person-mention">@Claude</span>, update- the pipeline from our sales sync. Northwind asked for a- proposal, and Lumen signed.- </>- ),- },- ]}- />- <div class="crm-pipeline-frame glass-input">+ <DemoInteractionBoundary+ class="feature-page-visual crm-agent-scene"+ render={() => (<DeferredDemo- preload={loadPipeline}- fallback={- <DemoPlaceholder label="Agent updates the customer pipeline" />- }+ preload={loadFollowup}+ fallback={<DemoPlaceholder label="Customer follow-up" />}>- <PipelineDemo playbackControls={false} />+ <FollowupDemo /></DeferredDemo>- </div>- </div>- <ProductProse>- <p>- We treat Macro’s MCP server as seriously as the interface. Agents- can list companies, read a record, and update its properties,- whether they’re running in Macro or in Claude, ChatGPT, or Cursor.- Tell one which deals moved after your sales sync and the pipeline- updates while you get on with your day.- </p>- </ProductProse>+ )}+ /></FeaturePageSection>+ <CrmComparison /><FeaturePageFaqid="crm-faq-title"title="Questions about Macro CRM"- introduction={- <p>- If you’re coming from HubSpot, Attio, or a spreadsheet, here’s- what’s different.- </p>- }items={faqItems}/>- <CrmComparison /><HomepageClosing /></ProductPage>);diff --git a/apps/marketing/src/app/routes/RouteDemo.tsx b/apps/marketing/src/app/routes/RouteDemo.tsxindex 3928e610b4..532aea3102 100644--- a/apps/marketing/src/app/routes/RouteDemo.tsx+++ b/apps/marketing/src/app/routes/RouteDemo.tsx@@ -1,4 +1,6 @@import { useSearchParams } from '@solidjs/router';+import { lazy, Show, Suspense } from 'solid-js';+import { DemoInteractionScope } from '../../features/marketing/components/DemoInteractionBoundary';import DummyWorkspace from '../../features/marketing/components/workspace/DummyWorkspace';import palette from '../../styles/dark-theme.css?inline';import uiStyles from '../../styles/site-ui.css?inline';@@ -16,6 +18,10 @@ const styles = uiStyles.replace(/@(font-face|property)[^{]*\{[^}]*\}/g, '').replaceAll(':root', ':scope');+const HomepageScene = lazy(+ () => import('../../features/marketing/components/homepage/HomepageScene')+);+export default function RouteDemo() {const [params] = useSearchParams();const palette = createSitePalette();@@ -27,15 +33,43 @@ export default function RouteDemo() {noindex: true,});return (- <main- class="dummy-route"- data-theme-light={palette() === 'cream' ? 'true' : 'false'}- data-palette={palette() === 'cream' ? 'cream' : undefined}- data-embedded={params.embedded === 'true'}- >- <style>{properties}</style>- <style>{`@scope (.dummy-route) { ${styles} ${workspacePalette.replaceAll(':root', ':scope')} }`}</style>- <DummyWorkspace />- </main>+ <DemoInteractionScope>+ <main+ class="dummy-route"+ data-theme-light={palette() === 'cream' ? 'true' : 'false'}+ data-palette={palette() === 'cream' ? 'cream' : undefined}+ data-embedded={params.embedded === 'true'}+ >+ <style>{properties}</style>+ <style>{`@scope (.dummy-route) { ${styles} ${workspacePalette.replaceAll(':root', ':scope')} }`}</style>+ <Show+ when={params.scene === 'homepage'}+ fallback={+ <DummyWorkspace+ initialView={+ typeof params.document === 'string' ? 'documents' : undefined+ }+ initialDocument={+ typeof params.document === 'string'+ ? params.document+ : undefined+ }+ />+ }+ >+ <Suspense+ fallback={+ <div class="email-desktop-loading">Opening your workspace…</div>+ }+ >+ <HomepageScene+ initialView={+ typeof params.view === 'string' ? params.view : undefined+ }+ />+ </Suspense>+ </Show>+ </main>+ </DemoInteractionScope>);}diff --git a/apps/marketing/src/app/routes/RouteEmail.tsx b/apps/marketing/src/app/routes/RouteEmail.tsxindex 9d3989c06e..1f4e0ba595 100644--- a/apps/marketing/src/app/routes/RouteEmail.tsx+++ b/apps/marketing/src/app/routes/RouteEmail.tsx@@ -1,6 +1,6 @@-import MacroLogo from '@icon/macro-logo.svg';+import { DemoInteractionBoundary } from '../../features/marketing/components/DemoInteractionBoundary';+import { EmailAccountsDemo } from '../../features/marketing/components/email/EmailAccountsDemo';import { EmailAgenticEditingDemo } from '../../features/marketing/components/email/EmailAgenticEditingDemo';-import { EmailAutoTagsDemo } from '../../features/marketing/components/email/EmailAutoTagsDemo';import { EmailComparison } from '../../features/marketing/components/email/EmailComparison';import { EmailDesktopDemo } from '../../features/marketing/components/email/EmailDesktopDemo';import {@@ -18,68 +18,86 @@ import {FeaturePageSection,} from '../../features/marketing/components/FeaturePage';import { HomepageClosing } from '../../features/marketing/components/HomepageClosing';+import { ProductBrand } from '../../features/marketing/components/product/ProductPage';import { setPageSeo } from '../utils/utilSeo';import '../../features/marketing/components/email/email-hero.css';const faqItems = [{- q: 'Does Macro work with my existing email account?',- a: 'Macro supports Gmail and Google Workspace. Connect your existing account to read and send email in Macro. You can continue using Gmail alongside it.',+ q: 'Which email accounts can I connect?',+ a: (+ <>+ Macro supports Gmail and Google Workspace. Connect an account in+ Settings and keep using Gmail alongside Macro. See the{' '}+ <a href="https://docs.macro.com/product/email">email setup guide</a>.+ </>+ ),},{- q: 'Can I connect more than one account?',- a: 'Yes. View connected accounts in one inbox, or filter to a single account. Each message keeps its original sender and account.',+ q: 'Can I use my personal and work inboxes together?',+ a: (+ <>+ Yes. Connect multiple accounts, view them together, or filter to one+ inbox. When composing, choose which connected address to send from.+ Account limits depend on your <a href="/pricing">plan</a>.+ </>+ ),},{- q: 'What can an agent do with my email?',- a: 'An agent can help draft and edit replies using email and the workspace context available to it. Review the draft, make changes, and approve it before sending.',+ q: 'Can an agent draft replies for me?',+ a: (+ <>+ Yes. Ask an agent to draft a reply using the email thread and relevant+ workspace context. Review and edit the draft before sending. Learn more+ about <a href="/agents">Macro Agents</a>.+ </>+ ),},{q: 'How do Signal and Noise work?',- a: 'Signal keeps important conversations together. Noise groups lower-priority mail, such as newsletters and automated updates. You can move a thread between the two views.',+ a: 'Signal groups important conversations; Noise groups lower-priority mail such as newsletters and promotions. Right-click a thread to change how its sender is classified.',},{- q: 'Can I share an email with a channel?',- a: 'Yes. Share a thread with your team and link it in a channel. Teammates with access can open the conversation, including later replies, without forwarding a separate copy.',+ q: 'Can my team read an email I share?',+ a: (+ <>+ Yes. Sharing gives recipients access to the full thread, including new+ replies. It does not let them send replies from your mailbox. See{' '}+ <a href="/channels">sharing email in team chat</a>.+ </>+ ),},{- q: 'Is my email used to train AI?',- a: 'Data received through Google Workspace APIs is not used to develop or train generalized AI models. Macro maintains zero data retention agreements with OpenAI and Anthropic for model processing.',+ q: 'Does Macro get my Google password?',+ a: 'No. You authorize the connection on Google, and Macro receives access tokens rather than your password.',},{- q: 'Can I disconnect my account?',+ q: 'Is my email used to train AI?',a: (<>- Disconnect in Macro’s Settings or revoke access from your Google- account. Revoking access and deleting data already stored in Macro are- separate actions. Our <a href="/privacy">Privacy Policy</a> explains- data deletion.+ Data received through Google Workspace APIs is not used to train+ generalized AI models. See our <a href="/privacy">Privacy Policy</a> for+ data use details.</>),},{- q: 'Is Macro open source?',+ q: 'How do I disconnect an account?',a: (<>- Yes. You can inspect the application code on{' '}- <a- href="https://github.com/macro-inc/macro"- target="_blank"- rel="noreferrer"- >- GitHub- </a>- . Open source does not make your email or workspace public.+ Disconnect in Macro’s Settings or revoke access from your Google+ account. Disconnecting does not delete data already stored in Macro. See+ the <a href="/privacy">Privacy Policy</a> for deletion details.</>),},{- q: 'Can I join as a Guest for free?',+ q: 'Can I try Macro for free?',a: (<>- Yes. Guest access includes email alongside chat, documents, tasks, and- AI, with usage limits. See <a href="/pricing">pricing</a> for current- account, storage, and AI limits.+ Yes. Macro has a free plan with usage limits. See{' '}+ <a href="/pricing">plans and limits</a> before choosing a plan for your+ team.</>),},@@ -96,18 +114,14 @@ export function RouteEmail() {return (<FeaturePage productSpacing><header class="feature-page-hero email-page-hero">- <p class="email-page-hero-label">- <MacroLogo aria-hidden="true" />- <span>Macro Mail</span>- </p>+ <ProductBrand product="Mail" /><h1><span>Extremely fast email for</span><span>humans and agents.</span></h1><p class="email-page-hero-description">- All your accounts in one inbox. Search across them.- <br class="email-page-hero-break" /> Share threads. Let agents draft- your replies.+ Keep your inbox clean, move through emails quickly, and have agents+ draft good replies.</p><FeaturePageCta name="email_hero_get_started" /></header>@@ -118,7 +132,7 @@ export function RouteEmail() {><a href="#auto-tags"><AutoTagsGraphic />- <span>Automatic tags</span>+ <span>Tags</span></a><a href="#email-sharing"><EmailSharingGraphic />@@ -135,97 +149,48 @@ export function RouteEmail() {</nav><FeaturePageSectionid="auto-tags"- title="Your email, automatically tagged."- description={- 'Macro tags incoming email by customer, project, or follow-up.\nUse tags to find the related conversations across your accounts.'- }+ title={['Keep all your inboxes', 'organized.']}+ description="Connect your personal and work inboxes across Gmail, Outlook, and more. Organize them with tags for customers, projects, and follow-ups.">- <div class="feature-page-visual">- <EmailAutoTagsDemo />- </div>- <div class="email-feature-prose">- <p>- Automatic tags label incoming messages so you can browse email by- customer, project, or follow-up. Tags also work on documents, tasks,- and other workspace items. You can add, remove, or change a tag- yourself. A thread can have several tags, so it can appear under- both the customer and the project.- </p>- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <EmailAccountsDemo />}+ /></FeaturePageSection><FeaturePageSectionid="email-sharing"- title="Share an email directly to a channel."- description={- 'Share the full email thread with your team.\nFuture replies appear in the shared thread automatically.'- }+ title={['Share email threads', 'with your team.']}+ description="Share email threads in a channel so your team can read the full conversation, discuss it, and keep new replies linked.">- <div class="feature-page-visual">- <EmailSharingDemo />- </div>- <div class="email-feature-prose">- <p>- Choose a channel, add a note, and share the email. Channel members- can open the original thread, including its messages and- attachments. New replies update that same thread. Your team can- leave comments and @mention documents or tasks alongside the- customer’s email.- </p>- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <EmailSharingDemo />}+ /></FeaturePageSection><FeaturePageSectionid="keyboard-speed"- title="Superhuman speed."- description={- 'J and K to navigate. E to mark done.\nSearch all your connected accounts from one inbox.'- }+ title={['Manage your inbox', 'with keyboard shortcuts.']}+ description="Open, reply to, and archive emails with keyboard shortcuts so you can move through your inbox faster.">- <div class="feature-page-visual">- <EmailKeyboardDemo />- </div>- <div class="email-feature-prose">- <p>- Macro syncs email into its own database and search index. Search and- agent reading tools work on the indexed messages across your- connected accounts. J and K move to the next and previous thread. E- marks the conversation done. Enter opens it, and Esc returns to the- list. These shortcuts work with a thread open too.- </p>- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <EmailKeyboardDemo />}+ /></FeaturePageSection><FeaturePageSectionid="agentic-editing"- title="Agents draft from your email and docs."- description={- 'Ask for a follow-up using the email thread and meeting transcript.\nReview the draft, recipients, and attachments before sending.'- }+ title={['Draft emails in your', 'voice with agents.']}+ description="Ask an agent to prepare a reply using the email thread, relevant documents, meeting transcripts, and team conversations. Review and edit the draft before sending.">- <div class="feature-page-visual">- <EmailAgenticEditingDemo />- </div>- <div class="email-feature-prose">- <p>- Agents can search past emails and read the documents and calls you- reference. Ask Claude to write a reply, attach a proposal, and copy- the people involved. The result is an editable email draft. Change- the subject or wording, check the recipients, and approve the send- when you’re ready.- </p>- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <EmailAgenticEditingDemo />}+ /></FeaturePageSection><EmailComparison /><FeaturePageFaqid="email-faq-title"- title="Gmail accounts and agent permissions"- introduction={- <p>- Macro connects to your existing Google account. You can read,- organize, and reply to email alongside your team’s work. You approve- the connection on Google. Macro does not receive your Google- password. Email agents show you the draft and ask for approval- before sending.- </p>- }+ title="Questions about Macro Mail"items={faqItems}/><HomepageClosing />diff --git a/apps/marketing/src/app/routes/RoutePricing.tsx b/apps/marketing/src/app/routes/RoutePricing.tsxindex 38ac19e71f..4d3b8d084e 100644--- a/apps/marketing/src/app/routes/RoutePricing.tsx+++ b/apps/marketing/src/app/routes/RoutePricing.tsx@@ -203,7 +203,6 @@ function PricingPlans() {eyebrow="Free"price="$0"primaryLine="per seat / month"- secondaryLine="No credit card required"buttonName="pricing_free_connect_google"buttonLabel="Start for free"/>diff --git a/apps/marketing/src/app/routes/RouteTasks.tsx b/apps/marketing/src/app/routes/RouteTasks.tsxindex 1c8b6a9527..0e9d2f46da 100644--- a/apps/marketing/src/app/routes/RouteTasks.tsx+++ b/apps/marketing/src/app/routes/RouteTasks.tsx@@ -1,4 +1,5 @@import jacobPhoto from '../../assets/people/jacob.webp';+import { DemoInteractionBoundary } from '../../features/marketing/components/DemoInteractionBoundary';import {FeaturePageFaq,FeaturePageSection,@@ -22,53 +23,56 @@ import { setPageSeo } from '../utils/utilSeo';const tasksFaq = [{- q: 'How do I see my work and the tasks I’ve assigned?',- a: 'My Tasks shows your assignments. Created by me shows the work you’ve asked for, and All Tasks shows tasks you can access. Filter by owner, status, or priority. New assignments also arrive in Home alongside your email and messages.',+ q: 'How do I create and assign a task?',+ a: 'Create a task in Tasks or from a message. Give it a title, assign a person or available agent, and set its status and priority. Keep relevant files and conversations linked to the task.',},{- q: 'What updates automatically?',+ q: 'Can I import existing tasks?',a: (<>- Task mentions reflect the task’s current title and status. People update- progress directly, or ask an agent to do it. For engineering work,- linked GitHub pull requests move tasks into review and mark them- completed when merged. <a href="/github">See the GitHub integration</a>.+ You can import Linear issues or task CSVs. See{' '}+ <a href="/migrate">migration options</a>, or{' '}+ <a href={DEMO_BOOKING_URL}>talk to our team</a> about moving your+ company’s work.</>),},{- q: 'Can an agent take on a task?',+ q: 'Where do I see my tasks and the work I’ve assigned?',+ a: 'My Tasks shows your assignments. Created by me shows tasks you created, and All Tasks shows tasks you can access. Filter by owner, status, or priority.',+ },+ {+ q: 'Can an agent work on a task?',a: (<>- Yes. Assign an available agent to a task to start an agent session. Open- that session from the task to follow its work. You can also ask @Macro- to create tasks, change assignments, or find what’s still open.{' '}- <a href="/agents">Explore agents in Macro</a>.+ Yes. Assign an available agent to start an agent session and open that+ session from the task to follow its work. You can also ask an agent to+ create or update tasks. See <a href="/agents">Macro Agents</a>.</>),},{- q: 'Can we bring our existing tasks?',+ q: 'What updates automatically?',a: (<>- You can import Linear issues or task CSVs. The route depends on what- you’re bringing from your current tool.{' '}- <a href="/migrate">See your migration options</a> or{' '}- <a href={DEMO_BOOKING_URL}>talk to our team</a> about moving your- company.+ Task mentions show the current title and status. Linked pull requests+ move tasks into review and complete them when merged. Other progress is+ updated by people or agents. See the{' '}+ <a href="/github">GitHub integration</a>.</>),},{- q: 'Who can see our tasks?',- a: 'Tasks follow your sharing settings. The task composer lets you share with your team or keep a task private to you and the people you share it with. Macro’s code is open source; your company’s work is not public.',+ q: 'Who can see a task?',+ a: 'Tasks follow their sharing settings. In the task composer, choose whether to share with your team or keep access limited to yourself and the people you share it with.',},{- q: 'Can I get started for free?',+ q: 'Can I try Macro for free?',a: (<>- Yes. Start with a free personal account. See{' '}- <a href="/pricing">pricing</a> for company plans and current limits.+ Yes. Macro has a free plan with usage limits. See{' '}+ <a href="/pricing">plans and limits</a> before choosing a plan for your+ team.</>),},@@ -88,7 +92,10 @@ export function RouteTasks() {cta="tasks_hero_get_started"product="Tasks"title={['Task tracking without', 'the busywork.']}- description="What task tracking was meant to be."+ description={[+ 'Turn requests from chat, email, and docs',+ 'into tasks your team can act on.',+ ]}/><TaskHeroDemo /><section@@ -129,39 +136,43 @@ export function RouteTasks() {</section><FeaturePageSectionid="from-a-message"- title="Turn a message into a task."- description="Make a task from the request and give it an owner."+ title={['Turn requests in chat', 'into tasks.']}+ description="Turn a request in chat into a task without copying it into another tool. Give it an owner, set the priority, and keep the original conversation close by.">- <div class="feature-page-visual">- <TaskFromMessageDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <TaskFromMessageDemo />}+ /></FeaturePageSection><FeaturePageSectionid="ask-macro"- title="Ask your agent to handle updates."- description="Macro can create the tasks, change an assignment, or check what’s still open."+ title={['Keep your tasks', 'up to date with agents.']}+ description="Tell your agent what your team needs to get done in your team channels. The agent can create tasks, change who’s assigned, and check what tasks are still incomplete.">- <div class="feature-page-visual">- <TaskAgentChannelDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <TaskAgentChannelDemo />}+ /></FeaturePageSection><FeaturePageSectionid="from-docs-and-email"- title="Link the work inside the task."- description={'Use @mentions to link docs, emails, and conversations.'}+ title={['Attach files, people,', 'and emails to your task.']}+ description="Tag emails, documents, images, and team discussion directly to your task so your team has the context it needs to complete the task.">- <div class="feature-page-visual">- <TaskContextDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <TaskContextDemo />}+ /></FeaturePageSection><FeaturePageSectionid="github"- title="Tasks close themselves upon completion."- description="Merge a linked pull request and Macro marks the task done."+ title={['Keep tasks in sync', 'with your code.']}+ description="Connect a task to its pull request and let the code update its status. The task moves into review when the PR opens and completes when the change merges.">- <div class="feature-page-visual">- <TaskGithubDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <TaskGithubDemo />}+ /></FeaturePageSection><TasksComparison /><FeaturePageFaqdiff --git a/apps/marketing/src/features/marketing/components/DemoCursor.tsx b/apps/marketing/src/features/marketing/components/DemoCursor.tsxindex ab8ea135af..5bed5036b8 100644--- a/apps/marketing/src/features/marketing/components/DemoCursor.tsx+++ b/apps/marketing/src/features/marketing/components/DemoCursor.tsx@@ -1,13 +1,12 @@-import type { JSX } from 'solid-js';+import { type JSX, Show } from 'solid-js';import './demo-cursor.css';-// Macro's rounded pointer, the same shape the homepage CRM demo uses.-const POINTER_PATH =- 'M3.902 8.546L5.012 5.511L5.512 5.011L8.547 3.902L8.562 3.896C8.7 3.834 8.817 3.733 8.896 3.604C8.976 3.475 9.014 3.326 9.007 3.175C9 3.024 8.947 2.878 8.856 2.758C8.765 2.637 8.639 2.547 8.496 2.499L0.992 0.049C0.861 0.006 0.72 0 0.586 0.032C0.452 0.064 0.329 0.133 0.231 0.231C0.133 0.328 0.065 0.451 0.032 0.585C0 0.72 0.006 0.86 0.049 0.992L2.499 8.496C2.545 8.64 2.635 8.768 2.756 8.86C2.877 8.952 3.023 9.005 3.175 9.011H3.211C3.357 9.012 3.5 8.969 3.621 8.889C3.743 8.809 3.839 8.695 3.896 8.562L3.902 8.546Z';+// A conventional mouse arrow, with its hotspot at the top-left tip.+const POINTER_PATH = 'M1 1v18l4.4-4.4 3.8 8.4 3.8-1.8L9.1 13h7.7Z';/**- * The one animated cursor for every website demo: Macro's pointer with a- * name tag. Agents are labelled "Claude"; people use their first name.+ * Operating mouse, distinct from a collaborator's text caret.+ * Names are optional and identify the actor only when useful.* Callers position it with `class` or `style`; the tip sits at (0, 0).*/export function DemoCursor(props: {@@ -15,6 +14,7 @@ export function DemoCursor(props: {class?: string;style?: JSX.CSSProperties;clicking?: boolean;+ caret?: boolean;ref?: (element: HTMLDivElement) => void;}) {return (@@ -23,12 +23,15 @@ export function DemoCursor(props: {class={`demo-cursor${props.class ? ` ${props.class}` : ''}`}style={props.style}data-clicking={props.clicking ? 'true' : undefined}+ data-caret={props.caret ? 'true' : undefined}aria-hidden="true">- <svg viewBox="0 0 9.014 9.012">+ <svg viewBox="0 0 24 26"><path d={POINTER_PATH} /></svg>- <span>{props.label ?? 'Claude'}</span>+ <Show when={props.label}>+ <span>{props.label}</span>+ </Show></div>);}diff --git a/apps/marketing/src/features/marketing/components/DemoInteractionBoundary.test.tsx b/apps/marketing/src/features/marketing/components/DemoInteractionBoundary.test.tsxnew file mode 100644index 0000000000..0f18811614--- /dev/null+++ b/apps/marketing/src/features/marketing/components/DemoInteractionBoundary.test.tsx@@ -0,0 +1,258 @@+import {+ cleanup,+ fireEvent,+ render,+ screen,+ waitFor,+} from '@solidjs/testing-library';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import {+ DEMO_INTERACTION_EVENT,+ DemoInteractionBoundary,+ DemoInteractionScope,+} from './DemoInteractionBoundary';++beforeEach(() => {+ vi.stubGlobal(+ 'IntersectionObserver',+ class {+ observe() {}+ disconnect() {}+ }+ );+});+afterEach(() => {+ cleanup();+ vi.useRealTimers();+ vi.restoreAllMocks();+ vi.unstubAllGlobals();+});++it('lets preview wheel gestures pass to the page and enables controls only on entry', () => {+ const wheel = vi.fn();+ const use = vi.fn();+ const view = render(() => (+ <DemoInteractionBoundary label="workspace">+ <div onWheel={wheel}>+ <button onClick={use}>Edit item</button>+ </div>+ </DemoInteractionBoundary>+ ));+ const content = view.container.querySelector<HTMLElement>(+ '.demo-interaction-content'+ )!;+ const entry = screen.getByRole('button', { name: /Interact with workspace/ });+ const event = new WheelEvent('wheel', {+ bubbles: true,+ cancelable: true,+ deltaY: 300,+ });+ entry.dispatchEvent(event);+ expect(event.defaultPrevented).toBe(false);+ expect(wheel).not.toHaveBeenCalled();+ const started = vi.fn();+ view.container.addEventListener(DEMO_INTERACTION_EVENT, started);+ fireEvent.click(entry, { detail: 1 });+ expect(content.inert).toBe(false);+ expect(started).toHaveBeenCalledTimes(1);+ fireEvent.click(screen.getByRole('button', { name: 'Edit item' }));+ expect(use).toHaveBeenCalledTimes(1);+ fireEvent.pointerDown(document.body);+ expect(content.inert).toBe(true);+});++it('uses one gate for nested demos and restores entry focus with Escape', async () => {+ const view = render(() => (+ <DemoInteractionBoundary>+ <DemoInteractionBoundary>+ <button>Inner action</button>+ </DemoInteractionBoundary>+ </DemoInteractionBoundary>+ ));+ expect(screen.getAllByRole('button', { name: /Interact with/ })).toHaveLength(+ 1+ );+ fireEvent.click(screen.getByRole('button', { name: /Interact with/ }), {+ detail: 0,+ });+ await waitFor(() =>+ expect(document.activeElement).toBe(+ screen.getByRole('button', { name: 'Inner action' })+ )+ );+ fireEvent.keyDown(screen.getByRole('button', { name: 'Inner action' }), {+ key: 'Escape',+ });+ await waitFor(() =>+ expect(document.activeElement).toBe(+ screen.getByRole('button', { name: /Interact with/ })+ )+ );+ view.unmount();+ render(() => (+ <DemoInteractionScope>+ <DemoInteractionBoundary>+ <button>Standalone control</button>+ </DemoInteractionBoundary>+ </DemoInteractionScope>+ ));+ expect(screen.queryByRole('button', { name: /Interact with/ })).toBeNull();+});++it('handles iframe Escape, respects inner menus, and removes frame listeners on unmount', async () => {+ const view = render(() => (+ <DemoInteractionBoundary>+ <iframe title="Sample workspace" />+ </DemoInteractionBoundary>+ ));+ const frame = view.container.querySelector('iframe')!;+ const page = frame.contentDocument!;+ fireEvent.load(frame);+ fireEvent.click(screen.getByRole('button', { name: /Interact with/ }), {+ detail: 1,+ });+ page.body.innerHTML = '<div role="menu">View options</div>';+ fireEvent.keyDown(page.body, { key: 'Escape' });+ expect(screen.queryByRole('button', { name: /Interact with/ })).toBeNull();+ page.body.innerHTML = '';+ fireEvent.keyDown(page.body, { key: 'Escape' });+ await waitFor(() =>+ expect(screen.getByRole('button', { name: /Interact with/ })).toBeTruthy()+ );+ fireEvent.click(screen.getByRole('button', { name: /Interact with/ }), {+ detail: 1,+ });+ view.unmount();+ const event = new KeyboardEvent('keydown', {+ key: 'Escape',+ bubbles: true,+ cancelable: true,+ });+ page.dispatchEvent(event);+ expect(event.defaultPrevented).toBe(false);+});++it('recreates an abandoned demo after 30 seconds away, but never while focused or visible', async () => {+ vi.useFakeTimers();+ const observe: IntersectionObserverCallback[] = [];+ vi.stubGlobal(+ 'IntersectionObserver',+ class {+ constructor(callback: IntersectionObserverCallback) {+ observe.push(callback);+ }+ observe() {}+ disconnect() {}+ }+ );+ vi.spyOn(document, 'hidden', 'get').mockReturnValue(false);+ let created = 0;+ const Scene = () => {+ created++;+ return <input aria-label="Local draft" value="Original" />;+ };+ const view = render(() => (+ <DemoInteractionBoundary render={() => <Scene />} />+ ));+ fireEvent.click(screen.getByRole('button', { name: /Interact with/ }), {+ detail: 1,+ });+ vi.advanceTimersByTime(0);+ const input = screen.getByLabelText('Local draft') as HTMLInputElement;+ input.focus();+ vi.advanceTimersByTime(0);+ fireEvent.input(input, { target: { value: 'My draft' } });+ observe[0](+ [{ isIntersecting: false } as IntersectionObserverEntry],+ {} as IntersectionObserver+ );+ await Promise.resolve();+ vi.advanceTimersByTime(40000);+ expect(input.value).toBe('My draft');+ expect(created).toBe(1);+ input.blur();+ vi.advanceTimersByTime(0);+ await Promise.resolve();+ vi.advanceTimersByTime(29999);+ expect(created).toBe(1);+ observe[0](+ [{ isIntersecting: true } as IntersectionObserverEntry],+ {} as IntersectionObserver+ );+ vi.advanceTimersByTime(40000);+ expect(created).toBe(1);+ observe[0](+ [{ isIntersecting: false } as IntersectionObserverEntry],+ {} as IntersectionObserver+ );+ vi.advanceTimersByTime(25000);+ fireEvent.pointerDown(document.body);+ vi.advanceTimersByTime(0);+ vi.advanceTimersByTime(5000);+ expect(created).toBe(2);+ expect((screen.getByLabelText('Local draft') as HTMLInputElement).value).toBe(+ 'Original'+ );+ expect(view.container.querySelector('[data-demo-interacted]')).toBeNull();+ view.unmount();+ vi.useRealTimers();+ vi.restoreAllMocks();+ vi.unstubAllGlobals();+});++it('lets an inner source handle Escape before leaving the demo', () => {+ const close = vi.fn((event: KeyboardEvent) => {+ event.preventDefault();+ });+ render(() => (+ <DemoInteractionBoundary>+ <button+ onKeyDown={(event) => {+ if (event.key === 'Escape') close(event);+ }}+ >+ Close source+ </button>+ </DemoInteractionBoundary>+ ));+ fireEvent.click(screen.getByRole('button', { name: /Interact with/ }), {+ detail: 1,+ });+ fireEvent.keyDown(screen.getByRole('button', { name: 'Close source' }), {+ key: 'Escape',+ });+ expect(close).toHaveBeenCalledTimes(1);+ expect(screen.queryByRole('button', { name: /Interact with/ })).toBeNull();+});++it('cancels pending idle work when the demo is removed', async () => {+ vi.useFakeTimers();+ let callback!: IntersectionObserverCallback;+ vi.stubGlobal(+ 'IntersectionObserver',+ class {+ constructor(next: IntersectionObserverCallback) {+ callback = next;+ }+ observe() {}+ disconnect() {}+ }+ );+ vi.spyOn(document, 'hidden', 'get').mockReturnValue(false);+ const view = render(() => (+ <DemoInteractionBoundary render={() => <button>Sample</button>} />+ ));+ fireEvent.click(screen.getByRole('button', { name: /Interact with/ }), {+ detail: 1,+ });+ vi.advanceTimersByTime(0);+ callback(+ [{ isIntersecting: false } as IntersectionObserverEntry],+ {} as IntersectionObserver+ );+ fireEvent.pointerDown(document.body);+ view.unmount();+ vi.advanceTimersByTime(0);+ await Promise.resolve();+ expect(vi.getTimerCount()).toBe(0);+});diff --git a/apps/marketing/src/features/marketing/components/DemoInteractionBoundary.tsx b/apps/marketing/src/features/marketing/components/DemoInteractionBoundary.tsxnew file mode 100644index 0000000000..6db9877b5e--- /dev/null+++ b/apps/marketing/src/features/marketing/components/DemoInteractionBoundary.tsx@@ -0,0 +1,275 @@+import {+ createContext,+ createSignal,+ type JSX,+ onCleanup,+ onMount,+ type ParentProps,+ Show,+ splitProps,+ useContext,+} from 'solid-js';+import './demo-interaction-boundary.css';++const InteractionScope = createContext(false);+export const DEMO_IDLE_RESET_MS = 30_000;+export const DEMO_INTERACTION_EVENT = 'macro-demo-interaction';+export const DEMO_REPLAY_EVENT = 'macro-demo-replay';++/** The standalone sample workspace is already an intentional app visit. */+export function DemoInteractionScope(props: ParentProps) {+ return (+ <InteractionScope.Provider value={true}>+ {props.children}+ </InteractionScope.Provider>+ );+}++/** Preview gestures belong to the page until the visitor explicitly enters a demo. */+export function DemoInteractionBoundary(+ props: JSX.HTMLAttributes<HTMLDivElement> & {+ label?: string;+ render?: () => JSX.Element;+ }+) {+ const [local, rest] = splitProps(props, [+ 'children',+ 'class',+ 'ref',+ 'label',+ 'render',+ ]);+ const nested = useContext(InteractionScope);+ const [active, setActive] = createSignal(false);+ const [interacted, setInteracted] = createSignal(false);+ const [generation, setGeneration] = createSignal(1);+ let root!: HTMLDivElement;+ let content!: HTMLDivElement;+ let entry: HTMLButtonElement | undefined;+ const activate = () => {+ if (active()) return;+ setInteracted(true);+ setActive(true);+ root.dispatchEvent(+ new CustomEvent(DEMO_INTERACTION_EVENT, { bubbles: true })+ );+ };+ const leave = (restoreFocus = false) => {+ setActive(false);+ if (restoreFocus)+ queueMicrotask(() => entry?.focus({ preventScroll: true }));+ };+ onMount(() => {+ if (nested) return;+ const document = root.ownerDocument;+ let visible = true;+ let disposed = false;+ let resetTimer: ReturnType<typeof setTimeout> | undefined;+ const focusedInside = () => {+ const focus = document.activeElement;+ if (!focus || focus === root || focus === entry) return false;+ if (root.contains(focus)) return true;+ const popup = focus.closest(+ '[role="dialog"], [role="menu"], [role="listbox"]'+ );+ return active() && !!popup && !popup.contains(root);+ };+ const refreshReset = () => {+ if (+ disposed ||+ !interacted() ||+ visible ||+ document.hidden ||+ focusedInside()+ ) {+ clearTimeout(resetTimer);+ resetTimer = undefined;+ return;+ }+ // Activity elsewhere on the page must not postpone an abandoned demo.+ if (resetTimer !== undefined) return;+ resetTimer = setTimeout(() => {+ resetTimer = undefined;+ if (disposed || visible || document.hidden || focusedInside()) return;+ setActive(false);+ setInteracted(false);+ // Recreate scene state, timers, and cursors together. Never rewind live edits.+ if (local.render) setGeneration((value) => value + 1);+ else+ for (const frame of root.querySelectorAll<HTMLIFrameElement>(+ 'iframe[src]'+ )) {+ if (+ new URL(frame.src, document.baseURI).origin ===+ document.location.origin+ )+ frame.contentWindow?.location.reload();+ }+ root.dispatchEvent(+ new CustomEvent(DEMO_REPLAY_EVENT, { bubbles: true })+ );+ }, DEMO_IDLE_RESET_MS);+ };+ let visibility: IntersectionObserver | undefined;+ const watch = () => {+ if (visibility || (!local.render && !root.querySelector('iframe[src]')))+ return;+ visibility = new IntersectionObserver(([entry]) => {+ visible = entry.isIntersecting;+ refreshReset();+ });+ visibility.observe(root);+ };+ root.addEventListener(DEMO_INTERACTION_EVENT, watch);+ const activity = () => queueMicrotask(refreshReset);+ document.addEventListener('focusin', activity);+ document.addEventListener('focusout', activity);+ document.addEventListener('pointerdown', activity, true);+ document.addEventListener('visibilitychange', refreshReset);++ const insidePopup = (target: EventTarget | null) =>+ target instanceof Element &&+ !!target.closest('[role="dialog"], [role="menu"], [role="listbox"]');+ const outside = (event: Event) => {+ if (+ event.type === 'focusin' &&+ (event.target === document.body ||+ event.target === document.documentElement)+ )+ return;+ if (+ !active() ||+ (event.target instanceof Node && root.contains(event.target)) ||+ insidePopup(event.target)+ )+ return;+ leave();+ };+ const escapeFrom = (page: Document, event: KeyboardEvent) => {+ if (!active() || event.key !== 'Escape' || event.defaultPrevented) return;+ // Let native popups use the first Escape; the next exits the demo.+ if (+ page.querySelector('[role="menu"], [role="listbox"], [role="dialog"]')+ )+ return;+ event.preventDefault();+ leave(true);+ };+ const key = (event: KeyboardEvent) => {+ if (event.target instanceof Node && root.contains(event.target))+ escapeFrom(document, event);+ };+ document.addEventListener('pointerdown', outside, true);+ document.addEventListener('focusin', outside);+ document.addEventListener('keydown', key);++ const frames = new Map<HTMLIFrameElement, () => void>();+ const syncFrames = () => {+ const current = new Set(root.querySelectorAll('iframe'));+ for (const [frame, dispose] of frames)+ if (!current.has(frame)) {+ dispose();+ frames.delete(frame);+ }+ for (const frame of current) {+ if (frames.has(frame)) continue;+ let releasePage: (() => void) | undefined;+ const attach = () => {+ releasePage?.();+ releasePage = undefined;+ let page: Document | null;+ try {+ page = frame.contentDocument;+ } catch {+ return;+ }+ if (!page) return;+ const onKey = (event: KeyboardEvent) => escapeFrom(page, event);+ page.addEventListener('keydown', onKey);+ releasePage = () => page.removeEventListener('keydown', onKey);+ };+ frame.addEventListener('load', attach);+ attach();+ frames.set(frame, () => {+ frame.removeEventListener('load', attach);+ releasePage?.();+ });+ }+ };+ syncFrames();+ const observer = new MutationObserver((records) => {+ if (+ records.some((record) =>+ [...record.addedNodes, ...record.removedNodes].some(+ (node) =>+ node instanceof Element &&+ (node.matches('iframe') || node.querySelector('iframe'))+ )+ )+ )+ syncFrames();+ });+ observer.observe(root, { childList: true, subtree: true });+ onCleanup(() => {+ disposed = true;+ observer.disconnect();+ visibility?.disconnect();+ root.removeEventListener(DEMO_INTERACTION_EVENT, watch);+ clearTimeout(resetTimer);+ document.removeEventListener('focusin', activity);+ document.removeEventListener('focusout', activity);+ document.removeEventListener('pointerdown', activity, true);+ document.removeEventListener('visibilitychange', refreshReset);+ for (const dispose of frames.values()) dispose();+ document.removeEventListener('pointerdown', outside, true);+ document.removeEventListener('focusin', outside);+ document.removeEventListener('keydown', key);+ });+ });++ return (+ <div+ {...rest}+ ref={(element) => {+ root = element;+ if (typeof local.ref === 'function') local.ref(element);+ }}+ class={`demo-interaction-boundary ${local.class ?? ''}`}+ data-demo-active={nested || active()}+ data-demo-interacted={interacted() || undefined}+ tabIndex={-1}+ >+ <div+ ref={content}+ class="demo-interaction-content"+ inert={!nested && !active()}+ >+ <InteractionScope.Provider value={true}>+ <Show when={generation()} keyed>+ {(_generation) => (local.render ? local.render() : local.children)}+ </Show>+ </InteractionScope.Provider>+ </div>+ <Show when={!nested && !active()}>+ <button+ ref={entry}+ class="demo-interaction-activate"+ type="button"+ aria-label={`Interact with ${local.label ?? 'demo'}. Press Escape to return to page scrolling.`}+ onPointerDown={(event) => event.stopPropagation()}+ onClick={(event) => {+ activate();+ if (event.detail === 0)+ queueMicrotask(() => {+ const first = content.querySelector<HTMLElement>(+ 'iframe, button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), a[href], [tabindex="0"], [contenteditable="true"]'+ );+ (first ?? root).focus({ preventScroll: true });+ });+ else root.focus({ preventScroll: true });+ }}+ />+ </Show>+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/DemoMention.test.tsx b/apps/marketing/src/features/marketing/components/DemoMention.test.tsxindex 807c54aa37..667251ecaa 100644--- a/apps/marketing/src/features/marketing/components/DemoMention.test.tsx+++ b/apps/marketing/src/features/marketing/components/DemoMention.test.tsx@@ -48,14 +48,14 @@ it('keeps multiple references atomic, formatted, and intact when the message is</>));const editor = screen.getByRole('textbox', { name: 'Message' });- for (const query of ['@teo', '@q3', '@announcement']) {+ for (const query of ['@teo', '@web', '@announcement']) {typeAtEnd(editor, query);fireEvent.keyDown(editor, { key: 'Enter' });expect(onSend).not.toHaveBeenCalled();expect(screen.queryByRole('listbox')).toBeNull();}expect(editor.textContent).toBe(- '@Teo Q3 launch plan Write the launch announcement '+ '@Teo Website launch plan Write the launch announcement ');expect(editor.querySelectorAll('[contenteditable="false"]')).toHaveLength(3);expect(editor.querySelector('.mention-person')?.textContent).toBe('@Teo');@@ -77,7 +77,7 @@ it('keeps multiple references atomic, formatted, and intact when the message is3);expect(result.container.textContent).toContain(- '@Teo Q3 launch plan Write the launch announcement please review these.'+ '@Teo Website launch plan Write the launch announcement please review these.');expect(result.container.textContent).not.toContain('demo-mention:');});@@ -104,3 +104,27 @@ it('keeps pasted HTML out of the draft and preserves existing mention nodes', ()expect(editor.querySelector('[data-demo-mention="teo"]')).toBeTruthy();expect(editor.textContent).toBe('@Teo plain text');});++it('renders Claude and Cursor as person mentions in both editors and sent messages', () => {+ render(() => (+ <>+ <DemoMentionMenu />+ <div class="workspace-demo">+ <ChannelComposer richMentions label="Message" onSend={() => {}} />+ </div>+ </>+ ));+ const editor = screen.getByRole('textbox', { name: 'Message' });+ for (const name of ['claude', 'cursor']) {+ typeAtEnd(editor, `@${name}`);+ fireEvent.keyDown(editor, { key: 'Enter' });+ }+ expect(editor.textContent).toBe('@Claude @Cursor ');+ expect(editor.querySelectorAll('.mention-person')).toHaveLength(2);+ expect(editor.querySelector('.demo-mention-icon')).toBeNull();+ const result = render(() => (+ <DemoMentionText text={serializeDemoEditor(editor)} />+ ));+ expect(result.container.textContent).toBe('@Claude @Cursor ');+ expect(result.container.querySelector('.demo-mention-icon')).toBeNull();+});diff --git a/apps/marketing/src/features/marketing/components/DemoMentionMenu.test.tsx b/apps/marketing/src/features/marketing/components/DemoMentionMenu.test.tsxindex 7ab06ed718..2756e2cda1 100644--- a/apps/marketing/src/features/marketing/components/DemoMentionMenu.test.tsx+++ b/apps/marketing/src/features/marketing/components/DemoMentionMenu.test.tsx@@ -1,4 +1,10 @@-import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';+import {+ cleanup,+ fireEvent,+ render,+ screen,+ within,+} from '@solidjs/testing-library';import { createSignal } from 'solid-js';import { afterEach, beforeEach, expect, it, vi } from 'vitest';import { mentionAtCaret } from '../core/demo-mentions';@@ -115,7 +121,7 @@ it('inserts into nested contenteditable markup while preserving surrounding text><p><strong>Keep this </strong>- <span>@q3</span> and this.+ <span>@web</span> and this.</p></div></div>@@ -125,13 +131,13 @@ it('inserts into nested contenteditable markup while preserving surrounding texteditor.focus();const query = editor.querySelector('span')!.firstChild!;const range = document.createRange();- range.setStart(query, 3);+ range.setStart(query, 4);range.collapse(true);window.getSelection()!.removeAllRanges();window.getSelection()!.addRange(range);fireEvent.input(editor);fireEvent.keyDown(editor, { key: 'Enter' });- expect(editor.textContent).toBe('Keep this Q3 launch plan and this.');+ expect(editor.textContent).toBe('Keep this Website launch plan and this.');expect(editor.querySelector('[data-demo-mention="plan"]')@@ -180,13 +186,18 @@ it('supports opted-in legacy demos without changing their style scope', () => {it('uses the real menu category drilldown and return behavior', () => {const { editor } = composer();fireEvent.input(editor, { target: { value: '@' } });- fireEvent.click(screen.getByRole('button', { name: 'View all (9)' }));+ const documents = screen+ .getByText('Documents, Agents, & Tasks')+ .closest('section')!;+ fireEvent.click(+ within(documents).getByRole('button', { name: 'View all (8)' })+ );expect(screen.queryByText('People')).toBeNull();- expect(screen.getAllByRole('option')).toHaveLength(9);+ expect(screen.getAllByRole('option')).toHaveLength(8);fireEvent.click(screen.getByRole('button', { name: '← Back to everything' }));expect(screen.getByText('People')).toBeTruthy();fireEvent.keyDown(editor, { key: 'ArrowRight' });- expect(screen.getAllByRole('option')).toHaveLength(7);+ expect(screen.getAllByRole('option')).toHaveLength(8);fireEvent.keyDown(editor, { key: 'ArrowLeft' });expect(screen.getByText('Channels')).toBeTruthy();});diff --git a/apps/marketing/src/features/marketing/components/FeaturePage.tsx b/apps/marketing/src/features/marketing/components/FeaturePage.tsxindex 0074a5cdd1..e655a478b3 100644--- a/apps/marketing/src/features/marketing/components/FeaturePage.tsx+++ b/apps/marketing/src/features/marketing/components/FeaturePage.tsx@@ -4,9 +4,11 @@ import { For, type JSX, Show } from 'solid-js';import { ctaHref, handleCtaClick } from '../../../app/utils/utilCta';import palette from '../../../styles/dark-theme.css?inline';import uiStyles from '../../../styles/site-ui.css?inline';-import { HomepageFeatureHeading } from './HomepageFeatureHeading';import './workspace-story.css';import './feature-page.css';+import './product-feature-section.css';+import './product-page-preview.css';+import { isEmbeddedProductPage } from './productPagePreview';// The frozen UI utilities and palette apply only inside this page. Legacy// public routes retain their own CSS; no authenticated app styles are loaded.@@ -20,9 +22,11 @@ export function FeaturePage(props: {children: JSX.Element;productSpacing?: boolean;}) {+ const embedded = isEmbeddedProductPage();return (<mainclass="feature-page"+ data-product-preview={embedded ? 'true' : undefined}data-product-spacing={props.productSpacing ? 'true' : undefined}><style>{uiProperties}</style>@@ -35,7 +39,7 @@ export function FeaturePage(props: {export function FeaturePageCta(props: { name: string; label?: string }) {return (<a- class="feature-page-cta"+ class="site-nav-start feature-page-cta"href={ctaHref()}onClick={(event) => handleCtaClick(event, props.name)}>@@ -47,7 +51,7 @@ export function FeaturePageCta(props: { name: string; label?: string }) {export function FeaturePageSection(props: {id: string;- title: string;+ title: string | readonly string[];description: string;children: JSX.Element;}) {@@ -57,11 +61,16 @@ export function FeaturePageSection(props: {id={props.id}aria-labelledby={`${props.id}-title`}>- <HomepageFeatureHeading- id={`${props.id}-title`}- title={props.title}- description={props.description}- />+ <header class="product-feature-intro">+ <h2 id={`${props.id}-title`}>+ <For+ each={typeof props.title === 'string' ? [props.title] : props.title}+ >+ {(line) => <span>{line}</span>}+ </For>+ </h2>+ <p>{props.description}</p>+ </header>{props.children}</section>);@@ -72,7 +81,6 @@ export function FeaturePageFaq(props: {id: string;eyebrow?: string;title: string;- introduction?: JSX.Element;items: readonly { q: string; a: JSX.Element }[];}) {return (@@ -82,10 +90,6 @@ export function FeaturePageFaq(props: {<p class="feature-page-eyebrow">{props.eyebrow}</p></Show><h2 id={props.id}>{props.title}</h2>- <Show when={props.introduction}>- <div class="feature-page-prose">{props.introduction}</div>- <h3>Frequently asked questions</h3>- </Show><div class="feature-page-faq"><For each={props.items}>{(item) => (diff --git a/apps/marketing/src/features/marketing/components/HomepageCollaborativeDoc.test.tsx b/apps/marketing/src/features/marketing/components/HomepageCollaborativeDoc.test.tsxindex cb78941044..f5ceff3074 100644--- a/apps/marketing/src/features/marketing/components/HomepageCollaborativeDoc.test.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageCollaborativeDoc.test.tsx@@ -4,14 +4,22 @@ import HomepageCollaborativeDoc from './HomepageCollaborativeDoc';let intersections: IntersectionObserverCallback[];let reduced = false;+let motionListeners: Set<() => void>;beforeEach(() => {intersections = [];reduced = false;+ motionListeners = new Set();vi.useFakeTimers();vi.stubGlobal('matchMedia', () => ({- matches: reduced,- addEventListener() {},- removeEventListener() {},+ get matches() {+ return reduced;+ },+ addEventListener(_type: string, listener: () => void) {+ motionListeners.add(listener);+ },+ removeEventListener(_type: string, listener: () => void) {+ motionListeners.delete(listener);+ },}));vi.stubGlobal('IntersectionObserver',@@ -52,7 +60,7 @@ it('restores actual document content in both directions and holds the chosen edishow();fireEvent.input(slider, { target: { value: '1000' } });const finished = scene.textContent;- expect(finished).toContain('Q3 launch plan');+ expect(finished).toContain('Website launch plan');fireEvent.input(slider, { target: { value: '200' } });const earlier = scene.textContent;expect(earlier).not.toBe(finished);@@ -86,3 +94,17 @@ it('shows the completed document with reduced motion but still permits scrubbingvi.advanceTimersByTime(5000);expect(slider.value).toBe('300');});++it('finishes a partially played document when reduced motion is enabled', () => {+ const view = render(() => <HomepageCollaborativeDoc />);+ const slider = view.getByRole('slider') as HTMLInputElement;+ show();+ vi.advanceTimersByTime(2000);+ expect(Number(slider.value)).toBeGreaterThan(0);+ expect(Number(slider.value)).toBeLessThan(1000);+ reduced = true;+ motionListeners.forEach((listener) => listener());+ expect(slider.value).toBe('1000');+ vi.advanceTimersByTime(5000);+ expect(slider.value).toBe('1000');+});diff --git a/apps/marketing/src/features/marketing/components/HomepageCollaborativeDoc.tsx b/apps/marketing/src/features/marketing/components/HomepageCollaborativeDoc.tsxindex eeff8b341b..52878553d6 100644--- a/apps/marketing/src/features/marketing/components/HomepageCollaborativeDoc.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageCollaborativeDoc.tsx@@ -11,6 +11,7 @@ import {REST_T,} from '../../../app/components/featureGraphics/DocsMarkdownScene';import { createVisible } from '../../../app/utils/utilVisible';+import { observeDemoTakeover } from '../primitives/observeDemoTakeover';import { HomepageVersionHistory } from './HomepageVersionHistory';import './homepage-collaborative-doc.css';@@ -20,21 +21,33 @@ export default function HomepageCollaborativeDoc() {const [playing, setPlaying] = createSignal(false);const [foreground, setForeground] = createSignal(true);let root: HTMLDivElement | undefined;+ let takenOver = false;+ const takeOver = () => {+ takenOver = true;+ setPlaying(false);+ };const visible = createVisible(() => root);onMount(() => {+ const releaseTakeover = root+ ? observeDemoTakeover(root, takeOver)+ : undefined;const motion = window.matchMedia('(prefers-reduced-motion: reduce)');if (!motion.matches) {setTime(0);setPlaying(true);}const stopForReducedMotion = () => {- if (motion.matches) setPlaying(false);+ if (motion.matches && !takenOver) {+ setPlaying(false);+ setTime(REST_T);+ }};const visibility = () => setForeground(!document.hidden);visibility();motion.addEventListener('change', stopForReducedMotion);document.addEventListener('visibilitychange', visibility);onCleanup(() => {+ releaseTakeover?.();motion.removeEventListener('change', stopForReducedMotion);document.removeEventListener('visibilitychange', visibility);});@@ -54,16 +67,21 @@ export default function HomepageCollaborativeDoc() {onCleanup(() => cancelAnimationFrame(id));});return (- <div class="homepage-collaborative-doc" ref={root}>+ <div+ class="homepage-collaborative-doc"+ ref={root}+ onPointerDown={takeOver}+ onKeyDown={takeOver}+ ><DocsGraphicFrame label="Julia's document edits. Use the version history slider below to move backward or forward through the changes."><DocsMarkdownScene t={time} /></DocsGraphicFrame><div class="homepage-doc-timeline"><HomepageVersionHistoryposition={time() / REST_T}- onPause={() => setPlaying(false)}+ onPause={takeOver}onSeek={(position) => {- setPlaying(false);+ takeOver();setTime(position * REST_T);}}/>diff --git a/apps/marketing/src/features/marketing/components/HomepageCrm.tsx b/apps/marketing/src/features/marketing/components/HomepageCrm.tsxindex e73ed9a69d..9c4b4eec26 100644--- a/apps/marketing/src/features/marketing/components/HomepageCrm.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageCrm.tsx@@ -15,6 +15,7 @@ import {crmDemoFrame,} from '../core/crm-demo';import { homepagePeople } from '../core/homepage-demo-people';+import { observeDemoTakeover } from '../primitives/observeDemoTakeover';import {CompanyKanbanCardSurface,CompanyKanbanColumn,@@ -71,6 +72,9 @@ export default function HomepageCrm(CRM_DEMO_COMPANIES.find((c) => c.id === frame().company)!;onMount(() => {+ const releaseTakeover = viewport()+ ? observeDemoTakeover(viewport()!, () => setPaused(true))+ : undefined;const media = matchMedia('(prefers-reduced-motion: reduce)');const sync = () => {setReduced(media.matches);@@ -79,11 +83,17 @@ export default function HomepageCrm(sync();media.addEventListener('change', sync);const observer = new IntersectionObserver(- (entries) => setVisible(entries.some((e) => e.isIntersecting)),+ (entries) =>+ setVisible(+ entries.some(+ (entry) => entry.isIntersecting && entry.intersectionRatio >= 0.3+ )+ ),{ threshold: 0.3 });if (viewport()) observer.observe(viewport()!);onCleanup(() => {+ releaseTakeover?.();observer.disconnect();media.removeEventListener('change', sync);});@@ -116,7 +126,7 @@ export default function HomepageCrm(ref={setViewport}class="homepage-crm-viewport"role="img"- aria-label="Claude moves Northwind from Qualified to Proposal, then Lumen from Proposal to Closed won."+ aria-label="Claude moves Keystone Mechanical from Qualified to Proposal, then Bookend Retail from Proposal to Closed won."><divclass="homepage-crm-canvas"@@ -191,11 +201,8 @@ export default function HomepageCrm(/></div></div>- <div class="homepage-crm-footer">- <span class="homepage-crm-status" role="status">- {frame().status}- </span>- <Show when={!reduced() && props.playbackControls !== false}>+ <Show when={!reduced() && props.playbackControls !== false}>+ <div class="homepage-crm-footer"><div class="flex gap-3 shrink-0"><Show when={!complete()}><button@@ -219,8 +226,8 @@ export default function HomepageCrm(Replay</button></div>- </Show>- </div>+ </div>+ </Show></DocsGraphicFrame></div>);diff --git a/apps/marketing/src/features/marketing/components/HomepageDemoCarousel.test.tsx b/apps/marketing/src/features/marketing/components/HomepageDemoCarousel.test.tsxindex 3e7b6740af..acbc542c50 100644--- a/apps/marketing/src/features/marketing/components/HomepageDemoCarousel.test.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageDemoCarousel.test.tsx@@ -8,16 +8,21 @@ beforeEach(() => {vi.stubGlobal('matchMedia', () => ({ matches: true }));frame = document.createElement('iframe');document.body.append(frame);- frame.contentDocument!.body.innerHTML = `<div class="dummy-rail">${['Home', 'Chat', 'Drive', 'Tasks', 'Customers', 'Agents'].map((label) => `<button aria-label="${label}">${label}</button>`).join('')}</div><div class="dummy-sidebar"><button>Next steps for our team</button><button>Fix the deploy pipeline</button></div>`;+ frame.contentDocument!.body.innerHTML = `<div class="dummy-rail">${['Home', 'Chat', 'Drive', 'Tasks', 'Customers', 'Agents'].map((label) => `<button aria-label="${label}">${label}</button>`).join('')}</div><div class="dummy-sidebar"><button>Homepage feedback</button><button data-agent-session-row="deploy">Fix the deploy pipeline<span>12m · PR #482</span></button></div>`;openView = vi.fn();frame.contentDocument!.querySelectorAll('button').forEach((button) => {- button.addEventListener('click', () => openView(button.textContent));+ button.addEventListener('click', () =>+ openView(+ button.getAttribute('data-agent-session-row') ?? button.textContent+ )+ );});});afterEach(() => {cleanup();frame.remove();vi.unstubAllGlobals();+ vi.useRealTimers();});function mountCarousel() {return render(() => <HomepageDemoCarousel frame={() => frame} />);@@ -26,7 +31,7 @@ it('starts with the unified Home example and wraps the highlights with keyboardmountCarousel();expect(openView.mock.calls.map((call) => call[0])).toEqual(['Home',- 'Next steps for our team',+ 'Homepage feedback',]);fireEvent.click(screen.getByRole('button', { name: 'Previous highlight' }));expect(@@ -34,11 +39,13 @@ it('starts with the unified Home example and wraps the highlights with keyboard.getByRole('button', { name: 'Show Agents highlight' }).getAttribute('aria-pressed')).toBe('true');- expect(openView).toHaveBeenLastCalledWith('Fix the deploy pipeline');+ expect(openView).toHaveBeenLastCalledWith('deploy');fireEvent.keyDown(screen.getByRole('button', { name: 'Next highlight' }), {key: 'ArrowRight',});- expect(screen.getByRole('heading').textContent).toContain('One inbox');+ expect(screen.getByRole('heading').textContent).toContain(+ 'One inbox for emails, agents,\ntasks, and messages'+ );});it('keeps the carousel in place during iframe interaction and cleans up load listeners', () => {const view = mountCarousel();@@ -57,7 +64,7 @@ it('keeps the carousel in place during iframe interaction and cleans up load lis.contentDocument!.querySelector<HTMLButtonElement>('[aria-label=Chat]')!.click();expect(screen.getByRole('heading').textContent).toContain(- 'Agents are first-class participants'+ 'Agents are first-class participants\nin channels and DMs');view.unmount();openView.mockClear();@@ -93,19 +100,198 @@ it('captures horizontal drags and ignores vertical or cancelled gestures', () =>expect(capture).toHaveBeenCalledWith(1);pointer('pointerup', carousel, { ...down, clientX: 200 });expect(screen.getByRole('heading').textContent).toContain(- 'first-class participants'+ 'Agents are first-class participants\nin channels and DMs');pointer('pointerdown', carousel, down);pointer('pointerup', carousel, { ...down, clientX: 400 });- expect(screen.getByRole('heading').textContent).toContain('One inbox');+ expect(screen.getByRole('heading').textContent).toContain(+ 'One inbox for emails, agents,\ntasks, and messages'+ );pointer('pointerdown', carousel, down);pointer('pointerup', carousel, { ...down, clientX: 200, clientY: 250 });- expect(screen.getByRole('heading').textContent).toContain('One inbox');+ expect(screen.getByRole('heading').textContent).toContain(+ 'One inbox for emails, agents,\ntasks, and messages'+ );pointer('pointerdown', carousel, down);pointer('pointercancel', carousel, down);pointer('pointerup', carousel, { ...down, clientX: 200 });- expect(screen.getByRole('heading').textContent).toContain('One inbox');+ expect(screen.getByRole('heading').textContent).toContain(+ 'One inbox for emails, agents,\ntasks, and messages'+ );+});++function enableAutoplay() {+ vi.useFakeTimers();+ vi.stubGlobal('matchMedia', () => ({ matches: false }));+ frame.animate = vi.fn(() => ({ cancel() {} }) as Animation);+ vi.stubGlobal(+ 'IntersectionObserver',+ class {+ constructor(private callback: IntersectionObserverCallback) {}+ observe(target: Element) {+ this.callback(+ [+ {+ target,+ isIntersecting: true,+ intersectionRatio: 1,+ } as IntersectionObserverEntry,+ ],+ this as unknown as IntersectionObserver+ );+ }+ disconnect() {}+ }+ );+}++it('keeps the selected highlight stable for reduced motion', () => {+ vi.useFakeTimers();+ mountCarousel();+ vi.advanceTimersByTime(24000);+ expect(openView.mock.calls.map((call) => call[0])).toEqual([+ 'Home',+ 'Homepage feedback',+ ]);+ expect(screen.queryByRole('button', { name: 'Pause slideshow' })).toBeNull();+});++it('keeps the selected highlight stable without reduced motion', () => {+ enableAutoplay();+ mountCarousel();+ fireEvent.click(screen.getByRole('button', { name: 'Next highlight' }));+ expect(openView).toHaveBeenLastCalledWith('Chat');+ openView.mockClear();+ vi.advanceTimersByTime(24000);+ expect(openView).not.toHaveBeenCalled();+});++it('does not advance after entering or replaying the sample workspace', () => {+ enableAutoplay();+ mountCarousel();+ fireEvent(+ screen.getByRole('region'),+ new CustomEvent('macro-demo-interaction', { bubbles: true })+ );+ fireEvent(+ screen.getByRole('region'),+ new CustomEvent('macro-demo-replay', { bubbles: true })+ );+ openView.mockClear();+ vi.advanceTimersByTime(30000);+ expect(openView).not.toHaveBeenCalled();+});++it('handles page arrow keys without focusing an arrow and releases the listener on unmount', () => {+ const view = mountCarousel();+ fireEvent.keyDown(document.body, { key: 'ArrowRight' });+ expect(openView).toHaveBeenLastCalledWith('Chat');+ fireEvent.keyDown(document.body, { key: 'ArrowLeft' });+ expect(openView).toHaveBeenLastCalledWith('Homepage feedback');+ view.unmount();+ openView.mockClear();+ fireEvent.keyDown(document.body, { key: 'ArrowRight' });+ expect(openView).not.toHaveBeenCalled();+});++it('leaves arrows with editors, other controls, dialogs, and the embedded workspace', () => {+ mountCarousel();+ const container = document.createElement('div');+ container.innerHTML =+ '<input /><textarea></textarea><div contenteditable="true"><span>Editor</span></div><button>Other carousel</button><div role="slider" tabindex="0"></div>';+ document.body.append(container);+ openView.mockClear();+ for (const target of container.querySelectorAll(+ 'input, textarea, span, button, [role="slider"]'+ )) {+ expect(fireEvent.keyDown(target, { key: 'ArrowRight' })).toBe(true);+ }+ fireEvent.keyDown(frame.contentDocument!.body, { key: 'ArrowRight' });+ for (const options of [+ { metaKey: true },+ { ctrlKey: true },+ { altKey: true },+ { shiftKey: true },+ { isComposing: true },+ { repeat: true },+ ]) {+ fireEvent.keyDown(document.body, { key: 'ArrowRight', ...options });+ }+ const dialog = document.createElement('div');+ dialog.setAttribute('role', 'dialog');+ container.append(dialog);+ fireEvent.keyDown(document.body, { key: 'ArrowRight' });+ expect(openView).not.toHaveBeenCalled();+ container.remove();+});++it('ignores page arrow keys when the demo is out of view', () => {+ let visibility: IntersectionObserverCallback | undefined;+ vi.stubGlobal(+ 'IntersectionObserver',+ class {+ constructor(+ callback: IntersectionObserverCallback,+ options: IntersectionObserverInit+ ) {+ if (!options.rootMargin) visibility = callback;+ }+ observe() {}+ disconnect() {}+ }+ );+ mountCarousel();+ openView.mockClear();+ fireEvent.keyDown(document.body, { key: 'ArrowRight' });+ expect(openView).not.toHaveBeenCalled();+ visibility?.(+ [+ {+ isIntersecting: true,+ intersectionRatio: 0.5,+ } as IntersectionObserverEntry,+ ],+ {} as IntersectionObserver+ );+ fireEvent.keyDown(document.body, { key: 'ArrowRight' });+ expect(openView).toHaveBeenLastCalledWith('Chat');+ visibility?.(+ [+ {+ isIntersecting: false,+ intersectionRatio: 0,+ } as IntersectionObserverEntry,+ ],+ {} as IntersectionObserver+ );+ openView.mockClear();+ fireEvent.keyDown(document.body, { key: 'ArrowLeft' });+ expect(openView).not.toHaveBeenCalled();+});++it('does not restart automatic cycling after keyboard focus leaves the demo', () => {+ enableAutoplay();+ mountCarousel();+ const next = screen.getByRole('button', { name: 'Next highlight' });+ fireEvent.focusIn(next);+ fireEvent.focusOut(next, { relatedTarget: document.body });+ openView.mockClear();+ vi.advanceTimersByTime(60000);+ expect(openView).not.toHaveBeenCalled();+});++it('opens the email in the mixed Home feed using the current fixture title', () => {+ const email = frame.contentDocument!.querySelector<HTMLButtonElement>(+ '.dummy-sidebar button'+ )!;+ const openEmail = vi.fn();+ email.addEventListener('click', openEmail);+ mountCarousel();+ expect(openEmail).toHaveBeenCalledTimes(1);+ fireEvent.click(screen.getByRole('button', { name: 'Next highlight' }));+ fireEvent.click(screen.getByRole('button', { name: 'Previous highlight' }));+ expect(openEmail).toHaveBeenCalledTimes(2);});diff --git a/apps/marketing/src/features/marketing/components/HomepageDemoCarousel.tsx b/apps/marketing/src/features/marketing/components/HomepageDemoCarousel.tsxindex f3fa564437..e5f9b0f073 100644--- a/apps/marketing/src/features/marketing/components/HomepageDemoCarousel.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageDemoCarousel.tsx@@ -52,12 +52,13 @@ function CarouselCaret(props: { direction: 'left' | 'right' }) {);}-/** The live-site highlights over a workspace that is always interactive. */+/** Manual highlights over the sample workspace. */export function HomepageDemoCarousel(props: {frame: () => HTMLIFrameElement;}) {const [active, setActive] = createSignal(0);const [ready, setReady] = createSignal(false);+ let root!: HTMLDivElement;let document: Document | null = null;let transition: Animation | undefined;let swipe: { x: number; y: number; pointerId: number } | undefined;@@ -74,9 +75,7 @@ export function HomepageDemoCarousel(props: {document?.querySelectorAll<HTMLButtonElement>('.dummy-sidebar button') ?? []- ).find(- (button) => button.textContent?.trim() === 'Next steps for our team'- );+ ).find((button) => button.textContent?.trim() === 'Homepage feedback');email?.click();}if (slide().target === 'Drive') {@@ -85,7 +84,7 @@ export function HomepageDemoCarousel(props: {[]).find((button) =>- button.textContent?.trim().startsWith('Q3 launch plan')+ button.textContent?.trim().startsWith('Website launch plan'))?.click();}@@ -97,14 +96,8 @@ export function HomepageDemoCarousel(props: {?.click();}if (slide().target === 'Agents') {- Array.from(- document?.querySelectorAll<HTMLButtonElement>(- '.dummy-sidebar button'- ) ?? []- )- .find(- (button) => button.textContent?.trim() === 'Fix the deploy pipeline'- )+ document+ ?.querySelector<HTMLButtonElement>('[data-agent-session-row="deploy"]')?.click();}};@@ -122,6 +115,52 @@ export function HomepageDemoCarousel(props: {onMount(() => {const frame = props.frame();+ let visible = typeof IntersectionObserver === 'undefined';+ const navigateWithKeyboard = (event: KeyboardEvent) => {+ if (+ !ready() ||+ !visible ||+ window.document.hidden ||+ event.defaultPrevented ||+ event.isComposing ||+ event.repeat ||+ event.altKey ||+ event.ctrlKey ||+ event.metaKey ||+ event.shiftKey ||+ (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight')+ )+ return;+ const target = event.target;+ if (+ window.document.querySelector(+ '[role="dialog"], [role="menu"], [role="listbox"]'+ ) ||+ (target instanceof Element &&+ (target.closest(+ 'input, textarea, select, [contenteditable]:not([contenteditable="false"]), [role="textbox"], [role="slider"], [role="spinbutton"], [role="tablist"]'+ ) ||+ (!root.contains(target) &&+ target.closest('button, a, [tabindex]'))))+ )+ return;+ // Listen on the page so navigating does not require focusing an arrow.+ // Events inside the embedded workspace stay with its editors and controls.+ event.preventDefault();+ select(active() + (event.key === 'ArrowRight' ? 1 : -1));+ };+ window.document.addEventListener('keydown', navigateWithKeyboard);+ const visibility =+ typeof IntersectionObserver === 'undefined'+ ? undefined+ : new IntersectionObserver(+ ([entry]) => {+ visible = entry.isIntersecting && entry.intersectionRatio >= 0.35;+ },+ { threshold: 0.35 }+ );+ visibility?.observe(root.previousElementSibling ?? root);+const followNavigation = (event: Event) => {const target = event.target as Element | null;const button = target?.closest('.dummy-rail button[aria-label]');@@ -154,6 +193,8 @@ export function HomepageDemoCarousel(props: {onCleanup(() => {document?.removeEventListener('click', followNavigation);observer.disconnect();+ visibility?.disconnect();+ window.document.removeEventListener('keydown', navigateWithKeyboard);transition?.cancel();frame.removeEventListener('load', attach);});@@ -161,7 +202,9 @@ export function HomepageDemoCarousel(props: {return (<div+ ref={root}class="homepage-demo-carousel"+ data-active-scene={slide().label}aria-roledescription="carousel"role="region"aria-label="What you can do with Macro"@@ -196,18 +239,7 @@ export function HomepageDemoCarousel(props: {swipe = undefined;}}>- <div- class="homepage-demo-slide-controls"- onKeyDown={(event) => {- if (- !ready() ||- (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight')- )- return;- event.preventDefault();- select(active() + (event.key === 'ArrowRight' ? 1 : -1));- }}- >+ <div class="homepage-demo-slide-controls"><buttontype="button"class="homepage-demo-arrow"diff --git a/apps/marketing/src/features/marketing/components/HomepageEmailCompose.tsx b/apps/marketing/src/features/marketing/components/HomepageEmailCompose.tsxindex aa0db64c4b..e2b1d8913f 100644--- a/apps/marketing/src/features/marketing/components/HomepageEmailCompose.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageEmailCompose.tsx@@ -2,7 +2,7 @@ import ArrowUp from '@phosphor/arrow-up.svg';import Paperclip from '@phosphor/paperclip.svg';import TextAa from '@phosphor/text-aa.svg';import { Button, ComposerSurface, SendButton } from '@ui';-import { createSignal, For, onCleanup, Show } from 'solid-js';+import { createSignal, For, type JSX, onCleanup, Show } from 'solid-js';import { Dynamic, render } from 'solid-js/web';import { homepagePeople } from '../core/homepage-demo-people';import {@@ -17,6 +17,8 @@ export default function HomepageEmailCompose(props: {appChrome?: boolean;readOnly?: boolean;+ /** Optional rich body for a prefilled local draft. */+ bodyContent?: JSX.Element;draft?: {subject: string;to: string;@@ -42,7 +44,7 @@ export default function HomepageEmailCompose() {const initialBody = props.draft?.body;const [subject, setSubject] = createSignal(- props.draft?.subject ?? 'Great meeting you — demo follow-up'+ props.draft?.subject ?? 'Demo follow-up');const [showBcc, setShowBcc] = createSignal(false);const [showFormat, setShowFormat] = createSignal(false);@@ -53,7 +55,7 @@ export default function HomepageEmailCompose(let body: HTMLDivElement | undefined;let fileInput: HTMLInputElement | undefined;const [to, setTo] = createSignal(- props.draft?.to ?? 'Dana <[email protected]>'+ props.draft?.to ?? 'Valentina <[email protected]>');const [cc, setCc] = createSignal(props.draft?.cc ?? 'Julia <[email protected]>'@@ -97,9 +99,11 @@ export default function HomepageEmailCompose(description={item.kind === 'pdf'? 'Macro product overview and pricing, shared after the demo.'- : 'The setup steps and owners for Dana’s team.'+ : 'The setup steps and owners for Valentina’s team.'+ }+ href={+ item.kind === 'md' ? '/demo?document=rollout' : '/documents'}- href="#email"/>),mention@@ -240,7 +244,7 @@ export default function HomepageEmailCompose(aria-multiline="true"aria-disabled={generating() || props.readOnly}>- {initialBody}+ {props.bodyContent ?? initialBody}</div><For each={attachments()}>{(file) => (diff --git a/apps/marketing/src/features/marketing/components/HomepageFeatureDetails.test.tsx b/apps/marketing/src/features/marketing/components/HomepageFeatureDetails.test.tsxnew file mode 100644index 0000000000..b3a7c61f0d--- /dev/null+++ b/apps/marketing/src/features/marketing/components/HomepageFeatureDetails.test.tsx@@ -0,0 +1,27 @@+import { cleanup, render, screen } from '@solidjs/testing-library';+import { afterEach, expect, it } from 'vitest';+import {+ HomepageFeatureDetails,+ type ProductPagePath,+} from './HomepageFeatureDetails';++afterEach(cleanup);++it.each<{ title: string; path: ProductPagePath }>([+ { title: 'Email', path: '/email' },+ { title: 'Chat', path: '/channels' },+ { title: 'Documents', path: '/documents' },+ { title: 'Tasks', path: '/tasks' },+ { title: 'Agents', path: '/agents' },+ { title: 'CRM', path: '/crm' },+])('links $title directly to its full product page', ({ title, path }) => {+ const view = render(() => (+ <HomepageFeatureDetails title={title} path={path} />+ ));+ const link = screen.getByRole('link', { name: `Learn more about ${title}` });+ expect(link.getAttribute('href')).toBe(path);+ expect(link.getAttribute('target')).toBeNull();+ expect(link.hasAttribute('aria-haspopup')).toBe(false);+ expect(view.container.querySelector('iframe')).toBeNull();+ expect(screen.queryByRole('dialog')).toBeNull();+});diff --git a/apps/marketing/src/features/marketing/components/HomepageFeatureDetails.tsx b/apps/marketing/src/features/marketing/components/HomepageFeatureDetails.tsxnew file mode 100644index 0000000000..bd6905f0a4--- /dev/null+++ b/apps/marketing/src/features/marketing/components/HomepageFeatureDetails.tsx@@ -0,0 +1,25 @@+import CaretRight from '@phosphor/caret-right.svg';+import './homepage-feature-details.css';++export type ProductPagePath =+ | '/email'+ | '/channels'+ | '/documents'+ | '/tasks'+ | '/agents'+ | '/crm';++/** Open the full product page through a normal same-tab link. */+export function HomepageFeatureDetails(props: {+ title: string;+ path: ProductPagePath;+}) {+ return (+ <div class="homepage-feature-more workspace-demo">+ <a href={props.path} aria-label={`Learn more about ${props.title}`}>+ {props.title}+ <CaretRight aria-hidden="true" />+ </a>+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/HomepageGithub.tsx b/apps/marketing/src/features/marketing/components/HomepageGithub.tsxindex 0313e44269..b98a6ea86d 100644--- a/apps/marketing/src/features/marketing/components/HomepageGithub.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageGithub.tsx@@ -127,8 +127,6 @@ export function HomepageGithub(props: { motion?: 'bubbles' } = {}) {</h2><p class="homepage-open-source-subtext">#1 on GitHub Trending in August.- <br />- Read the code. Make it your own.</p><HomepageTrustBadges /></section>diff --git a/apps/marketing/src/features/marketing/components/HomepageMention.test.tsx b/apps/marketing/src/features/marketing/components/HomepageMention.test.tsxnew file mode 100644index 0000000000..7c8755b103--- /dev/null+++ b/apps/marketing/src/features/marketing/components/HomepageMention.test.tsx@@ -0,0 +1,36 @@+import { cleanup, fireEvent, render } from '@solidjs/testing-library';+import { afterEach, expect, it, vi } from 'vitest';+import { HomepageMention } from './HomepageMention';++afterEach(cleanup);+it('opens the linked source on click without producing a hover popup', () => {+ const open = vi.fn();+ const view = render(() => (+ <HomepageMention+ kind="md"+ label="Setup plan"+ description="The shared setup steps."+ href="/documents"+ onOpen={open}+ />+ ));+ const link = view.getByRole('link', { name: 'Setup plan' });+ fireEvent.pointerEnter(link);+ fireEvent.focus(link);+ expect(view.queryByText('The shared setup steps.')).toBeNull();+ fireEvent.click(link);+ expect(open).toHaveBeenCalledExactlyOnceWith(link);+});+it('keeps normal navigation available for links without a local source', () => {+ const view = render(() => (+ <HomepageMention+ kind="pdf"+ label="Macro overview.pdf"+ description="Learn about documents in Macro."+ href="/documents"+ />+ ));+ const link = view.getByRole('link', { name: 'Macro overview.pdf' });+ expect(link.getAttribute('href')).toBe('/documents');+ expect(link.getAttribute('target')).toBe('_blank');+});diff --git a/apps/marketing/src/features/marketing/components/HomepageMention.tsx b/apps/marketing/src/features/marketing/components/HomepageMention.tsxindex 57902fd4e7..195fe0f736 100644--- a/apps/marketing/src/features/marketing/components/HomepageMention.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageMention.tsx@@ -21,72 +21,45 @@ const mentionIcons = {pdf: { icon: PdfIcon, color: 'text-pdf' },};-import { HoverCard } from '@ui/components/HoverCard';-import { createSignal } from 'solid-js';--/** A local example entity, using the app's icon and hover-card primitives. */+/** Inline entity link. Existing sources open in the demo; other links navigate normally. */export function HomepageMention(props: {- kind:- | 'md'- | 'pdf'- | 'task'- | 'email'- | 'channel'- | 'spreadsheet'- | 'call'- | 'calendar';+ kind: keyof typeof mentionIcons;label: string;description: string;href: string;+ onOpen?: (trigger: HTMLAnchorElement) => void;}) {- const [open, setOpen] = createSignal(false);return (- <HoverCard- triggerAs="span"- triggerClass="inline"- triggerTabIndex={-1}- open={open()}- onOpenChange={setOpen}- placement="top"- openDelay={180}- closeDelay={150}- trigger={- <>- <a- class="homepage-mention"- href={props.href}- onFocus={() => setOpen(true)}- onBlur={() => setOpen(false)}- onClick={() => setOpen(false)}- onKeyDown={(event) => {- if (event.key === 'Escape') setOpen(false);- }}- >- <Dynamic- component={mentionIcons[props.kind].icon}- class={`size-4.5 shrink-0 ${mentionIcons[props.kind].color}`}- aria-hidden="true"- />- <span>{props.label}</span>- </a>- {'\u2060'}- </>+ <a+ class="homepage-mention"+ href={props.href}+ target={+ props.href.startsWith('/') && !props.onOpen ? '_blank' : undefined}- content={- <div class="workspace-demo glass max-w-72 rounded-2xl bg-panel p-4 text-sm text-ink shadow-lg">- <div class="mb-2 flex items-center gap-2 font-medium">- <Dynamic- component={mentionIcons[props.kind].icon}- class={`size-4.5 shrink-0 ${mentionIcons[props.kind].color}`}- aria-hidden="true"- />- <span>{props.label}</span>- </div>- <p class="m-0 text-xs leading-5 text-ink-muted">- {props.description}- </p>- </div>+ rel={+ props.href.startsWith('/') && !props.onOpen ? 'noreferrer' : undefined}- />+ aria-description={props.description}+ onClick={(event) => {+ if (+ !props.onOpen ||+ event.metaKey ||+ event.ctrlKey ||+ event.shiftKey ||+ event.altKey ||+ event.button !== 0+ )+ return;+ event.preventDefault();+ props.onOpen(event.currentTarget);+ }}+ >+ <Dynamic+ component={mentionIcons[props.kind].icon}+ class={`size-4.5 shrink-0 ${mentionIcons[props.kind].color}`}+ aria-hidden="true"+ />+ <span>{props.label}</span>+ </a>);}diff --git a/apps/marketing/src/features/marketing/components/HomepageOpenSource.tsx b/apps/marketing/src/features/marketing/components/HomepageOpenSource.tsxindex 500127cdcd..22be8bfaab 100644--- a/apps/marketing/src/features/marketing/components/HomepageOpenSource.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageOpenSource.tsx@@ -2,6 +2,7 @@ import { createMediaQuery } from '@solid-primitives/media';import { createSignal, type JSX, onCleanup, onMount, Show } from 'solid-js';import { pinnedPalette } from '../../setup/sitePalette';import { animateDemoEntrance } from './animateDemoEntrance';+import { DemoInteractionBoundary } from './DemoInteractionBoundary';import { HomepageDemoCarousel } from './HomepageDemoCarousel';import { HomepageGithub } from './HomepageGithub';import { HomepageMobileOpenSource } from './HomepageMobileOpenSource';@@ -116,7 +117,10 @@ function DesktopHomepageOpenSource(props: {<div class="homepage-embedded-stage"><div class="homepage-embedded-wallpaper"><div class="homepage-embedded-window">- <div class="homepage-embedded-content">+ <DemoInteractionBoundary+ label={'Macro sample workspace'}+ class="homepage-embedded-content"+ ><Show when={!loaded()}><div class="homepage-embedded-loading" role="status">Opening your workspace…@@ -128,7 +132,7 @@ function DesktopHomepageOpenSource(props: {// Ignore the initial about:blank load before src is set.onLoad={() => frame.src && setLoaded(true)}/>- </div>+ </DemoInteractionBoundary></div></div></div>diff --git a/apps/marketing/src/features/marketing/components/HomepagePipelineDemo.tsx b/apps/marketing/src/features/marketing/components/HomepagePipelineDemo.tsxnew file mode 100644index 0000000000..475a62adab--- /dev/null+++ b/apps/marketing/src/features/marketing/components/HomepagePipelineDemo.tsx@@ -0,0 +1,12 @@+import CrmPipelineScene from './homepage/CrmPipelineScene';+import './workspace/dummy-workspace.css';+import './homepage-pipeline-demo.css';++/** The interactive CRM scene, without a playback frame or simulated cursor. */+export default function HomepagePipelineDemo() {+ return (+ <div class="homepage-pipeline-demo workspace-demo">+ <CrmPipelineScene compact />+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/HomepagePlayback.test.tsx b/apps/marketing/src/features/marketing/components/HomepagePlayback.test.tsxnew file mode 100644index 0000000000..7d747d9cf2--- /dev/null+++ b/apps/marketing/src/features/marketing/components/HomepagePlayback.test.tsx@@ -0,0 +1,142 @@+import { cleanup, render } from '@solidjs/testing-library';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { DemoInteractionBoundary } from './DemoInteractionBoundary';+import HomepageCrm from './HomepageCrm';+import HomepageEmailCompose from './HomepageEmailCompose';++let observers: Map<Element, IntersectionObserverCallback>;+beforeEach(() => {+ observers = new Map();+ vi.useFakeTimers();+ vi.stubGlobal('matchMedia', () => ({+ matches: false,+ addEventListener() {},+ removeEventListener() {},+ }));+ vi.stubGlobal(+ 'IntersectionObserver',+ class {+ constructor(private callback: IntersectionObserverCallback) {}+ observe(element: Element) {+ observers.set(element, this.callback);+ }+ disconnect() {}+ }+ );+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ observe() {}+ unobserve() {}+ disconnect() {}+ }+ );+});+afterEach(() => {+ cleanup();+ vi.useRealTimers();+ vi.unstubAllGlobals();+});++function show(element: Element, intersectionRatio: number) {+ observers.get(element)!(+ [+ {+ target: element,+ isIntersecting: true,+ intersectionRatio,+ } as IntersectionObserverEntry,+ ],+ {} as IntersectionObserver+ );+}++it('waits for the email body to be visible and pauses again below its threshold', () => {+ const view = render(() => <HomepageEmailCompose />);+ const composer = view.container.querySelector('[data-generation]')!;+ const body = view.getByRole('textbox', { name: 'Email body' });+ show(composer, 0.05);+ vi.advanceTimersByTime(5000);+ expect(body.textContent).toBe('');+ show(composer, 0.2);+ vi.advanceTimersByTime(1100);+ expect(body.textContent).not.toBe('');+ const partial = body.textContent;+ show(composer, 0.05);+ vi.advanceTimersByTime(5000);+ expect(body.textContent).toBe(partial);+ show(composer, 0.2);+ vi.advanceTimersByTime(5000);+ expect(body.textContent).toContain('Thanks for joining the demo');+});++it('waits for the CRM scene before moving a company and pauses below its threshold', () => {+ const view = render(() => <HomepageCrm />);+ const scene = view.getByRole('img', {+ name: /Claude moves Keystone Mechanical/,+ });+ const northwind = () =>+ view.container.querySelector('[data-crm-company="northwind"]')!;+ show(scene, 0.05);+ vi.advanceTimersByTime(15000);+ expect(northwind().getAttribute('data-crm-stage')).toBe('Qualified');+ show(scene, 0.3);+ vi.advanceTimersByTime(5200);+ expect(northwind().getAttribute('data-crm-stage')).toBe('Proposal');+ show(scene, 0.05);+ vi.advanceTimersByTime(15000);+ expect(+ view.container+ .querySelector('[data-crm-company="lumen"]')!+ .getAttribute('data-crm-stage')+ ).toBe('Proposal');+ show(scene, 0.3);+ vi.advanceTimersByTime(10000);+ expect(+ view.container+ .querySelector('[data-crm-company="lumen"]')!+ .getAttribute('data-crm-stage')+ ).toBe('Closed won');+});++it('stops generating email on preview activation and preserves the visitor draft', () => {+ const view = render(() => (+ <DemoInteractionBoundary>+ <HomepageEmailCompose />+ </DemoInteractionBoundary>+ ));+ const composer = view.container.querySelector('[data-generation]')!;+ const body = view.getByRole('textbox', { name: 'Email body' });+ show(composer, 1);+ vi.advanceTimersByTime(1100);+ view.container+ .querySelector('.demo-interaction-boundary')!+ .dispatchEvent(new CustomEvent('macro-demo-interaction'));+ body.textContent = 'My follow-up draft';+ show(composer, 0);+ show(composer, 1);+ vi.advanceTimersByTime(10000);+ expect(body.textContent).toBe('My follow-up draft');+ expect(composer.getAttribute('data-generation')).toBe('complete');+});++it('pauses the restored CRM illustration when the visitor enters it', () => {+ const view = render(() => (+ <DemoInteractionBoundary>+ <HomepageCrm />+ </DemoInteractionBoundary>+ ));+ const scene = view.getByRole('img', {+ name: /Claude moves Keystone Mechanical/,+ });+ show(scene, 1);+ view.container+ .querySelector('.demo-interaction-boundary')!+ .dispatchEvent(new CustomEvent('macro-demo-interaction'));+ vi.advanceTimersByTime(15000);+ expect(+ view.container+ .querySelector('[data-crm-company="northwind"]')!+ .getAttribute('data-crm-stage')+ ).toBe('Qualified');+});diff --git a/apps/marketing/src/features/marketing/components/HomepagePullRequest.tsx b/apps/marketing/src/features/marketing/components/HomepagePullRequest.tsxindex eb0233edff..2417973e23 100644--- a/apps/marketing/src/features/marketing/components/HomepagePullRequest.tsx+++ b/apps/marketing/src/features/marketing/components/HomepagePullRequest.tsx@@ -92,9 +92,6 @@ export default function HomepagePullRequest() {onOpen={() => open('trace')}/></div>- <span class="homepage-agent-trace-hint">- Open to explore the full agent trace- </span></>),},diff --git a/apps/marketing/src/features/marketing/components/HomepageReassurance.tsx b/apps/marketing/src/features/marketing/components/HomepageReassurance.tsxindex 5e467e73a5..2439d9316c 100644--- a/apps/marketing/src/features/marketing/components/HomepageReassurance.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageReassurance.tsx@@ -3,12 +3,11 @@ import IconIso from '../../../assets/designs/design-iso.svg';import IconSoc2 from '../../../assets/designs/design-soc2.svg';import './homepage-reassurance.css';-/** Shared, unchanged social proof for the homepage and signup. */+/** Shared social proof for the homepage and signup. */export function HomepageReassurance() {return (<div class="homepage-app-reassurance"><p>Join 170k+ users.</p>- <p>Free personal account. No credit card required.</p><div class="homepage-app-security" aria-label="Security certifications"><IconIso aria-label="ISO 27001" /><IconSoc2 aria-label="AICPA SOC 2" />diff --git a/apps/marketing/src/features/marketing/components/HomepageScrollCue.tsx b/apps/marketing/src/features/marketing/components/HomepageScrollCue.tsxindex 851b93ac49..84c8c3f707 100644--- a/apps/marketing/src/features/marketing/components/HomepageScrollCue.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageScrollCue.tsx@@ -46,7 +46,6 @@ export function HomepageScrollCue() {});}}>- <span>Explore</span><ArrowDown aria-hidden="true" /></button>);diff --git a/apps/marketing/src/features/marketing/components/HomepageSections.tsx b/apps/marketing/src/features/marketing/components/HomepageSections.tsxindex d6c1267daa..df91254579 100644--- a/apps/marketing/src/features/marketing/components/HomepageSections.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageSections.tsx@@ -1,6 +1,16 @@-import { createMemo, type JSX, lazy, onCleanup, onMount, Show } from 'solid-js';+import {+ createMemo,+ For,+ type JSX,+ lazy,+ onCleanup,+ onMount,+ Show,+} from 'solid-js';import siteStyles from '../../../app/main/index.css?inline';import { DeferredDemo, DemoPlaceholder } from './DeferredDemo';+import { DemoInteractionBoundary } from './DemoInteractionBoundary';+import { DemoMention } from './DemoMention';import { HomepageAgentLogos } from './HomepageAgentLogos';import { HomepageBlog } from './HomepageBlog';import { HomepageClosing } from './HomepageClosing';@@ -8,6 +18,10 @@ import {HomepageConversation,type HomepageMessage,} from './HomepageConversation';+import {+ HomepageFeatureDetails,+ type ProductPagePath,+} from './HomepageFeatureDetails';import { HomepageFeatureHeading } from './HomepageFeatureHeading';import { HomepageMention } from './HomepageMention';import { HomepageOpenSource } from './HomepageOpenSource';@@ -33,7 +47,7 @@ const HomepageSpreadsheet = lazy(loadSpreadsheet);const LaunchPlan = () => (<HomepageMentionkind="md"- label="Q3 launch plan"+ label="Website launch plan"description="The shared launch plan, checklist, and owners. Julia and Gabriel are editing."href="#documents"/>@@ -58,9 +72,11 @@ function Feature(props: {id: string;title: string;description: string;+ productPages?: readonly { title: string; path: ProductPagePath }[];titleAdornment?: JSX.Element;messages?: readonly HomepageMessage[];- children: JSX.Element;+ children?: JSX.Element;+ render?: () => JSX.Element;}) {const conversation = createMemo(() => props.messages);return (@@ -79,13 +95,29 @@ function Feature(props: {<Show when={conversation()}>{(messages) => <HomepageConversation messages={messages()} />}</Show>- <div class="homepage-feature-visual">- <div- class={`homepage-feature-graphic homepage-enter homepage-feature-${props.id}`}- >- {props.children}- </div>- </div>+ <DemoInteractionBoundary+ label={props.title}+ class="homepage-feature-visual"+ render={() => (+ <div+ class={`homepage-feature-graphic homepage-enter homepage-feature-${props.id}`}+ >+ {props.render ? props.render() : props.children}+ </div>+ )}+ />+ <Show when={props.productPages}>+ {(pages) => (+ <div class="homepage-feature-more-group">+ <span class="homepage-feature-more-label">Learn more</span>+ <For each={pages()}>+ {(page) => (+ <HomepageFeatureDetails title={page.title} path={page.path} />+ )}+ </For>+ </div>+ )}+ </Show></section>);}@@ -149,47 +181,51 @@ export function HomepageSections() {</HomepageOpenSource><Featureid="email"+ productPages={[+ { title: 'Email', path: '/email' },+ { title: 'Chat', path: '/channels' },+ ]}title="Email and chat"description="Share live email threads in channels. Ask agents to draft from your emails, documents, and calls."messages={[{person: 'julia',- text: 'Dana wants to invite her team. Are we still on for Thursday?',+ text: 'Can you send Valentina the demo follow-up?',},{person: 'jacob',text: (<>- <span class="homepage-person-mention">@Claude</span>, draft a- follow-up email based on{' '}- <HomepageMention- kind="calendar"- label="Demo Call Sep 14th"- description="Jacob, Dana, and Julia · Product demo and next steps for Dana’s team."- href="#email"+ <DemoMention+ item={{ id: 'macro', label: 'Macro', kind: 'person' }}/>{' '}- and{' '}+ draft Valentina’s follow-up from{' '}<HomepageMentionkind="call"label="Demo call transcript"- description="Transcript of the September 14 demo with Dana · Team rollout, sales materials, and follow-up next steps."+ description="Transcript of the September 14 demo with Valentina · Team rollout, sales materials, and follow-up next steps."href="#email"/>- . Include the sales PDF and rollout doc, and cc Julia.+ . Link the sales PDF and rollout plan. Cc Julia.</>),},]}- >- <DeferredDemo- preload={loadEmailCompose}- fallback={<DemoPlaceholder label="Email draft preview" />}- >- <HomepageEmailCompose />- </DeferredDemo>- </Feature>+ render={() => (+ <DeferredDemo+ preload={loadEmailCompose}+ fallback={<DemoPlaceholder label="Email draft preview" />}+ >+ <HomepageEmailCompose />+ </DeferredDemo>+ )}+ /><Featureid="documents"+ productPages={[+ { title: 'Documents', path: '/documents' },+ { title: 'Tasks', path: '/tasks' },+ ]}title="Documents and tasks"description="CRDT documents with live agent edits. Create tasks from messages and link them to the specification."messages={[@@ -208,33 +244,36 @@ export function HomepageSections() {text: 'On it. I’ve linked the launch checklist so we can track it from the doc.',},]}- >- <figure class="homepage-doc-history" id="tasks">- <div id="version-control">- <DeferredDemo- preload={loadCollaborativeDoc}- fallback={- <DemoPlaceholder label="Collaborative document, tasks, and version history preview" />- }- >- <HomepageCollaborativeDoc />- </DeferredDemo>- </div>- </figure>- </Feature>+ render={() => (+ <figure class="homepage-doc-history" id="tasks">+ <div id="version-control">+ <DeferredDemo+ preload={loadCollaborativeDoc}+ fallback={+ <DemoPlaceholder label="Collaborative document, tasks, and version history preview" />+ }+ >+ <HomepageCollaborativeDoc />+ </DeferredDemo>+ </div>+ </figure>+ )}+ /><Featureid="coding-agents"+ productPages={[{ title: 'Agents', path: '/agents' }]}title="Coding agents"titleAdornment={<HomepageAgentLogos />}description="Use your coding agent subscriptions in channels. Read the diff and follow the task through to a pull request."- >- <DeferredDemo- preload={loadPullRequest}- fallback={<DemoPlaceholder label="Agent session preview" />}- >- <HomepagePullRequest />- </DeferredDemo>- </Feature>+ render={() => (+ <DeferredDemo+ preload={loadPullRequest}+ fallback={<DemoPlaceholder label="Agent session preview" />}+ >+ <HomepagePullRequest />+ </DeferredDemo>+ )}+ /><Featureid="spreadsheet"title="Sheets and databases"@@ -250,21 +289,23 @@ export function HomepageSections() {),},]}- >- <DeferredDemo- preload={loadSpreadsheet}- fallback={<DemoPlaceholder label="Spreadsheet preview" />}- >- <HomepageSpreadsheet />- </DeferredDemo>- </Feature>+ render={() => (+ <DeferredDemo+ preload={loadSpreadsheet}+ fallback={<DemoPlaceholder label="Spreadsheet preview" />}+ >+ <HomepageSpreadsheet />+ </DeferredDemo>+ )}+ /><Featureid="crm"- title="Sales and marketing"+ productPages={[{ title: 'CRM', path: '/crm' }]}+ title="CRM"description="Companies and contacts created from email. Agents update deal stages and draft customer follow-ups."messages={[{- person: 'valentina',+ person: 'jacob',text: (<><span class="homepage-person-mention">@Claude</span>, update@@ -272,23 +313,24 @@ export function HomepageSections() {<HomepageMentionkind="call"label="Sales sync"- description="Today’s sales call · Northwind requested a proposal, and Lumen signed."+ description="Today’s sales call · Keystone Mechanical asked for a proposal, and Bookend Retail signed."href="#crm"/>- . Northwind asked for a proposal, and Lumen signed. Move them- to the right stages.+ . Keystone Mechanical asked for a proposal, and Bookend Retail+ signed. Update their stages.</>),},]}- >- <DeferredDemo- preload={loadCrm}- fallback={<DemoPlaceholder label="CRM pipeline preview" />}- >- <HomepageCrm />- </DeferredDemo>- </Feature>+ render={() => (+ <DeferredDemo+ preload={loadCrm}+ fallback={<DemoPlaceholder label="CRM pipeline preview" />}+ >+ <HomepageCrm />+ </DeferredDemo>+ )}+ /><HomepageTestimonials /><HomepageBlog /><HomepageClosing root={() => root} />diff --git a/apps/marketing/src/features/marketing/components/HomepageSidebar.tsx b/apps/marketing/src/features/marketing/components/HomepageSidebar.tsxindex 208e839863..05bebafb45 100644--- a/apps/marketing/src/features/marketing/components/HomepageSidebar.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageSidebar.tsx@@ -123,7 +123,7 @@ const RECENT_ITEMS: readonly {unread: true,},{- label: 'Q3 launch plan',+ label: 'Website launch plan',icon: DocumentIcon,kind: 'documents',},diff --git a/apps/marketing/src/features/marketing/components/HomepageSpreadsheet.tsx b/apps/marketing/src/features/marketing/components/HomepageSpreadsheet.tsxindex 36575b1d14..99765f9f52 100644--- a/apps/marketing/src/features/marketing/components/HomepageSpreadsheet.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageSpreadsheet.tsx@@ -19,10 +19,21 @@ import TextB from '@phosphor/text-b.svg';import TextItalic from '@phosphor/text-italic.svg';import TextStrikethrough from '@phosphor/text-strikethrough.svg';import TextUnderline from '@phosphor/text-underline.svg';-import { createMemo, createSignal, For, type JSX, Show } from 'solid-js';+import {+ createMemo,+ createSignal,+ For,+ type JSX,+ lazy,+ Show,+ Suspense,+} from 'solid-js';+import { DocMention } from './documents/DocMention';import { CUSTOMERS, type DemoCell } from './spreadsheet-demo-data';import './homepage-spreadsheet.css';+const LinkedRecord = lazy(() => import('./SpreadsheetRecordPreview'));+const NAME = 'Customers to reach';const COLUMNS = Array.from({ length: 26 }, (_, column) =>String.fromCharCode(65 + column)@@ -85,6 +96,12 @@ export default function HomepageSpreadsheet() {const [rows, setRows] = createSignal(200);const [firstRow, setFirstRow] = createSignal(0);const [notice, setNotice] = createSignal('');+ const [record, setRecord] = createSignal<DemoCell['reference']>();+ let mentionTrigger: HTMLButtonElement | undefined;+ const closeRecord = () => {+ setRecord(undefined);+ queueMicrotask(() => mentionTrigger?.focus({ preventScroll: true }));+ };let grid: HTMLDivElement | undefined;let editInput: HTMLInputElement | undefined;const active = () => cells()[selected()] ?? { value: '' };@@ -104,7 +121,10 @@ export default function HomepageSpreadsheet() {function commit() {if (!editing()) return;if (draft() !== active().value)- change({ ...cells(), [selected()]: { ...active(), value: draft() } });+ change({+ ...cells(),+ [selected()]: { ...active(), value: draft(), reference: undefined },+ });setEditing(false);}function select(next: string) {@@ -193,6 +213,19 @@ export default function HomepageSpreadsheet() {return (<div class="relative pb-24">+ <Show when={record()}>+ {(reference) => (+ <Suspense>+ <LinkedRecord+ company={cells()[`B${reference().row}`]?.value ?? ''}+ person={cells()[`A${reference().row}`]?.value ?? ''}+ email={cells()[`C${reference().row}`]?.value ?? ''}+ kind={reference().kind}+ onClose={closeRecord}+ />+ </Suspense>+ )}+ </Show><div class="workspace-demo homepage-spreadsheet"><div class="homepage-compose-status"><span>{NAME}</span>@@ -427,7 +460,11 @@ export default function HomepageSpreadsheet() {event.preventDefault();change({...cells(),- [selected()]: { ...active(), value: '' },+ [selected()]: {+ ...active(),+ value: '',+ reference: undefined,+ },});} else if (event.key.length === 1 &&@@ -513,7 +550,39 @@ export default function HomepageSpreadsheet() {><Showwhen={editing() && selected() === key}- fallback={display(cell())}+ fallback={+ <Show+ when={cell()?.reference}+ fallback={display(cell())}+ >+ {(reference) => (+ <button+ type="button"+ class="homepage-sheet-mention"+ aria-label={`Open ${cell()?.value}`}+ onClick={(event) => {+ event.stopPropagation();+ select(key);+ mentionTrigger = event.currentTarget;+ setRecord(reference());+ }}+ onDblClick={(event) =>+ event.stopPropagation()+ }+ onKeyDown={(event) =>+ event.stopPropagation()+ }+ >+ <DocMention+ item={{+ kind: reference().kind,+ label: cell()?.value ?? '',+ }}+ />+ </button>+ )}+ </Show>+ }><inputref={editInput}@@ -589,28 +658,6 @@ export default function HomepageSpreadsheet() {</div></section></div>- <div class="pointer-events-none absolute bottom-0 left-2 z-10 text-ink-muted sm:left-6">- <span class="sr-only">Interactive demo — try editing a cell.</span>- <svg- class="h-[160px] w-[200px] -rotate-6"- viewBox="0 0 200 165"- fill="none"- stroke="currentColor"- stroke-width="2.5"- stroke-linecap="round"- stroke-linejoin="round"- aria-hidden="true"- >- {/* Hand-lettered so the marker note stays consistent without a font download. */}- <path d="M59 112C8 99 8 47 38 7M22 13C28 12 33 9 38 7C38 14 39 19 41 24" />- <g transform="translate(0 40)">- <path d="M70 70C84 68 98 67 108 69M91 69L87 102" />- <path d="M107 81L104 101M106 88C113 76 120 77 123 80" />- <path d="M127 80C124 89 125 94 130 94C137 94 141 82 143 78M143 78C137 101 135 115 123 116C116 116 116 111 121 108" />- <path d="M163 85L160 103M165 75L165 76M181 75L174 98Q174 105 182 100M167 85L186 83" />- </g>- </svg>- </div></div>);}diff --git a/apps/marketing/src/features/marketing/components/HomepageStandaloneDemos.test.tsx b/apps/marketing/src/features/marketing/components/HomepageStandaloneDemos.test.tsxindex b43799e860..e507771a24 100644--- a/apps/marketing/src/features/marketing/components/HomepageStandaloneDemos.test.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageStandaloneDemos.test.tsx@@ -1,9 +1,16 @@-import { cleanup, fireEvent, render } from '@solidjs/testing-library';+import {+ cleanup,+ fireEvent,+ render,+ screen,+ within,+} from '@solidjs/testing-library';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import HomepageEmailCompose from './HomepageEmailCompose';import HomepageSpreadsheet from './HomepageSpreadsheet';beforeEach(() => {+ vi.stubGlobal('scrollTo', vi.fn());vi.stubGlobal('matchMedia', () => ({matches: true,addEventListener: vi.fn(),@@ -16,6 +23,14 @@ beforeEach(() => {disconnect() {}});+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ observe() {}+ unobserve() {}+ disconnect() {}+ }+ );vi.stubGlobal('fetch',vi.fn(() =>@@ -31,6 +46,12 @@ afterEach(() => {describe('standalone website demos', () => {it('opens Bcc, edits the draft, and sends only within the local demo', () => {const view = render(() => <HomepageEmailCompose />);+ expect(+ (view.getByRole('textbox', { name: 'To' }) as HTMLInputElement).value+ ).toBe('Valentina <[email protected]>');+ expect(+ (view.getByRole('textbox', { name: 'Cc' }) as HTMLInputElement).value+ ).toBe('Julia <[email protected]>');expect(view.getByRole('textbox', { name: 'Email body' }).textContent).toContain('Thanks for joining the demo');@@ -73,29 +94,88 @@ describe('standalone website demos', () => {expect(fetch).not.toHaveBeenCalled();});+ it('opens company and person mentions locally and preserves the sheet on return', async () => {+ const view = render(() => <HomepageSpreadsheet />);+ const company = view.getByRole('button', { name: 'Open Coparse' });+ fireEvent.click(company);+ // The first linked record loads a separate chunk; include its cold test transform.+ const dialog = await screen.findByRole(+ 'dialog',+ { name: 'Coparse' },+ { timeout: 3000 }+ );+ expect(+ (+ within(dialog).getByRole('textbox', {+ name: 'Company name',+ }) as HTMLInputElement+ ).value+ ).toBe('Coparse');+ fireEvent.click(+ within(dialog).getByRole('button', { name: 'Close linked record' })+ );+ expect(+ view+ .getByRole('gridcell', { name: 'B2: Coparse' })+ .getAttribute('aria-selected')+ ).toBe('true');+ fireEvent.click(view.getByRole('button', { name: 'Open Valentina' }));+ const contact = await screen.findByRole('dialog', {+ name: 'Valentina · Coparse',+ });+ expect(within(contact).getByText('[email protected]')).toBeTruthy();+ fireEvent.click(+ within(contact).getByRole('button', { name: 'Close linked record' })+ );+ const cell = view.getByRole('gridcell', { name: 'B2: Coparse' });+ fireEvent.click(cell);+ fireEvent.dblClick(cell);+ fireEvent.input(view.getByRole('textbox', { name: 'Edit B2' }), {+ target: { value: 'New company' },+ });+ fireEvent.keyDown(view.getByRole('textbox', { name: 'Edit B2' }), {+ key: 'Enter',+ });+ expect(view.queryByRole('button', { name: 'Open New company' })).toBeNull();+ fireEvent.click(view.getByRole('button', { name: 'Undo' }));+ expect(view.getByRole('button', { name: 'Open Coparse' })).toBeTruthy();+ expect(fetch).not.toHaveBeenCalled();+ });+it('edits cells, commits keyboard navigation, and restores edits with undo and redo', () => {const view = render(() => <HomepageSpreadsheet />);+ expect(view.getByRole('gridcell', { name: 'B2: Coparse' })).toBeTruthy();+ expect(+ view.getByRole('gridcell', { name: 'C3: [email protected]' })+ ).toBeTruthy();+ expect(+ view.getByRole('gridcell', { name: 'C4: [email protected]' })+ ).toBeTruthy();const cell = view.getByRole('gridcell', {- name: 'A2: Dana',+ name: 'A2: Valentina',});fireEvent.click(cell);fireEvent.dblClick(cell);fireEvent.input(view.getByRole('textbox', { name: 'Edit A2' }), {- target: { value: 'Dana Test' },+ target: { value: 'Valentina Test' },});fireEvent.keyDown(view.getByRole('textbox', { name: 'Edit A2' }), {key: 'Enter',});- expect(view.getByRole('gridcell', { name: 'A2: Dana Test' })).toBeTruthy();+ expect(+ view.getByRole('gridcell', { name: 'A2: Valentina Test' })+ ).toBeTruthy();expect(view.getByRole('gridcell', { name: 'A3: Maya' }).getAttribute('aria-selected')).toBe('true');fireEvent.click(view.getByRole('button', { name: 'Undo' }));- expect(view.getByRole('gridcell', { name: 'A2: Dana' })).toBeTruthy();+ expect(view.getByRole('gridcell', { name: 'A2: Valentina' })).toBeTruthy();fireEvent.click(view.getByRole('button', { name: 'Redo' }));- expect(view.getByRole('gridcell', { name: 'A2: Dana Test' })).toBeTruthy();+ expect(+ view.getByRole('gridcell', { name: 'A2: Valentina Test' })+ ).toBeTruthy();fireEvent.click(view.getByRole('button', { name: 'Bold' }));expect(view.getByRole('gridcell', { name: 'A3: Maya' }).style.fontWeightdiff --git a/apps/marketing/src/features/marketing/components/HomepageTaskConversation.tsx b/apps/marketing/src/features/marketing/components/HomepageTaskConversation.tsxindex 6ce08394d0..9b903b4df7 100644--- a/apps/marketing/src/features/marketing/components/HomepageTaskConversation.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageTaskConversation.tsx@@ -25,7 +25,7 @@ export default function HomepageTaskConversation() {The invite in{' '}<HomepageMentionkind="md"- label="Q3 launch plan"+ label="Website launch plan"description="Thursday’s launch plan and owners."href="#documents"/>{' '}diff --git a/apps/marketing/src/features/marketing/components/HomepageUnification.tsx b/apps/marketing/src/features/marketing/components/HomepageUnification.tsxindex 68bb3a139f..3e1640c66c 100644--- a/apps/marketing/src/features/marketing/components/HomepageUnification.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageUnification.tsx@@ -360,9 +360,9 @@ export function HomepageUnification(for your company.</div><h2 id="unification-heading">- Replace 27+ apps+ <span class="unification-heading-prefix">Replace 27+ apps</span><br />- with a single system.+ with Macro.</h2><p class="unification-subtext"><span class="unification-subtext-desktop">diff --git a/apps/marketing/src/features/marketing/components/HomepageWorkspace.tsx b/apps/marketing/src/features/marketing/components/HomepageWorkspace.tsxindex e4919c91ef..c640d17dd3 100644--- a/apps/marketing/src/features/marketing/components/HomepageWorkspace.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageWorkspace.tsx@@ -71,7 +71,7 @@ const PAGES: DemoPage[] = [const TITLES: Record<DemoPage, string> = {home: 'launch',messages: 'launch',- documents: 'Q3 launch plan',+ documents: 'Website launch plan',tasks: 'My tasks',agents: 'Agents',email: 'New email',@@ -199,11 +199,11 @@ function DocumentDemo(props: { demo: WorkspaceDemo }) {const initialDocument = props.demo.document();return (<div class="workspace-demo-scroll workspace-demo-document">- <h1 class="mb-6 text-2xl font-semibold">Q3 launch plan</h1>+ <h1 class="mb-6 text-2xl font-semibold">Website launch plan</h1><divcontentEditablerole="textbox"- aria-label="Q3 launch plan document"+ aria-label="Website launch plan document"aria-multiline="true"class="h-auto text-sm outline-none"onInput={(event) =>@@ -378,7 +378,7 @@ function AgentSessionDemo(props: {id: 'read-plan',name: { kind: 'native', name: 'Read' },status: 'completed',- detail: { kind: 'read', paths: ['Q3 launch plan'] },+ detail: { kind: 'read', paths: ['Website launch plan'] },},{kind: 'text',diff --git a/apps/marketing/src/features/marketing/components/HomepageWorkspaceList.tsx b/apps/marketing/src/features/marketing/components/HomepageWorkspaceList.tsxindex 798c3143c4..4e8107dac8 100644--- a/apps/marketing/src/features/marketing/components/HomepageWorkspaceList.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageWorkspaceList.tsx@@ -29,7 +29,7 @@ type Item = {const ITEMS: Item[] = [{ label: 'launch', page: 'messages', icon: HashIcon },{ label: 'Thursday’s launch', page: 'email', icon: EmailIcon },- { label: 'Q3 launch plan', page: 'documents', icon: DocumentIcon },+ { label: 'Website launch plan', page: 'documents', icon: DocumentIcon },{ label: 'Launch checklist', page: 'tasks', icon: TaskIcon },{label: 'Plan Thursday’s launch',diff --git a/apps/marketing/src/features/marketing/components/SiteHeader.test.tsx b/apps/marketing/src/features/marketing/components/SiteHeader.test.tsxnew file mode 100644index 0000000000..ec4b6f95a8--- /dev/null+++ b/apps/marketing/src/features/marketing/components/SiteHeader.test.tsx@@ -0,0 +1,165 @@+import {+ cleanup,+ fireEvent,+ render,+ screen,+ within,+} from '@solidjs/testing-library';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { SiteHeader } from './SiteHeader';++// Booking is independent of the public navigation interaction.+vi.mock('./DemoBookingDialog', () => ({ DemoBookingDialog: () => null }));+beforeEach(() => {+ vi.useFakeTimers();+ vi.stubGlobal('matchMedia', (query: string) => ({+ matches: query === '(min-width: 768px) and (hover: hover)',+ media: query,+ onchange: null,+ addListener: vi.fn(),+ removeListener: vi.fn(),+ addEventListener: vi.fn(),+ removeEventListener: vi.fn(),+ dispatchEvent: vi.fn(),+ }));+});+afterEach(() => {+ cleanup();+ vi.useRealTimers();+ vi.restoreAllMocks();+ vi.unstubAllGlobals();+});++function mousePointer(type: string) {+ const event = new Event(type, { bubbles: true });+ Object.defineProperty(event, 'pointerType', { value: 'mouse' });+ return event;+}++it('opens on mouse hover and keeps the mark linked to the landing page', () => {+ render(() => <SiteHeader />);+ const home = screen.getByRole('link', { name: 'Macro home' });+ expect(home.getAttribute('href')).toBe('/');+ expect(home.getAttribute('target')).toBe('_self');+ expect(screen.queryByRole('navigation')).toBeNull();+ fireEvent(home.parentElement!, mousePointer('pointerenter'));+ const nav = screen.getByRole('navigation', { name: 'Main navigation' });+ expect(home.getAttribute('aria-expanded')).toBe('true');+ expect(+ within(nav).getByRole('link', { name: 'Tasks' }).getAttribute('href')+ ).toBe('/tasks');+ fireEvent(home.parentElement!, mousePointer('pointerleave'));+ expect(screen.getByRole('navigation')).toBeTruthy();+ vi.advanceTimersByTime(350);+ expect(screen.queryByRole('navigation')).toBeNull();+});++it('opens with Down Arrow, keeps focused links available, and returns focus with Escape', () => {+ render(() => <SiteHeader />);+ const home = screen.getByRole('link', { name: 'Macro home' });+ home.focus();+ fireEvent.keyDown(home, { key: 'ArrowDown' });+ const email = within(screen.getByRole('navigation')).getByRole('link', {+ name: 'Email',+ });+ expect(document.activeElement).toBe(email);+ fireEvent(home.parentElement!, mousePointer('pointerleave'));+ expect(screen.getByRole('navigation')).toBeTruthy();+ fireEvent.keyDown(email, { key: 'Escape' });+ expect(screen.queryByRole('navigation')).toBeNull();+ expect(document.activeElement).toBe(home);+});++it('uses a separate touch toggle and closes when leaving navigation', () => {+ render(() => <SiteHeader />);+ const home = screen.getByRole('link', { name: 'Macro home' });+ const touch = new Event('pointerenter', { bubbles: true });+ Object.defineProperty(touch, 'pointerType', { value: 'touch' });+ fireEvent(home.parentElement!, touch);+ expect(screen.queryByRole('navigation')).toBeNull();+ const toggle = screen.getByRole('button', { name: 'Open navigation' });+ fireEvent.click(toggle);+ expect(screen.getByRole('navigation')).toBeTruthy();+ fireEvent.keyDown(toggle, { key: 'Escape' });+ expect(document.activeElement).toBe(toggle);+ expect(screen.queryByRole('navigation')).toBeNull();+ fireEvent.click(toggle);+ fireEvent.pointerDown(document.body);+ expect(screen.queryByRole('navigation')).toBeNull();+ fireEvent.click(toggle);+ fireEvent.focusOut(toggle, {+ relatedTarget: screen.getByRole('link', { name: 'Open app' }),+ });+ expect(screen.queryByRole('navigation')).toBeNull();+});++it('keeps narrow-screen keyboard navigation inside the open menu', () => {+ vi.stubGlobal('matchMedia', (query: string) => ({+ matches: query === '(max-width: 767px)',+ media: query,+ onchange: null,+ addListener: vi.fn(),+ removeListener: vi.fn(),+ addEventListener: vi.fn(),+ removeEventListener: vi.fn(),+ dispatchEvent: vi.fn(),+ }));+ render(() => <SiteHeader />);+ const home = screen.getByRole('link', { name: 'Macro home' });+ fireEvent(home.parentElement!, mousePointer('pointerenter'));+ expect(screen.queryByRole('navigation')).toBeNull();+ fireEvent.click(screen.getByRole('button', { name: 'Open navigation' }));+ const last = within(screen.getByRole('navigation')).getByRole('link', {+ name: 'Book a demo',+ });+ home.focus();+ fireEvent.keyDown(home, { key: 'Tab', shiftKey: true });+ expect(document.activeElement).toBe(last);+ fireEvent.keyDown(last, { key: 'Tab' });+ expect(document.activeElement).toBe(home);+});++it('allows crossing the gap and cancels dismissal while over the dropdown', () => {+ render(() => <SiteHeader />);+ const menu = screen.getByRole('link', { name: 'Macro home' }).parentElement!;+ fireEvent(menu, mousePointer('pointerenter'));+ fireEvent(menu, mousePointer('pointerleave'));+ vi.advanceTimersByTime(300);+ const nav = screen.getByRole('navigation');+ fireEvent(nav, mousePointer('pointerenter'));+ vi.advanceTimersByTime(1000);+ expect(screen.getByRole('navigation')).toBe(nav);+ fireEvent(menu, mousePointer('pointerleave'));+ vi.advanceTimersByTime(200);+ fireEvent(menu, mousePointer('pointerenter'));+ vi.advanceTimersByTime(1000);+ expect(screen.getByRole('navigation')).toBe(nav);+ fireEvent(menu, mousePointer('pointerleave'));+ vi.advanceTimersByTime(350);+ expect(screen.queryByRole('navigation')).toBeNull();+});++it('cancels a pending close when keyboard navigation opens and dismisses immediately on Escape', () => {+ render(() => <SiteHeader />);+ const home = screen.getByRole('link', { name: 'Macro home' });+ fireEvent(home.parentElement!, mousePointer('pointerenter'));+ fireEvent(home.parentElement!, mousePointer('pointerleave'));+ vi.advanceTimersByTime(200);+ fireEvent.keyDown(home, { key: 'ArrowDown' });+ vi.advanceTimersByTime(350);+ expect(screen.getByRole('navigation')).toBeTruthy();+ fireEvent.keyDown(document.activeElement!, { key: 'Escape' });+ expect(screen.queryByRole('navigation')).toBeNull();+ vi.advanceTimersByTime(350);+ expect(screen.queryByRole('navigation')).toBeNull();+});++it('cleans up the dismissal timer on unmount', () => {+ const view = render(() => <SiteHeader />);+ const menu = screen.getByRole('link', { name: 'Macro home' }).parentElement!;+ fireEvent(menu, mousePointer('pointerenter'));+ fireEvent(menu, mousePointer('pointerleave'));+ expect(vi.getTimerCount()).toBe(1);+ view.unmount();+ expect(vi.getTimerCount()).toBe(0);+});diff --git a/apps/marketing/src/features/marketing/components/SiteHeader.tsx b/apps/marketing/src/features/marketing/components/SiteHeader.tsxindex 76887854a1..b29b14da01 100644--- a/apps/marketing/src/features/marketing/components/SiteHeader.tsx+++ b/apps/marketing/src/features/marketing/components/SiteHeader.tsx@@ -1,11 +1,5 @@-import {- createSignal,- For,- type JSX,- onCleanup,- onMount,- Show,-} from 'solid-js';+import CaretDown from '@phosphor/caret-down.svg';+import { createSignal, For, onCleanup, onMount, Show } from 'solid-js';import {DEMO_BOOKING_URL,FEATURE_PAGES,@@ -19,7 +13,7 @@ const EXPLORE_PAGES = [{ href: '/', label: 'Home' },{ href: '/pricing', label: 'Pricing' },{ href: '/partners', label: 'Partners' },- { href: DEMO_BOOKING_URL, label: 'Talk to us' },+ { href: DEMO_BOOKING_URL, label: 'Book a demo' },];function NavigationGroup(props: {@@ -49,51 +43,30 @@ function NavigationGroup(props: {/** Shared public navigation and app entry. */export function SiteHeader(props: { hideOpenApp?: boolean }) {let menu!: HTMLDivElement;- let trigger!: HTMLButtonElement;+ let trigger!: HTMLAnchorElement;+ let menuOpener: HTMLElement | undefined;const [open, setOpen] = createSignal(false);- let glowFrame = 0;- let glowTarget: HTMLAnchorElement | undefined;- let pointerX = 0;- let pointerY = 0;- const moveGlow: JSX.EventHandler<HTMLAnchorElement, PointerEvent> = (- event- ) => {- if (event.pointerType === 'touch') return;- glowTarget = event.currentTarget;- pointerX = event.clientX;- pointerY = event.clientY;- if (glowFrame) return;- glowFrame = requestAnimationFrame(() => {- glowFrame = 0;- if (!glowTarget) return;- const bounds = glowTarget.getBoundingClientRect();- // Percentages also track correctly when Open app scales into the footer.- glowTarget.style.setProperty(- '--glow-x',- `${((pointerX - bounds.left) / bounds.width) * 100}%`- );- glowTarget.style.setProperty(- '--glow-y',- `${((pointerY - bounds.top) / bounds.height) * 100}%`- );- });+ let closeTimer: ReturnType<typeof setTimeout> | undefined;+ let pointerInside = false;+ const cancelClose = () => {+ clearTimeout(closeTimer);+ closeTimer = undefined;};- const stopGlow = () => {- if (glowFrame) cancelAnimationFrame(glowFrame);- glowFrame = 0;- glowTarget = undefined;+ const closeMenu = () => {+ cancelClose();+ setOpen(false);};- const centerGlow: JSX.EventHandler<HTMLAnchorElement, FocusEvent> = (- event- ) => {- event.currentTarget.style.setProperty('--glow-x', '50%');- event.currentTarget.style.setProperty('--glow-y', '50%');+ const openMenu = () => {+ cancelClose();+ setOpen(true);};- onCleanup(stopGlow);+ onCleanup(cancelClose);+ const hasHoverMenu = () =>+ window.matchMedia('(min-width: 768px) and (hover: hover)').matches;onMount(() => {const outside = (event: PointerEvent) => {- if (!menu.contains(event.target as Node)) setOpen(false);+ if (!menu.contains(event.target as Node)) closeMenu();};document.addEventListener('pointerdown', outside);onCleanup(() => document.removeEventListener('pointerdown', outside));@@ -104,14 +77,36 @@ export function SiteHeader(props: { hideOpenApp?: boolean }) {<divref={menu}class="site-menu"+ onPointerEnter={(event) => {+ if (event.pointerType === 'mouse' && hasHoverMenu()) {+ pointerInside = true;+ menuOpener = trigger;+ openMenu();+ }+ }}+ onPointerLeave={(event) => {+ if (event.pointerType !== 'mouse' || !hasHoverMenu()) return;+ pointerInside = false;+ cancelClose();+ closeTimer = setTimeout(() => {+ closeTimer = undefined;+ if (+ !pointerInside &&+ !menu.querySelector('nav')?.contains(document.activeElement)+ ) {+ setOpen(false);+ }+ }, 350);+ }}onFocusOut={(event) => {- if (!menu.contains(event.relatedTarget as Node)) setOpen(false);+ if (!pointerInside && !menu.contains(event.relatedTarget as Node))+ closeMenu();}}onKeyDown={(event) => {if (event.key === 'Escape' && open()) {event.preventDefault();- setOpen(false);- trigger.focus();+ closeMenu();+ (menuOpener ?? trigger).focus();}if (event.key === 'Tab' &&@@ -130,86 +125,108 @@ export function SiteHeader(props: { hideOpenApp?: boolean }) {}}}>- <button+ <aref={trigger}- type="button"+ href="/"+ target="_self"class="site-menu-trigger"- aria-label={open() ? 'Close navigation' : 'Open navigation'}+ aria-label="Macro home"aria-expanded={open()}aria-controls="site-main-navigation"- onClick={() => setOpen(!open())}+ aria-keyshortcuts="ArrowDown"+ onClick={closeMenu}+ onKeyDown={(event) => {+ if (event.key !== 'ArrowDown') return;+ event.preventDefault();+ menuOpener = trigger;+ openMenu();+ menu.querySelector<HTMLAnchorElement>('nav a')?.focus();+ }}><span class="site-menu-mark" aria-hidden="true"><span /><span /><span /></span>+ </a>+ <button+ type="button"+ class="site-menu-toggle"+ aria-label={open() ? 'Close navigation' : 'Open navigation'}+ aria-expanded={open()}+ aria-controls="site-main-navigation"+ onClick={(event) => {+ menuOpener = event.currentTarget;+ if (open()) closeMenu();+ else openMenu();+ }}+ >+ <CaretDown aria-hidden="true" /></button><navid="site-main-navigation"class="site-menu-panel"hidden={!open()}aria-label="Main navigation"+ onPointerEnter={(event) => {+ if (event.pointerType === 'mouse' && hasHoverMenu()) {+ pointerInside = true;+ cancelClose();+ }+ }}><NavigationGrouplabel="Features"links={FEATURE_PAGES}- onNavigate={() => setOpen(false)}+ onNavigate={closeMenu}/><NavigationGrouplabel="Resources"links={RESOURCE_PAGES}- onNavigate={() => setOpen(false)}+ onNavigate={closeMenu}/><NavigationGrouplabel="Explore"links={EXPLORE_PAGES}- onNavigate={() => setOpen(false)}+ onNavigate={closeMenu}/></nav></div><div class="site-header-actions"><aclass="site-nav-demo"- onPointerEnter={moveGlow}- onPointerMove={moveGlow}- onPointerLeave={stopGlow}- onPointerCancel={stopGlow}- onFocus={centerGlow}href={DEMO_BOOKING_URL}target="_blank"rel="noreferrer">- Talk to us+ Book a demo</a><Show when={!props.hideOpenApp}><a- class="site-nav-start"+ class="site-nav-start site-nav-open"target="_self"href="/app/signup"onClick={routePhoneToMobileSignup}- onPointerEnter={moveGlow}- onPointerMove={moveGlow}- onPointerLeave={stopGlow}- onPointerCancel={stopGlow}- onFocus={centerGlow}>- <span>Open app</span>- <svg- width="28"- height="28"- viewBox="0 0 32 32"- fill="none"- aria-hidden="true"- >- <path- d="M5 16h22M17 6l10 10-10 10"- stroke="currentColor"- stroke-width="2"- stroke-linecap="round"- stroke-linejoin="round"- />- </svg>+ <span class="site-nav-open-label">Open app</span>+ <span class="site-nav-open-footer" aria-hidden="true">+ <span>Open app</span>+ <svg+ width="28"+ height="28"+ viewBox="0 0 32 32"+ fill="none"+ aria-hidden="true"+ >+ <path+ d="M5 16h22M17 6l10 10-10 10"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+ />+ </svg>+ </span></a></Show></div>diff --git a/apps/marketing/src/features/marketing/components/SpreadsheetRecordPreview.tsx b/apps/marketing/src/features/marketing/components/SpreadsheetRecordPreview.tsxnew file mode 100644index 0000000000..de670d1c17--- /dev/null+++ b/apps/marketing/src/features/marketing/components/SpreadsheetRecordPreview.tsx@@ -0,0 +1,73 @@+import X from '@phosphor/x.svg';+import { Button } from '@ui';+import { Dialog } from '@ui/components/Dialog';+import { createSignal } from 'solid-js';+import { createDummyWorkspace } from '../primitives/createDummyWorkspace';+import { CrmRecordWorkspace } from './crm/CrmRecordWorkspace';+import type { CompanySection } from './workspace/WorkspaceCompanies';++/** Linked sheet cells resolve to a local CRM record, preserving the sheet behind it. */+export default function SpreadsheetRecordPreview(props: {+ company: string;+ person: string;+ email: string;+ kind: 'company' | 'person';+ onClose: () => void;+}) {+ const w = createDummyWorkspace('crm');+ const [section, setSection] = createSignal<CompanySection>(+ props.kind === 'person' ? 'team' : 'overview'+ );+ w.setData('companies', [+ {+ id: 'sheet-company',+ name: props.company,+ domain: props.email.split('@')[1] ?? '',+ description: '',+ stage: 'Customer',+ owner: '',+ revenue: '',+ comments: [],+ emailIds: [],+ contacts: [{ name: props.person, email: props.email }],+ },+ ]);+ w.open('crm', 'sheet-company');+ w.setCompanyFilter('Customers to reach');+ const linked = { ...w, open: () => props.onClose() };+ return (+ <Dialog+ open+ position="center"+ class="homepage-sheet-record workspace-demo portal-scope"+ onOpenChange={(open) => {+ if (!open) props.onClose();+ }}+ >+ <header class="homepage-sheet-record-header">+ <Dialog.Title>+ {props.kind === 'person'+ ? `${props.person} · ${props.company}`+ : props.company}+ </Dialog.Title>+ <Button+ variant="ghost"+ size="icon-sm"+ label="Close linked record"+ onClick={props.onClose}+ >+ <X />+ </Button>+ </header>+ <Dialog.Description class="sr-only">+ Linked record from Customers to reach+ </Dialog.Description>+ <CrmRecordWorkspace+ workspace={linked}+ hideCopyLink+ section={section()}+ onSectionChange={setSection}+ />+ </Dialog>+ );+}diff --git a/apps/marketing/src/features/marketing/components/WorkspaceDesktopDemo.test.tsx b/apps/marketing/src/features/marketing/components/WorkspaceDesktopDemo.test.tsxnew file mode 100644index 0000000000..c36ab503da--- /dev/null+++ b/apps/marketing/src/features/marketing/components/WorkspaceDesktopDemo.test.tsx@@ -0,0 +1,46 @@+import { cleanup, render } from '@solidjs/testing-library';+import { afterEach, expect, it, vi } from 'vitest';+import { WorkspaceDesktopDemo } from './WorkspaceDesktopDemo';++vi.mock('./DemoInteractionBoundary', () => ({+ DemoInteractionBoundary: (props: {+ children: unknown;+ render?: () => unknown;+ }) => props.render?.() ?? props.children,+}));+afterEach(cleanup);++it('omits simulated browser chrome while retaining the hero and its app content', () => {+ const view = render(() => (+ <WorkspaceDesktopDemo+ heroFrame+ windowChrome={false}+ view="crm"+ label="Explore Macro CRM"+ >+ <div>Sales pipeline</div>+ </WorkspaceDesktopDemo>+ ));+ const frame = view.getByRole('region', { name: 'Explore Macro CRM' });+ expect(frame.getAttribute('data-hero-frame')).toBe('true');+ expect(frame.getAttribute('data-window-chrome')).toBe('false');+ expect(frame.querySelector('.email-desktop-titlebar')).toBeNull();+ expect(frame.querySelector('.email-desktop-traffic-lights')).toBeNull();+ expect(frame.querySelector('.email-desktop-wallpaper')).toBeTruthy();+ expect(view.getByText('Sales pipeline')).toBeTruthy();+});++it('preserves the existing title bar on other product frames', () => {+ const view = render(() => (+ <WorkspaceDesktopDemo heroFrame view="documents" label="Explore Macro Docs">+ <div>Shared document</div>+ </WorkspaceDesktopDemo>+ ));+ expect(view.container.querySelector('.email-desktop-titlebar')).toBeTruthy();+ expect(+ view+ .getByRole('link', { name: 'Open the sample workspace in a new tab' })+ .getAttribute('href')+ ).toBe('/demo');+ expect(view.getByText('Shared document')).toBeTruthy();+});diff --git a/apps/marketing/src/features/marketing/components/WorkspaceDesktopDemo.tsx b/apps/marketing/src/features/marketing/components/WorkspaceDesktopDemo.tsxindex 6ebad2987f..1e5ba7ad36 100644--- a/apps/marketing/src/features/marketing/components/WorkspaceDesktopDemo.tsx+++ b/apps/marketing/src/features/marketing/components/WorkspaceDesktopDemo.tsx@@ -8,6 +8,7 @@ import {} from 'solid-js';import type { DummyData, WorkspaceView } from '../core/dummy-workspace';import { DeferredDemo } from './DeferredDemo';+import { DemoInteractionBoundary } from './DemoInteractionBoundary';import './email/email-desktop-demo.css';const loadWorkspace = () => import('./workspace/DummyWorkspace');@@ -17,8 +18,10 @@ const Workspace = lazy(loadWorkspace);export function WorkspaceDesktopDemo(props: {view: WorkspaceView;label: string;- caption?: string;heroFrame?: boolean;+ /** Omit simulated browser chrome while retaining the shared hero dimensions. */+ windowChrome?: boolean;+ demoHref?: string;/** Keep a desktop canvas intact inside a smaller marketing frame. */desktopWidth?: number;initialDocument?: string;@@ -31,6 +34,7 @@ export function WorkspaceDesktopDemo(props: {tasksShowcase?: boolean;chatSplits?: boolean;children?: JSX.Element;+ render?: () => JSX.Element;}) {let content!: HTMLDivElement;const [scale, setScale] = createSignal(1);@@ -54,6 +58,7 @@ export function WorkspaceDesktopDemo(props: {<sectionclass="email-desktop-demo"aria-label={props.label}+ data-window-chrome={props.windowChrome === false ? 'false' : undefined}data-hero-frame={props.heroFrame ? 'true' : undefined}data-desktop-canvas={!!props.desktopWidth}data-agent-showcase={props.agentShowcase ? 'true' : undefined}@@ -64,64 +69,69 @@ export function WorkspaceDesktopDemo(props: {><div class="email-desktop-wallpaper"><div class="email-desktop-window">- <div class="email-desktop-titlebar">- <div class="email-desktop-traffic-lights" aria-hidden="true">- <span />- <span />- <span />- </div>- <span>Macro</span>- <a- href={- props.agentShowcase- ? '/demo?scene=agents'- : props.tasksShowcase- ? '/demo?scene=tasks'- : '/demo'- }- target="_blank"- rel="noreferrer"- aria-label="Open the sample workspace in a new tab"- >- ↗- </a>- </div>- <div ref={content} class="email-desktop-content">- <div class="email-desktop-canvas">- <Show- when={props.children}- fallback={- <DeferredDemo- preload={loadWorkspace}- fallback={- <div class="email-desktop-loading" role="status">- Opening your sample workspace…- </div>- }- >- <Workspace- initialView={props.view}- initialData={props.initialData}- initialChannelThread={props.initialChannelThread}- initialDocument={props.initialDocument}- initialAgent={props.initialAgent}- agentShowcase={props.agentShowcase}- tasksShowcase={props.tasksShowcase}- chatSplits={props.chatSplits}- embedded- />- </DeferredDemo>+ <Show when={props.windowChrome !== false}>+ <div class="email-desktop-titlebar">+ <div class="email-desktop-traffic-lights" aria-hidden="true">+ <span />+ <span />+ <span />+ </div>+ <span>Macro</span>+ <a+ href={+ props.demoHref ??+ (props.agentShowcase+ ? '/demo?scene=agents'+ : props.tasksShowcase+ ? '/demo?scene=tasks'+ : '/demo')}+ target="_blank"+ rel="noreferrer"+ aria-label="Open the sample workspace in a new tab">- {props.children}- </Show>+ ↗+ </a></div>- </div>+ </Show>+ <DemoInteractionBoundary+ label={props.label}+ ref={content}+ class="email-desktop-content"+ render={() => (+ <div class="email-desktop-canvas">+ <Show+ when={props.render || props.children}+ fallback={+ <DeferredDemo+ preload={loadWorkspace}+ fallback={+ <div class="email-desktop-loading" role="status">+ Opening your sample workspace…+ </div>+ }+ >+ <Workspace+ initialView={props.view}+ initialData={props.initialData}+ initialChannelThread={props.initialChannelThread}+ initialDocument={props.initialDocument}+ initialAgent={props.initialAgent}+ agentShowcase={props.agentShowcase}+ tasksShowcase={props.tasksShowcase}+ chatSplits={props.chatSplits}+ embedded+ />+ </DeferredDemo>+ }+ >+ {props.render ? props.render() : props.children}+ </Show>+ </div>+ )}+ /></div></div>- <Show when={props.caption}>- <p class="email-desktop-caption">{props.caption}</p>- </Show></section>);}diff --git a/apps/marketing/src/features/marketing/components/agents/AgentStories.test.tsx b/apps/marketing/src/features/marketing/components/agents/AgentStories.test.tsxindex 4c9515dcb6..06c6f2f72f 100644--- a/apps/marketing/src/features/marketing/components/agents/AgentStories.test.tsx+++ b/apps/marketing/src/features/marketing/components/agents/AgentStories.test.tsx@@ -360,7 +360,9 @@ it('keeps the created task linked to the same rollout plan and source discussionexpect(pane.getByRole('button', { name: 'Northwind rollout plan' })).toBeTruthy();- expect(pane.queryByRole('button', { name: 'Q3 launch plan' })).toBeNull();+ expect(+ pane.queryByRole('button', { name: 'Website launch plan' })+ ).toBeNull();fireEvent.click(pane.getByRole('button', { name: 'From customers' }));expect(view.getByText(/Northwind now needs 40 seats and SSO/)).toBeTruthy();});diff --git a/apps/marketing/src/features/marketing/components/agents/AgentWorkflowStories.test.tsx b/apps/marketing/src/features/marketing/components/agents/AgentWorkflowStories.test.tsxindex 1af4fe671f..b04ff710cc 100644--- a/apps/marketing/src/features/marketing/components/agents/AgentWorkflowStories.test.tsx+++ b/apps/marketing/src/features/marketing/components/agents/AgentWorkflowStories.test.tsx@@ -131,10 +131,11 @@ it('shows human approval before the coding result and opens its review', () => {expect(view.queryByText(/build this\./)).toBeNull();expect(view.queryByRole('button', { name: 'Open session' })).toBeNull();visible();- vi.advanceTimersByTime(2000);+ vi.advanceTimersByTime(7800);+ expect(view.getByText(/Can we keep the folder structure/)).toBeTruthy();expect(view.getAllByText(/build this\./)).toHaveLength(1);expect(view.queryByRole('button', { name: 'Open session' })).toBeNull();- vi.advanceTimersByTime(2000);+ vi.advanceTimersByTime(6100);fireEvent.click(view.getByRole('button', { name: /#248 · Improve the client upload flow/ }));@@ -174,8 +175,14 @@ it('lets a visitor inspect the design without autoplay taking over', async () =>it('shows the completed collaboration without animation for reduced motion', () => {reduced = true;const view = render(() => <AgentTeamworkStory />);- expect(view.getAllByText(/build this\./)).toHaveLength(2);+ expect(view.getAllByText(/build this\./)).toHaveLength(1);expect(view.getByRole('button', { name: 'Open session' })).toBeTruthy();+ expect(view.container.querySelectorAll('[data-agent="cursor"]')).toHaveLength(+ 1+ );+ expect(+ view.queryByText(/On it. I found the existing upload component/)+ ).toBeNull();expect(view.queryByRole('heading', { name: 'Improve the client upload flow' })).toBeNull();@@ -233,7 +240,7 @@ it('replies to Julia before visibly writing a substantive checklist', () => {expect(body().textContent).toContain('Before sharing with clients');expect(body().textContent).toContain('Send a file');expect(body().textContent).not.toContain('Check that the client can see');- vi.advanceTimersByTime(20000);+ vi.advanceTimersByTime(7000);expect(body().textContent).toContain('Check that the client can see who is reviewing the file.');diff --git a/apps/marketing/src/features/marketing/components/agents/AgentWorkflowStories.tsx b/apps/marketing/src/features/marketing/components/agents/AgentWorkflowStories.tsxindex da1323c0c1..3e05708e9d 100644--- a/apps/marketing/src/features/marketing/components/agents/AgentWorkflowStories.tsx+++ b/apps/marketing/src/features/marketing/components/agents/AgentWorkflowStories.tsx@@ -149,7 +149,7 @@ function WorkflowSources(props: {text={'Sources: @[customer-support](agent:support), @[File upload testing notes](agent:notes), and @[Upload size guidance task](agent:task).' +(props.meeting- ? '\n\n@[Dana’s latest email](agent:email) · @[Beacon discovery call](agent:call)'+ ? '\n\n@[Valentina’s latest email](agent:email) · @[Beacon discovery call](agent:call)': '')}mentions={{@@ -236,7 +236,27 @@ export function AgentFeedbackWorkflow(props: { workspace: DummyWorkspace }) {id: 'feedback-after-3',person: 'jacob',time: '9:47 AM',- body: 'let’s leave guest access for now. fix those two first',+ body: 'Let’s leave guest access for now. Fix those two first.',+ },+ {+ id: 'feedback-coding-request',+ person: 'teo',+ time: '9:49 AM',+ body: '@[Cursor](demo-mention:cursor), take upload recovery. Keep the selected files when an upload fails and add a regression test.',+ },+ {+ id: 'feedback-coding-response',+ replyTo: 'feedback-coding-request',+ person: 'cursor',+ time: '9:50 AM',+ body: 'I found where the selection gets cleared on an error. I’ll keep it for retries and open a PR for you to review.',+ },+ {+ id: 'feedback-reviewer',+ replyTo: 'feedback-coding-request',+ person: 'julia',+ time: '9:51 AM',+ body: 'Thanks. Send me the preview too. I can test it with Beacon’s files.',},]);return (@@ -248,7 +268,7 @@ export function AgentFeedbackWorkflow(props: { workspace: DummyWorkspace }) {return (<AgentAnswertext={- 'Two fixes before the next release. I checked @[customer-support](agent:support), @[File upload testing notes](agent:notes), and existing tasks.\n\n- Upload recovery: failed uploads lose selected files. Confirmed in testing.\n- Reviewer visibility: requested by both Beacon and Westlake.\n\nSize guidance is already in progress. Guest access needs a decision.\n\nCreated @[Client file upload feedback](agent:brief) with the open work and sources.'+ 'Two fixes are still open:\n\n- Keep selected files after a failed upload.\n- Show clients who is reviewing their files.\n\nI checked @[customer-support](agent:support) and @[File upload testing notes](agent:notes). Size guidance is already in progress. I put the remaining work in @[Client file upload feedback](agent:brief).'}mentions={{support: {@@ -446,7 +466,34 @@ export function AgentDeliverableStory() {root: () => root,steps: frames.length + 3,visibilityThreshold: 0.5,- reset: () => {},+ loop: { hold: 9000 },+ reset: () => {+ if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame);+ pendingFrame = undefined;+ w.setData(+ 'documents',+ (doc) => doc.id === FEEDBACK_BRIEF,+ 'body',+ original+ );+ w.setData(+ 'documents',+ (doc) => doc.id === FEEDBACK_BRIEF,+ 'comments',+ (comments) =>+ comments.filter((comment) => comment.id !== 'brief-update-result')+ );+ setTyping(false);+ setCaret(undefined);+ setResponseState('ready');+ root+ .querySelectorAll<HTMLElement>(+ '.dummy-scroll, [aria-label="Document discussion"]'+ )+ .forEach((el) => {+ el.scrollTop = 0;+ });+ },delay: (step) => {if (step <= 2) return 1600;if (step === frames.length + 3) return 260;@@ -562,7 +609,19 @@ export function AgentMeetingStory() {root: () => root,steps: 6,visibilityThreshold: 0.5,- reset: () => {},+ loop: { hold: 9000 },+ reset: () => {+ if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame);+ pendingFrame = undefined;+ w.setData('documents', (docs) =>+ docs.filter((doc) => doc.id !== MEETING_BRIEF)+ );+ setPhase(0);+ setToolsOpen(true);+ setTurns([]);+ const log = frame.querySelector('.agent-transcript');+ if (log) log.scrollTop = 0;+ },delay: (step) => (step === 5 ? 700 : step === 6 ? 450 : 1300),reduced: finish,advance: (step) => {@@ -686,27 +745,41 @@ export function AgentTeamworkStory() {id: 'design-request',person: 'jacob',time: '10:04 AM',- body: '@Macro, mock this up from the client brief.',+ body: '@Macro, can you sketch the upload screen from the client brief? Focus on uploading a whole project folder.',},{id: 'design-result',replyTo: 'design-request',person: 'macro',time: '10:05 AM',- body: 'Here’s the mockup.',+ body: 'Here’s a first pass. Files and folders use the same drop area. The destination stays visible at the bottom.',+ },+ {+ id: 'design-refinement',+ replyTo: 'design-request',+ person: 'julia',+ time: '10:06 AM',+ body: 'Yes, this is much clearer. Can we keep the folder structure? Clients usually send us a whole project, not individual files.',+ },+ {+ id: 'design-revision',+ replyTo: 'design-request',+ person: 'macro',+ time: '10:07 AM',+ body: 'Yes. The folder option keeps nested folders together. I added it beside Add files so both paths are easy to find.',},{id: 'design-approval',replyTo: 'design-request',person: 'jacob',- time: '10:06 AM',- body: '@Cursor, build this.',+ time: '10:08 AM',+ body: '@Cursor, build this. Reuse the upload flow and preserve nested folders. Julia will check the preview.',},{id: 'code-result',replyTo: 'design-request',person: 'cursor',- time: '10:09 AM',+ time: '10:14 AM',body: '',},];@@ -715,19 +788,20 @@ export function AgentTeamworkStory() {id: 'design-context',person: 'julia',time: '9:54 AM',- body: 'client brief is updated. they want to see who’s reviewing each upload',+ body: 'Updated the client brief after the Beacon call. They’re uploading entire project folders one file at a time.',+ documentId: FEEDBACK_BRIEF,},{id: 'design-question',person: 'teo',time: '9:56 AM',- body: 'same screen or a separate page?',+ body: 'We already support files. We should be able to reuse that flow for folders.',},{id: 'design-answer',person: 'julia',time: '9:57 AM',- body: 'same screen. keep it simple',+ body: 'Exactly. Keep the subfolders and make the destination obvious. That would save them a lot of setup.',},];w.setData('channels', (all) => [@@ -745,13 +819,14 @@ export function AgentTeamworkStory() {w.setData('channels', (c) => c.id === 'client-files', 'messages', [...teamHistory,...sceneMessages.slice(0, step + 2),- ...(step === 2+ ...(step === 5? [{id: 'design-followup',person: 'julia' as const,- time: '10:10 AM',- body: 'i’ll try the preview before we send it over',+ time: '10:18 AM',+ body: 'Tested the preview with their sample project. All three subfolders stayed intact. I’ll review the PR after lunch.',+ replyTo: 'design-request',},]: []),@@ -759,11 +834,24 @@ export function AgentTeamworkStory() {};const playback = createProductWalkthrough({root: () => root,- steps: 2,- reset: () => {},- delay: () => 2000,- reduced: () => advance(2),- advance,+ steps: 5,+ loop: { hold: 10000 },+ reset: () => {+ advance(0);+ setDetail(undefined);+ setSessionTurns([]);+ const log = root.querySelector('.sample-chat-log');+ if (log) log.scrollTop = 0;+ },+ delay: (step) => (step >= 4 ? 3500 : 2600),+ reduced: () => advance(5),+ advance: (step) => {+ advance(step);+ queueMicrotask(() => {+ const log = root.querySelector<HTMLElement>('.sample-chat-log');+ if (log) log.scrollTo({ top: log.scrollHeight, behavior: 'smooth' });+ });+ },});let trigger: HTMLElement | undefined;const show = (next: 'design' | 'session' | 'pr') => {@@ -802,7 +890,7 @@ export function AgentTeamworkStory() {renderMessageBody={(message) =>message.id === 'design-request' ? (<AgentAnswer- text="@[Macro](agent:macro), mock this up from the @[client brief](agent:brief)."+ text="@[Macro](agent:macro), can you sketch the upload screen from the @[client brief](agent:brief)? Focus on uploading a whole project folder."mentions={{macro: { kind: 'person', person: 'macro' },brief: {@@ -813,7 +901,7 @@ export function AgentTeamworkStory() {/>) : message.id === 'design-approval' ? (<AgentAnswer- text="@[Cursor](agent:cursor), build this."+ text="@[Cursor](agent:cursor), build this. Reuse the upload flow and preserve nested folders. Julia will check the preview."mentions={{ cursor: { kind: 'person', person: 'cursor' } }}/>) : undefined@@ -834,8 +922,8 @@ export function AgentTeamworkStory() {<DemoAgentChipagentSessionId="portal-implementation"requester="Jacob"- request="@Cursor, build this."- markdown="Ready for review."+ request="Add folder upload using the approved design."+ markdown="Folder upload is ready. Nested folders and mobile file selection checked. PR #248 is open for review."onOpen={() => show('session')}headerActions={null}pullRequest={@@ -877,7 +965,7 @@ export function AgentTeamworkStory() {onSend={(text) => setSessionTurns((all) => [...all, text])}><AgentTurn>- <AgentPrompt text="Build this from the mockup in the thread." />+ <AgentPrompt text="Use the approved mockup. Reuse the upload flow, preserve nested folders, and keep the destination visible." /></AgentTurn><AgentTurn><AgentToolGroup@@ -898,7 +986,7 @@ export function AgentTeamworkStory() {]}/><AgentAnswer- text="Built the upload screen from the mockup. The PR is ready for review."+ text="Reused the upload component and added folder selection. Nested folders stay intact, and mobile file selection still works. PR #248 is ready for Julia’s review."mentions={{}}/><button@@ -927,7 +1015,7 @@ export function AgentTeamworkStory() {repository: 'beacon/client-files',number: 248,description:- '## Changes\n\n- Match the approved upload layout.\n- Support files and folders in the dropzone.\n- Keep the destination visible.\n\n## Review\n\nReady for a teammate to review. Guest access is outside this change.',+ '## Changes\n\n- Reuse the existing file upload flow.\n- Add folder selection with nested folders preserved.\n- Keep the destination visible.\n- Check mobile file selection.\n\n## Review\n\nReady for a teammate to review. Guest access is outside this change.',}}/></div>diff --git a/apps/marketing/src/features/marketing/components/agents/LaunchConversation.tsx b/apps/marketing/src/features/marketing/components/agents/LaunchConversation.tsxindex 6e19ff30e9..3a9cc2a1bc 100644--- a/apps/marketing/src/features/marketing/components/agents/LaunchConversation.tsx+++ b/apps/marketing/src/features/marketing/components/agents/LaunchConversation.tsx@@ -27,7 +27,7 @@ const LAUNCH_CALLS: AgentToolCall[] = [},{kind: 'document',- title: 'Q3 launch plan',+ title: 'Website launch plan',snippet: 'Send the customer email. Publish the changelog.',time: 'Sep 28',},@@ -47,12 +47,12 @@ const LAUNCH_CALLS: AgentToolCall[] = [},],},- { kind: 'read-document', title: 'Q3 launch plan' },+ { kind: 'read-document', title: 'Website launch plan' },{ kind: 'read-channel', channel: 'launch', count: 20 },];const LAUNCH_ANSWER =- 'Five launch tasks are still open:\n\n- @[Fix the team invite handoff](agent:invite) is urgent, and Teo is on it.\n- @[Write the launch announcement](agent:announcement) is in review. Julia’s first draft is ready.\n- @[Fix the deploy pipeline](agent:deploy) has a pull request up for Teo to review.\n- @[Prepare the launch checklist](agent:checklist) hasn’t started. It’s yours.\n- @[Send Dana the rollout plan](agent:follow-up) is yours too.\n\nThe @[Q3 launch plan](agent:plan) also still lists the customer email and the changelog.';+ 'Five launch tasks are still open:\n\n- @[Fix the team invite handoff](agent:invite) is urgent, and Teo is on it.\n- @[Write the launch announcement](agent:announcement) is in review. Julia’s first draft is ready.\n- @[Fix the deploy pipeline](agent:deploy) has a pull request up for Teo to review.\n- @[Prepare the launch checklist](agent:checklist) hasn’t started. It’s yours.\n- @[Send Valentina the rollout plan](agent:follow-up) is yours too.\n\nThe @[Website launch plan](agent:plan) also still lists the customer email and the changelog.';export const LAUNCH_PROMPT = 'What’s left before Thursday’s launch?';diff --git a/apps/marketing/src/features/marketing/components/agents/NorthwindCollaboration.tsx b/apps/marketing/src/features/marketing/components/agents/NorthwindCollaboration.tsxindex bc2401d556..01d0eca3bf 100644--- a/apps/marketing/src/features/marketing/components/agents/NorthwindCollaboration.tsx+++ b/apps/marketing/src/features/marketing/components/agents/NorthwindCollaboration.tsx@@ -88,6 +88,7 @@ export function NorthwindCollaboration() {};const agent = createDemoPointer({frame: () => frame,+ active: cursors,target: () =>cursors() && phase() >= 1? '[aria-label="Document body"] h2:nth-of-type(4)'@@ -95,6 +96,7 @@ export function NorthwindCollaboration() {});const person = createDemoPointer({frame: () => frame,+ active: cursors,target: () =>cursors() && phase() >= 1? '[aria-label="Document body"] p:last-of-type'@@ -154,6 +156,7 @@ export function NorthwindCollaboration() {<Show when={agent()}>{(point) => (<DemoCursor+ caretlabel="Claude"class="agent-demo-pointer"style={{ transform: `translate(${point().x}px, ${point().y}px)` }}@@ -163,6 +166,7 @@ export function NorthwindCollaboration() {<Show when={person()}>{(point) => (<DemoCursor+ caretlabel="Jacob"class="agent-demo-pointer"style={{ transform: `translate(${point().x}px, ${point().y}px)` }}diff --git a/apps/marketing/src/features/marketing/components/agents/agent-stories.css b/apps/marketing/src/features/marketing/components/agents/agent-stories.cssindex 7015a3050b..533635f81f 100644--- a/apps/marketing/src/features/marketing/components/agents/agent-stories.css+++ b/apps/marketing/src/features/marketing/components/agents/agent-stories.css@@ -1,6 +1,6 @@/* Agents page demos. Window chrome comes from ProductDemo. */.agent-demo-frame { position: relative; }-.agent-demo-pointer { position: absolute; top: 0; left: 0; z-index: 9; pointer-events: none; transition: transform 650ms cubic-bezier(.2, .8, .2, 1); }+.agent-demo-pointer { position: absolute; top: 0; left: 0; z-index: 9; pointer-events: none; }.dummy-workspace .agent-session-composer { width:100%; max-width:928px; margin-inline:auto; padding:0 16px 10px; flex-shrink:0; }/* A mention opened from the answer lands in a split beside the session. */diff --git a/apps/marketing/src/features/marketing/components/agents/createDemoPointer.ts b/apps/marketing/src/features/marketing/components/agents/createDemoPointer.tsindex 2a79113593..603b3a093b 100644--- a/apps/marketing/src/features/marketing/components/agents/createDemoPointer.ts+++ b/apps/marketing/src/features/marketing/components/agents/createDemoPointer.ts@@ -1,45 +1 @@-import { createEffect, createSignal, onCleanup, onMount } from 'solid-js';--/**- * Where DemoCursor should point: the measured center-left of the element- * `target()` selects inside `frame()`, or nothing when it's hidden.- */-export function createDemoPointer(options: {- frame: () => HTMLElement;- target: () => string | undefined;-}) {- const [pointer, setPointer] = createSignal<{ x: number; y: number }>();- onMount(() => {- const position = () => {- const frame = options.frame();- const selector = options.target();- const target = selector- ? frame.querySelector<HTMLElement>(selector)- : undefined;- if (!target) {- setPointer(undefined);- return;- }- const bounds = target.getBoundingClientRect();- const parent = frame.getBoundingClientRect();- setPointer({- x: bounds.left - parent.left + Math.min(bounds.width / 2, 36),- y: bounds.top - parent.top + bounds.height / 2,- });- };- createEffect(() => {- options.target();- const timer = requestAnimationFrame(position);- onCleanup(() => cancelAnimationFrame(timer));- });- const resize = new ResizeObserver(position);- resize.observe(options.frame());- const frame = options.frame();- frame.addEventListener('scroll', position, true);- onCleanup(() => {- resize.disconnect();- frame.removeEventListener('scroll', position, true);- });- });- return pointer;-}+export { createDemoPointer } from '../../primitives/createDemoPointer';diff --git a/apps/marketing/src/features/marketing/components/agents/northwindScenario.ts b/apps/marketing/src/features/marketing/components/agents/northwindScenario.tsindex f47fc3d55b..3b60fa42e6 100644--- a/apps/marketing/src/features/marketing/components/agents/northwindScenario.ts+++ b/apps/marketing/src/features/marketing/components/agents/northwindScenario.ts@@ -139,7 +139,7 @@ export function seedNorthwind(w: DummyWorkspace, completed = true) {...emails,{id: 'northwind-email',- sender: 'Marcus <[email protected]>',+ sender: 'Marcus <[email protected]>',subject: 'Northwind rollout requirements',snippet:'We need 40 seats, and everyone must use single sign-on (SSO) before joining.',diff --git a/apps/marketing/src/features/marketing/components/agents/workflowData.ts b/apps/marketing/src/features/marketing/components/agents/workflowData.tsindex ea0b909d22..08c36398d0 100644--- a/apps/marketing/src/features/marketing/components/agents/workflowData.ts+++ b/apps/marketing/src/features/marketing/components/agents/workflowData.ts@@ -43,10 +43,10 @@ export function seedAgentWorkflows(w: DummyWorkspace) {...all,{id: 'beacon-email',- sender: 'Dana <[email protected]>',+ sender: 'Valentina <[email protected]>',subject: 'One more thing before Friday',snippet: 'Can our 12 clients upload without accounts?',- body: 'Hi Julia,\n\nWe talked about our 8 internal reviewers on Tuesday. We also need 12 clients to send us files without creating accounts. Can we include that in the trial?\n\nLet’s discuss on Friday.\nDana',+ body: 'Hi Julia,\n\nWe talked about our 8 internal reviewers on Tuesday. We also need 12 clients to send us files without creating accounts. Can we include that in the trial?\n\nLet’s discuss on Friday.\nValentina',time: 'Thursday',account: 'work',folder: 'inbox',@@ -109,7 +109,7 @@ export function seedAgentWorkflows(w: DummyWorkspace) {duration: 0.5,calendar: 'work',description:- 'Agree on the first trial for client file uploads with Dana. Julia hosts.',+ 'Agree on the first trial for client file uploads with Valentina. Julia hosts.',},{id: 'westlake-meeting',diff --git a/apps/marketing/src/features/marketing/components/animateDemoEntrance.ts b/apps/marketing/src/features/marketing/components/animateDemoEntrance.tsindex c591748a4d..1da66bee33 100644--- a/apps/marketing/src/features/marketing/components/animateDemoEntrance.ts+++ b/apps/marketing/src/features/marketing/components/animateDemoEntrance.ts@@ -1,4 +1,4 @@-/** Carry the feature bubbles into a grainy color field, then open the workspace. */+/** Carry the feature bubbles into the existing sample workspace. */export function animateDemoEntrance(section: HTMLElement,scroller: HTMLElementdiff --git a/apps/marketing/src/features/marketing/components/animateHomepageCta.ts b/apps/marketing/src/features/marketing/components/animateHomepageCta.tsindex 868f768e8b..57359eea19 100644--- a/apps/marketing/src/features/marketing/components/animateHomepageCta.ts+++ b/apps/marketing/src/features/marketing/components/animateHomepageCta.ts@@ -22,6 +22,8 @@ export function animateHomepageCta(const originalOpacity = button.style.opacity;const originalTransition = button.style.transition;const originalWillChange = button.style.willChange;+ const originalLanding = button.style.getPropertyValue('--cta-landing');+ const originalFooter = button.hasAttribute('data-cta-footer');const closing = destination.closest('footer') ?? destination;let maxScroll = 0;let startScroll = 0;@@ -83,6 +85,8 @@ export function animateHomepageCta(// The arc descends along the right margin, then turns into the closing// space. Grow with the inward motion so the button stays small beside work.const inward = progress ** 6;+ button.style.setProperty('--cta-landing', String(inward));+ button.toggleAttribute('data-cta-footer', inward >= 0.98);const downward = 1 - (1 - progress) ** 3;button.style.transform = `translate(${dx * inward}px, ${dy * downward}px) scale(${1 + (scale - 1) * inward})`;let opacity = 1 - 0.55 * Math.sin(Math.PI * progress) ** 2;@@ -131,7 +135,11 @@ export function animateHomepageCta();startScroll = Math.min(startScroll, maxScroll - 1);travel = Math.max(1, maxScroll - startScroll);- scale = Math.min(3, (viewport.width - 48) / start.width);+ const landingWidth =+ Number.parseFloat(+ getComputedStyle(button).getPropertyValue('--cta-footer-width')+ ) || start.width;+ scale = Math.min(3, (viewport.width - 48) / landingWidth);dx = (end.left + end.width / 2 - start.left - start.width / 2) / cssScale;dy =(end.top +@@ -167,5 +175,9 @@ export function animateHomepageCta(button.style.transform = originalTransform;button.style.transformOrigin = originalOrigin;button.style.opacity = originalOpacity;+ if (originalLanding)+ button.style.setProperty('--cta-landing', originalLanding);+ else button.style.removeProperty('--cta-landing');+ button.toggleAttribute('data-cta-footer', originalFooter);};}diff --git a/apps/marketing/src/features/marketing/components/calls/CallChannel.tsx b/apps/marketing/src/features/marketing/components/calls/CallChannel.tsxindex 9ae830d1de..976f7eea91 100644--- a/apps/marketing/src/features/marketing/components/calls/CallChannel.tsx+++ b/apps/marketing/src/features/marketing/components/calls/CallChannel.tsx@@ -224,7 +224,7 @@ export function ChannelMessages(props: {<Show when={message.documentId}><span class="dummy-entity-link"><FileIcon class="size-4 text-note" />- Q3 launch plan+ Website launch plan</span></Show></MessageRow>diff --git a/apps/marketing/src/features/marketing/components/calls/CallRecord.tsx b/apps/marketing/src/features/marketing/components/calls/CallRecord.tsxindex 26a0f045d1..f30208a3c7 100644--- a/apps/marketing/src/features/marketing/components/calls/CallRecord.tsx+++ b/apps/marketing/src/features/marketing/components/calls/CallRecord.tsx@@ -505,7 +505,10 @@ export function CallRecordBody(props: {src={homepagePeople[person].photo}alt=""/>- <span class="max-w-48 truncate">{callEmail(person)}</span>+ <span class="max-w-48 truncate">+ {props.call.participantEmails?.[person] ??+ callEmail(person)}+ </span></span>)}</For>@@ -546,7 +549,7 @@ export function CallRecordBody(props: {<Show when={message.documentId}><span class="dummy-entity-link"><FileIcon class="size-4 text-note" />- Q3 launch plan+ Website launch plan</span></Show></MessageRow>diff --git a/apps/marketing/src/features/marketing/components/calls/CallStories.test.tsx b/apps/marketing/src/features/marketing/components/calls/CallStories.test.tsxindex f343d91b41..7ace239d2f 100644--- a/apps/marketing/src/features/marketing/components/calls/CallStories.test.tsx+++ b/apps/marketing/src/features/marketing/components/calls/CallStories.test.tsx@@ -77,7 +77,7 @@ const playerTime = (container: HTMLElement) =>it('shows the full call record and seeks when a transcript line is clicked', () => {const view = render(() => <CallHeroDemo />);fireEvent.click(view.getByRole('button', { name: 'After the call' }));- expect(view.getByText('[email protected]')).toBeTruthy();+ expect(view.getByText('[email protected]')).toBeTruthy();expect(view.getByText('Summary')).toBeTruthy();expect(view.getByText('Recording')).toBeTruthy();expect(playerTime(view.container)).toBe('0:00 / 18:22');@@ -180,6 +180,18 @@ it('uses the call to reassign the existing task and add pending next steps', ()});it('starts a call from the channel header and shows everyone who joins', () => {+ vi.spyOn(HTMLElement.prototype, 'getBoundingClientRect').mockReturnValue({+ x: 0,+ y: 0,+ left: 0,+ top: 0,+ width: 800,+ height: 600,+ right: 800,+ bottom: 600,+ toJSON: () => ({}),+ });+const view = render(() => <CallStartDemo />);expect(view.getByRole('button', { name: 'Call' })).toBeTruthy();visible(true);@@ -395,11 +407,24 @@ it('does not expose an unshared recording to the absent teammate', () => {});it('uses the toolbar hang-up control and a cursor to walk through team memory', () => {+ vi.spyOn(HTMLElement.prototype, 'getBoundingClientRect').mockReturnValue({+ x: 0,+ y: 0,+ left: 0,+ top: 0,+ width: 800,+ height: 600,+ right: 800,+ bottom: 600,+ toJSON: () => ({}),+ });+const view = render(() => <CallTeamMemoryDemo />);expect(view.queryByRole('button', { name: 'End call' })).toBeNull();visible(true);vi.advanceTimersByTime(1900);- expect(view.container.querySelector('.call-memory-pointer')).toBeTruthy();+ const pointer = view.container.querySelector('.call-memory-pointer');+ expect(pointer).toBeTruthy();vi.advanceTimersByTime(9000);expect(playerTime(view.container)).toContain('1:02');expect(view.container.querySelector('.call-memory-pointer')).toBeNull();diff --git a/apps/marketing/src/features/marketing/components/calls/CallStories.tsx b/apps/marketing/src/features/marketing/components/calls/CallStories.tsxindex be6ca4944e..0e98041cbf 100644--- a/apps/marketing/src/features/marketing/components/calls/CallStories.tsx+++ b/apps/marketing/src/features/marketing/components/calls/CallStories.tsx@@ -493,6 +493,9 @@ export function CallFollowupDemo() {const w = createCallProject();w.open('tasks', 'invite');w.updateTask('invite', { steps: [], comments: [] });+ const initialInvite = {+ ...w.data.tasks.find((task) => task.id === 'invite')!,+ };const [tools, setTools] = createSignal(1);const [done, setDone] = createSignal(false);const [updated, setUpdated] = createSignal(false);@@ -551,7 +554,18 @@ export function CallFollowupDemo() {const playback = createProductWalkthrough({root: () => root,steps: 4,- reset: () => {},+ loop: { hold: 9000 },+ reset: () => {+ w.updateTask('invite', initialInvite);+ setTools(1);+ setDone(false);+ setUpdated(false);+ setOpen(true);+ setFollowups([]);+ setOpenedItem(undefined);+ sourcePlayer.pause();+ sourcePlayer.seek(0);+ },reduced: finish,delay: (step) => [0, 800, 800, 800, 1000][step] ?? 800,advance: (step) => {diff --git a/apps/marketing/src/features/marketing/components/calls/CallTeamMemoryDemo.tsx b/apps/marketing/src/features/marketing/components/calls/CallTeamMemoryDemo.tsxindex b569b5a72f..7eb145205b 100644--- a/apps/marketing/src/features/marketing/components/calls/CallTeamMemoryDemo.tsx+++ b/apps/marketing/src/features/marketing/components/calls/CallTeamMemoryDemo.tsx@@ -48,7 +48,18 @@ export function CallTeamMemoryDemo() {const playback = createProductWalkthrough({root: () => root,steps: 9,- reset: () => {},+ loop: { hold: 9000 },+ reset: () => {+ player.pause();+ player.seek(0);+ session.setJoined(true);+ setPhase(0);+ setShared(true);+ setQuery('');+ setAim(undefined);+ setClicking(false);+ setAutomatic(true);+ },delay: (step) =>[0, 1800, 600, 200, 1600, 600, 200, 3800, 600, 200][step] ?? 2000,reduced: () => {diff --git a/apps/marketing/src/features/marketing/components/calls/CallsComparison.tsx b/apps/marketing/src/features/marketing/components/calls/CallsComparison.tsxindex cda0716375..6c97f9f1c8 100644--- a/apps/marketing/src/features/marketing/components/calls/CallsComparison.tsx+++ b/apps/marketing/src/features/marketing/components/calls/CallsComparison.tsx@@ -1,36 +1,49 @@import type { FeatureComparison } from '../../core/feature-comparisons';import { FeatureComparisons } from '../comparisons/FeatureComparisons';-// Availability includes paid plans. Compare built-in tools, not integrations.+// Availability includes paid plans; Granola complements existing meeting apps.// Granola explicitly rules out audio/video playback in its feature-request docs.+// Macro uses Granola Get Note/List Notes through its connector catalog; this+// grants access to notes, not control of Granola’s capture UI. See+// docs/agent-guide/settings.md and docs/agent-guide/ai-chat.md.const comparisons: readonly FeatureComparison[] = [{id: 'google-meet',question: 'How does Macro compare with Google Meet?',competitor: 'Google Meet',rows: [- { feature: 'Video calls', macro: true, competitor: true },- { feature: 'Recording playback', macro: true, competitor: true },{- feature: 'Transcripts and AI summaries',+ feature: 'Recorded calls with searchable transcripts',macro: true,competitor: true,},+ { feature: 'Ask AI about past meetings', macro: true, competitor: true },{- feature: 'Calls, tasks, and docs in one app',+ feature: 'Create tasks and email drafts from a call',macro: true,- competitor: false,+ competitor: true,},{- feature: 'Agents update tasks and docs in the app',+ feature: 'Built-in CRM for customer follow-ups',macro: true,+ competitor: 'partial',+ competitorNote:+ 'Customer records and pipeline follow-ups use a connected CRM alongside Google Workspace.',+ },+ {+ feature: 'Capture notes in other meeting apps',+ macro: 'partial',+ macroNote:+ 'Granola captures the meeting. After connecting Granola, Macro agents can read its notes and transcripts; Macro does not record other meeting apps itself.',competitor: false,},],sources: ['https://docs.macro.com/product/calls',+ 'https://pipedream.com/apps/granola/integrations/slack-v2','https://docs.macro.com/product/agents','https://support.google.com/meet/answer/9308681',+ 'https://support.google.com/meet/answer/18481437','https://support.google.com/meet/answer/14754931','https://support.google.com/meet/answer/16024610',],@@ -40,26 +53,42 @@ const comparisons: readonly FeatureComparison[] = [question: 'How does Macro compare with Granola?',competitor: 'Granola',rows: [- { feature: 'Video calls', macro: true, competitor: false },- { feature: 'Recording playback', macro: true, competitor: false },{- feature: 'Transcripts and AI summaries',+ feature: 'Recorded calls with searchable transcripts',macro: true,- competitor: true,+ competitor: 'partial',+ competitorNote:+ 'Granola transcribes meetings and keeps notes, but does not retain audio or video recordings for playback.',},+ { feature: 'Ask AI about past meetings', macro: true, competitor: true },{- feature: 'Calls, tasks, and docs in one app',+ feature: 'Create tasks and email drafts from a call',macro: true,- competitor: false,+ competitor: 'partial',+ competitorNote:+ 'Granola supplies meeting context through MCP and integrations; tasks and email drafts are created in connected tools.',},{- feature: 'Agents update tasks and docs in the app',+ feature: 'Built-in CRM for customer follow-ups',macro: true,- competitor: false,+ competitor: 'partial',+ competitorNote:+ 'Granola sends meeting context to connected CRMs such as Attio and HubSpot; it is not itself a CRM.',+ },+ {+ feature: 'Capture notes in other meeting apps',+ macro: 'partial',+ macroNote:+ 'Granola captures the meeting. After connecting Granola, Macro agents can read its notes and transcripts; Macro does not record other meeting apps itself.',+ competitor: true,},],sources: ['https://docs.granola.ai/help-center/feature-requests',+ 'https://www.granola.ai/security',+ 'https://www.granola.ai/mcp',+ 'https://pipedream.com/apps/granola/integrations/slack-v2',+ 'https://www.granola.ai/integrations','https://docs.granola.ai/help-center/consent-security-privacy/security-privacy-data-faqs','https://docs.granola.ai/help-center/sharing/integrations/mcp',],@@ -67,5 +96,10 @@ const comparisons: readonly FeatureComparison[] = [];export function CallsComparison() {- return <FeatureComparisons comparisons={comparisons} />;+ return (+ <FeatureComparisons+ title="Compare Meeting Tools"+ comparisons={comparisons}+ />+ );}diff --git a/apps/marketing/src/features/marketing/components/calls/call-fixtures.ts b/apps/marketing/src/features/marketing/components/calls/call-fixtures.tsindex fb6f17b205..c1b99795d1 100644--- a/apps/marketing/src/features/marketing/components/calls/call-fixtures.ts+++ b/apps/marketing/src/features/marketing/components/calls/call-fixtures.ts@@ -4,7 +4,7 @@ import type { WorkspaceComment } from '../../core/dummy-workspace';export type CallPerson = 'jacob' | 'teo' | 'julia' | 'gabriel' | 'valentina';/** Participant pills show `idToEmail(userId)` in the app. */-export const callEmail = (person: CallPerson) => `${person}@macro.com`;+export const callEmail = (person: CallPerson) => `${person}@coparse.com`;export type CallSegment = {id: string;@@ -24,6 +24,8 @@ export type SampleCall = {/** Duration in seconds. */duration: number;people: CallPerson[];+ /** Optional addresses for page-owned sample participants. */+ participantEmails?: Partial<Record<CallPerson, string>>;summary: string;segments: CallSegment[];poster: CallPosterTile[];diff --git a/apps/marketing/src/features/marketing/components/calls/call-stories.css b/apps/marketing/src/features/marketing/components/calls/call-stories.cssindex 152d6c4bf1..4b464b88a2 100644--- a/apps/marketing/src/features/marketing/components/calls/call-stories.css+++ b/apps/marketing/src/features/marketing/components/calls/call-stories.css@@ -211,5 +211,5 @@.call-memory-sharing input { accent-color:var(--color-accent); }.call-team-memory { position:relative; }-.call-memory-pointer { position:absolute; top:0; left:0; z-index:12; pointer-events:none; transition:transform 480ms ease; }+.call-memory-pointer { position:absolute; top:0; left:0; z-index:12; pointer-events:none; }@media(prefers-reduced-motion:reduce) { .call-memory-pointer { display:none; } }diff --git a/apps/marketing/src/features/marketing/components/calls/demo-pointer.ts b/apps/marketing/src/features/marketing/components/calls/demo-pointer.tsindex 38653d90f3..603b3a093b 100644--- a/apps/marketing/src/features/marketing/components/calls/demo-pointer.ts+++ b/apps/marketing/src/features/marketing/components/calls/demo-pointer.ts@@ -1,42 +1 @@-import { createEffect, createSignal, onCleanup, onMount } from 'solid-js';--/**- * Positions a DemoCursor over the element a walkthrough step targets,- * measured relative to `frame` (the TaskCreationFlow approach).- */-export function createDemoPointer(options: {- frame: () => HTMLElement;- target: () => string | undefined;- active: () => boolean;-}) {- const [pointer, setPointer] = createSignal<{ x: number; y: number }>();- onMount(() => {- const position = () => {- const selector = options.target();- const frame = options.frame();- const target = selector- ? frame.querySelector<HTMLElement>(selector)- : undefined;- if (!options.active() || !target) {- setPointer(undefined);- return;- }- const bounds = target.getBoundingClientRect();- const parent = frame.getBoundingClientRect();- setPointer({- x: bounds.left - parent.left + Math.min(bounds.width / 2, 40),- y: bounds.top - parent.top + bounds.height / 2,- });- };- createEffect(() => {- options.target();- options.active();- const frame = requestAnimationFrame(position);- onCleanup(() => cancelAnimationFrame(frame));- });- const resize = new ResizeObserver(position);- resize.observe(options.frame());- onCleanup(() => resize.disconnect());- });- return pointer;-}+export { createDemoPointer } from '../../primitives/createDemoPointer';diff --git a/apps/marketing/src/features/marketing/components/channels/ChannelStories.test.tsx b/apps/marketing/src/features/marketing/components/channels/ChannelStories.test.tsxindex b28cee4a5b..6942940550 100644--- a/apps/marketing/src/features/marketing/components/channels/ChannelStories.test.tsx+++ b/apps/marketing/src/features/marketing/components/channels/ChannelStories.test.tsx@@ -25,6 +25,17 @@ beforeEach(() => {reduced = false;hidden = false;vi.useFakeTimers();+ vi.spyOn(HTMLElement.prototype, 'getBoundingClientRect').mockReturnValue({+ x: 0,+ y: 0,+ left: 0,+ top: 0,+ width: 800,+ height: 600,+ right: 800,+ bottom: 600,+ toJSON: () => ({}),+ });vi.stubGlobal('fetch', vi.fn());vi.spyOn(document, 'hidden', 'get').mockImplementation(() => hidden);vi.stubGlobal('matchMedia', () => ({@@ -125,11 +136,27 @@ it('shows multiple conversations without a navigation sidebar', () => {it('shows channel access in Share and retains the chosen permission after reopening', () => {const view = render(() => <ChannelPermissionsDemo />);+ expect(+ view.container.querySelector('[data-document-share]')?.textContent+ ).toContain('Share');visible(true);vi.advanceTimersByTime(1300);+ expect(view.container.querySelector('.channel-demo-cursor')).toBeTruthy();+ vi.advanceTimersByTime(600);+ expect(+ view.queryByRole('combobox', {+ name: 'Access for Julia, Teo, Gabriel +1 other',+ })+ ).toBeNull();+ advanceTo(() =>+ view.queryByRole('combobox', {+ name: 'Access for Julia, Teo, Gabriel +1 other',+ })+ );const access = view.getByRole('combobox', {name: 'Access for Julia, Teo, Gabriel +1 other',});+ fireEvent.pointerDown(access);expect((access as HTMLSelectElement).value).toBe('view');fireEvent.change(access, { target: { value: 'comment' } });fireEvent.click(view.getByRole('button', { name: 'Cancel' }));@@ -383,3 +410,73 @@ it('keeps document edits when email opens in a third split and closes only the sawait Promise.resolve();expect(view.container.querySelectorAll('.channel-work-item')).toHaveLength(0);});++function advanceTo(reached: () => unknown) {+ for (let elapsed = 0; elapsed < 30000 && !reached(); elapsed += 50)+ vi.advanceTimersByTime(50);+ expect(!!reached()).toBe(true);+}++it('types and selects the channel, grants access, then opens the delivered document', () => {+ const view = render(() => <ChannelPermissionsDemo />);+ visible(true);+ advanceTo(() => view.queryByRole('option', { name: /launch/ }));+ const input = view.getByRole<HTMLInputElement>('textbox', {+ name: 'Email or group',+ });+ expect(input.value).toBe('l');+ expect(view.queryByRole('button', { name: 'Open #launch' })).toBeNull();+ advanceTo(() => view.queryByRole('button', { name: 'Open #launch' }));+ expect(+ (+ view.getByRole('combobox', {+ name: 'Access for Julia, Teo, Gabriel +1 other',+ }) as HTMLSelectElement+ ).value+ ).toBe('view');+ advanceTo(() => view.queryByRole('log', { name: 'Channel launch' }));+ expect(+ view.getByText(/Please check your items before tomorrow/)+ ).toBeTruthy();+ expect(view.getByRole('button', { name: 'Launch checklist' })).toBeTruthy();+ advanceTo(() => view.queryByRole('region', { name: 'Shared work' }));+ expect(+ view.getByRole('textbox', { name: 'Document title' }).textContent+ ).toBe('Launch checklist');+ expect(+ view.getByRole('textbox', { name: 'Document body' }).textContent+ ).toContain('Final checks for tomorrow');+ vi.advanceTimersByTime(9500);+ expect(view.queryByRole('log', { name: 'Channel launch' })).toBeNull();+ expect(view.queryByRole('button', { name: 'Open #launch' })).toBeNull();+});++it('uses the same channel grant and delivery when a visitor shares manually', async () => {+ const view = render(() => <ChannelPermissionsDemo />);+ const share = view.getByRole('button', { name: 'Share' });+ fireEvent.pointerDown(share);+ fireEvent.click(share);+ const dialog = within(view.getByRole('dialog'));+ fireEvent.input(dialog.getByRole('textbox', { name: 'Email or group' }), {+ target: { value: 'launch' },+ });+ fireEvent.click(dialog.getByRole('option', { name: /launch/ }));+ await Promise.resolve();+ fireEvent.input(dialog.getByRole('textbox', { name: 'Optional message' }), {+ target: { value: 'Please review my changes.' },+ });+ fireEvent.click(dialog.getByRole('button', { name: /^Share/ }));+ expect(+ view.getByRole('combobox', {+ name: 'Access for Julia, Teo, Gabriel +1 other',+ })+ ).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Open #launch' }));+ expect(view.getByText(/Please review my changes/)).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Launch checklist' }));+ expect(+ view.getByRole('textbox', { name: 'Document title' }).textContent+ ).toBe('Launch checklist');+ vi.advanceTimersByTime(30000);+ expect(view.getByText(/Please review my changes/)).toBeTruthy();+});diff --git a/apps/marketing/src/features/marketing/components/channels/ChannelStories.tsx b/apps/marketing/src/features/marketing/components/channels/ChannelStories.tsxindex 54ade8cffb..599de17b45 100644--- a/apps/marketing/src/features/marketing/components/channels/ChannelStories.tsx+++ b/apps/marketing/src/features/marketing/components/channels/ChannelStories.tsx@@ -1,10 +1,14 @@-import { createEffect, createSignal, onCleanup, onMount, Show } from 'solid-js';+import { createSignal, onCleanup, onMount, Show } from 'solid-js';import { unwrap } from 'solid-js/store';import type { WorkspaceComment } from '../../core/dummy-workspace';+import { createDemoPointer } from '../../primitives/createDemoPointer';import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';+import { demoTypingActions } from '../../primitives/demoTypingActions';import {+ type DocumentShareHandle,DocumentShareSheet,LAUNCH_MEMBERS,+ type ShareLevel,} from '../documents/DocumentShareSheet';import { WorkspaceDocuments } from '../workspace/WorkspaceDocuments';import '../documents/document-stories.css';@@ -24,48 +28,6 @@ import {import '../workspace/dummy-workspace.css';import './channel-stories.css';-/** Measures `selector` inside `frame` and returns the cursor's tip position. */-function createCursorTarget(- frame: () => HTMLElement | undefined,- selector: () => string | undefined-) {- const [point, setPoint] = createSignal<{ x: number; y: number }>();- onMount(() => {- const measure = () => {- const root = frame();- const query = selector();- const target = query- ? root?.querySelector<HTMLElement>(query)- : undefined;- if (!root || !target) return setPoint(undefined);- const bounds = target.getBoundingClientRect();- const parent = root.getBoundingClientRect();- setPoint({- x: bounds.left - parent.left + Math.min(bounds.width / 2, 48),- y: bounds.top - parent.top + bounds.height / 2,- });- };- createEffect(() => {- selector();- const id = requestAnimationFrame(measure);- onCleanup(() => cancelAnimationFrame(id));- });- const observer = new ResizeObserver(measure);- const root = frame();- if (root) {- observer.observe(root);- const conversation = root.querySelector('.channel-work-conversation');- if (conversation) observer.observe(conversation);- root.addEventListener('scroll', measure, true);- }- onCleanup(() => {- observer.disconnect();- root?.removeEventListener('scroll', measure, true);- });- });- return point;-}-/** Full chat navigation makes the hero recognizable as a channel. */export function ChannelHero() {const w = createChannelHeroProject();@@ -87,11 +49,11 @@ export function ChannelHero() {export function ChannelSharedWorkDemo() {let root!: HTMLDivElement;let frame: HTMLDivElement | undefined;+ let resetSurface = () => {};const w = createChannelChecklist();const [aim, setAim] = createSignal<string>();const [clicking, setClicking] = createSignal(false);const [cursorVisible, setCursorVisible] = createSignal(false);- const [cursorOrigin, setCursorOrigin] = createSignal({ x: 0, y: 200 });const scrollToMessage = (id: string, smooth = true) => {const log = root?.querySelector<HTMLElement>('.channel-work-conversation [role="log"]'@@ -117,14 +79,20 @@ export function ChannelSharedWorkDemo() {)?.click();setClicking(false);- setCursorVisible(false);setAim(undefined);};const playback = createProductWalkthrough({root: () => root,visibilityThreshold: 0.5,steps: 9,- reset: () => {},+ loop: { hold: 8000 },+ reset: () => {+ resetSurface();+ setAim(undefined);+ setClicking(false);+ setCursorVisible(false);+ scrollToMessage('shared-plan', false);+ },reduced: () => {clickMention('shared-plan');clickMention('welcome');@@ -135,7 +103,7 @@ export function ChannelSharedWorkDemo() {advance: (step) => {if (step === 1) {scrollToMessage('shared-plan');- setCursorOrigin({ x: root.clientWidth * 0.68, y: 260 });+ setAim('shared-plan');setCursorVisible(true);}if (step === 2) setAim('shared-plan');@@ -148,7 +116,7 @@ export function ChannelSharedWorkDemo() {?.getAttribute('data-narrow') === 'true';if (narrow) setAim('close');else scrollToMessage('welcome');- setCursorOrigin({ x: Math.min(root.clientWidth * 0.7, 360), y: 180 });+setCursorVisible(true);}if (step === 6) {@@ -164,15 +132,16 @@ export function ChannelSharedWorkDemo() {if (step === 9) clickMention('welcome');},});- const pointer = createCursorTarget(- () => frame,- () =>+ const pointer = createDemoPointer({+ frame: () => frame,+ active: cursorVisible,+ target: () =>aim() === 'close'? '.channel-work-back': aim()? `[data-thread-id="${aim()}"] .sample-inline-reference`- : undefined- );+ : undefined,+ });return (<div ref={frame} class="channel-demo-frame"><ProductDemo@@ -187,15 +156,19 @@ export function ChannelSharedWorkDemo() {height={620}mobileHeight={600}>- <ChannelWorkSurface workspace={w} />+ <ChannelWorkSurface+ workspace={w}+ onReady={(reset) => {+ resetSurface = reset;+ }}+ /></ProductDemo>- <Show when={cursorVisible()}>+ <Show when={cursorVisible() && pointer()}><DemoCursor- label="Jacob"clicking={clicking()}class="channel-demo-cursor"style={{- transform: `translate(${(pointer() ?? cursorOrigin()).x}px, ${(pointer() ?? cursorOrigin()).y}px)`,+ transform: `translate(${pointer()!.x}px, ${pointer()!.y}px)`,}}/></Show>@@ -203,27 +176,163 @@ export function ChannelSharedWorkDemo() {);}-/** Show the actual channel grant in Share, with the document behind it. */+/** Share the file to #launch, show the grant, and open the delivered file. */export function ChannelPermissionsDemo() {let root!: HTMLDivElement;- let shareTrigger: HTMLButtonElement | undefined;+ let frame!: HTMLDivElement;+ let form: DocumentShareHandle | undefined;const w = createChannelChecklist();+ const initialMessages = structuredClone(+ unwrap(w.data.channels.find((channel) => channel.id === 'launch')!.messages)+ ).filter((message) => message.documentId !== 'plan');+ w.setData(+ 'channels',+ (channel) => channel.id === 'launch',+ 'messages',+ initialMessages+ );w.open('documents', 'plan');const [sharing, setSharing] = createSignal(false);const [manual, setManual] = createSignal(false);+ const [channelMode, setChannelMode] = createSignal(false);+ const [access, setAccess] = createSignal<ShareLevel>();+ const [sharedMessageId, setSharedMessageId] = createSignal('');+ const [target, setTarget] = createSignal<string>();+ const [clicking, setClicking] = createSignal(false);+ let shareCount = 0;+ const message = 'Please check your items before tomorrow.';+ const share = () => setSharing(true);+ const deliver = (body: string, permission: ShareLevel) => {+ setAccess(permission);+ const id = `channel-file-share-${++shareCount}`;+ setSharedMessageId(id);+ w.setData(+ 'channels',+ (channel) => channel.id === 'launch',+ 'messages',+ (all) => [+ ...all,+ {+ id,+ person: 'jacob' as const,+ time: '10:10 AM',+ body,+ documentId: 'plan',+ },+ ]+ );+ };+ const openChannel = () => {+ setSharing(false);+ w.open('messages', 'launch');+ w.setChannelThread(sharedMessageId());+ setChannelMode(true);+ if (manual())+ queueMicrotask(() =>+ root+ .querySelector<HTMLButtonElement>(+ `[data-thread-id="${sharedMessageId()}"] .sample-inline-reference`+ )+ ?.focus({ preventScroll: true })+ );+ };+ const approach = (selector: string) => {+ setClicking(false);+ setTarget(selector);+ };+ const click = (action: () => void) => {+ setClicking(true);+ action();+ };+ const actions = [+ { delay: 1200, run: () => approach('[data-document-share]') },+ { delay: 650, run: () => click(share) },+ { delay: 350, run: () => approach('[aria-label="Email or group"]') },+ { delay: 650, run: () => click(() => {}) },+ ...demoTypingActions(+ 'launch',+ (text) => {+ setClicking(false);+ form?.typeRecipient(text);+ },+ 250+ ),+ { delay: 500, run: () => approach('[data-share-channel-option]') },+ { delay: 650, run: () => click(() => form?.selectChannel()) },+ { delay: 350, run: () => approach('[aria-label="Optional message"]') },+ { delay: 650, run: () => click(() => {}) },+ ...demoTypingActions(+ message,+ (text) => {+ setClicking(false);+ form?.typeMessage(text);+ },+ 250+ ),+ { delay: 700, run: () => approach('[data-share-submit]') },+ { delay: 650, run: () => click(() => form?.share()) },+ { delay: 1800, run: () => approach('[data-open-shared-channel]') },+ { delay: 650, run: () => click(openChannel) },+ {+ delay: 1800,+ run: () =>+ approach(+ `[data-thread-id="${sharedMessageId()}"] .sample-inline-reference`+ ),+ },+ {+ delay: 650,+ run: () =>+ click(() =>+ root+ .querySelector<HTMLButtonElement>(+ `[data-thread-id="${sharedMessageId()}"] .sample-inline-reference`+ )+ ?.click()+ ),+ },+ { delay: 400, run: () => setClicking(false) },+ ];const playback = createProductWalkthrough({root: () => root,- steps: 1,- reset: () => {},- reduced: () => setSharing(true),- delay: () => 1200,- advance: () => setSharing(true),+ steps: actions.length,+ loop: { hold: 9000 },+ reset: () => {+ setSharing(false);+ setChannelMode(false);+ setAccess(undefined);+ setTarget(undefined);+ setClicking(false);+ setManual(false);+ setSharedMessageId('');+ shareCount = 0;+ form?.reset();+ w.setData(+ 'channels',+ (channel) => channel.id === 'launch',+ 'messages',+ structuredClone(initialMessages)+ );+ w.setChannelThread(undefined);+ w.open('documents', 'plan');+ },+ reduced: () => {+ deliver(message, 'view');+ openChannel();+ },+ delay: (step) => actions[step - 1].delay,+ advance: (step) => actions[step - 1].run(),+ });+ const pointer = createDemoPointer({+ frame: () => frame,+ target,+ active: () => !manual(),});return (- <div class="channel-permissions-demo">+ <div ref={frame} class="channel-permissions-demo channel-demo-frame"><ProductDemoref={(el) => (root = el)}- label="The document is shared with the channel"+ label="Share a document with everyone in a channel"height={610}mobileHeight={660}onInteract={() => {@@ -231,29 +340,59 @@ export function ChannelPermissionsDemo() {playback.pause();}}>- <WorkspaceDocuments- sharingDescription="Shared with #launch"- workspace={w}- onShare={() => {- shareTrigger = [- ...root.querySelectorAll<HTMLButtonElement>(- '[data-view-shell-top-bar] button'- ),- ].find((button) => button.textContent?.trim() === 'Share');- setSharing(true);- }}- />+ <Show+ when={channelMode()}+ fallback={+ <WorkspaceDocuments+ sharingDescription={+ access() ? 'Shared with #launch' : 'Only you have access'+ }+ workspace={w}+ onShare={share}+ />+ }+ >+ <ChannelWorkSurface workspace={w} />+ </Show><DocumentShareSheetopen={sharing()}autoFocus={manual()}title={w.data.documents.find((doc) => doc.id === 'plan')?.title ?? ''}- channel={{ members: LAUNCH_MEMBERS, level: 'view' }}+ channel={+ access()+ ? {+ name: 'launch',+ members: LAUNCH_MEMBERS,+ level: access()!,+ fresh: !manual(),+ }+ : undefined+ }+ channelDestination="launch"+ initialPermission="view"+ onShareChannel={deliver}+ onOpenChannel={openChannel}+ onReady={(handle) => {+ form = handle;+ }}onClose={() => {setSharing(false);- shareTrigger?.focus({ preventScroll: true });+ if (manual())+ root+ .querySelector<HTMLButtonElement>('[data-document-share]')+ ?.focus({ preventScroll: true });}}/></ProductDemo>+ <Show when={pointer()}>+ {(point) => (+ <DemoCursor+ class="channel-demo-cursor"+ clicking={clicking()}+ style={{ transform: `translate(${point().x}px, ${point().y}px)` }}+ />+ )}+ </Show></div>);}@@ -356,6 +495,8 @@ export function ChannelAgentDemo() {const [sessionOpen, setSessionOpen] = createSignal(false);let root!: HTMLDivElement;const w = createChannelProject();+ const initialTasks = structuredClone(unwrap(w.data.tasks));+ let resetSurface = () => {};const initial = [...structuredClone(channelHistory.slice(10)),{@@ -452,7 +593,17 @@ export function ChannelAgentDemo() {root: () => root,visibilityThreshold: 0.5,steps: 3,- reset: () => {},+ loop: { hold: 8500 },+ reset: () => {+ resetSurface();+ w.setData('tasks', structuredClone(initialTasks));+ w.setData('channels', (channel) => channel.id === 'launch', 'messages', [+ ...initial,+ ]);+ w.setChannelThread(undefined);+ const log = root.querySelector('[role="log"]');+ if (log) log.scrollTop = log.scrollHeight;+ },reduced: () => {createFollowUp();bringCursor();@@ -478,6 +629,9 @@ export function ChannelAgentDemo() {fallback={<ChannelWorkSurfaceworkspace={w}+ onReady={(reset) => {+ resetSurface = reset;+ }}renderMessageDetails={(message) =>message.id === 'cursor-finding' ? (<DemoAgentChipdiff --git a/apps/marketing/src/features/marketing/components/channels/ChannelWorkSurface.tsx b/apps/marketing/src/features/marketing/components/channels/ChannelWorkSurface.tsxindex 2ab817ee35..777a7104c2 100644--- a/apps/marketing/src/features/marketing/components/channels/ChannelWorkSurface.tsx+++ b/apps/marketing/src/features/marketing/components/channels/ChannelWorkSurface.tsx@@ -177,6 +177,7 @@ function ChannelWorkPane(props: {export function ChannelWorkSurface(props: {workspace: DummyWorkspace;renderMessageDetails?: (message: WorkspaceComment) => JSX.Element;+ onReady?: (reset: () => void) => void;}) {const w = props.workspace;let root!: HTMLDivElement;@@ -185,6 +186,12 @@ export function ChannelWorkSurface(props: {const [active, setActive] = createSignal<string>();const closeButtons = new Map<string, HTMLButtonElement>();const triggers = new Map<string, HTMLElement>();+ props.onReady?.(() => {+ setPanes([]);+ setActive(undefined);+ closeButtons.clear();+ triggers.clear();+ });const narrow = () => width() < 480 || width() / (panes().length + 1) < 240;const navigate = (view: WorkspaceView, id?: string) => {if (view === 'messages' || view === 'home') {diff --git a/apps/marketing/src/features/marketing/components/channels/channel-stories.css b/apps/marketing/src/features/marketing/components/channels/channel-stories.cssindex e111edf867..4ff1fb63d3 100644--- a/apps/marketing/src/features/marketing/components/channels/channel-stories.css+++ b/apps/marketing/src/features/marketing/components/channels/channel-stories.css@@ -1,5 +1,5 @@.channel-demo-frame { position: relative; }-.channel-demo-cursor { z-index: 9; transition: transform 600ms cubic-bezier(.2,.8,.2,1); }+.channel-demo-cursor { z-index: 9; }/* features/home on desktop: a ViewSidebar with a Home header, New chat, and date groups. */.chat-inbox-scene { outline: none; }diff --git a/apps/marketing/src/features/marketing/components/comparisons/FeatureComparisons.test.tsx b/apps/marketing/src/features/marketing/components/comparisons/FeatureComparisons.test.tsxindex 71e21f830b..e4e4fb9270 100644--- a/apps/marketing/src/features/marketing/components/comparisons/FeatureComparisons.test.tsx+++ b/apps/marketing/src/features/marketing/components/comparisons/FeatureComparisons.test.tsx@@ -2,24 +2,41 @@ import { cleanup, render, within } from '@solidjs/testing-library';import { afterEach, expect, it } from 'vitest';import { setViewportWidth } from '../../../../app/utils/utilBreakpoint';import {+ documentComparisons,emailComparisons,taskComparisons,} from '../../core/feature-comparisons';+import { CallsComparison } from '../calls/CallsComparison';+import { CrmComparison } from '../crm/CrmComparison';import { FeatureComparisons } from './FeatureComparisons';afterEach(cleanup);-it('shows one table with all email competitors and no disclosure or heading', () => {+it('shows one table with all email competitors with a heading and no disclosure', () => {setViewportWidth(1440);const view = render(() => (- <FeatureComparisons comparisons={emailComparisons} />+ <FeatureComparisons+ title="Compare Email Clients"+ comparisons={emailComparisons}+ />));const table = view.getByRole('region', { name: 'Compare Macro' });expect(view.container.querySelector('details')).toBeNull();- expect(view.queryByRole('heading')).toBeNull();+ expect(+ view.getByRole('heading', { name: 'Compare Email Clients', level: 2 })+ ).toBeTruthy();expect(within(table).getByText('Superhuman Mail')).toBeTruthy();expect(within(table).getByText('Gmail')).toBeTruthy();- expect(within(table).getAllByText('Keyboard shortcuts')).toHaveLength(1);+ let accountCell = within(table).getByText(+ 'Manage multiple email accounts'+ ).nextElementSibling;+ for (let index = 0; index < 3; index++) {+ expect(accountCell?.querySelector('[aria-label="Yes"]')).toBeTruthy();+ accountCell = accountCell?.nextElementSibling ?? null;+ }+ expect(+ within(table).getAllByText('Keyboard navigation and command menu')+ ).toHaveLength(1);expect(within(table).getAllByRole('img', { name: 'Yes' }).length).toBeGreaterThan(0);@@ -31,7 +48,10 @@ it('shows one table with all email competitors and no disclosure or heading', ()it('combines Linear and Jira in one mobile-scrollable table', () => {setViewportWidth(390);const view = render(() => (- <FeatureComparisons comparisons={taskComparisons} />+ <FeatureComparisons+ title="Compare Task Managers"+ comparisons={taskComparisons}+ />));const table = view.getByRole('region', { name: 'Compare Macro' });expect(within(table).getByText('Linear')).toBeTruthy();@@ -41,3 +61,106 @@ it('combines Linear and Jira in one mobile-scrollable table', () => {expect(view.container.querySelector('#compare-linear')).toBeTruthy();expect(view.container.querySelector('#compare-jira')).toBeTruthy();});++it('credits shared CRM capabilities and competitors’ dedicated reporting', () => {+ setViewportWidth(390);+ const view = render(() => <CrmComparison />);+ expect(+ view.getByRole('heading', { name: 'Compare CRMs', level: 2 })+ ).toBeTruthy();+ const table = view.getByRole('region', { name: 'Compare Macro' });+ expect(view.container.querySelector('details')).toBeNull();+ expect(within(table).getByText('Features')).toBeTruthy();+ expect(table.querySelector('[title$="logo placeholder"]')).toBeNull();+ for (const label of ['Macro', 'Salesforce', 'HubSpot', 'Attio']) {+ expect(within(table).getByText(label)).toBeTruthy();+ }+ const contacts = within(table).getByText('Sales pipelines and custom fields');+ let cell = contacts.nextElementSibling;+ for (let index = 0; index < 4; index++) {+ expect(cell?.querySelector('[aria-label="Yes"]')).toBeTruthy();+ cell = cell?.nextElementSibling ?? null;+ }+ const reports = within(table).getByText('Sales reporting');+ cell = reports.nextElementSibling;+ expect(+ cell+ ?.querySelector('[aria-label="Partial"]')+ ?.getAttribute('aria-description')+ ).toContain('no dedicated sales reporting dashboard');+ for (let index = 0; index < 3; index++) {+ cell = cell?.nextElementSibling ?? null;+ expect(cell?.querySelector('[aria-label="Yes"]')).toBeTruthy();+ }+ expect(view.getByText('Partial')).toBeTruthy();+ expect(view.queryByText('Not included')).toBeNull();+ expect(table.tabIndex).toBe(0);+ expect(table.style.overflowX).toBe('auto');+ expect(view.queryByText(/Includes paid features/)).toBeNull();+});++it('explains Gmail’s partial keyboard workflow without denying its shortcuts', () => {+ setViewportWidth(1440);+ const view = render(() => (+ <FeatureComparisons+ title="Compare Email Clients"+ comparisons={emailComparisons}+ />+ ));+ const keyboard = view.getByText('Keyboard navigation and command menu');+ const gmail =+ keyboard.nextElementSibling?.nextElementSibling?.nextElementSibling;+ expect(+ gmail+ ?.querySelector('[aria-label="Partial"]')+ ?.getAttribute('aria-description')+ ).toContain('Gmail supports navigation and action shortcuts');+});++it('credits Notion’s task and CRM databases while explaining the setup difference', () => {+ setViewportWidth(1440);+ const view = render(() => (+ <FeatureComparisons+ title="Compare Workspaces"+ comparisons={documentComparisons}+ />+ ));+ const task = view.getByText('Dedicated task manager');+ const crm = view.getByText('Dedicated CRM');+ const taskMark = task.nextElementSibling?.nextElementSibling?.querySelector(+ '[aria-label="Partial"]'+ );+ const crmMark = crm.nextElementSibling?.nextElementSibling?.querySelector(+ '[aria-label="Partial"]'+ );+ expect(taskMark?.getAttribute('aria-description')).toContain(+ 'task databases, My tasks, and sprints'+ );+ expect(crmMark?.getAttribute('aria-description')).toContain(+ 'databases and templates'+ );+ const collaboration = view.getByText('Live document collaboration');+ expect(+ collaboration.nextElementSibling?.nextElementSibling?.querySelector(+ '[aria-label="Yes"]'+ )+ ).toBeTruthy();+});++it('credits connected Granola notes without claiming native external-meeting capture', () => {+ setViewportWidth(1440);+ const view = render(() => <CallsComparison />);+ const row = view.getByText('Capture notes in other meeting apps');+ const macro = row.nextElementSibling?.querySelector('[aria-label="Partial"]');+ expect(macro?.getAttribute('aria-description')).toContain(+ 'Granola captures the meeting'+ );+ expect(macro?.getAttribute('aria-description')).toContain(+ 'does not record other meeting apps itself'+ );+ expect(+ row.nextElementSibling?.nextElementSibling?.nextElementSibling?.querySelector(+ '[aria-label="Yes"]'+ )+ ).toBeTruthy();+});diff --git a/apps/marketing/src/features/marketing/components/comparisons/FeatureComparisons.tsx b/apps/marketing/src/features/marketing/components/comparisons/FeatureComparisons.tsxindex 88445c35c3..12399eeb92 100644--- a/apps/marketing/src/features/marketing/components/comparisons/FeatureComparisons.tsx+++ b/apps/marketing/src/features/marketing/components/comparisons/FeatureComparisons.tsx@@ -1,30 +1,17 @@-import { For, onCleanup, onMount } from 'solid-js';+import MacroLogo from '@icon/macro-logo.svg';+import { For, onCleanup, onMount, Show } from 'solid-js';import {CheckMark,- type ComparisonColumn,ComparisonTable,CrossMark,+ PartialMark,} from '../../../../app/components/sections/ComparisonTable';-import Gmail from '../../../../assets/icons/logo-gmail.svg';-import Jira from '../../../../assets/icons/logo-jira.svg';-import Linear from '../../../../assets/icons/logo-linear.svg';-import Notion from '../../../../assets/icons/logo-notion.svg';-import Slack from '../../../../assets/icons/logo-slack.svg';-import Superhuman from '../../../../assets/icons/logo-superhuman.svg';import type { FeatureComparison } from '../../core/feature-comparisons';import './feature-comparisons.css';-const logos: Record<string, ComparisonColumn['logo']> = {- gmail: Gmail,- jira: Jira,- linear: Linear,- notion: Notion,- slack: Slack,- superhuman: Superhuman,-};-/** One visible table per page, with competitors side by side. */export function FeatureComparisons(props: {+ title: string;comparisons: readonly FeatureComparison[];}) {let container!: HTMLDivElement;@@ -37,6 +24,15 @@ export function FeatureComparisons(props: {).map((row) => ({feature: row.feature,+ cellNotes: [+ row.macroNote,+ ...props.comparisons.map(+ (comparison) =>+ comparison.rows.find(+ (candidate) => candidate.feature === row.feature+ )?.competitorNote+ ),+ ],cells: [row.macro,...props.comparisons.map(@@ -69,7 +65,7 @@ export function FeatureComparisons(props: {});});return (- <div ref={container} class="feature-page-reading feature-comparisons">+ <div ref={container} class="feature-comparisons"><For each={props.comparisons}>{(comparison) => (<span@@ -78,28 +74,52 @@ export function FeatureComparisons(props: {/>)}</For>+ <h2 class="feature-comparison-heading">{props.title}</h2><ComparisonTable+ presentation="framed"columns={[- { label: 'Macro', macro: true },+ { label: 'Macro', macro: true, icon: <ComparisonMacroLogo /> },...props.comparisons.map((comparison) => ({label: comparison.competitor,- logo: logos[comparison.id],})),]}rows={rows()}sortRows={false}- mobileCellWidth={100}- mobileMinWidth={props.comparisons.length > 1 ? 520 : 390}+ mobileCellWidth={110}+ mobileMinWidth={240 + (props.comparisons.length + 1) * 110}scrollLabel="Compare Macro"/>- <div class="feature-comparison-key">+ <FeatureComparisonKey+ partial={rows().some((row) => row.cells.includes('partial'))}+ unavailable={rows().some((row) => row.cells.includes(false))}+ />+ </div>+ );+}++export function ComparisonMacroLogo() {+ return <MacroLogo class="feature-comparison-macro-logo" aria-hidden="true" />;+}++function FeatureComparisonKey(props: {+ partial: boolean;+ unavailable: boolean;+}) {+ return (+ <div class="feature-comparison-key">+ <span>+ <CheckMark /> Available+ </span>+ <Show when={props.partial}><span>- <CheckMark /> Available+ <PartialMark /> Partial</span>+ </Show>+ <Show when={props.unavailable}><span>- <CrossMark /> Not offered as a built-in tool+ <CrossMark /> Not included</span>- </div>+ </Show></div>);}diff --git a/apps/marketing/src/features/marketing/components/comparisons/feature-comparisons.css b/apps/marketing/src/features/marketing/components/comparisons/feature-comparisons.cssindex fcfb50c5c5..77778958b0 100644--- a/apps/marketing/src/features/marketing/components/comparisons/feature-comparisons.css+++ b/apps/marketing/src/features/marketing/components/comparisons/feature-comparisons.css@@ -1,6 +1,67 @@-.feature-comparisons { position: relative; display: grid; gap: 20px; scroll-margin-top: 112px; }+.feature-page .feature-comparisons {+ --comparison-header-bg: color-mix(in srgb, var(--color-ink) 5%, var(--b0));+ --comparison-header-size: 17px;+ --comparison-header-padding: 24px 16px;+ --comparison-row-size: 15px;+ --comparison-label-padding: 20px 24px;+ --comparison-cell-padding: 20px 16px;++ --comparison-accent: var(--color-ink);+ --comparison-macro-case: none;+ --comparison-partial-height: 2px;+ position: relative;+ display: grid;+ gap: 20px;+ width: min(1160px, calc(100vw - 80px));+ max-width: none;+ margin-block: var(--feature-section-space, 96px) 72px;+ margin-inline: calc((100% - min(1160px, 100vw - 80px)) / 2);+ padding: 0;+ scroll-margin-top: 112px;+}.feature-comparison-anchor { position: absolute; top: 0; scroll-margin-top: 112px; }.feature-comparisons .comparison-table-scroll { max-width: 100%; }-.feature-comparison-key { display: flex; flex-wrap: wrap; gap: 10px 24px; color: #a3a3a3; font-size: 12px; line-height: 1.5; }+.feature-comparison-macro-logo { width: 24px; height: 24px; flex: none; display: block; color: var(--comparison-accent); }+.feature-comparison-key { display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--color-ink-muted); font-size: 12px; line-height: 1.5; }.feature-comparison-key > span { display: inline-flex; gap: 8px; align-items: center; }.feature-comparison-key svg { flex: none; }+.feature-comparisons .comparison-table-scroll svg { filter: grayscale(1); }+@media (max-width: 799px) {+ .feature-page .feature-comparisons { width: calc(100% - 36px); margin-inline: auto; margin-bottom: 48px; }+}+@media (max-width: 699px) {+ .feature-page .product-page .feature-comparisons { width: 100%; }+}++++.feature-comparisons .feature-comparison-heading {+ margin-bottom: 8px;+ font-size: clamp(28px, 2.5vw, 36px);+ line-height: 1.2;+ letter-spacing: -.035em;+}+.feature-comparisons .comparison-table-scroll {+ border: 1px solid color-mix(in srgb, var(--color-ink) 12%, transparent);+ border-radius: 16px;+ overflow: hidden;+}+.feature-comparisons .comparison-feature-label {+ display: flex;+ align-items: center;+ padding: var(--comparison-header-padding);+ padding-left: 24px;+ font-size: var(--comparison-header-size);+ color: var(--color-ink-muted);+}+.comparison-inline-brand { display: inline-flex; align-items: center; gap: 9px; }+@media (max-width: 699px) {+ .feature-page .feature-comparisons {+ --comparison-header-size: 14px;+ --comparison-header-padding: 20px 12px;+ --comparison-row-size: 13px;+ --comparison-label-padding: 16px;+ --comparison-cell-padding: 16px 12px;+ }+ .feature-comparisons .comparison-feature-label { padding-left: 16px; position: sticky; left: 0; z-index: 2; }+}diff --git a/apps/marketing/src/features/marketing/components/crm/CompanyPipelineEntry.tsx b/apps/marketing/src/features/marketing/components/crm/CompanyPipelineEntry.tsxnew file mode 100644index 0000000000..33069a885e--- /dev/null+++ b/apps/marketing/src/features/marketing/components/crm/CompanyPipelineEntry.tsx@@ -0,0 +1,165 @@+import ArrowUpRight from '@phosphor/arrow-up-right.svg';+import CaretDown from '@phosphor/caret-down.svg';+import Currency from '@phosphor/currency-dollar.svg';+import Table from '@phosphor/table.svg';+import Users from '@phosphor/users.svg';+import { Button, Dropdown } from '@ui';+import { createSignal, For, Show } from 'solid-js';+import {+ type HomepagePersonId,+ homepagePeople,+} from '../../core/homepage-demo-people';+import { type DealStage, dealStages } from '../../core/workspace-fixtures';+import { StageIcon } from '../workspace/CompanyRecord';+import './company-pipeline-entry.css';++type PipelineValues = {+ stage: DealStage;+ owner: HomepagePersonId | '';+ revenue: string;+};+const owners = ['jacob', 'julia', 'teo', 'gabriel'] as const;++/** Frozen crm/components/pipeline-entry-cards: the deal stays separate from company properties. */+export function CompanyPipelineEntry(props: {+ name?: string;+ stages?: readonly DealStage[];+ value: PipelineValues;+ onChange: (patch: Partial<PipelineValues>) => void;+ onOpen?: () => void;+}) {+ const [expanded, setExpanded] = createSignal(true);+ return (+ <section class="sample-pipeline-entries" aria-label="Pipelines">+ <button+ class="sample-pipeline-toggle"+ aria-expanded={expanded()}+ onClick={() => setExpanded(!expanded())}+ >+ <CaretDown+ class="size-3"+ style={{ transform: expanded() ? undefined : 'rotate(-90deg)' }}+ />+ Pipelines+ </button>+ <Show when={expanded()}>+ <article+ class="sample-pipeline-entry"+ aria-label={`${props.name ?? 'Sales pipeline'} entry`}+ >+ <header>+ <Table class="size-4" />+ <span>{props.name ?? 'Sales pipeline'}</span>+ <Show when={props.onOpen}>+ <Button+ size="icon-sm"+ variant="ghost"+ label={`Open ${props.name ?? 'Sales pipeline'}`}+ onClick={() => props.onOpen?.()}+ >+ <ArrowUpRight />+ </Button>+ </Show>+ </header>+ <div class="sample-pipeline-entry-fields">+ <div>+ <span class="sample-pipeline-field-label">+ <StageIcon stage={props.value.stage} /> Stage+ </span>+ <Dropdown modal={false}>+ <Dropdown.Trigger+ variant="plain"+ size="sm"+ aria-label="Change Stage"+ data-company-property="stage"+ >+ <StageIcon stage={props.value.stage} />+ {props.value.stage}+ <CaretDown class="size-3" />+ </Dropdown.Trigger>+ <Dropdown.Content portalScope="local">+ <Dropdown.Group>+ <For each={props.stages ?? dealStages}>+ {(stage) => (+ <Dropdown.Item+ onSelect={() => props.onChange({ stage })}+ >+ <StageIcon stage={stage} />+ {stage}+ </Dropdown.Item>+ )}+ </For>+ </Dropdown.Group>+ </Dropdown.Content>+ </Dropdown>+ </div>+ <div>+ <span class="sample-pipeline-field-label">+ <Users class="size-3" /> Owner+ </span>+ <Dropdown modal={false}>+ <Dropdown.Trigger+ variant="plain"+ size="sm"+ aria-label="Change Owner"+ data-company-property="owner"+ >+ <Show+ when={+ props.value.owner+ ? homepagePeople[props.value.owner]+ : undefined+ }+ fallback="Empty"+ >+ {(person) => (+ <>+ <img src={person().photo} alt="" />+ {person().shortName}+ </>+ )}+ </Show>+ <CaretDown class="size-3" />+ </Dropdown.Trigger>+ <Dropdown.Content portalScope="local">+ <Dropdown.Group>+ <For each={owners}>+ {(owner) => (+ <Dropdown.Item+ onSelect={() => props.onChange({ owner })}+ >+ {homepagePeople[owner].name}+ </Dropdown.Item>+ )}+ </For>+ </Dropdown.Group>+ </Dropdown.Content>+ </Dropdown>+ </div>+ <div>+ <span class="sample-pipeline-field-label">+ {' '}+ <Currency class="size-3" /> Revenue+ </span>+ <input+ aria-label="Pipeline revenue"+ inputMode="decimal"+ value={props.value.revenue}+ placeholder="Empty"+ onChange={(event) => {+ const value = event.currentTarget.value.replace(+ /[$,\s]/g,+ ''+ );+ if (value === '' || /^\d+(\.\d{0,2})?$/.test(value))+ props.onChange({ revenue: value });+ else event.currentTarget.value = props.value.revenue;+ }}+ />+ </div>+ </div>+ </article>+ </Show>+ </section>+ );+}diff --git a/apps/marketing/src/features/marketing/components/crm/CrmCaptureDemo.test.tsx b/apps/marketing/src/features/marketing/components/crm/CrmCaptureDemo.test.tsxindex 6135fc1113..d8a7462fd5 100644--- a/apps/marketing/src/features/marketing/components/crm/CrmCaptureDemo.test.tsx+++ b/apps/marketing/src/features/marketing/components/crm/CrmCaptureDemo.test.tsx@@ -57,33 +57,47 @@ const stage = (view: ReturnType<typeof render>) =>const owner = (view: ReturnType<typeof render>) =>view.getByRole('button', { name: 'Change Owner' }).textContent;-it('lets Claude set the stage and owner, then answer in the Discussion thread', () => {+it('types the request before sending, acknowledges it, updates the record, then confirms and loops', () => {const view = render(() => <CrmCaptureDemo />);- expect(view.getByText(/just got off a call with Dana/)).toBeTruthy();- expect(stage(view)).toContain('Lead');- expect(owner(view)).toContain('Empty');+ const input = view.getByRole('textbox', { name: 'Comment on company' });+ expect(input.textContent).toBe('');vi.advanceTimersByTime(10000);- expect(stage(view)).toContain('Lead');+ expect(input.textContent).toBe('');visible(true);- vi.advanceTimersByTime(1900);- expect(stage(view)).toContain('Demo');- expect(owner(view)).toContain('Empty');+ vi.advanceTimersByTime(1500);+ expect(input.textContent).toBe('@Claud');+ expect(view.queryByText(/I’ll update the stage/)).toBeNull();visible(false);+ const draft = input.textContent;vi.advanceTimersByTime(10000);- expect(owner(view)).toContain('Empty');+ expect(input.textContent).toBe(draft);visible(true);- vi.advanceTimersByTime(1900);+ // Observe each actual transition, including the acknowledgment before updates.+ for (+ let elapsed = 0;+ elapsed < 20000 && !view.queryByText(/I’ll update the stage/);+ elapsed += 100+ )+ vi.advanceTimersByTime(100);+ expect(view.getByText(/I’ll update the stage/)).toBeTruthy();+ expect(input.textContent).toBe('');+ expect(view.getByText('@Claude')).toBeTruthy();+ expect(stage(view)).toContain('Lead');+ expect(owner(view)).toContain('Empty');+ vi.advanceTimersByTime(1400);+ expect(stage(view)).toContain('Demo');+ expect(owner(view)).toContain('Empty');+ vi.advanceTimersByTime(1400);expect(owner(view)).toContain('Jacob');- expect(view.queryByText(/The Meadow is in Demo/)).toBeNull();- vi.advanceTimersByTime(1900);- const thread = view.container.querySelector<HTMLElement>(- '[data-thread-id="capture-request"]'- );- expect(- within(thread!).getByText(/The Meadow is in Demo and you’re the owner/)- ).toBeTruthy();- expect(within(thread!).getByText('Agent')).toBeTruthy();+ expect(view.queryByText(/Done. Parlor Studio/)).toBeNull();+ vi.advanceTimersByTime(1400);+ expect(view.getByText(/Done. Parlor Studio/)).toBeTruthy();expect(view.container.querySelector('.demo-cursor')).toBeNull();+ vi.advanceTimersByTime(8000);+ expect(stage(view)).toContain('Lead');+ expect(owner(view)).toContain('Empty');+ expect(input.textContent).toBe('');+ expect(view.queryByText(/Done. Parlor Studio/)).toBeNull();});it('stops the walkthrough when a visitor takes over the record', () => {@@ -92,13 +106,13 @@ it('stops the walkthrough when a visitor takes over the record', () => {vi.advanceTimersByTime(900);fireEvent.pointerDown(view.getByRole('group', {- name: 'Claude updates The Meadow from a comment in its Discussion',+ name: 'Claude updates Parlor Studio from a comment in its Discussion',}));vi.advanceTimersByTime(20000);expect(stage(view)).toContain('Lead');expect(owner(view)).toContain('Empty');- expect(view.queryByText(/The Meadow is in Demo/)).toBeNull();+ expect(view.queryByText(/Parlor Studio is in Demo/)).toBeNull();expect(view.container.querySelector('.demo-cursor')).toBeNull();});@@ -107,20 +121,19 @@ it('shows the updated record and the reply at once with reduced motion', () => {const view = render(() => <CrmCaptureDemo />);expect(stage(view)).toContain('Demo');expect(owner(view)).toContain('Jacob');- expect(view.getByText(/The Meadow is in Demo/)).toBeTruthy();+ expect(view.getByText(/Parlor Studio is in Demo/)).toBeTruthy();expect(view.container.querySelector('.demo-cursor')).toBeNull();});it('posts a visitor’s comment and thread reply in the company Discussion', () => {const view = render(() => <CrmCaptureDemo />);const comment = view.getByRole('textbox', { name: 'Comment on company' });- expect(comment.getAttribute('placeholder')).toBe('Leave a comment...');- fireEvent.input(comment, { target: { value: 'Dana confirmed 12 seats.' } });+ expect(comment.getAttribute('data-placeholder')).toBe('Leave a comment...');+ comment.textContent = 'Ava confirmed 12 seats.';+ fireEvent.input(comment);fireEvent.keyDown(comment, { key: 'Enter' });- expect(view.getByText('Dana confirmed 12 seats.')).toBeTruthy();- const thread = view.container.querySelector<HTMLElement>(- '[data-thread-id="capture-request"]'- );+ expect(view.getByText('Ava confirmed 12 seats.')).toBeTruthy();+ const thread = view.container.querySelector<HTMLElement>('[data-thread-id]');fireEvent.click(within(thread!).getByRole('button', { name: 'Reply' }));const reply = view.getByRole('textbox', { name: 'Thread reply' });expect(reply.getAttribute('placeholder')).toBe('Send a reply');@@ -128,3 +141,39 @@ it('posts a visitor’s comment and thread reply in the company Discussion', ()fireEvent.keyDown(reply, { key: 'Enter' });expect(within(thread!).getByText('On it.')).toBeTruthy();});++it('preserves a visitor’s edit in the middle of the typed CRM request', () => {+ const view = render(() => <CrmCaptureDemo />);+ visible(true);+ vi.advanceTimersByTime(2000);+ const input = view.getByRole<HTMLElement>('textbox', {+ name: 'Comment on company',+ });+ expect(input.textContent?.startsWith('@Claude')).toBe(true);+ expect(input.textContent?.includes('rollout')).toBe(false);+ fireEvent.pointerDown(input);+ input.textContent = 'Keep my own request.';+ fireEvent.input(input);+ vi.advanceTimersByTime(30000);+ expect(input.textContent).toBe('Keep my own request.');+ expect(stage(view)).toContain('Lead');+});++it('renders Claude as a stable inline mention while the request is still being typed', () => {+ const view = render(() => <CrmCaptureDemo />);+ visible(true);+ vi.advanceTimersByTime(2000);+ const input = view.getByRole('textbox', { name: 'Comment on company' });+ const mention = input.querySelector('[data-demo-mention="claude"]');+ expect(mention).toBeTruthy();+ expect(mention?.textContent).toBe('@Claude');+ expect(mention?.getAttribute('contenteditable')).toBe('false');+ expect(view.queryByRole('listbox')).toBeNull();+ expect(+ view.container.querySelector('[data-thread-id="capture-request"]')+ ).toBeNull();+ const before = input.textContent;+ vi.advanceTimersByTime(500);+ expect(input.querySelector('[data-demo-mention="claude"]')).toBe(mention);+ expect(input.textContent?.length).toBeGreaterThan(before?.length ?? 0);+});diff --git a/apps/marketing/src/features/marketing/components/crm/CrmCaptureDemo.tsx b/apps/marketing/src/features/marketing/components/crm/CrmCaptureDemo.tsxindex 7e3acdea41..4c6a877374 100644--- a/apps/marketing/src/features/marketing/components/crm/CrmCaptureDemo.tsx+++ b/apps/marketing/src/features/marketing/components/crm/CrmCaptureDemo.tsx@@ -1,138 +1,133 @@-import { createEffect, createSignal, onCleanup, onMount, Show } from 'solid-js';+import { createSignal } from 'solid-js';+import { createStore } from 'solid-js/store';+import { demoMentions } from '../../core/demo-mentions';import type { WorkspaceComment } from '../../core/dummy-workspace';import type { SampleCompany } from '../../core/workspace-fixtures';-import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';+import { createCrmDemoWorkspace } from '../../primitives/createCrmDemoWorkspace';import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';-import { DemoCursor } from '../DemoCursor';+import { demoTypingActions } from '../../primitives/demoTypingActions';+import type { ChannelComposerHandle } from '../email/frozen/ChannelComposer';import { ProductDemo } from '../product/ProductPage';+import { CompanyPipelineEntry } from './CompanyPipelineEntry';import { CrmRecordWorkspace } from './CrmRecordWorkspace';const request: WorkspaceComment = {id: 'capture-request',person: 'jacob',- body: '@[Claude](demo-mention:claude) just got off a call with Dana. They want a demo Thursday at 9 for the studio team. Move The Meadow to Demo, make me the owner, and note that Alex is running the rollout on their side.',+ body: '@[Claude](demo-mention:claude) just got off a call with Ava. They want a demo Thursday at 9 for the studio team. Move Parlor Studio to Demo, make me the owner, and note that Alex is running the rollout on their side.',time: '9:51 AM',};const reply: WorkspaceComment = {id: 'capture-reply',person: 'claude',- body: 'Done. The Meadow is in Demo and you’re the owner. From the call: demo Thursday at 9 with the studio team, and Alex ([email protected]) is running the rollout on their side.',+ body: 'Done. Parlor Studio is in Demo and you’re the owner. From the call: demo Thursday at 9 with the studio team, and Alex ([email protected]) is running the rollout on their side.',time: '9:52 AM',replyTo: 'capture-request',};-/**- * @Claude in a company's Discussion: the agent sets Stage and Owner through- * the property tools and answers in the thread. Phases: 0 request, 1 Stage,- * 2 Stage set, 3 Owner, 4 Owner set, 5 thread, 6 reply.- */+/** Type and send a request, then show the agent's reply and property updates. */export function CrmCaptureDemo() {let frame!: HTMLDivElement;- const w = createDummyWorkspace('crm');+ let composer: ChannelComposerHandle | undefined;+ const w = createCrmDemoWorkspace();const meadow = (patch: Partial<SampleCompany>) =>w.setData('companies', (company) => company.id === 'meadow', patch);- meadow({ stage: 'Lead', owner: '', comments: [request] });+ meadow({ comments: [] });+ const [deal, setDeal] = createStore<+ Pick<SampleCompany, 'stage' | 'owner' | 'revenue'>+ >({ stage: 'Lead', owner: '', revenue: '18000' });w.open('crm', 'meadow');const [phase, setPhase] = createSignal(0);- const [automatic, setAutomatic] = createSignal(true);- const [pointer, setPointer] = createSignal<{ x: number; y: number }>();+ const claude = demoMentions.find((item) => item.id === 'claude');+ const typing = demoTypingActions(+ request.body.replace('@[Claude](demo-mention:claude)', '@Claude'),+ (text) => composer?.setText(text, claude),+ 1200+ );+ const sent = typing.length + 1;+ const acknowledgment: WorkspaceComment = {+ id: 'capture-working',+ person: 'claude',+ body: 'I’ll update the stage, owner, and rollout notes.',+ time: '9:51 AM',+ replyTo: request.id,+ };+ const scrollTo = (selector: string) => {+ queueMicrotask(() => {+ const scroll = frame.querySelector<HTMLElement>('.sample-company-scroll');+ const target = frame.querySelector<HTMLElement>(selector);+ if (scroll && target)+ scroll.scrollTop +=+ target.getBoundingClientRect().top -+ scroll.getBoundingClientRect().top -+ 16;+ });+ };const finish = () => {- meadow({ stage: 'Demo', owner: 'jacob', comments: [request, reply] });- setPhase(6);+ composer?.setText('');+ setDeal({ stage: 'Demo', owner: 'jacob' });+ meadow({ comments: [request, acknowledgment, reply] });+ setPhase(sent + 4);};const playback = createProductWalkthrough({root: () => frame,- steps: 6,- reset: () => {},- reduced: () => {- setAutomatic(false);- finish();+ steps: sent + 4,+ loop: { hold: 8000 },+ reset: () => {+ composer?.setText('');+ setDeal({ stage: 'Lead', owner: '', revenue: '18000' });+ meadow({ comments: [] });+ setPhase(0);+ const scroll = frame.querySelector('.sample-company-scroll');+ if (scroll) scroll.scrollTop = 0;},- delay: (step) => [0, 900, 900, 1000, 900, 1000, 900][step] ?? 1000,+ reduced: finish,+ delay: (step) =>+ step < sent ? typing[step - 1].delay : step === sent ? 900 : 1400,advance: (step) => {- if (step === 2) meadow({ stage: 'Demo' });- if (step === 4) meadow({ owner: 'jacob' });- if (step === 6) {+ setPhase(step);+ if (step < sent) {+ typing[step - 1].run();+ if (step === 1) scrollTo('[data-discussion-composer]');+ } else if (step === sent) {+ // Use the same send path as the visitor, then attach the scripted thread ID.+ composer?.send();+ meadow({ comments: [request] });+ scrollTo('[data-thread-id="capture-request"]');+ } else if (step === sent + 1) {+ meadow({ comments: [request, acknowledgment] });+ } else if (step === sent + 2) {+ setDeal({ stage: 'Demo' });+ scrollTo('.sample-pipeline-entries');+ } else if (step === sent + 3) {+ setDeal({ owner: 'jacob' });+ } else {finish();- setAutomatic(false);- // Like a chat, the record scrolls to the new reply when it lands- // below the fold (or under the phone's details sheet).- requestAnimationFrame(() => {- const scroll = frame.querySelector('.sample-company-scroll');- scroll?.scrollTo?.({ top: scroll.scrollHeight, behavior: 'smooth' });- });- } else setPhase(step);+ scrollTo('[data-thread-id="capture-request"]');+ }},});- const pause = () => {- setAutomatic(false);- playback.pause();- };+ const pause = () => playback.pause();const action = () =>- phase() === 1 || phase() === 2- ? 'stage'- : phase() === 3 || phase() === 4- ? 'owner'- : undefined;- onMount(() => {- const position = () => {- const selector = [- undefined,- '[data-company-property="stage"]',- '[data-company-property="stage"]',- '[data-company-property="owner"]',- '[data-company-property="owner"]',- '[data-thread-id="capture-request"] .sample-message-row',- ][phase()];- const target = selector- ? frame.querySelector<HTMLElement>(selector)- : undefined;- if (!automatic() || !target) {- setPointer(undefined);- return;- }- const bounds = target.getBoundingClientRect();- const parent = frame.getBoundingClientRect();- const thread = phase() === 5;- setPointer({- x: bounds.left - parent.left + (thread ? 56 : bounds.width * 0.6),- y:- bounds.top -- parent.top +- (thread ? bounds.height + 18 : bounds.height / 2),- });- };- createEffect(() => {- phase();- automatic();- const timer = requestAnimationFrame(position);- onCleanup(() => cancelAnimationFrame(timer));- });- const resize = new ResizeObserver(position);- resize.observe(frame);- onCleanup(() => resize.disconnect());- });+ phase() === sent + 2 ? 'stage' : phase() === sent + 3 ? 'owner' : undefined;return (<div ref={frame} class="crm-demo-frame" onFocusIn={pause}><ProductDemo- label="Claude updates The Meadow from a comment in its Discussion"+ label="Claude updates Parlor Studio from a comment in its Discussion"onInteract={pause}action={action()}height={600}mobileHeight={700}>- <CrmRecordWorkspace workspace={w} initialPanelOpen />+ <CrmRecordWorkspace+ richComposer+ workspace={w}+ onComposerReady={(handle) => {+ composer = handle;+ }}+ pipeline={<CompanyPipelineEntry value={deal} onChange={setDeal} />}+ /></ProductDemo>- <Show when={automatic() && pointer()}>- {(p) => (- <DemoCursor- label="Claude"- class="crm-demo-pointer"- clicking={phase() === 2 || phase() === 4}- style={{ transform: `translate(${p().x}px, ${p().y}px)` }}- />- )}- </Show></div>);}diff --git a/apps/marketing/src/features/marketing/components/crm/CrmComparison.tsx b/apps/marketing/src/features/marketing/components/crm/CrmComparison.tsxindex ba67528867..d22f78ff64 100644--- a/apps/marketing/src/features/marketing/components/crm/CrmComparison.tsx+++ b/apps/marketing/src/features/marketing/components/crm/CrmComparison.tsx@@ -1,66 +1,8 @@-import CaretDown from '@phosphor/caret-down.svg';-import {- ComparisonLegend,- type ComparisonRow,- ComparisonTable,-} from '../../../../app/components/sections/ComparisonTable';--const comparisonRows: ComparisonRow[] = [- {- feature: 'Companies and contacts created from your email',- cells: [true, false, 'partial', 'partial'],- },- {- feature: 'Company descriptions filled in automatically',- cells: [true, 'partial', true, true],- },- {- feature: 'Threaded discussion on every company',- cells: [true, 'partial', 'partial', false],- },- {- feature: '@mention companies in docs, tasks, and chat',- cells: [true, false, false, false],- },- {- feature: 'Emails, calls, files, and tasks on the record',- cells: [true, 'partial', 'partial', false],- },- {- feature: 'Email, calls, docs, and tasks in the same app',- cells: [true, 'partial', 'partial', false],- },- {- feature: 'Agents can also read your email, calls, and docs',- cells: [true, 'partial', 'partial', 'partial'],- },- {- feature: 'One search across email, chat, docs, and customers',- cells: [true, false, false, false],- },- { feature: 'Open source (AGPLv3)', cells: [true, false, false, false] },-];+import { crmComparisons } from '../../core/feature-comparisons';+import { FeatureComparisons } from '../comparisons/FeatureComparisons';export function CrmComparison() {return (- <details class="feature-page-comparison">- <summary>- <span>Compare CRM tools</span>- <CaretDown aria-hidden="true" />- </summary>- <div class="feature-page-comparison-content">- <ComparisonTable- columns={['Macro', 'Salesforce', 'HubSpot', 'Attio'].map((label) => ({- label,- }))}- rows={comparisonRows}- />- <ComparisonLegend />- <p>- Availability varies by product and plan. See{' '}- <a href="/pricing">Macro pricing</a> for current plans and limits.- </p>- </div>- </details>+ <FeatureComparisons title="Compare CRMs" comparisons={crmComparisons} />);}diff --git a/apps/marketing/src/features/marketing/components/crm/CrmContextDemos.test.tsx b/apps/marketing/src/features/marketing/components/crm/CrmContextDemos.test.tsxindex 3dfc6a3665..b1af09e017 100644--- a/apps/marketing/src/features/marketing/components/crm/CrmContextDemos.test.tsx+++ b/apps/marketing/src/features/marketing/components/crm/CrmContextDemos.test.tsx@@ -93,73 +93,80 @@ it('shows the described company and note at once with reduced motion', () => {expect(view.container.querySelector('.demo-cursor')).toBeNull();});-it('tours The Meadow’s emails and calls, then returns to its Discussion', () => {+it('tours Parlor Studio’s emails and calls, then returns to its Discussion', () => {const view = render(() => <CrmRecordDemo />);- expect(view.getByText(/Dana asked about pricing/)).toBeTruthy();+ expect(view.getByText(/Ava wants to try folder uploads/)).toBeTruthy();visible(true);vi.advanceTimersByTime(1400);expect(section(view)).toBe('Emails');const emails = within(view.getByLabelText('Company emails'));- expect(emails.getByText('Seats for the studio team')).toBeTruthy();- expect(emails.getByText('Intro from Sam')).toBeTruthy();+ expect(emails.getByText('Thursday demo')).toBeTruthy();+ expect(emails.getByText('Who is joining on Thursday')).toBeTruthy();vi.advanceTimersByTime(2000);expect(section(view)).toBe('Calls');expect(- within(view.getByLabelText('Company calls')).getByText(- 'Rollout check-in with The Meadow'- )+ within(view.getByLabelText('Company calls')).getByText('Thursday demo prep')).toBeTruthy();vi.advanceTimersByTime(2000);+ expect(section(view)).toBe('Files');+ expect(view.getByText('Setup guide')).toBeTruthy();+ vi.advanceTimersByTime(2000);+ expect(section(view)).toBe('Tasks');+ expect(view.getByText('Verify folder uploads in production')).toBeTruthy();+ vi.advanceTimersByTime(2000);expect(section(view)).toBe('Overview');- expect(view.getByText('Sent. Order form is in Files.')).toBeTruthy();+ expect(+ view.getByText(+ 'Ava wants to try folder uploads at Thursday’s demo. Check the release with Teo before confirming. Julia is helping with setup.'+ )+ ).toBeTruthy();expect(view.container.querySelector('.demo-cursor')).toBeNull();});-it('filters the Emails tab by Signal and by your own threads', () => {+it('keeps the visitor’s Emails tab selected while changing filters', () => {const view = render(() => <CrmRecordDemo />);- fireEvent.pointerDown(- view.getByRole('group', {- name: 'The Meadow’s emails, calls, and team discussion in one record',- })+ fireEvent.click(+ view.getByRole('button', { name: /^Interact with Parlor Studio/ }));fireEvent.click(view.getByRole('radio', { name: 'Emails' }));const list = () => within(view.getByLabelText('Company emails'));- expect(list().getByText('Invitation: The Meadow · Demo')).toBeTruthy();+ expect(list().getByText('Who is joining on Thursday')).toBeTruthy();fireEvent.click(view.getByRole('radio', { name: 'Signal' }));- expect(list().queryByText('Invitation: The Meadow · Demo')).toBeNull();- expect(list().getByText('Seats for the studio team')).toBeTruthy();+ expect(+ (view.getByRole('radio', { name: 'Signal' }) as HTMLInputElement).checked+ ).toBe(true);+ expect(list().getByText('Thursday demo')).toBeTruthy();fireEvent.click(view.getByRole('radio', { name: 'Me' }));- expect(list().queryByText('Seats for the studio team')).toBeNull();- expect(list().getByText('Recap from today')).toBeTruthy();+ expect(+ (view.getByRole('radio', { name: 'Me' }) as HTMLInputElement).checked+ ).toBe(true);+ expect(list().getByText('Thursday demo')).toBeTruthy();fireEvent.click(view.getByRole('radio', { name: 'All' }));- expect(list().getByText('Invitation: The Meadow · Demo')).toBeTruthy();+ expect(list().getByText('Who is joining on Thursday')).toBeTruthy();vi.advanceTimersByTime(20000);expect(section(view)).toBe('Emails');});it('lists the record’s team, files, and tasks', () => {const view = render(() => <CrmRecordDemo />);- fireEvent.pointerDown(- view.getByRole('group', {- name: 'The Meadow’s emails, calls, and team discussion in one record',- })+ fireEvent.click(+ view.getByRole('button', { name: /^Interact with Parlor Studio/ }));fireEvent.click(view.getByRole('radio', { name: 'Team' }));const contacts = within(view.getByLabelText('Contacts'));- expect(contacts.getByText('[email protected]')).toBeTruthy();+ expect(contacts.getByText('[email protected]')).toBeTruthy();fireEvent.input(view.getByRole('textbox', { name: 'Search contacts' }), {target: { value: 'priya' },});- expect(contacts.queryByText('Dana')).toBeNull();+ expect(view.getByText('No matching contacts.')).toBeTruthy();+ expect(view.queryByLabelText('Contacts')).toBeNull();fireEvent.click(view.getByRole('radio', { name: 'Files' }));- expect(- view.getByRole('button', { name: 'Team rollout plan 9:30 AM' })- ).toBeTruthy();- expect(view.getByText('The Meadow order form.pdf')).toBeTruthy();+ expect(view.getByRole('button', { name: 'Setup guide Today' })).toBeTruthy();+ expect(view.getByText('Thursday demo agenda')).toBeTruthy();fireEvent.click(view.getByRole('radio', { name: 'Tasks' }));expect(within(view.getByLabelText('Company tasks')).getByText(- 'Get the order form signed'+ 'Verify folder uploads in production')).toBeTruthy();});diff --git a/apps/marketing/src/features/marketing/components/crm/CrmEnrichmentDemo.tsx b/apps/marketing/src/features/marketing/components/crm/CrmEnrichmentDemo.tsxindex 21a548c90a..bf935bccfc 100644--- a/apps/marketing/src/features/marketing/components/crm/CrmEnrichmentDemo.tsx+++ b/apps/marketing/src/features/marketing/components/crm/CrmEnrichmentDemo.tsx@@ -1,7 +1,8 @@-import { createEffect, createSignal, onCleanup, onMount, Show } from 'solid-js';+import { createSignal, Show } from 'solid-js';import type { WorkspaceComment } from '../../core/dummy-workspace';import type { SampleCompany } from '../../core/workspace-fixtures';-import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';+import { createCrmDemoWorkspace } from '../../primitives/createCrmDemoWorkspace';+import { createDemoPointer } from '../../primitives/createDemoPointer';import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';import { DemoCursor } from '../DemoCursor';import { ProductDemo } from '../product/ProductPage';@@ -48,11 +49,10 @@ const note: WorkspaceComment = {*/export function CrmEnrichmentDemo() {let frame!: HTMLDivElement;- const w = createDummyWorkspace('crm');+ const w = createCrmDemoWorkspace();w.setCompanyLayout('List');const [phase, setPhase] = createSignal(0);const [automatic, setAutomatic] = createSignal(true);- const [pointer, setPointer] = createSignal<{ x: number; y: number }>();const arrive = () => {if (!w.data.companies.some((company) => company.id === 'kestrel'))w.setData('companies', (companies) => [...companies, { ...kestrel }]);@@ -73,7 +73,15 @@ export function CrmEnrichmentDemo() {const playback = createProductWalkthrough({root: () => frame,steps: 6,- reset: () => {},+ loop: { hold: 8000 },+ reset: () => {+ w.open('crm');+ w.setData('companies', (companies) =>+ companies.filter((company) => company.id !== kestrel.id)+ );+ setPhase(0);+ setAutomatic(true);+ },reduced: () => {setAutomatic(false);finish();@@ -93,9 +101,11 @@ export function CrmEnrichmentDemo() {setAutomatic(false);playback.pause();};- onMount(() => {- const position = () => {- const selector = [+ const pointer = createDemoPointer({+ frame: () => frame,+ active: automatic,+ target: () => {+ return [undefined,undefined,'[data-company-row="kestrel"] .truncate',@@ -103,29 +113,7 @@ export function CrmEnrichmentDemo() {undefined,'[data-discussion-composer]',][phase()];- const target = selector- ? frame.querySelector<HTMLElement>(selector)- : undefined;- if (!automatic() || !target) {- setPointer(undefined);- return;- }- const bounds = target.getBoundingClientRect();- const parent = frame.getBoundingClientRect();- setPointer({- x: bounds.left - parent.left + Math.min(bounds.width * 0.6, 160),- y: bounds.top - parent.top + bounds.height / 2,- });- };- createEffect(() => {- phase();- automatic();- const timer = requestAnimationFrame(position);- onCleanup(() => cancelAnimationFrame(timer));- });- const resize = new ResizeObserver(position);- resize.observe(frame);- onCleanup(() => resize.disconnect());+ },});return (<div ref={frame} class="crm-demo-frame" onFocusIn={pause}>@@ -140,7 +128,6 @@ export function CrmEnrichmentDemo() {<Show when={automatic() && pointer()}>{(p) => (<DemoCursor- label="Jacob"class="crm-demo-pointer"clicking={phase() === 3}style={{ transform: `translate(${p().x}px, ${p().y}px)` }}diff --git a/apps/marketing/src/features/marketing/components/crm/CrmFollowupDemo.test.tsx b/apps/marketing/src/features/marketing/components/crm/CrmFollowupDemo.test.tsxnew file mode 100644index 0000000000..f7d05bb36c--- /dev/null+++ b/apps/marketing/src/features/marketing/components/crm/CrmFollowupDemo.test.tsx@@ -0,0 +1,205 @@+import { cleanup, fireEvent, render } from '@solidjs/testing-library';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { CrmFollowupDemo } from './CrmFollowupDemo';+import { CrmRecordDemo } from './CrmRecordDemo';++let observe: IntersectionObserverCallback;+let reduced = false;+beforeEach(() => {+ vi.useFakeTimers();+ reduced = false;+ vi.stubGlobal('fetch', vi.fn());+ vi.spyOn(document, 'hidden', 'get').mockReturnValue(false);+ vi.stubGlobal('matchMedia', (query: string) => ({+ matches: query.includes('prefers-reduced-motion') && reduced,+ media: query,+ addEventListener: vi.fn(),+ removeEventListener: vi.fn(),+ }));+ vi.stubGlobal(+ 'IntersectionObserver',+ class {+ constructor(private callback: IntersectionObserverCallback) {}+ observe(target: HTMLElement) {+ if (target.classList.contains('crm-demo-frame'))+ observe = this.callback;+ }+ disconnect() {}+ unobserve() {}+ }+ );+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ observe() {}+ unobserve() {}+ disconnect() {}+ }+ );+ Object.defineProperty(HTMLElement.prototype, 'scrollIntoView', {+ configurable: true,+ value: vi.fn(),+ });+ Object.defineProperty(HTMLElement.prototype, 'scrollTo', {+ configurable: true,+ value: vi.fn(),+ });+});+afterEach(() => {+ cleanup();+ vi.advanceTimersByTime(100);+ expect(fetch).not.toHaveBeenCalled();+ expect(vi.getTimerCount()).toBe(0);+ vi.useRealTimers();+ vi.restoreAllMocks();+ vi.unstubAllGlobals();+});+function visible(value: boolean) {+ observe(+ [+ {+ isIntersecting: value,+ intersectionRatio: value ? 1 : 0,+ } as IntersectionObserverEntry,+ ],+ {} as IntersectionObserver+ );+}++it('reads every source in chat without automatically opening a second workspace', () => {+ const view = render(() => <CrmFollowupDemo />);+ visible(true);+ for (const delay of [1200, 1800, 1800, 1800, 1800, 1800, 1800]) {+ vi.advanceTimersByTime(delay);+ expect(view.queryByRole('region', { name: 'Customer context' })).toBeNull();+ expect(view.getByRole('region', { name: 'Follow-up agent' })).toBeTruthy();+ }+ expect(+ view.getByText('Read task: Verify folder uploads in production')+ ).toBeTruthy();+ expect(+ view.getByText('Read pull request #248: Fix folder uploads')+ ).toBeTruthy();+ vi.advanceTimersByTime(1800);+ expect(+ view.getByRole<HTMLInputElement>('textbox', { name: 'To' }).value+ ).toBe('Ava Chen <[email protected]>');+ expect(view.getByText('Next steps')).toBeTruthy();+});++it('pauses the chat walkthrough offscreen', () => {+ const view = render(() => <CrmFollowupDemo />);+ visible(true);+ vi.advanceTimersByTime(1200);+ visible(false);+ vi.advanceTimersByTime(20000);+ expect(view.queryByRole('textbox', { name: 'Email body' })).toBeNull();+ visible(true);+ vi.advanceTimersByTime(12600);+ expect(view.getByRole('textbox', { name: 'Email body' })).toBeTruthy();+});++it('opens every cited source and preserves an edited draft when returning', () => {+ reduced = true;+ const view = render(() => <CrmFollowupDemo />);+ const subject = view.getByRole<HTMLInputElement>('textbox', {+ name: 'Subject',+ });+ fireEvent.input(subject, { target: { value: 'Thursday at 9' } });+ const body = view.getByRole('textbox', { name: 'Email body' });+ body.textContent = 'Hi Ava, I’ll confirm after Teo finishes the check.';+ fireEvent.input(body);+ for (const name of [+ 'Thursday demo',+ 'prep call',+ 'team chat',+ 'production verification',+ 'setup guide',+ ]) {+ fireEvent.click(view.getByRole('button', { name }));+ expect(view.getByRole('region', { name: 'Customer context' })).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Back to follow-up' }));+ expect(view.getByRole('textbox', { name: 'Subject' })).toBe(subject);+ expect(subject.value).toBe('Thursday at 9');+ expect(view.getByRole('textbox', { name: 'Email body' })).toBe(body);+ expect(body.textContent).toBe(+ 'Hi Ava, I’ll confirm after Teo finishes the check.'+ );+ }+ fireEvent.click(view.getByRole('link', { name: 'Fix folder uploads #248' }));+ expect(+ view.getByRole('heading', { name: 'Fix folder uploads' })+ ).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Back to follow-up' }));+ expect(subject.value).toBe('Thursday at 9');+});++it('opens linked tasks and calls from the real company tabs', () => {+ reduced = true;+ const view = render(() => <CrmFollowupDemo />);+ fireEvent.click(view.getByRole('button', { name: 'Open Parlor Studio' }));+ fireEvent.click(view.getByRole('radio', { name: 'Tasks' }));+ fireEvent.click(+ view.getByRole('button', { name: /Verify folder uploads in production/ })+ );+ expect(+ view.container+ .querySelector('.crm-followup-demo')+ ?.getAttribute('data-source')+ ).toBe('task');+ fireEvent.click(view.getByRole('button', { name: 'Back to follow-up' }));+ fireEvent.click(view.getByRole('button', { name: 'Open Parlor Studio' }));+ fireEvent.click(view.getByRole('radio', { name: 'Calls' }));+ fireEvent.click(+ view.getByRole('button', { name: 'Thursday demo prep Yesterday' })+ );+ expect(+ view.container+ .querySelector('.crm-followup-demo')+ ?.getAttribute('data-source')+ ).toBe('call');+});++it('shows the same files and tasks in the preceding customer-record tour', () => {+ const view = render(() => <CrmRecordDemo />);+ visible(true);+ vi.advanceTimersByTime(5400);+ expect(view.getByLabelText('Company files').textContent).toContain(+ 'Setup guide'+ );+ vi.advanceTimersByTime(2000);+ expect(view.getByLabelText('Company tasks').textContent).toContain(+ 'Verify folder uploads in production'+ );+ fireEvent.click(view.getByRole('radio', { name: 'Files' }));+ vi.advanceTimersByTime(20000);+ expect(view.getByLabelText('Company files')).toBeTruthy();+});++it('populates customer sources and opens the selected task rather than the first task', () => {+ reduced = true;+ const view = render(() => <CrmFollowupDemo />);+ fireEvent.click(view.getByRole('button', { name: 'Open Parlor Studio' }));+ fireEvent.click(view.getByRole('radio', { name: 'Tasks' }));+ const tasks = view.getByLabelText('Company tasks');+ expect(tasks.querySelectorAll('.sample-record-task')).toHaveLength(4);+ expect(tasks.querySelectorAll('[aria-label="Task"]')).toHaveLength(4);+ fireEvent.click(+ view.getByRole('button', { name: /Confirm Thursday’s attendees/ })+ );+ expect(+ view.getByText(+ 'Ask Ava for the three attendee names and send the calendar invite.'+ )+ ).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Back to follow-up' }));+ fireEvent.click(view.getByRole('button', { name: 'Open Parlor Studio' }));+ fireEvent.click(view.getByRole('radio', { name: 'Emails' }));+ expect(+ view.getByLabelText('Company emails').querySelectorAll('.sample-record-row')+ ).toHaveLength(4);+ fireEvent.click(view.getByRole('radio', { name: 'Files' }));+ expect(+ view.getByLabelText('Company files').querySelectorAll('button')+ ).toHaveLength(3);+});diff --git a/apps/marketing/src/features/marketing/components/crm/CrmFollowupDemo.tsx b/apps/marketing/src/features/marketing/components/crm/CrmFollowupDemo.tsxnew file mode 100644index 0000000000..d874b1a2e7--- /dev/null+++ b/apps/marketing/src/features/marketing/components/crm/CrmFollowupDemo.tsx@@ -0,0 +1,452 @@+import ArrowLeft from '@phosphor/arrow-left.svg';+import { Button } from '@ui';+import { createSignal, Match, Show, Switch } from 'solid-js';+import type { WorkspaceView } from '../../core/dummy-workspace';+import { createCrmDemoWorkspace } from '../../primitives/createCrmDemoWorkspace';+import type { DummyWorkspace } from '../../primitives/createDummyWorkspace';+import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';+import { AgentSession } from '../agents/AgentSession';+import {+ AgentAnswer,+ type AgentMention,+ AgentPrompt,+ type AgentToolCall,+ AgentToolGroup,+ AgentTurn,+} from '../agents/AgentTranscript';+import {+ CallRecordBody,+ CallRecordTopBar,+ createCallPlayback,+} from '../calls/CallRecord';+import { DemoPrDocument } from '../DemoPrDocument';+import { DocMention } from '../documents/DocMention';+import HomepageEmailCompose from '../HomepageEmailCompose';+import { ProductDemo } from '../product/ProductPage';+import { PrMention } from '../reviews/ReviewPrMention';+import { WorkspaceChannel } from '../workspace/WorkspaceChannel';+import type { CompanySection } from '../workspace/WorkspaceCompanies';+import { WorkspaceDocuments } from '../workspace/WorkspaceDocuments';+import { WorkspaceEmail } from '../workspace/WorkspaceEmail';+import { WorkspaceTasks } from '../workspace/WorkspaceTasks';+import { CrmRecordWorkspace } from './CrmRecordWorkspace';+import {+ followupCall,+ followupDraft,+ followupIds,+ followupPr,+ followupPrompt,+ seedCrmFollowup,+} from './crm-followup-data';+import '../calls/call-stories.css';+import '../reviews/review-stories.css';+import './crm-followup-demo.css';++type Source = 'company' | 'email' | 'call' | 'file' | 'task' | 'chat' | 'pr';++/** Chat-first walkthrough; linked sources open only on visitor request. */+export function CrmFollowupDemo() {+ let frame!: HTMLDivElement;+ let opener: HTMLElement | undefined;+ const w = createCrmDemoWorkspace();+ seedCrmFollowup(w);+ const [phase, setPhase] = createSignal(0);+ const [source, setSource] = createSignal<Source | undefined>();+ const [sourceId, setSourceId] = createSignal<string>();+ const [section, setSection] = createSignal<CompanySection>('overview');+ const [toolsOpen, setToolsOpen] = createSignal(true);+ const callPlayback = createCallPlayback(followupCall.duration);+ const finish = () => {+ w.open('crm', followupIds.company);+ setPhase(8);+ setSource(undefined);+ setToolsOpen(false);+ queueMicrotask(() => {+ const log = frame.querySelector<HTMLElement>('.agent-transcript');+ const result = frame.querySelector<HTMLElement>('.crm-followup-result');+ if (log && result)+ log.scrollTop +=+ result.getBoundingClientRect().top -+ log.getBoundingClientRect().top -+ 16;+ });+ };+ const playback = createProductWalkthrough({+ root: () => frame,+ steps: 10,+ visibilityThreshold: 0.45,+ loop: { hold: 10000 },+ reset: () => {+ setPhase(0);+ setSource(undefined);+ setSection('overview');+ setToolsOpen(true);+ w.open('crm', followupIds.company);+ frame+ .querySelectorAll<HTMLElement>('.agent-transcript, .dummy-scroll')+ .forEach((el) => {+ el.scrollTop = 0;+ });+ },+ reduced: finish,+ delay: (step) => (step === 1 ? 1200 : step >= 9 ? 6500 : 1800),+ advance: (step) => {+ setPhase(step);+ if (step === 1) w.open('crm', followupIds.company);+ if (step === 8) finish();+ if (step >= 9)+ queueMicrotask(() => {+ const log = frame.querySelector<HTMLElement>('.agent-transcript');+ const draft = frame.querySelector<HTMLElement>(+ '.homepage-email-demo'+ );+ if (!log) return;+ const top =+ step === 9 && draft+ ? log.scrollTop ++ draft.getBoundingClientRect().top -+ log.getBoundingClientRect().top -+ 16+ : log.scrollHeight;+ log.scrollTo({ top, behavior: 'smooth' });+ });+ },+ });+ const pause = () => {+ playback.pause();+ callPlayback.pause();+ };+ const open = (kind: Source, trigger?: HTMLButtonElement, id?: string) => {+ setSourceId(id);+ pause();+ if (!source() || !opener?.isConnected) {+ opener =+ trigger ??+ (document.activeElement instanceof HTMLElement+ ? document.activeElement+ : undefined);+ }+ if (kind === 'company') {+ w.open('crm', followupIds.company);+ setSection('overview');+ }+ setSource(kind);+ queueMicrotask(() => {+ frame+ .querySelector<HTMLButtonElement>('.crm-followup-back button')+ ?.focus({ preventScroll: true });+ frame.scrollIntoView({+ block: 'start',+ behavior: window.matchMedia('(prefers-reduced-motion: reduce)').matches+ ? 'instant'+ : 'smooth',+ });+ });+ };+ const close = () => {+ pause();+ setSource(undefined);+ queueMicrotask(() => {+ const target = opener?.isConnected+ ? opener+ : frame.querySelector<HTMLElement>(+ '.crm-followup-agent [aria-label="Message the agent"]'+ );+ target?.focus({ preventScroll: true });+ });+ };+ const openItem = (view: WorkspaceView, id?: string) => {+ if (view === 'email') open('email', undefined, id);+ if (view === 'documents') open('file', undefined, id);+ if (view === 'tasks') open('task', undefined, id);+ if (view === 'messages') open('chat', undefined, id);+ };+ const sourceView = (): WorkspaceView =>+ source() === 'email'+ ? 'email'+ : source() === 'file'+ ? 'documents'+ : source() === 'task'+ ? 'tasks'+ : source() === 'chat'+ ? 'messages'+ : 'crm';+ const selected = () =>+ sourceId() ??+ (source() === 'email'+ ? followupIds.email+ : source() === 'file'+ ? followupIds.file+ : source() === 'task'+ ? followupIds.task+ : followupIds.company);+ const linked: DummyWorkspace = {+ ...w,+ view: sourceView,+ contentView: sourceView,+ selected,+ channel: () => followupIds.chat,+ open: openItem,+ openItem,+ backToCollection: close,+ };+ const calls: AgentToolCall[] = [+ { kind: 'action', label: 'Read company: Parlor Studio' },+ { kind: 'read-thread' },+ { kind: 'read-call' },+ { kind: 'read-document', title: 'Setup guide' },+ { kind: 'action', label: 'Read task: Verify folder uploads in production' },+ { kind: 'read-channel', channel: 'customer-followup', count: 3 },+ { kind: 'action', label: 'Read pull request #248: Fix folder uploads' },+ ];+ const mentions: Record<string, AgentMention> = {+ email: { kind: 'email', onOpen: (t) => open('email', t) },+ call: { kind: 'call', onOpen: (t) => open('call', t) },+ file: { kind: 'document', onOpen: (t) => open('file', t) },+ task: { kind: 'task', onOpen: (t) => open('task', t) },+ chat: { kind: 'channel', onOpen: (t) => open('chat', t) },+ teo: { kind: 'person', person: 'teo' },+ julia: { kind: 'person', person: 'julia' },+ };+ return (+ <div+ ref={frame}+ class="crm-demo-frame crm-followup-demo"+ data-phase={phase()}+ data-source-open={!!source()}+ data-source={source()}+ onFocusIn={pause}+ onKeyDown={(event) => {+ if (event.key === 'Escape' && source() && !event.defaultPrevented) {+ event.preventDefault();+ event.stopPropagation();+ close();+ }+ }}+ >+ <ProductDemo+ label="Prepare a customer follow-up from the company’s linked work"+ height={700}+ mobileHeight={740}+ onInteract={pause}+ >+ <div class="crm-followup-splits">+ <Show when={source()}>+ <section class="crm-followup-source" aria-label="Customer context">+ <div class="crm-followup-back">+ <Button variant="plain" size="sm" onClick={close}>+ <ArrowLeft />+ Back to follow-up+ </Button>+ </div>+ <div class="crm-followup-source-body">+ <Switch>+ <Match when={source() === 'company'}>+ <CrmRecordWorkspace+ workspace={w}+ hideCopyLink+ section={section()}+ onSectionChange={(section) => {+ pause();+ setSection(section);+ }}+ onOpenItem={openItem}+ onOpenCall={() => open('call')}+ onOpenTask={(id) => open('task', undefined, id)}+ />+ </Match>+ <Match when={source() === 'email'}>+ <WorkspaceEmail+ workspace={linked}+ tab="all"+ account="all"+ hideCollectionNavigation+ />+ </Match>+ <Match when={source() === 'file'}>+ <WorkspaceDocuments workspace={linked} />+ </Match>+ <Match when={source() === 'task'}>+ <WorkspaceTasks workspace={linked} filter="all" />+ </Match>+ <Match when={source() === 'chat'}>+ <WorkspaceChannel+ workspace={linked}+ renderMessageBody={(message) => {+ if (message.id === 'followup-chat-1')+ return (+ <>+ Ava at{' '}+ <button+ type="button"+ class="crm-followup-file"+ onClick={() => open('company')}+ >+ <DocMention+ item={{+ kind: 'company',+ label: 'Parlor Studio',+ }}+ />+ </button>{' '}+ asked if folder uploads will be ready for+ Thursday. Can we confirm?+ </>+ );+ if (message.id === 'followup-chat-2')+ return (+ <>+ <PrMention+ pr={followupPr}+ status="merged"+ onOpen={() => open('pr')}+ />{' '}+ is merged. I’m checking the production release+ now. Please wait for that check before promising+ it is ready.+ </>+ );+ if (message.id === 'followup-chat-3')+ return (+ <>+ I can help with setup at 9. Please ask Ava for the+ attendee names and send the{' '}+ <button+ type="button"+ class="crm-followup-file"+ onClick={() => open('file')}+ >+ <DocMention+ item={{+ kind: 'document',+ label: 'Setup guide',+ }}+ />+ </button>+ .+ </>+ );+ return undefined;+ }}+ />+ </Match>+ <Match when={source() === 'call'}>+ <CallRecordTopBar title={followupCall.title} />+ <CallRecordBody+ call={followupCall}+ playback={callPlayback}+ />+ </Match>+ <Match when={source() === 'pr'}>+ <div class="dummy-scroll crm-followup-pr">+ <DemoPrDocument+ merged+ record={{+ name: followupPr.title,+ description: followupPr.description,+ repository: followupPr.repo,+ number: followupPr.number,+ }}+ />+ </div>+ </Match>+ </Switch>+ </div>+ </section>+ </Show>+ <section class="crm-followup-agent" aria-label="Follow-up agent">+ <AgentSession+ title="Follow up with Parlor Studio"+ onSend={() => {+ pause();+ finish();+ }}+ >+ <AgentTurn>+ <AgentPrompt text={followupPrompt} />+ </AgentTurn>+ <AgentTurn>+ <Show when={phase() > 0}>+ <AgentToolGroup+ calls={calls.slice(0, Math.min(phase(), 7))}+ active={phase() < 8}+ open={toolsOpen()}+ onOpenChange={setToolsOpen}+ />+ </Show>+ </AgentTurn>+ <Show when={phase() >= 8}>+ <AgentTurn>+ <div class="crm-followup-result">+ <AgentAnswer+ text="Ava asked whether uploads are ready in @[Thursday demo](agent:email). The @[prep call](agent:call) and @[team chat](agent:chat) agree: the fix merged, but Teo still needs to verify the release."+ mentions={mentions}+ />+ <p class="crm-followup-pr-link">+ <PrMention+ pr={followupPr}+ status="merged"+ onOpen={() => open('pr')}+ />+ </p>+ <HomepageEmailCompose+ appChrome+ draft={followupDraft}+ bodyContent={+ <>+ <p>Hi Ava,</p>+ <p>+ Thursday at 9 works. The folder-upload fix has+ merged, and Teo is checking the production release.+ I’ll confirm once it’s ready to try.+ </p>+ <p>+ Here’s the{' '}+ <span contentEditable={false}>+ <button+ type="button"+ class="crm-followup-file"+ onClick={() => open('file')}+ >+ <DocMention+ item={{+ kind: 'document',+ label: 'Setup guide',+ }}+ />+ </button>+ </span>+ . I’ve copied Julia, who can help with setup. Could+ you send her the names of the people joining?+ </p>+ <p>+ See you Thursday,+ <br />+ Jacob+ </p>+ </>+ }+ />+ <AgentAnswer+ text={+ '**Next steps**\n\n- @[Teo](agent:teo): finish @[production verification](agent:task) before confirming readiness.\n- @[Julia](agent:julia): get the attendee names and share the @[setup guide](agent:file).\n- Jacob: review the draft, then confirm Thursday at 9 with Ava.'+ }+ mentions={mentions}+ />+ <Button+ variant="plain"+ size="sm"+ onClick={(event) => open('company', event.currentTarget)}+ >+ Open Parlor Studio+ </Button>+ </div>+ </AgentTurn>+ </Show>+ </AgentSession>+ </section>+ </div>+ </ProductDemo>+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/crm/CrmHeroSidebar.tsx b/apps/marketing/src/features/marketing/components/crm/CrmHeroSidebar.tsxnew file mode 100644index 0000000000..21adc65d84--- /dev/null+++ b/apps/marketing/src/features/marketing/components/crm/CrmHeroSidebar.tsx@@ -0,0 +1,110 @@+import Building from '@phosphor/buildings.svg';+import CaretDown from '@phosphor/caret-down.svg';+import List from '@phosphor/list-bullets.svg';+import Table from '@phosphor/table.svg';+import Users from '@phosphor/users.svg';+import { createSignal, For, type JSX, Show } from 'solid-js';+import { ViewSidebar } from '../DemoViewSidebar';+import { crmHeroLists, crmHeroPipelines } from './crm-hero-data';+import './crm-hero.css';++/** Presentation from CRM's sidebar and CollapsibleSection at 682c2654. */+function Section(props: { title: string; children: JSX.Element }) {+ const [open, setOpen] = createSignal(true);+ return (+ <section class="crm-hero-nav-section">+ <button+ class="crm-hero-section-trigger"+ aria-expanded={open()}+ onClick={() => setOpen(!open())}+ >+ {props.title}+ <CaretDown class="size-2.5" />+ </button>+ <Show when={open()}>{props.children}</Show>+ </section>+ );+}++export function CrmHeroSidebar(props: {+ tab: string;+ pipelineId: string;+ onNavigate: (tab: string) => void;+ onPipeline: (id: string) => void;+}) {+ return (+ <ViewSidebar.Root aria-label="CRM navigation">+ <ViewSidebar.Header>+ <ViewSidebar.Title>Customers</ViewSidebar.Title>+ </ViewSidebar.Header>+ <ViewSidebar.Content>+ <Section title="Records">+ <ViewSidebar.Nav aria-label="CRM records">+ <ViewSidebar.Item+ active={props.tab === 'companies'}+ onClick={() => props.onNavigate('companies')}+ >+ <ViewSidebar.Icon>+ <Building />+ </ViewSidebar.Icon>+ Companies+ </ViewSidebar.Item>+ <ViewSidebar.Item+ active={props.tab === 'contacts'}+ onClick={() => props.onNavigate('contacts')}+ >+ <ViewSidebar.Icon>+ <Users />+ </ViewSidebar.Icon>+ Contacts+ </ViewSidebar.Item>+ </ViewSidebar.Nav>+ </Section>+ <Section title="Pipelines">+ <ViewSidebar.Nav aria-label="CRM pipelines">+ <For each={crmHeroPipelines}>+ {(pipeline) => (+ <ViewSidebar.Item+ title={pipeline.name}+ active={+ props.tab === 'pipeline' && props.pipelineId === pipeline.id+ }+ onClick={() => props.onPipeline(pipeline.id)}+ >+ <ViewSidebar.Icon>+ <Table />+ </ViewSidebar.Icon>+ <span class="min-w-0 flex-1 truncate">{pipeline.name}</span>+ <span class="text-xs text-ink-extra-muted">+ {pipeline.sharing}+ </span>+ </ViewSidebar.Item>+ )}+ </For>+ </ViewSidebar.Nav>+ </Section>+ <Section title="Lists">+ <ViewSidebar.Nav aria-label="Company lists">+ <For each={crmHeroLists}>+ {(list) => (+ <ViewSidebar.Item+ title={list.name}+ active={props.tab === `list:${list.id}`}+ onClick={() => props.onNavigate(`list:${list.id}`)}+ >+ <ViewSidebar.Icon>+ <List />+ </ViewSidebar.Icon>+ <span class="min-w-0 flex-1 truncate">{list.name}</span>+ <span class="text-xs tabular-nums text-ink-extra-muted">+ {list.companyIds.length}+ </span>+ </ViewSidebar.Item>+ )}+ </For>+ </ViewSidebar.Nav>+ </Section>+ </ViewSidebar.Content>+ </ViewSidebar.Root>+ );+}diff --git a/apps/marketing/src/features/marketing/components/crm/CrmRecordDemo.tsx b/apps/marketing/src/features/marketing/components/crm/CrmRecordDemo.tsxindex dc65f13cc5..149547be71 100644--- a/apps/marketing/src/features/marketing/components/crm/CrmRecordDemo.tsx+++ b/apps/marketing/src/features/marketing/components/crm/CrmRecordDemo.tsx@@ -1,10 +1,15 @@-import { createEffect, createSignal, onCleanup, onMount, Show } from 'solid-js';-import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';+import { createSignal, Show } from 'solid-js';+import { createStore } from 'solid-js/store';+import type { SampleCompany } from '../../core/workspace-fixtures';+import { createCrmDemoWorkspace } from '../../primitives/createCrmDemoWorkspace';+import { createDemoPointer } from '../../primitives/createDemoPointer';import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';import { DemoCursor } from '../DemoCursor';import { ProductDemo } from '../product/ProductPage';import type { CompanySection } from '../workspace/WorkspaceCompanies';+import { CompanyPipelineEntry } from './CompanyPipelineEntry';import { CrmRecordWorkspace } from './CrmRecordWorkspace';+import { seedCrmFollowup } from './crm-followup-data';/** Tab the walkthrough points at, then opens, for each step. */const tour: (CompanySection | undefined)[] = [@@ -13,23 +18,38 @@ const tour: (CompanySection | undefined)[] = ['emails','calls','calls',+ 'files',+ 'files',+ 'tasks',+ 'tasks','overview','overview',];-/** The Meadow's record: Emails, then Calls, then back to the Discussion. */+/** Tour the linked email, calls, files, tasks, and team discussion. */export function CrmRecordDemo() {let frame!: HTMLDivElement;- const w = createDummyWorkspace('crm');+ const w = createCrmDemoWorkspace();+ seedCrmFollowup(w);w.open('crm', 'meadow');+ const [deal, setDeal] = createStore<+ Pick<SampleCompany, 'stage' | 'owner' | 'revenue'>+ >({ stage: 'Demo', owner: 'jacob', revenue: '18000' });const [section, setSection] = createSignal<CompanySection>('overview');const [phase, setPhase] = createSignal(0);const [automatic, setAutomatic] = createSignal(true);- const [pointer, setPointer] = createSignal<{ x: number; y: number }>();const playback = createProductWalkthrough({root: () => frame,- steps: 6,- reset: () => {},+ steps: 10,+ loop: { hold: 6500 },+ reset: () => {+ w.open('crm', 'meadow');+ setPhase(0);+ setSection('overview');+ setAutomatic(true);+ const scroll = frame.querySelector('.sample-company-scroll');+ if (scroll) scroll.scrollTop = 0;+ },reduced: () => {setAutomatic(false);setSection('overview');@@ -39,7 +59,7 @@ export function CrmRecordDemo() {setPhase(step);const tab = tour[step];if (step % 2 === 0 && tab) setSection(tab);- if (step === 6) {+ if (step === 10) {setAutomatic(false);// Back on Overview, bring the team's thread into view.requestAnimationFrame(() => {@@ -53,43 +73,25 @@ export function CrmRecordDemo() {setAutomatic(false);playback.pause();};- onMount(() => {- const position = () => {+ const pointer = createDemoPointer({+ frame: () => frame,+ active: automatic,+ target: () => {const tab = tour[phase()];- const target = tab- ? frame.querySelector<HTMLElement>(`[data-record-tab="${tab}"]`)- : undefined;- if (!automatic() || !target) {- setPointer(undefined);- return;- }- const bounds = target.getBoundingClientRect();- const parent = frame.getBoundingClientRect();- setPointer({- x: bounds.left - parent.left + bounds.width / 2,- y: bounds.top - parent.top + bounds.height * 0.7,- });- };- createEffect(() => {- phase();- automatic();- const timer = requestAnimationFrame(position);- onCleanup(() => cancelAnimationFrame(timer));- });- const resize = new ResizeObserver(position);- resize.observe(frame);- onCleanup(() => resize.disconnect());+ return tab ? `[data-record-tab="${tab}"]` : undefined;+ },});return (<div ref={frame} class="crm-demo-frame" onFocusIn={pause}><ProductDemo- label="The Meadow’s emails, calls, and team discussion in one record"+ label="Parlor Studio’s emails, calls, files, tasks, and team discussion in one record"onInteract={pause}height={520}mobileHeight={600}><CrmRecordWorkspaceworkspace={w}+ pipeline={<CompanyPipelineEntry value={deal} onChange={setDeal} />}section={section()}onSectionChange={setSection}/>@@ -97,7 +99,6 @@ export function CrmRecordDemo() {<Show when={automatic() && pointer()}>{(p) => (<DemoCursor- label="Jacob"class="crm-demo-pointer"clicking={phase() % 2 === 0}style={{ transform: `translate(${p().x}px, ${p().y}px)` }}diff --git a/apps/marketing/src/features/marketing/components/crm/CrmRecordWorkspace.tsx b/apps/marketing/src/features/marketing/components/crm/CrmRecordWorkspace.tsxindex 1022065482..32b07e82ec 100644--- a/apps/marketing/src/features/marketing/components/crm/CrmRecordWorkspace.tsx+++ b/apps/marketing/src/features/marketing/components/crm/CrmRecordWorkspace.tsx@@ -1,5 +1,7 @@-import { Match, Switch } from 'solid-js';+import { type JSX, Match, Switch } from 'solid-js';+import type { WorkspaceView } from '../../core/dummy-workspace';import type { DummyWorkspace } from '../../primitives/createDummyWorkspace';+import type { ChannelComposerHandle } from '../email/frozen/ChannelComposer';import {type CompanySection,WorkspaceCompanies,@@ -16,6 +18,13 @@ import '../workspace/dummy-workspace.css';export function CrmRecordWorkspace(props: {workspace: DummyWorkspace;initialPanelOpen?: boolean;+ pipeline?: JSX.Element;+ hideCopyLink?: boolean;+ onComposerReady?: (handle: ChannelComposerHandle | undefined) => void;+ richComposer?: boolean;+ onOpenItem?: (view: WorkspaceView, id: string) => void;+ onOpenCall?: (id: string) => void;+ onOpenTask?: (id: string) => void;section?: CompanySection;onSectionChange?: (section: CompanySection) => void;}) {@@ -24,8 +33,15 @@ export function CrmRecordWorkspace(props: {<Switchfallback={<WorkspaceCompanies+ onComposerReady={props.onComposerReady}+ richComposer={props.richComposer}workspace={w}+ onOpenItem={props.onOpenItem}+ onOpenCall={props.onOpenCall}+ onOpenTask={props.onOpenTask}+ hideCopyLink={props.hideCopyLink}initialPanelOpen={props.initialPanelOpen}+ pipeline={() => props.pipeline}section={props.section}onSectionChange={props.onSectionChange}/>diff --git a/apps/marketing/src/features/marketing/components/crm/company-pipeline-entry.css b/apps/marketing/src/features/marketing/components/crm/company-pipeline-entry.cssnew file mode 100644index 0000000000..29f82c1a30--- /dev/null+++ b/apps/marketing/src/features/marketing/components/crm/company-pipeline-entry.css@@ -0,0 +1,13 @@+.sample-pipeline-entries { display: flex; flex-direction: column; gap: 10px; min-width: 0; }+.sample-pipeline-toggle { display: flex; align-items: center; align-self: flex-start; gap: 4px; font-size: 12px; }+.sample-pipeline-entry { overflow: hidden; border: 1px solid var(--color-edge-muted); border-radius: 12px; background: var(--color-panel); }+.sample-pipeline-entry > header { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 14px; border-bottom: 1px solid var(--color-edge-muted); background: var(--color-hover); font-size: 13px; font-weight: 500; }+.sample-pipeline-entry > header > span { flex: 1; }+.sample-pipeline-entry-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 12px 16px 14px; }+.sample-pipeline-entry-fields > div { min-width: 0; }+.sample-pipeline-field-label { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--color-ink-muted); font-size: 12px; }+.sample-pipeline-entry-fields button { max-width: 100%; height: 28px; padding: 3px 0; font-size: 12px; white-space: nowrap; }+.sample-pipeline-entry-fields img { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }+.sample-pipeline-entry-fields input { width: 100%; height: 28px; background: transparent; font-size: 12px; }+.sample-pipeline-entry-fields input:focus-visible { outline: 1px solid var(--color-accent); }+@media (max-width: 699px) { .sample-pipeline-entry-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }diff --git a/apps/marketing/src/features/marketing/components/crm/crm-followup-data.ts b/apps/marketing/src/features/marketing/components/crm/crm-followup-data.tsnew file mode 100644index 0000000000..23b66c2d00--- /dev/null+++ b/apps/marketing/src/features/marketing/components/crm/crm-followup-data.ts@@ -0,0 +1,305 @@+import type { CompanyFile } from '../../core/workspace-fixtures';+import type { DummyWorkspace } from '../../primitives/createDummyWorkspace';+import type { SampleCall } from '../calls/call-fixtures';+import type { DemoPullRequest } from '../reviews/review-fixtures';++export const followupIds = {+ company: 'meadow',+ email: 'followup-email',+ file: 'followup-guide',+ task: 'followup-check',+ chat: 'customer-followup',+ call: 'followup-call',+} as const;+export const followupPrompt =+ 'Open Parlor Studio’s record and review the linked customer work. Draft a reply to Ava about Thursday’s demo and tell me what we need to do next. Don’t send it.';+export const followupDraft = {+ subject: 'Re: Thursday demo',+ to: 'Ava Chen <[email protected]>',+ cc: 'Julia <[email protected]>',+ body: 'Hi Ava,\n\nThursday at 9 works. The folder-upload fix has merged, and Teo is checking the production release. I’ll confirm once it’s ready to try.\n\nJulia can help with setup. Could you send her the names of the people joining?\n\nSee you Thursday,\nJacob',+};+export const followupPr: DemoPullRequest = {+ id: 'followup-pr',+ title: 'Fix folder uploads',+ repo: 'team/workspace',+ number: 248,+ status: 'merged',+ author: 'teo',+ login: 'teo',+ additions: 24,+ deletions: 8,+ checksPassed: 6,+ description:+ '## What changed\n\nFolder uploads now preserve nested folders. This addresses the issue reported in the customer demo.\n\n## Release\n\nThe change is merged. Production verification is still assigned to Teo; do not promise that it is available until that check is complete.',+ comments: [],+};+export const followupCall: SampleCall = {+ title: 'Thursday demo prep',+ ended: 'Oct 19, 2026 · 9:20 AM',+ duration: 420,+ people: ['jacob', 'julia', 'teo'],+ participantEmails: {+ jacob: '[email protected]',+ julia: '[email protected]',+ teo: '[email protected]',+ },+ poster: [+ { person: 'jacob', video: false },+ { person: 'julia', video: false },+ { person: 'teo', video: false },+ ],+ summary:+ '- Thursday’s customer demo is at 9.\n- Julia will help with setup and needs the attendee names.\n- Teo must verify the folder-upload fix in production before Jacob confirms it is ready.',+ segments: [+ {+ id: 'time',+ person: 'jacob',+ at: 12,+ text: 'Ava confirmed Thursday at 9. She asked if the folder-upload issue is fixed.',+ },+ {+ id: 'release',+ person: 'teo',+ at: 45,+ text: 'The pull request is merged. I still need to verify it in production before we tell her it’s ready.',+ },+ {+ id: 'setup',+ person: 'julia',+ at: 80,+ text: 'I can help with setup. Ask Ava for the names of the people joining, and send her the setup guide.',+ },+ ],+};++/** Local evidence is consistent across the company, sources, and drafted reply. */+export function seedCrmFollowup(w: DummyWorkspace) {+ w.setData('emails', (emails) => [+ ...emails,+ {+ id: followupIds.email,+ sender: 'Ava Chen',+ subject: 'Thursday demo',+ snippet: 'Thursday at 9 works. Is the folder-upload issue fixed?',+ time: '9:35 AM',+ account: 'work',+ folder: 'inbox',+ unread: true,+ body: 'Hi Jacob,\n\nThursday at 9 works. Is the folder-upload issue fixed? Could you send the setup guide and let us know what you need before the demo?\n\nThanks,\nAva',+ replies: [],+ },+ {+ id: 'followup-attendees',+ sender: 'Ava Chen',+ subject: 'Who is joining on Thursday',+ snippet: 'Three people from our design team will join.',+ time: 'Yesterday',+ account: 'work',+ folder: 'inbox',+ unread: false,+ body: 'Hi Julia, three people from our design team will join on Thursday. I will send their names once everyone confirms.',+ replies: [],+ },+ {+ id: 'followup-upload-report',+ sender: 'Ava Chen',+ subject: 'Folder upload issue',+ snippet: 'Nested folders are missing after upload.',+ time: 'Mon',+ account: 'work',+ folder: 'inbox',+ unread: false,+ body: 'Hi Jacob, we tried uploading a sample project. The top-level files appear, but the nested folders are missing. Can your team take a look?',+ replies: [],+ },+ {+ id: 'followup-intro',+ sender: 'Jacob',+ subject: 'Getting started with Macro',+ snippet: 'A short walkthrough for your team.',+ time: 'Fri',+ account: 'work',+ folder: 'inbox',+ unread: false,+ body: 'Hi Ava, happy to walk your team through shared files and email. Bring a sample project and we can try it together.',+ replies: [],+ },+ ]);+ w.setData('documents', (docs) => [+ ...docs,+ {+ id: followupIds.file,+ title: 'Setup guide',+ body: '# Before the demo\n\n1. Connect your work email.\n2. Send Julia the names of the people joining.\n3. Bring a sample folder to try after the upload fix is verified.\n\nJulia will help with setup on Thursday at 9.',+ comments: [],+ },+ ]);+ w.setData('documents', (docs) => [+ ...docs,+ {+ id: 'followup-agenda',+ title: 'Thursday demo agenda',+ body: '# Thursday demo\n\n## Plan\n- Connect the team’s work email.\n- Share a customer thread.\n- Try a sample project folder after Teo confirms the fix.\n\n## Attendees\nAva is confirming three people from the design team.',+ comments: [],+ },+ {+ id: 'followup-notes',+ title: 'Customer discovery notes',+ body: '# Discovery notes\n\nThe team shares project files and customer feedback across email. They want one place to find the latest conversation and the right version of each file.\n\n## Next step\nUse a real project in Thursday’s walkthrough.',+ comments: [],+ },+ ]);+ w.setData('tasks', (tasks) => [+ ...tasks,+ {+ id: followupIds.task,+ title: 'Verify folder uploads in production',+ description:+ 'Check that nested folders upload correctly in production after PR #248. Tell Jacob when the fix is ready so he can confirm with Ava before Thursday’s demo.',+ status: 'In Progress',+ priority: 'High',+ owner: 'teo',+ creator: 'jacob',+ tags: [],+ channel: followupIds.chat,+ relatedDocumentIds: [followupIds.file],+ steps: [],+ comments: [],+ },+ ]);+ w.setData('tasks', (tasks) => [+ ...tasks,+ {+ id: 'followup-attendees-task',+ title: 'Confirm Thursday’s attendees',+ description:+ 'Ask Ava for the three attendee names and send the calendar invite.',+ status: 'Not Started',+ priority: 'Medium',+ owner: 'julia',+ creator: 'jacob',+ tags: [],+ channel: followupIds.chat,+ steps: [],+ comments: [],+ },+ {+ id: 'followup-agenda-task',+ title: 'Prepare the demo project',+ description:+ 'Pick a small project with nested folders for the walkthrough.',+ status: 'In Progress',+ priority: 'Medium',+ owner: 'jacob',+ creator: 'jacob',+ tags: [],+ channel: followupIds.chat,+ steps: [],+ comments: [],+ },+ {+ id: 'followup-repro-task',+ title: 'Reproduce the folder upload issue',+ description:+ 'Confirmed that nested folders were missing. Fix merged in PR #248; production verification is tracked separately.',+ status: 'Completed',+ priority: 'High',+ owner: 'teo',+ creator: 'jacob',+ tags: [],+ channel: followupIds.chat,+ steps: [],+ comments: [],+ },+ ]);+ w.setData('channels', (channels) => [+ ...channels,+ {+ id: followupIds.chat,+ messages: [+ {+ id: 'followup-chat-1',+ person: 'jacob',+ body: 'Ava asked if folder uploads will be ready for Thursday. Can we confirm?',+ time: '9:25 AM',+ },+ {+ id: 'followup-chat-2',+ person: 'teo',+ body: 'PR #248 is merged. I’m checking the production release now. Please wait for that check before promising it is ready.',+ time: '9:27 AM',+ },+ {+ id: 'followup-chat-3',+ person: 'julia',+ body: 'I can help with setup at 9. Please ask Ava for the attendee names and send the setup guide.',+ time: '9:30 AM',+ },+ ],+ },+ ]);+ w.setData('companies', (c) => c.id === followupIds.company, {+ description:+ 'A design studio trying Macro for shared files and team communication.',+ lastInteracted: 'today',+ updated: '9:40 AM',+ contacts: [{ name: 'Ava Chen', email: '[email protected]' }],+ emailIds: [+ followupIds.email,+ 'followup-attendees',+ 'followup-upload-report',+ 'followup-intro',+ ],+ emails: [],+ files: w.data.documents+ .filter((doc) =>+ [followupIds.file, 'followup-agenda', 'followup-notes'].includes(doc.id)+ )+ .map(+ (doc): CompanyFile => ({+ id: doc.id,+ title: doc.title,+ kind: 'document',+ time: doc.id === followupIds.file ? 'Today' : 'Yesterday',+ documentId: doc.id,+ })+ ),+ tasks: w.data.tasks+ .filter((task) =>+ [+ followupIds.task,+ 'followup-attendees-task',+ 'followup-agenda-task',+ 'followup-repro-task',+ ].includes(task.id)+ )+ .map((task) => ({+ id: task.id,+ title: task.title,+ status: task.status,+ priority: task.priority,+ owner: task.owner,+ })),+ calls: [+ {+ id: followupIds.call,+ title: followupCall.title,+ time: 'Yesterday',+ duration: '7m',+ people: ['jacob', 'julia', 'teo'],+ guests: [],+ },+ ],+ comments: [+ {+ id: 'followup-note',+ person: 'jacob',+ body: 'Ava wants to try folder uploads at Thursday’s demo. Check the release with Teo before confirming. Julia is helping with setup.',+ time: '9:40 AM',+ },+ ],+ });+ w.setCompanyLayout('List');+ w.setQuery('Parlor Studio');+}diff --git a/apps/marketing/src/features/marketing/components/crm/crm-followup-demo.css b/apps/marketing/src/features/marketing/components/crm/crm-followup-demo.cssnew file mode 100644index 0000000000..cc6a7eca68--- /dev/null+++ b/apps/marketing/src/features/marketing/components/crm/crm-followup-demo.css@@ -0,0 +1,65 @@+.crm-followup-demo { scroll-margin-top:88px; }+.crm-followup-splits { display:flex; height:100%; min-height:0; }+.crm-followup-source { flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; }+.crm-followup-back { flex:none; padding:6px 10px; border-bottom:1px solid var(--color-edge-muted); }+.crm-followup-source-body { container:sample-main / inline-size; display:flex; flex-direction:column; flex:1; min-height:0; min-width:0; overflow:hidden; }+.crm-followup-source-body .sample-company-record { height:100%; }+.crm-followup-source-body .sample-company-scroll { min-height:0; }+.crm-followup-source-body button.sample-record-task { width:100%; text-align:left; font:inherit; color:inherit; background:transparent; }+.crm-followup-source-body .sample-company-row { grid-template-columns:8px minmax(0,1fr) 100px; }+.crm-followup-source-body .sample-company-row > :nth-child(n+4) { display:none; }+.crm-followup-demo[data-source-open=true] .crm-followup-agent { display:none; }+.crm-followup-agent { display:flex; flex-direction:column; flex:1; min-height:0; min-width:0; }+.crm-followup-agent .agent-turn { max-width:780px; }+.crm-followup-agent .agent-answer { font-size:14px; }+.crm-followup-result .homepage-email-demo { --homepage-email-height:420px; margin-block:20px; }+.crm-followup-result .homepage-email-body { white-space:normal; }+.crm-followup-file { display:inline; padding:0; border:0; background:none; color:inherit; font:inherit; }+.crm-followup-pr { padding:24px; }+.crm-followup-pr-link { margin:12px 0; font-size:14px; }+.crm-followup-source .call-record-column { padding:24px 16px; }+.crm-followup-source .sample-chat-log { padding:20px 14px; }+.crm-followup-source .sample-company-description { max-width:100%; }+@media(max-width:899px) {+ .crm-followup-source { flex:1; border:0; }+ .crm-followup-agent .agent-turn { padding-inline:12px; }+ .crm-followup-result .homepage-email-demo { --homepage-email-height:480px; }+}++/* Keep the compact email preview on two aligned lines inside the source pane. */+.crm-followup-source-body [aria-label="Company emails"] .sample-record-row {+ align-items: start;+ padding-block: 10px;+}+.crm-followup-source-body [aria-label="Company emails"] .sample-record-row-indicator {+ height: 20px;+}+.crm-followup-source-body [aria-label="Company emails"] .sample-record-row-content {+ display: grid;+ grid-template-columns: 16px minmax(0, 1fr);+ gap: 3px 8px;+}+.crm-followup-source-body [aria-label="Company emails"] .sample-record-row-content > svg {+ align-self: center;+}+.crm-followup-source-body [aria-label="Company emails"] .sample-record-row-title {+ max-width: none;+ line-height: 20px;+}+.crm-followup-source-body [aria-label="Company emails"] .sample-record-row-detail {+ grid-column: 2;+ padding-left: 0;+ gap: 8px;+ line-height: 18px;+}+.crm-followup-source-body [aria-label="Company emails"] .sample-record-row-detail > .text-ink {+ flex-shrink: 0;+ max-width: 60%;+}+.crm-followup-source-body [aria-label="Company emails"] .sample-record-row-snippet {+ display: block;+ min-width: 0;+}+.crm-followup-source-body [aria-label="Company emails"] .sample-record-row-time {+ line-height: 20px;+}diff --git a/apps/marketing/src/features/marketing/components/crm/crm-hero-data.ts b/apps/marketing/src/features/marketing/components/crm/crm-hero-data.tsnew file mode 100644index 0000000000..4817cf9dcc--- /dev/null+++ b/apps/marketing/src/features/marketing/components/crm/crm-hero-data.ts@@ -0,0 +1,182 @@+import type { HomepagePersonId } from '../../core/homepage-demo-people';+import type { DealStage } from '../../core/workspace-fixtures';++export type HeroDeal = {+ companyId: string;+ stage: DealStage;+ owner: HomepagePersonId | '';+ revenue: string;+};++/** Fictional pipelines. Deals retain their own fields even for the same company. */+export const crmHeroPipelines: {+ id: string;+ name: string;+ sharing: string;+ stages: DealStage[];+ deals: HeroDeal[];+}[] = [+ {+ id: 'new-business',+ name: 'New business',+ sharing: 'Team',+ stages: ['Lead', 'Qualified', 'Demo', 'Trial', 'Negotiation', 'Customer'],+ deals: [+ {+ companyId: 'northstar',+ stage: 'Lead',+ owner: 'jacob',+ revenue: '12000',+ },+ { companyId: 'harbor', stage: 'Lead', owner: 'julia', revenue: '' },+ { companyId: 'ridgeline', stage: 'Lead', owner: '', revenue: '' },+ { companyId: 'copperleaf', stage: 'Lead', owner: 'teo', revenue: '4800' },+ { companyId: 'orbit', stage: 'Qualified', owner: 'teo', revenue: '6000' },+ {+ companyId: 'tidewater',+ stage: 'Qualified',+ owner: 'jacob',+ revenue: '',+ },+ {+ companyId: 'fernway',+ stage: 'Qualified',+ owner: 'julia',+ revenue: '8400',+ },+ { companyId: 'meadow', stage: 'Demo', owner: 'jacob', revenue: '18000' },+ {+ companyId: 'bluebird',+ stage: 'Demo',+ owner: 'julia',+ revenue: '21600',+ },+ { companyId: 'sable', stage: 'Demo', owner: 'teo', revenue: '' },+ { companyId: 'lumen', stage: 'Trial', owner: 'julia', revenue: '9000' },+ {+ companyId: 'foxglove',+ stage: 'Trial',+ owner: 'jacob',+ revenue: '7200',+ },+ {+ companyId: 'northwind',+ stage: 'Negotiation',+ owner: 'jacob',+ revenue: '32000',+ },+ {+ companyId: 'granite',+ stage: 'Negotiation',+ owner: 'gabriel',+ revenue: '14400',+ },+ {+ companyId: 'relay',+ stage: 'Customer',+ owner: 'julia',+ revenue: '24000',+ },+ ],+ },+ {+ id: 'studios',+ name: 'Studio partnerships',+ sharing: 'Team',+ stages: ['Lead', 'Qualified', 'Demo', 'Negotiation', 'Customer'],+ deals: [+ { companyId: 'ridgeline', stage: 'Lead', owner: 'teo', revenue: '12000' },+ { companyId: 'cedar', stage: 'Lead', owner: '', revenue: '' },+ {+ companyId: 'sable',+ stage: 'Qualified',+ owner: 'julia',+ revenue: '9600',+ },+ {+ companyId: 'foxglove',+ stage: 'Demo',+ owner: 'jacob',+ revenue: '14400',+ },+ {+ companyId: 'meadow',+ stage: 'Negotiation',+ owner: 'julia',+ revenue: '36000',+ },+ ],+ },+ {+ id: 'renewals',+ name: 'Q4 renewals',+ sharing: 'Team',+ stages: ['Qualified', 'Negotiation', 'Customer', 'Churned'],+ deals: [+ {+ companyId: 'relay',+ stage: 'Qualified',+ owner: 'julia',+ revenue: '28800',+ },+ {+ companyId: 'pallet',+ stage: 'Qualified',+ owner: 'teo',+ revenue: '7200',+ },+ {+ companyId: 'fieldnote',+ stage: 'Negotiation',+ owner: 'jacob',+ revenue: '12000',+ },+ {+ companyId: 'lumen',+ stage: 'Customer',+ owner: 'julia',+ revenue: '10800',+ },+ { companyId: 'cedar', stage: 'Churned', owner: 'jacob', revenue: '4800' },+ ],+ },+ {+ id: 'expansion',+ name: 'Team expansion',+ sharing: 'Private',+ stages: ['Lead', 'Qualified', 'Demo', 'Negotiation', 'Customer'],+ deals: [+ { companyId: 'pallet', stage: 'Lead', owner: 'jacob', revenue: '3600' },+ {+ companyId: 'fieldnote',+ stage: 'Qualified',+ owner: 'jacob',+ revenue: '4800',+ },+ {+ companyId: 'relay',+ stage: 'Negotiation',+ owner: 'jacob',+ revenue: '12000',+ },+ ],+ },+];++export const crmHeroLists = [+ {+ id: 'onboarding',+ name: 'Onboarding this month',+ companyIds: ['relay', 'pallet', 'fieldnote'],+ },+ {+ id: 'design-partners',+ name: 'Design partners',+ companyIds: ['meadow', 'sable', 'foxglove', 'ridgeline'],+ },+ {+ id: 'follow-up',+ name: 'Follow up this week',+ companyIds: ['northstar', 'harbor', 'lumen', 'granite', 'bluebird'],+ },+];diff --git a/apps/marketing/src/features/marketing/components/crm/crm-hero.css b/apps/marketing/src/features/marketing/components/crm/crm-hero.cssnew file mode 100644index 0000000000..c724fb41ad--- /dev/null+++ b/apps/marketing/src/features/marketing/components/crm/crm-hero.css@@ -0,0 +1,49 @@+/* Match the app's sidebar tokens and database toolbar. Scope to /crm's hero. */+.crm-hero-nav-section { min-width: 0; flex-shrink: 0; }+.crm-hero-section-trigger {+ display: flex;+ width: 100%;+ height: var(--sidebar-row-height);+ align-items: center;+ gap: 4px;+ padding: 4px var(--sidebar-item-inset);+ border-radius: 8px;+ color: var(--color-ink-muted);+ text-align: left;+ font-size: 12px;+ line-height: 20px;+ font-weight: 500;+}+.crm-hero-section-trigger:focus-visible { outline: 2px solid var(--color-accent); }+.crm-hero-section-trigger svg { opacity: 0; }+.crm-hero-nav-section:hover .crm-hero-section-trigger svg,+.crm-hero-section-trigger:focus-visible svg,+.crm-hero-section-trigger[aria-expanded=false] svg { opacity: 1; }+.crm-hero-section-trigger[aria-expanded=false] svg { transform: rotate(-90deg); }+.crm-hero-nav-section > nav { padding-top: 4px; }+.homepage-crm-scene[data-hero=true] .homepage-crm-toolbar {+ gap: 8px;+ padding: 6px 16px;+}+.homepage-crm-scene[data-hero=true] .homepage-crm-toolbar > [aria-label=Views] {+ flex: 1;+ min-width: 0;+ gap: 2px;+}+.homepage-crm-scene[data-hero=true] .crm-hero-search {+ flex: 0 1 220px;+ min-width: 100px;+ max-width: 40%;+}+.homepage-crm-scene[data-hero=true] .homepage-pipeline-board {+ padding-inline: 16px;+}+@media (max-width: 650px) {+ .homepage-crm-scene[data-hero=true] .homepage-crm-sidebar { width: 256px; }+ .homepage-crm-scene[data-hero=true] .homepage-crm-toolbar {+ padding-inline: 10px;+ flex-wrap: wrap;+ }+ .homepage-crm-scene[data-hero=true] .homepage-crm-toolbar > [aria-label=Views] { flex-basis: 100%; }+ .homepage-crm-scene[data-hero=true] .crm-hero-search { flex: 1; max-width: none; }+}diff --git a/apps/marketing/src/features/marketing/components/crm/crm-page.css b/apps/marketing/src/features/marketing/components/crm/crm-page.cssindex 2449790759..fa6f2258c1 100644--- a/apps/marketing/src/features/marketing/components/crm/crm-page.css+++ b/apps/marketing/src/features/marketing/components/crm/crm-page.css@@ -1,3 +1,8 @@+/* Keep the shorter first description at the same three-line desktop rhythm. */+@media (min-width: 1200px) {+ #crm-from-email .product-feature-intro p { max-width: 38ch; }+}+/* Jump links reuse the CRM line illustrations. */.crm-feature-links a { gap: 8px; color: #b5b5b5; font-size: 13px; }.crm-feature-links a:hover { color: #fff; }@@ -8,26 +13,16 @@/* Walkthrough pointers sit over the product window they act in. */.crm-demo-frame { position: relative; }-.crm-demo-pointer { position: absolute; top: 0; left: 0; z-index: 9; pointer-events: none; transition: transform 600ms cubic-bezier(.2, .8, .2, 1); }+.crm-demo-pointer { position: absolute; top: 0; left: 0; z-index: 9; pointer-events: none; }.product-demo[data-action=stage] [data-company-property=stage],.product-demo[data-action=owner] [data-company-property=owner] { background: #ffffff25; box-shadow: 0 0 0 3px #ffffff0d; }.crm-demo-frame [data-thread-id] > .sample-message-row,.crm-demo-frame .sample-thread-replies .sample-message-row:last-child { animation: crm-arrive 400ms ease-out both; }@keyframes crm-arrive { from { opacity: 0; transform: translateY(4px); } }-/* The agent section keeps the homepage pipeline and its request. */-.crm-agent-scene .homepage-conversation { width: 100%; margin-bottom: 40px; }-.crm-pipeline-frame { position: relative; overflow: hidden; border-radius: 16px; background: #121315; box-shadow: var(--glass-shadow); }-.product-page .homepage-crm .mdf-frame { height: auto; padding: 0; background: transparent; overflow: visible; border-radius: 0; }-.product-page .homepage-crm .mds-card { height: auto; max-width: none; background: transparent; box-shadow: none; border-radius: 0; }-.product-page .homepage-crm .mdf-frame::before, .product-page .homepage-crm .mds-card::before { content: none; }-.product-page .homepage-crm-footer { border: 0; }-@media (max-width: 699px) {.crm-feature-links a { font-size: 12px; }.crm-feature-illustration { width: 150px; height: auto; aspect-ratio: 5 / 3; }- .crm-agent-scene .homepage-conversation { margin-bottom: 24px; }- .product-page .homepage-crm-viewport { height: 290px; }}@media (prefers-reduced-motion: reduce) {.crm-demo-pointer { display: none; }diff --git a/apps/marketing/src/features/marketing/components/crm/pipeline-transfer.css b/apps/marketing/src/features/marketing/components/crm/pipeline-transfer.cssnew file mode 100644index 0000000000..90c132c421--- /dev/null+++ b/apps/marketing/src/features/marketing/components/crm/pipeline-transfer.css@@ -0,0 +1,20 @@+.homepage-crm-scene [data-transferring=true] { opacity: .2; }+.landing-pipeline-transfer {+ position: absolute;+ z-index: 10;+ padding: 12px;+ border: 1px solid var(--color-edge);+ border-radius: 8px;+ background: var(--color-surface-3);+ box-shadow: 0 10px 24px #0004;+ pointer-events: none;+ animation: landing-deal-move 1400ms cubic-bezier(.22,1,.36,1) forwards;+}+.landing-pipeline-transfer .demo-cursor { position: absolute; right: 20px; bottom: -16px; }+.crm-hero-pointer { position: absolute; z-index: 10; pointer-events: none; }+@keyframes landing-deal-move {+ to { transform: translate(var(--transfer-x), var(--transfer-y)); }+}+@media (prefers-reduced-motion: reduce) {+ .landing-pipeline-transfer { animation: none; }+}diff --git a/apps/marketing/src/features/marketing/components/demo-cursor.css b/apps/marketing/src/features/marketing/components/demo-cursor.cssindex e167495b22..03da31e76d 100644--- a/apps/marketing/src/features/marketing/components/demo-cursor.css+++ b/apps/marketing/src/features/marketing/components/demo-cursor.css@@ -1,4 +1,4 @@-/* Matches the homepage CRM pipeline cursor exactly; every demo reuses it. */+/* Shared operating pointer; editor collaborators use the caret variant. */.demo-cursor {position: absolute;top: 0;@@ -6,18 +6,22 @@z-index: 8;font-size: 20px;pointer-events: none;- filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.4));+ filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.25));+ transition: transform 520ms cubic-bezier(.25, .75, .25, 1);}.demo-cursor > svg {display: block;- width: 0.7em;- height: 0.7em;+ width: 20px;+ height: 23px;overflow: visible;}.demo-cursor > svg path {- fill: oklch(0.96 0 59);+ fill: #151515;+ stroke: #fff;+ stroke-width: 1.2;+ stroke-linejoin: round;}.demo-cursor > span {@@ -33,15 +37,28 @@}.demo-cursor[data-clicking='true'] > svg {- animation: demo-cursor-click 600ms ease both;+ animation: demo-cursor-click 180ms ease both;+ transform-origin: 1px 1px;}@keyframes demo-cursor-click {55% {- transform: scale(0.8);+ transform: scale(0.92);}}+.demo-cursor[data-caret='true'] { filter: none; transition: none; }+.demo-cursor[data-caret='true'] > svg { display: none; }+.demo-cursor[data-caret='true']::before {+ content: '';+ position: absolute;+ width: 2px;+ height: 19px;+ background: #9caeff;+ bottom: 0;+}+.demo-cursor[data-caret='true'] > span { top: -38px; left: 0; }+@media (prefers-reduced-motion: reduce) {.demo-cursor {display: none;diff --git a/apps/marketing/src/features/marketing/components/demo-interaction-boundary.css b/apps/marketing/src/features/marketing/components/demo-interaction-boundary.cssnew file mode 100644index 0000000000..0a5dcd2b13--- /dev/null+++ b/apps/marketing/src/features/marketing/components/demo-interaction-boundary.css@@ -0,0 +1,4 @@+.demo-interaction-boundary { position: relative; isolation: isolate; outline: none; }+.demo-interaction-content { display: contents; }+.demo-interaction-boundary > .demo-interaction-activate { position: absolute; box-sizing: border-box; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 100%; margin: 0; padding: 16px; border: 0; border-radius: inherit; background: transparent; cursor: pointer; touch-action: pan-y; }+.demo-interaction-activate:focus-visible { outline: 2px solid var(--color-ink-muted); outline-offset: -3px; }diff --git a/apps/marketing/src/features/marketing/components/demo-mentions.css b/apps/marketing/src/features/marketing/components/demo-mentions.cssindex b92862b5c3..0166ec6c75 100644--- a/apps/marketing/src/features/marketing/components/demo-mentions.css+++ b/apps/marketing/src/features/marketing/components/demo-mentions.css@@ -73,12 +73,12 @@background: color-mix(in srgb, var(--color-link, #59a8ed) 8%, transparent);white-space: nowrap;}-.workspace-demo .demo-inline-mention > .demo-mention-icon { position: relative; top: .125em; width: 1em; height: 1em; margin-inline: 4px; }+.workspace-demo .demo-inline-mention > .demo-mention-icon { position: relative; top: .125em; width: 1em; height: 1em; margin-inline: .25em; }.workspace-demo .demo-inline-mention:not(.mention-person) > .demo-mention-name {text-decoration: underline;text-decoration-color: color-mix(in srgb, currentColor 20%, transparent);text-decoration-thickness: max(1px, .1em);- text-underline-offset: 2px;+ text-underline-offset: .125em;}.workspace-demo .demo-mention-status { display: inline-block; width: .75em; height: .75em; border: 2px solid var(--color-task, #37bb72); border-radius: 50%; margin-left: 4px; }.workspace-demo .demo-mention-status[data-status='In Review'] { border-color: var(--color-violet); background: conic-gradient(transparent 0 75%, var(--color-violet) 75% 100%); }diff --git a/apps/marketing/src/features/marketing/components/documents/DocMention.tsx b/apps/marketing/src/features/marketing/components/documents/DocMention.tsxindex eab19fcdc3..b3dd744ed4 100644--- a/apps/marketing/src/features/marketing/components/documents/DocMention.tsx+++ b/apps/marketing/src/features/marketing/components/documents/DocMention.tsx@@ -85,19 +85,19 @@ export const people = {julia: {kind: 'person',label: homepagePeople.julia.name,- detail: '[email protected]',+ detail: '[email protected]',photo: homepagePeople.julia.photo,},teo: {kind: 'person',label: homepagePeople.teo.name,- detail: '[email protected]',+ detail: '[email protected]',photo: homepagePeople.teo.photo,},gabriel: {kind: 'person',label: homepagePeople.gabriel.name,- detail: '[email protected]',+ detail: '[email protected]',photo: homepagePeople.gabriel.photo,},} satisfies Record<string, DocMentionItem>;diff --git a/apps/marketing/src/features/marketing/components/documents/DocumentMentionsDemo.tsx b/apps/marketing/src/features/marketing/components/documents/DocumentMentionsDemo.tsxindex 087028d85b..abd2a90702 100644--- a/apps/marketing/src/features/marketing/components/documents/DocumentMentionsDemo.tsx+++ b/apps/marketing/src/features/marketing/components/documents/DocumentMentionsDemo.tsx@@ -32,7 +32,13 @@ export function DocumentMentionsDemo() {const playback = createProductWalkthrough({root: () => root,steps: 5,- reset: () => {},+ loop: { hold: 7500 },+ reset: () => {+ setSources([]);+ setActive(undefined);+ setPhase(0);+ setAutomatic(true);+ },reduced: () => {setAutomatic(false);setSources(['email', 'task']);@@ -172,7 +178,6 @@ export function DocumentMentionsDemo() {<Show when={pointer()}>{(p) => (<DemoCursor- label="Jacob"class="doc-organize-pointer"style={{ transform: `translate(${p().x}px, ${p().y}px)` }}/>diff --git a/apps/marketing/src/features/marketing/components/documents/DocumentOrganizationDemo.tsx b/apps/marketing/src/features/marketing/components/documents/DocumentOrganizationDemo.tsxindex 363502e97c..8870c1d6f4 100644--- a/apps/marketing/src/features/marketing/components/documents/DocumentOrganizationDemo.tsx+++ b/apps/marketing/src/features/marketing/components/documents/DocumentOrganizationDemo.tsx@@ -105,7 +105,13 @@ export function DocumentOrganizationDemo() {const playback = createProductWalkthrough({root: () => root,steps: 5,- reset: () => {},+ reset: () => {+ setCollection('Website');+ setSelected(undefined);+ setQuery('');+ setPointAt(undefined);+ },+ loop: { hold: 5500 },reduced: () => {setAutomatic(false);},@@ -122,7 +128,7 @@ export function DocumentOrganizationDemo() {setSelected(undefined);setPointAt(undefined);}- if (step === 5) setAutomatic(false);+ if (step === 5) setPointAt(undefined);},});const pause = () => {@@ -361,7 +367,6 @@ export function DocumentOrganizationDemo() {<Show when={pointer()}>{(p) => (<DemoCursor- label="Julia"class="doc-organize-pointer"style={{ transform: `translate(${p().x}px, ${p().y}px)` }}/>diff --git a/apps/marketing/src/features/marketing/components/documents/DocumentProjectDemo.tsx b/apps/marketing/src/features/marketing/components/documents/DocumentProjectDemo.tsxindex b8e23a5ed4..48b19c8ce4 100644--- a/apps/marketing/src/features/marketing/components/documents/DocumentProjectDemo.tsx+++ b/apps/marketing/src/features/marketing/components/documents/DocumentProjectDemo.tsx@@ -16,6 +16,7 @@ import type {WorkspaceComment,WorkspaceView,} from '../../core/dummy-workspace';+import { DEMO_INTERACTION_EVENT } from '../DemoInteractionBoundary';import { ChannelComposer } from '../email/frozen/ChannelComposer';import { ProductDemo } from '../product/ProductPage';import { ProductWorkspace } from '../product/ProductWorkspace';@@ -183,9 +184,28 @@ export function DocumentSourceSurface();}-export function DocumentProjectDemo() {+export function DocumentProjectDemo(props: { teamEditing?: boolean } = {}) {let root!: HTMLDivElement;- const clock = createSceneClock({ root: () => root, end: 5200, lead: 900 });+ const clock = createSceneClock({+ root: () => root,+ end: props.teamEditing ? 6500 : 5200,+ lead: props.teamEditing ? 1200 : 900,+ visibilityThreshold: props.teamEditing ? 0.5 : undefined,+ });+ onMount(() => {+ if (!props.teamEditing) return;+ // The hero has an outer interaction gate around the nested ProductDemo.+ const boundary =+ root.parentElement?.closest('.demo-interaction-boundary') ?? root;+ boundary.addEventListener(DEMO_INTERACTION_EVENT, clock.pause);+ root.addEventListener('focusin', clock.pause);+ root.addEventListener('beforeinput', clock.pause);+ onCleanup(() => {+ boundary.removeEventListener(DEMO_INTERACTION_EVENT, clock.pause);+ root.removeEventListener('focusin', clock.pause);+ root.removeEventListener('beforeinput', clock.pause);+ });+ });const [source, setSource] = createSignal<DocumentSource>();const [focusSource, setFocusSource] = createSignal(false);const [comments, setComments] = createSignal<WorkspaceComment[]>([@@ -220,7 +240,11 @@ export function DocumentProjectDemo() {ref={(element) => {root = element;}}- label="Write together in the Website brief"+ label={+ props.teamEditing+ ? 'Julia and Jacob edit the Website brief together'+ : 'Write together in the Website brief'+ }onInteract={clock.pause}height={660}mobileHeight={650}@@ -258,10 +282,65 @@ export function DocumentProjectDemo() {}><h2>What we’re changing</h2>- <p>- Make the homepage easier to scan. Show what the product does before- asking people to sign up.- </p>+ <Show+ when={props.teamEditing}+ fallback={+ <p>+ Make the homepage easier to scan. Show what the product does+ before asking people to sign up.+ </p>+ }+ >+ <p class="doc-stable-edit doc-team-edit">+ <span+ class="doc-edit-measure"+ aria-hidden="true"+ contentEditable={false}+ data-content="Make the homepage easier to scan on mobile. Show the product before asking people to sign up."+ />+ <span class="doc-edit-live">+ Make the homepage easier to scan+ <span+ class="doc-team-format"+ data-selecting={+ clock.live() && clock.t() >= 4200 && clock.t() < 4800+ }+ data-bold={clock.t() >= 4800}+ >+ {typed(' on mobile', clock.t(), 2000, 3400)}+ </span>+ <Show+ when={clock.live() && clock.t() >= 2000 && clock.t() < 5000}+ >+ <span+ class="doc-caret doc-named-caret"+ data-caret="jacob"+ data-name="Jacob"+ contentEditable={false}+ aria-hidden="true"+ />+ </Show>+ .{' '}+ {typed(+ 'Show the product before asking people to sign up.',+ clock.t(),+ 700,+ 5000+ )}+ <Show+ when={clock.live() && clock.t() >= 700 && clock.t() < 5400}+ >+ <span+ class="doc-caret doc-named-caret"+ data-caret="julia"+ data-name="Julia"+ contentEditable={false}+ aria-hidden="true"+ />+ </Show>+ </span>+ </p>+ </Show><h2>Pricing</h2><p>{PROJECT_INTRO} Julia’s notes are in{' '}@@ -274,8 +353,10 @@ export function DocumentProjectDemo() {</li><li>Julia checks the copy.- {typed(' Keep the headings short.', clock.t(), 1200, 3800)}- <Show when={clock.live() && !clock.done()}>+ {props.teamEditing+ ? ' Keep the headings short.'+ : typed(' Keep the headings short.', clock.t(), 1200, 3800)}+ <Show when={!props.teamEditing && clock.live() && !clock.done()}><spanclass="doc-caret doc-named-caret"data-caret="julia"@@ -285,8 +366,10 @@ export function DocumentProjectDemo() {</li><li>Jacob tests signup.- {typed(' Check it on mobile too.', clock.t(), 2000, 5200)}- <Show when={clock.live() && !clock.done()}>+ {props.teamEditing+ ? ' Check it on mobile too.'+ : typed(' Check it on mobile too.', clock.t(), 2000, 5200)}+ <Show when={!props.teamEditing && clock.live() && !clock.done()}><spanclass="doc-caret doc-named-caret"data-caret="jacob"diff --git a/apps/marketing/src/features/marketing/components/documents/DocumentShareSheet.tsx b/apps/marketing/src/features/marketing/components/documents/DocumentShareSheet.tsxindex 1f281672b2..7e06c0917e 100644--- a/apps/marketing/src/features/marketing/components/documents/DocumentShareSheet.tsx+++ b/apps/marketing/src/features/marketing/components/documents/DocumentShareSheet.tsx@@ -2,12 +2,21 @@ import CaretDown from '@phosphor/caret-down.svg';import ChatTeardrop from '@phosphor/chat-teardrop.svg';import Eye from '@phosphor/eye.svg';import FileText from '@phosphor/file-text.svg';+import Hash from '@phosphor/hash-straight.svg';import PaperPlaneTilt from '@phosphor/paper-plane-tilt.svg';import Pencil from '@phosphor/pencil.svg';import UserCircle from '@phosphor/user-circle.svg';import Users from '@phosphor/users.svg';+import X from '@phosphor/x.svg';import { Button } from '@ui';-import { createSignal, createUniqueId, For, Show } from 'solid-js';+import {+ createSignal,+ createUniqueId,+ For,+ onCleanup,+ onMount,+ Show,+} from 'solid-js';import {type HomepagePersonId,homepagePeople,@@ -16,7 +25,15 @@ import {/** GroupChannelLabel for #launch: its other members, up to 20 characters. */export const LAUNCH_MEMBERS = 'Julia, Teo, Gabriel +1 other';-type Level = 'view' | 'comment' | 'edit';+export type ShareLevel = 'view' | 'comment' | 'edit';+type Level = ShareLevel;+export type DocumentShareHandle = {+ typeRecipient: (text: string) => void;+ typeMessage: (text: string) => void;+ selectChannel: () => void;+ share: () => void;+ reset: () => void;+};const LEVELS: { value: Level; label: string; icon: typeof Eye }[] = [{ value: 'view', label: 'View', icon: Eye },{ value: 'comment', label: 'Comment', icon: ChatTeardrop },@@ -94,17 +111,39 @@ export function DocumentShareSheet(props: {open: boolean;title: string;/** The channel the doc was mentioned in, labeled by its other members. */- channel?: { members: string; level: Level; fresh?: boolean };+ channel?: { members: string; level: Level; fresh?: boolean; name?: string };+ channelDestination?: string;+ initialPermission?: Level;+ onShareChannel?: (message: string, level: Level) => void;+ onOpenChannel?: () => void;+ onReady?: (handle: DocumentShareHandle | undefined) => void;entityLabel?: string;autoFocus?: boolean;onClose: () => void;}) {const titleId = createUniqueId();const [recipient, setRecipient] = createSignal('');- const [level, setLevel] = createSignal<Level>('edit');- const [channelLevel, setChannelLevel] = createSignal(- props.channel?.level ?? 'view'+ const [level, setLevel] = createSignal<Level>(+ props.initialPermission ?? 'edit');+ const [channelLevel, setChannelLevel] = createSignal<Level>();+ const [message, setMessage] = createSignal('');+ const [selectedChannel, setSelectedChannel] = createSignal(false);+ let messageInput: HTMLTextAreaElement | undefined;+ const showChannelOption = () =>+ !!props.channelDestination &&+ !selectedChannel() &&+ !!recipient().trim() &&+ props.channelDestination+ .toLowerCase()+ .includes(recipient().replace(/^#/, '').trim().toLowerCase());+ const chooseChannel = (focusMessage = false) => {+ if (!props.channelDestination) return;+ setSelectedChannel(true);+ setRecipient('#' + props.channelDestination);+ if (focusMessage)+ queueMicrotask(() => messageInput?.focus({ preventScroll: true }));+ };const [shared, setShared] = createSignal<{ id: string; name: string; person?: HomepagePersonId; level: Level }[]>([]);@@ -112,6 +151,14 @@ export function DocumentShareSheet(props: {const share = () => {const name = recipient().trim();if (!name) return;+ if (selectedChannel() && props.channelDestination) {+ props.onShareChannel?.(message(), level());+ setChannelLevel(undefined);+ setSelectedChannel(false);+ setRecipient('');+ setMessage('');+ return;+ }const person = MATCHES.find(([pattern]) => pattern.test(name))?.[1];setShared((rows) => [...rows.filter((row) => row.person !== person || !person),@@ -124,6 +171,27 @@ export function DocumentShareSheet(props: {]);setRecipient('');};+ onMount(() => {+ props.onReady?.({+ typeRecipient: (text) => {+ setSelectedChannel(false);+ setRecipient(text);+ },+ typeMessage: setMessage,+ selectChannel: chooseChannel,+ share,+ reset: () => {+ setRecipient('');+ setMessage('');+ setSelectedChannel(false);+ setLevel(props.initialPermission ?? 'edit');+ setChannelLevel(undefined);+ setShared([]);+ setScope('NONE');+ },+ });+ onCleanup(() => props.onReady?.(undefined));+ });return (<Show when={props.open}><div@@ -132,7 +200,11 @@ export function DocumentShareSheet(props: {if (event.target === event.currentTarget) props.onClose();}}onKeyDown={(event) => {- if (event.key === 'Escape') props.onClose();+ if (event.key === 'Escape' && !event.defaultPrevented) {+ event.preventDefault();+ event.stopPropagation();+ props.onClose();+ }}}><section@@ -156,17 +228,76 @@ export function DocumentShareSheet(props: {<span>{props.title}</span></header><div class="doc-share-to">- <input- aria-label="Email or group"- placeholder="To: Email or group"- value={recipient()}- onInput={(event) => setRecipient(event.currentTarget.value)}- onKeyDown={(event) => {- if (event.key === 'Enter' && (event.metaKey || event.ctrlKey))- share();- }}- />- <Show when={recipient().trim()}>+ <Show+ when={selectedChannel()}+ fallback={+ <input+ aria-label="Email or group"+ placeholder="To: Email or group"+ value={recipient()}+ onInput={(event) => setRecipient(event.currentTarget.value)}+ onKeyDown={(event) => {+ if (+ event.key === 'Enter' &&+ (event.metaKey || event.ctrlKey)+ )+ share();+ else if (event.key === 'Enter' && showChannelOption()) {+ event.preventDefault();+ chooseChannel(true);+ } else if (+ event.key === 'ArrowDown' &&+ showChannelOption()+ ) {+ event.preventDefault();+ event.currentTarget.parentElement+ ?.querySelector<HTMLElement>('[role="option"]')+ ?.focus();+ }+ }}+ />+ }+ >+ <span class="doc-share-recipient-chip">+ <Hash class="size-4" />+ {props.channelDestination}+ <button+ type="button"+ aria-label="Remove channel recipient"+ onClick={() => {+ setSelectedChannel(false);+ setRecipient('');+ }}+ >+ <X class="size-3" />+ </button>+ </span>+ </Show>+ <Show when={showChannelOption()}>+ <div+ class="doc-share-suggestions"+ role="listbox"+ aria-label="Channels"+ >+ <button+ type="button"+ role="option"+ aria-selected="true"+ data-share-channel-option+ onClick={() => chooseChannel(true)}+ >+ <Hash class="size-4" />+ <span>{props.channelDestination}</span>+ <span class="ml-auto text-xs text-ink-muted">Channel</span>+ </button>+ </div>+ </Show>+ <Show+ when={+ selectedChannel() ||+ (!props.channelDestination && recipient().trim())+ }+ ><span class="doc-share-can">can</span></Show><AccessLevel@@ -177,9 +308,12 @@ export function DocumentShareSheet(props: {/></div><textarea+ ref={messageInput}class="doc-share-message"aria-label="Optional message"placeholder="Optional message"+ value={message()}+ onInput={(event) => setMessage(event.currentTarget.value)}/><div class="doc-share-actions"><Button@@ -193,7 +327,8 @@ export function DocumentShareSheet(props: {<Buttonvariant="strong"depth={3}- disabled={!recipient().trim()}+ disabled={!recipient().trim() || showChannelOption()}+ data-share-submitonClick={share}><PaperPlaneTilt class="size-4" />@@ -224,12 +359,33 @@ export function DocumentShareSheet(props: {data-channel-access><span>- <Users />- <span>{channel().members}</span>+ <Show+ when={props.onOpenChannel}+ fallback={+ <>+ <Users />+ <span>{channel().members}</span>+ </>+ }+ >+ <button+ type="button"+ data-open-shared-channel+ class="doc-share-channel-link"+ aria-label={`Open #${channel().name ?? 'launch'}`}+ onClick={props.onOpenChannel}+ >+ <Hash class="size-4" />+ <span>{channel().name ?? 'launch'}</span>+ <span class="text-xs text-ink-muted">+ {channel().members}+ </span>+ </button>+ </Show></span><AccessLevellabel={`Access for ${channel().members}`}- value={channelLevel()}+ value={channelLevel() ?? channel().level}onChange={setChannelLevel}/></div>@@ -268,7 +424,11 @@ export function DocumentShareSheet(props: {<span>{LINK_SCOPES[scope()].title}<span class="doc-share-status">- {scope() === 'NONE' ? 'Shared' : LINK_SCOPES[scope()].label}+ {scope() === 'NONE'+ ? props.channel || shared().length+ ? 'Shared'+ : 'Not shared'+ : LINK_SCOPES[scope()].label}</span></span><spandiff --git a/apps/marketing/src/features/marketing/components/documents/DocumentSharingDemo.tsx b/apps/marketing/src/features/marketing/components/documents/DocumentSharingDemo.tsxindex ce6179daef..c7303fdaee 100644--- a/apps/marketing/src/features/marketing/components/documents/DocumentSharingDemo.tsx+++ b/apps/marketing/src/features/marketing/components/documents/DocumentSharingDemo.tsx@@ -138,7 +138,6 @@ export function DocumentSharingDemo() {<Show when={automatic() && pointer()}>{(point) => (<DemoCursor- label="Jacob"class="doc-story-cursor doc-story-glide"clicking={phase() === 2 || phase() === 4}style={{diff --git a/apps/marketing/src/features/marketing/components/documents/DocumentStories.test.tsx b/apps/marketing/src/features/marketing/components/documents/DocumentStories.test.tsxindex 5fb09628ca..decf5eb9f1 100644--- a/apps/marketing/src/features/marketing/components/documents/DocumentStories.test.tsx+++ b/apps/marketing/src/features/marketing/components/documents/DocumentStories.test.tsx@@ -1,5 +1,6 @@import { cleanup, fireEvent, render, within } from '@solidjs/testing-library';import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { DemoInteractionBoundary } from '../DemoInteractionBoundary';import { DocumentOrganizationDemo } from './DocumentOrganizationDemo';import { DocumentProjectDemo } from './DocumentProjectDemo';import {@@ -56,10 +57,15 @@ afterEach(() => {vi.restoreAllMocks();vi.unstubAllGlobals();});-function visible(value: boolean) {+function visible(value: boolean, ratio = 1) {for (const callback of intersections)callback(- [{ isIntersecting: value } as IntersectionObserverEntry],+ [+ {+ isIntersecting: value,+ intersectionRatio: ratio,+ } as IntersectionObserverEntry,+ ],{} as IntersectionObserver);}@@ -70,6 +76,67 @@ function reduce() {const body = (view: ReturnType<typeof render>) =>view.getByRole('textbox', { name: 'Document body' });+it('keeps the hero edits near the top and waits until the document is readable', () => {+ const view = render(() => <DocumentProjectDemo teamEditing />);+ visible(true, 0.2);+ vi.advanceTimersByTime(10000);+ expect(body(view).textContent).not.toContain('Show the product before');+ visible(true);+ vi.advanceTimersByTime(4100);+ const jacob = body(view).querySelector('[data-caret="jacob"]');+ const julia = body(view).querySelector('[data-caret="julia"]');+ expect(jacob).toBeTruthy();+ expect(julia).toBeTruthy();+ expect(jacob?.closest('p')).toBe(body(view).querySelector('p'));+ expect(julia?.closest('p')).toBe(jacob?.closest('p'));+ expect(body(view).querySelector('[data-caret="claude"]')).toBeNull();+ vi.advanceTimersByTime(10000);+ expect(body(view).textContent).toContain(+ 'Make the homepage easier to scan on mobile. Show the product before asking people to sign up.'+ );+ expect(body(view).querySelector('[data-caret]')).toBeNull();+});++it('hands the hero to the visitor on activation and preserves typing and formatting', () => {+ const view = render(() => (+ <DemoInteractionBoundary label="Docs hero">+ <DocumentProjectDemo teamEditing />+ </DemoInteractionBoundary>+ ));+ visible(true);+ vi.advanceTimersByTime(4100);+ fireEvent.click(+ view.getByRole('button', { name: /Interact with Docs hero/ })+ );+ const editor = body(view);+ expect(editor.querySelector('[data-caret]')).toBeNull();+ fireEvent(+ editor,+ new InputEvent('beforeinput', {+ bubbles: true,+ inputType: 'insertText',+ data: 'Keep this edit.',+ })+ );+ editor.innerHTML = '<p>Keep this <strong>edit.</strong></p>';+ fireEvent.input(editor);+ reduce();+ vi.advanceTimersByTime(20000);+ expect(editor.innerHTML).toBe('<p>Keep this <strong>edit.</strong></p>');+});++it('shows the complete two-person hero for reduced motion', () => {+ reduced = true;+ const view = render(() => <DocumentProjectDemo teamEditing />);+ expect(body(view).textContent).toContain(+ 'Make the homepage easier to scan on mobile. Show the product before asking people to sign up.'+ );+ expect(body(view).querySelector('[data-caret]')).toBeNull();+ visible(true);+ vi.advanceTimersByTime(20000);+ expect(body(view).querySelector('[data-caret]')).toBeNull();+});+it('reads the sources before editing and keeps both collaborators in one paragraph', () => {const view = render(() => <DocumentAgentDemo />);const hit = view.container.querySelector('[data-search-hit="email"]');@@ -86,7 +153,7 @@ it('reads the sources before editing and keeps both collaborators in one paragraexpect(human).toBeTruthy();expect(agent?.parentElement).toBe(human?.parentElement);expect(view.container.querySelector('[data-search-hit="email"]')).toBe(hit);- vi.advanceTimersByTime(20000);+ vi.advanceTimersByTime(6000);expect(body(view).textContent).toContain('Annual plans get two months free');expect(body(view).textContent).toContain('Link to the billing FAQ below the table.'@@ -140,7 +207,7 @@ it('merges an offline edit with the teammate edit on reconnect', () => {expect(body(view).textContent).not.toContain('Julia has the email ready');vi.advanceTimersByTime(800);expect(view.getByRole('status', { name: 'Reconnecting' })).toBeTruthy();- vi.advanceTimersByTime(10000);+ vi.advanceTimersByTime(2000);expect(view.queryByRole('status')).toBeNull();expect(body(view).textContent).toContain('Julia has the email ready. Send it tomorrow. Add a screenshot'@@ -186,7 +253,7 @@ it('filters the folder and navigates a nested folder', () => {it('opens sources beside the doc and restores focus without losing edits', () => {vi.spyOn(HTMLElement.prototype, 'clientWidth', 'get').mockReturnValue(1000);- const view = render(() => <DocumentProjectDemo />);+ const view = render(() => <DocumentProjectDemo teamEditing />);const editor = body(view);fireEvent.pointerDown(editor);editor.append(document.createTextNode(' Keep this sentence.'));@@ -252,7 +319,7 @@ it('keeps source playback stopped after closing a split', () => {it('compacts completed tool calls and lets the visitor reopen them', () => {const view = render(() => <DocumentAgentDemo />);visible(true);- vi.advanceTimersByTime(20000);+ vi.advanceTimersByTime(12000);const toggle = view.getByRole('button', { name: 'Called 4 tools' });expect(toggle.getAttribute('aria-expanded')).toBe('false');fireEvent.click(toggle);diff --git a/apps/marketing/src/features/marketing/components/documents/DocumentStories.tsx b/apps/marketing/src/features/marketing/components/documents/DocumentStories.tsxindex a7a281f227..49ebc18d87 100644--- a/apps/marketing/src/features/marketing/components/documents/DocumentStories.tsx+++ b/apps/marketing/src/features/marketing/components/documents/DocumentStories.tsx@@ -101,6 +101,17 @@ export function DocumentAgentDemo() {label={PROJECT_TITLE}description="The website copy and pricing changes."href="#document-agents"+ onOpen={() => {+ pause();+ setSource(undefined);+ queueMicrotask(() =>+ editorRoot+ .querySelector<HTMLElement>(+ '[aria-label="Document body"]'+ )+ ?.focus({ preventScroll: true })+ );+ }}/>{' '}from the latest pricing email.</>diff --git a/apps/marketing/src/features/marketing/components/documents/document-stories.css b/apps/marketing/src/features/marketing/components/documents/document-stories.cssindex 2474816a8d..3dce8c1d11 100644--- a/apps/marketing/src/features/marketing/components/documents/document-stories.css+++ b/apps/marketing/src/features/marketing/components/documents/document-stories.css@@ -191,7 +191,7 @@.doc-click-tags { display: flex; gap: 8px; padding-left: 6px; }.doc-click-tags button { padding: 3px 6px; border-radius: 5px; color: var(--color-ink-muted); font-size: 12px; }.doc-click-tags button:hover { background: var(--color-hover); }-.doc-organize-pointer { position: absolute; inset: 0 auto auto 0; z-index: 10; pointer-events: none; transition: transform 700ms ease; }+.doc-organize-pointer { position: absolute; inset: 0 auto auto 0; z-index: 10; pointer-events: none; }@media (max-width: 699px) {.docs-page .doc-story-page { padding-top: 24px; }.docs-page .doc-story-title { font-size: 23px; line-height: 30px; }@@ -235,6 +235,11 @@.docs-wide-demo .doc-story-title { font-size: 24px; }.docs-wide-demo .doc-story-scroll { padding-inline: 24px; }.doc-edit-measure::before { content: attr(data-content); }++/* The Docs hero keeps both human edits in its first visible paragraph. */+.doc-team-edit .doc-caret[data-caret='jacob'] { --doc-caret: var(--color-accent); }+.doc-team-format[data-selecting=true] { background: color-mix(in oklch, var(--color-accent) 25%, transparent); }+.doc-team-format[data-bold=true] { font-weight: 600; }.doc-agent-tools { transition: min-height 380ms ease; }.doc-agent-tools[data-open=false] { min-height: 32px; }@media (prefers-reduced-motion: reduce) { .doc-agent-tools { transition: none; } }@@ -244,3 +249,12 @@@media(max-width:699px) {.docs-page .email-page-hero > .email-page-hero-description { font-size:clamp(10px, 2.9vw, 14px); }}++/* ForwardToChannel recipient selection, using the existing share form surface. */+.doc-share-to { position:relative; }+.doc-share-recipient-chip { display:inline-flex; align-items:center; gap:6px; margin-right:auto; padding:4px 8px; border-radius:6px; background:var(--color-surface-2); font-size:14px; }+.doc-share-recipient-chip button { display:inline-flex; }+.doc-share-suggestions { position:absolute; left:8px; right:8px; top:100%; z-index:2; padding:4px; border:1px solid var(--color-edge-muted); border-radius:8px; background:var(--color-panel); box-shadow:0 8px 24px #0004; }+.doc-share-suggestions button { display:flex; align-items:center; gap:8px; width:100%; padding:8px; border-radius:4px; background:var(--color-hover); text-align:left; font-size:14px; }+.doc-share-channel-link { display:flex; align-items:center; gap:8px; min-width:0; text-align:left; }+.doc-share-channel-link > span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }diff --git a/apps/marketing/src/features/marketing/components/documents/documentScene.ts b/apps/marketing/src/features/marketing/components/documents/documentScene.tsindex 2366e7a540..d69a90c229 100644--- a/apps/marketing/src/features/marketing/components/documents/documentScene.ts+++ b/apps/marketing/src/features/marketing/components/documents/documentScene.ts@@ -1,4 +1,5 @@-import { createEffect, createSignal, onCleanup, onMount } from 'solid-js';+import { createSignal } from 'solid-js';+import { createDemoPointer } from '../../primitives/createDemoPointer';import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';export type Point = { x: number; y: number };@@ -14,6 +15,7 @@ export function createSceneClock(options: {/** Wait before the first frame once the demo is on screen. */lead?: number;tick?: number;+ visibilityThreshold?: number;}) {const tick = options.tick ?? 50;const [t, setT] = createSignal(0);@@ -22,8 +24,14 @@ export function createSceneClock(options: {const finish = () => setT(options.end);const playback = createProductWalkthrough({root: options.root,+ visibilityThreshold: options.visibilityThreshold,steps: Math.ceil(options.end / tick),- reset: () => {},+ loop: { hold: 8000 },+ reset: () => {+ setT(0);+ setLive(true);+ },+ onTakeover: () => setLive(false),reduced: () => {setReduced(true);setLive(false);@@ -82,33 +90,10 @@ export function createAnchor(options: {/** Re-measure whenever this changes, e.g. the scene clock. */track?: () => unknown;}) {- const [point, setPoint] = createSignal<Point>();- const measure = () => {- options.track?.();- const frame = options.frame();- const target = options.target();- const element = target- ? frame?.querySelector<HTMLElement>(target.selector)- : undefined;- if (!frame || !target || !element) {- setPoint(undefined);- return;- }- const bounds = frame.getBoundingClientRect();- const place = (target.place ?? caretPoint)(element.getBoundingClientRect());- setPoint({ x: place.x - bounds.left, y: place.y - bounds.top });- };- createEffect(measure);- onMount(() => {- const frame = options.frame();- if (!frame) return;- const resize = new ResizeObserver(measure);- resize.observe(frame);- frame.addEventListener('scroll', measure, true);- onCleanup(() => {- resize.disconnect();- frame.removeEventListener('scroll', measure, true);- });+ return createDemoPointer({+ frame: options.frame,+ target: () => options.target()?.selector,+ track: options.track,+ place: (rect) => (options.target()?.place ?? caretPoint)(rect),});- return point;}diff --git a/apps/marketing/src/features/marketing/components/email/EmailAccountsDemo.tsx b/apps/marketing/src/features/marketing/components/email/EmailAccountsDemo.tsxnew file mode 100644index 0000000000..aa992b9bca--- /dev/null+++ b/apps/marketing/src/features/marketing/components/email/EmailAccountsDemo.tsx@@ -0,0 +1,387 @@+import ArrowLeft from '@phosphor/arrow-left.svg';+import Check from '@phosphor/check.svg';+import Plus from '@phosphor/plus.svg';+import Tray from '@phosphor/tray.svg';+import { Button, Dropdown } from '@ui';+import { createSignal, For, Show } from 'solid-js';+import {+ type DemoEmail,+ demoMailAccounts,+ type EmailTagId,+ emailTags,+} from '../../core/demo-email';+import { emailPageInbox } from '../../core/email-demo-story';+import { createDemoPointer } from '../../primitives/createDemoPointer';+import { createEmailWalkthrough } from '../../primitives/createEmailWalkthrough';+import { DemoCursor } from '../DemoCursor';+import HomepageEmailCompose from '../HomepageEmailCompose';+import { EmailRows } from './frozen/EmailRows';+import {+ EmailShell,+ EmailSidebar,+ type MailTab,+ mailTabs,+} from './frozen/EmailShell';+import { EmailThread } from './frozen/EmailThread';+import { SearchBar } from './frozen/SearchBar';+import './email-feature-demos.css';+import './email-accounts-demo.css';++/** EmailInboxList/EmailInboxMenu presentation with local sample accounts only. */+export function EmailAccountsDemo() {+ let root!: HTMLDivElement;+ const [target, setTarget] = createSignal<string>();+ const [clicking, setClicking] = createSignal(false);+ const approach = (selector: string) => {+ setClicking(false);+ setTarget(selector);+ };+ const click = (run: () => void) => {+ setClicking(true);+ run();+ };++ const [accountCount, setAccountCount] = createSignal(1);+ const [account, setAccount] = createSignal('work');+ const [tab, setTab] = createSignal<MailTab>('important');+ const [tag, setTag] = createSignal<EmailTagId>();+ const [query, setQuery] = createSignal('');+ const [selected, setSelected] = createSignal<DemoEmail>();+ const [compose, setCompose] = createSignal(false);+ const [step, setStep] = createSignal(0);+ const accounts = () => demoMailAccounts.slice(0, accountCount());+ const accountLabel = () =>+ demoMailAccounts.find((a) => a.id === account())?.label ?? 'All inboxes';+ const title = () =>+ emailTags.find((t) => t.id === tag())?.label ??+ mailTabs.find((t) => t.id === tab())?.label;+ const emails = () =>+ emailPageInbox.filter(+ (email) =>+ accounts().some((account) => account.id === email.account) &&+ (account() === 'all' || email.account === account()) &&+ (!tag() || email.tags?.includes(tag()!)) &&+ (tab() === 'all' ||+ (tab() === 'important' && !email.noise) ||+ (tab() === 'noise' && email.noise) ||+ (tab() === 'favorites' && email.favorite)) &&+ `${email.sender} ${email.subject} ${email.snippet}`+ .toLowerCase()+ .includes(query().toLowerCase())+ );+ const finish = () => {+ setMenuOpen(false);+ setTarget(undefined);+ setClicking(false);+ setAccountCount(3);+ setAccount('all');+ setTab('important');+ setStep(7);+ };+ const [menuOpen, setMenuOpen] = createSignal(false);+ const mobile = () =>+ (root+ .querySelector<HTMLElement>('.email-accounts-mobile')+ ?.getBoundingClientRect().width ?? 0) > 0;+ const applyAccount = (id: string) => {+ setAccount(id);+ setSelected(undefined);+ setCompose(false);+ };+ const connectAccount = () => {+ setAccountCount((count) => Math.min(count + 1, 3));+ applyAccount('all');+ };+ const selectControl = (selector: string, run: () => void, hold = 1400) => [+ {+ delay: hold,+ run: () => approach(mobile() ? '[data-email-inbox-menu]' : selector),+ },+ {+ delay: 650,+ run: () => {+ if (mobile()) click(() => setMenuOpen(true));+ },+ },+ { delay: 300, run: () => approach(selector) },+ {+ delay: 650,+ run: () =>+ click(() => {+ run();+ setMenuOpen(false);+ }),+ },+ ];+ const actions = [+ ...selectControl('[data-email-connect]', () => setStep(1)),+ {+ delay: 900,+ run: () => {+ connectAccount();+ setStep(2);+ },+ },+ ...selectControl('[data-email-connect]', () => setStep(3)),+ {+ delay: 900,+ run: () => {+ connectAccount();+ setStep(4);+ },+ },+ ...selectControl(+ '[data-email-account="personal"]',+ () => {+ applyAccount('personal');+ setStep(6);+ },+ 2200+ ),+ ...selectControl(+ '[data-email-account="all"]',+ () => {+ applyAccount('all');+ setStep(7);+ },+ 2200+ ),+ { delay: 400, run: () => setClicking(false) },+ ];+ const playback = createEmailWalkthrough({+ root: () => root,+ steps: actions.length,+ visibilityThreshold: 0.45,+ delay: (step) => actions[step - 1].delay,+ loop: { hold: 8000 },+ reset: () => {+ setTarget(undefined);+ setClicking(false);+ setMenuOpen(false);+ setAccountCount(1);+ setAccount('work');+ setTab('important');+ setStep(0);+ },+ reduced: finish,+ advance: (next) => actions[next - 1].run(),+ });+ const chooseAccount = (id: string) => {+ playback.pause();+ applyAccount(id);+ };+ const chooseTab = (id: MailTab) => {+ playback.pause();+ setTab(id);+ setTag(undefined);+ setSelected(undefined);+ setCompose(false);+ };+ const connect = () => {+ playback.pause();+ connectAccount();+ setStep(7);+ };+ const pointer = createDemoPointer({+ frame: () => root,+ target,+ active: () => playback.playing() && !playback.reducedMotion(),+ });+ return (+ <div+ ref={root}+ class="email-feature-demo email-accounts-demo"+ data-step={step()}+ onPointerDown={playback.pause}+ onFocusIn={playback.pause}+ >+ <EmailShell+ showRail={false}+ label="Try multiple email accounts"+ sidebar={+ <EmailSidebar+ account={account()}+ accounts={accounts()}+ onAccount={chooseAccount}+ onConnect={accountCount() < 3 ? connect : undefined}+ connecting={step() === 1 || step() === 3}+ tab={tab()}+ onTab={chooseTab}+ tag={tag()}+ onTag={(id) => {+ chooseTab('all');+ setAccount('all');+ setTag(id);+ }}+ onCompose={() => {+ playback.pause();+ setCompose(true);+ }}+ />+ }+ >+ <header class="email-feature-toolbar email-accounts-toolbar">+ <Show when={selected() || compose()}>+ <Button+ variant="plain"+ size="icon-sm"+ aria-label="Back to inbox"+ onClick={() => {+ setSelected(undefined);+ setCompose(false);+ }}+ >+ <ArrowLeft />+ </Button>+ </Show>+ <span>+ {compose() ? 'New email' : (selected()?.subject ?? title())}+ </span>+ <Show when={account() !== 'all' && !selected() && !compose()}>+ <span class="email-account-scope">from {accountLabel()}</span>+ </Show>+ <div class="email-accounts-mobile">+ <Dropdown+ placement="bottom-end"+ modal={false}+ open={menuOpen()}+ onOpenChange={setMenuOpen}+ >+ <Dropdown.Trigger+ variant="ghost"+ size="icon-sm"+ aria-label={`Inbox: ${accountLabel()}`}+ data-email-inbox-menu+ >+ <Tray />+ </Dropdown.Trigger>+ <Dropdown.Content+ class="min-w-56"+ mount={root?.querySelector<HTMLElement>('.mail-app') ?? root}+ onOpenAutoFocus={(event) => {+ if (playback.playing()) event.preventDefault();+ }}+ onCloseAutoFocus={(event) => {+ if (playback.playing()) event.preventDefault();+ }}+ >+ <Dropdown.RadioGroup value={account()} onChange={chooseAccount}>+ <Dropdown.RadioItem+ value="all"+ data-email-account="all"+ closeOnSelect+ >+ All inboxes+ </Dropdown.RadioItem>+ <For each={accounts()}>+ {(a) => (+ <Dropdown.RadioItem+ value={a.id}+ data-email-account={a.id}+ closeOnSelect+ >+ {a.label}+ </Dropdown.RadioItem>+ )}+ </For>+ </Dropdown.RadioGroup>+ <Show when={accountCount() < 3}>+ <Dropdown.Item+ onSelect={connect}+ data-email-connect+ closeOnSelect+ >+ <Plus class="size-4 shrink-0" />+ Connect another account+ </Dropdown.Item>+ </Show>+ </Dropdown.Content>+ </Dropdown>+ </div>+ </header>+ <Show+ when={!compose()}+ fallback={+ <div class="email-account-compose">+ <HomepageEmailCompose+ appChrome+ draft={{ subject: '', to: '', cc: '', body: '' }}+ />+ </div>+ }+ >+ <Show+ when={selected()}+ fallback={+ <>+ <nav+ class="email-account-mobile-tabs"+ aria-label="Mobile email tabs"+ >+ <For+ each={mailTabs.filter((t) =>+ ['important', 'noise', 'all'].includes(t.id)+ )}+ >+ {(t) => (+ <button+ type="button"+ aria-pressed={tab() === t.id}+ onClick={() => chooseTab(t.id)}+ >+ <t.icon />+ {t.label}+ </button>+ )}+ </For>+ </nav>+ <div class="email-account-search">+ <SearchBar+ label="Search across inboxes"+ placeholder="Search email"+ hotkey="cmd+f"+ value={query()}+ onValueChange={(value) => {+ playback.pause();+ setQuery(value);+ }}+ />+ </div>+ <div class="email-account-list">+ <EmailRows+ emails={emails()}+ onOpen={(email) => {+ playback.pause();+ setSelected(email);+ }}+ />+ </div>+ </>+ }+ >+ {(email) => (+ <div class="email-account-thread">+ <EmailThread email={email()} hideHeader hideReply />+ </div>+ )}+ </Show>+ </Show>+ <Show when={(step() === 2 || step() === 4) && playback.playing()}>+ <div class="email-account-connected" role="status">+ <Check />+ Account connected+ </div>+ </Show>+ </EmailShell>+ <Show when={pointer()}>+ {(point) => (+ <DemoCursor+ class="email-demo-pointer"+ clicking={clicking()}+ style={{ transform: `translate(${point().x}px, ${point().y}px)` }}+ />+ )}+ </Show>+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/email/EmailAgenticEditingDemo.tsx b/apps/marketing/src/features/marketing/components/email/EmailAgenticEditingDemo.tsxindex 4a7384cafe..4bf249d6ab 100644--- a/apps/marketing/src/features/marketing/components/email/EmailAgenticEditingDemo.tsx+++ b/apps/marketing/src/features/marketing/components/email/EmailAgenticEditingDemo.tsx@@ -1,37 +1,270 @@-import { HomepageConversation } from '../HomepageConversation';+import Sparkle from '@phosphor/sparkle.svg';+import { UserMessageBubble } from '@ui/components/UserMessageBubble';+import { createSignal, lazy, Show, Suspense } from 'solid-js';+import { meetingDraft } from '../../core/email-demo-story';+import { createDemoPointer } from '../../primitives/createDemoPointer';+import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';+import { createEmailWalkthrough } from '../../primitives/createEmailWalkthrough';+import { demoTypingActions } from '../../primitives/demoTypingActions';+import { DemoCursor } from '../DemoCursor';import HomepageEmailCompose from '../HomepageEmailCompose';import { HomepageMention } from '../HomepageMention';+import {+ ChannelComposer,+ type ChannelComposerHandle,+} from './frozen/ChannelComposer';+import { EmailShell } from './frozen/EmailShell';+import './email-feature-demos.css';import './email-agentic-editing.css';-/** The homepage conversation and editable draft, kept local to this demo. */+const EmailDemoSource = lazy(() => import('./EmailDemoSource'));++const request =+ 'Draft a reply to Valentina confirming Thursday at 9. Use the call notes, include the setup plan and Macro overview, and copy Julia. Leave it as a draft.';++/** User request → source context → editable email, as in the app's agent chat. */export function EmailAgenticEditingDemo() {+ let root!: HTMLDivElement;+ const [target, setTarget] = createSignal<string>();+ const [clicking, setClicking] = createSignal(false);+ const approach = (selector: string) => {+ setClicking(false);+ setTarget(selector);+ };+ const click = (run: () => void) => {+ setClicking(true);+ run();+ };++ let scroll!: HTMLDivElement;+ let draft!: HTMLDivElement;+ let composer: ChannelComposerHandle | undefined;+ const [phase, setPhase] = createSignal(0);+ const [prompt, setPrompt] = createSignal(request);+ const [source, setSource] = createSignal<'setup' | 'call'>();+ const workspace = createDummyWorkspace('documents');+ workspace.setData('documents', [+ {+ id: 'email-setup',+ title: 'Setup plan',+ body: '## Before Thursday\n\n- Connect your email inbox.\n- Invite your teammates.\n- Choose the documents to share with your team.\n\nJulia can help with setup before the demo at 9.',+ comments: [],+ },+ ]);+ workspace.open('documents', 'email-setup');+ let sourceTrigger: HTMLAnchorElement | undefined;+ const openSource = (kind: 'setup' | 'call', trigger: HTMLAnchorElement) => {+ playback.pause();+ sourceTrigger = trigger;+ setSource(kind);+ };+ const closeSource = () => {+ setSource(undefined);+ queueMicrotask(() => sourceTrigger?.focus({ preventScroll: true }));+ };+ const showDraft = () => {+ setPhase(3);+ composer?.setText('');+ queueMicrotask(() => {+ if (draft && scroll)+ scroll.scrollTo({+ top: scroll.scrollHeight,+ behavior: playback.reducedMotion() ? 'instant' : 'smooth',+ });+ });+ };+ const actions = [+ {+ delay: 900,+ run: () => approach('[aria-label="Message the email agent"]'),+ },+ { delay: 650, run: () => click(() => {}) },+ ...demoTypingActions(+ request,+ (text) => {+ setClicking(false);+ setTarget(undefined);+ composer?.setText(text);+ },+ 250+ ),+ { delay: 700, run: () => approach('[aria-label="Send demo message"]') },+ {+ delay: 650,+ run: () =>+ click(() => {+ setPhase(1);+ composer?.setText('');+ }),+ },+ { delay: 200, run: () => setClicking(false) },+ { delay: 1600, run: () => setPhase(2) },+ { delay: 2200, run: showDraft },+ ];+ const playback = createEmailWalkthrough({+ root: () => root,+ steps: actions.length,+ visibilityThreshold: 0.45,+ delay: (step) => actions[step - 1].delay,+ loop: { hold: 8000 },+ reset: () => {+ setTarget(undefined);+ setClicking(false);+ setPhase(0);+ setPrompt(request);+ composer?.setText('');+ },+ reduced: () => {+ setPhase(3);+ composer?.setText('');+ },+ advance: (step) => actions[step - 1].run(),+ });+ const pointer = createDemoPointer({+ frame: () => root,+ target,+ active: () => playback.playing() && !playback.reducedMotion(),+ });return (- <div class="email-editing-stage">- <HomepageConversation- messages={[- {- person: 'julia',- text: 'Dana wants to invite her team. Are we still on for Thursday?',- },- {- person: 'jacob',- text: (- <>- <span class="homepage-person-mention">@Claude</span>, draft a- follow-up email based on{' '}- <HomepageMention- kind="call"- label="Demo call transcript"- description="The demo with Dana: team rollout, sales materials, and next steps."- href="#agentic-editing"- />- . Include the sales PDF and rollout doc, and cc Julia.- </>- ),- },- ]}- />- <HomepageEmailCompose appChrome />+ <div+ ref={root}+ class="email-editing-stage email-feature-demo"+ data-phase={phase()}+ onPointerDown={playback.pause}+ onFocusIn={playback.pause}+ onKeyDown={(event) => {+ if (event.key === 'Escape' && source() && !event.defaultPrevented) {+ event.preventDefault();+ event.stopPropagation();+ closeSource();+ }+ }}+ >+ <EmailShell label="Draft a reply from your work" showRail={false}>+ <div class="email-agent-splits" data-source-open={!!source()}>+ <Show when={source()} keyed>+ {(kind) => (+ <section+ class="email-agent-source workspace-demo dummy-workspace"+ aria-label="Linked source"+ >+ <Suspense fallback={<p role="status">Opening source…</p>}>+ <EmailDemoSource+ source={kind}+ workspace={workspace}+ onBack={closeSource}+ onReady={() =>+ root+ .querySelector<HTMLElement>(+ '.email-agent-source button'+ )+ ?.focus({ preventScroll: true })+ }+ />+ </Suspense>+ </section>+ )}+ </Show>+ <div class="email-agent-main">+ <header class="email-feature-toolbar email-draft-title">+ <Sparkle />+ <span>Draft a follow-up</span>+ </header>+ <div ref={scroll} class="email-agent-scroll">+ <div class="email-agent-content">+ <Show when={phase() >= 1}>+ <div class="email-agent-request">+ <UserMessageBubble>{prompt()}</UserMessageBubble>+ </div>+ </Show>+ <Show when={phase() >= 2}>+ <div class="email-agent-context">+ Thursday at 9 is confirmed in the{' '}+ <HomepageMention+ kind="call"+ label="Demo call"+ description="Valentina confirmed Thursday at 9. Julia will help with setup."+ href="/calls"+ onOpen={(trigger) => openSource('call', trigger)}+ />+ . The{' '}+ <HomepageMention+ kind="md"+ label="Setup plan"+ description="Connect your email, invite your teammates, and choose the documents to share. Julia can help."+ href="/documents"+ onOpen={(trigger) => openSource('setup', trigger)}+ />{' '}+ covers the setup steps.+ </div>+ </Show>+ <Show when={phase() >= 3}>+ <div ref={draft} class="email-agent-draft">+ <HomepageEmailCompose+ appChrome+ draft={meetingDraft}+ bodyContent={+ <>+ <p>Hi Valentina,</p>+ <p>Thursday at 9 works.</p>+ <p>+ Here’s the{' '}+ <HomepageMention+ kind="md"+ label="Setup plan"+ description="Connect your email, invite your teammates, and share your documents."+ href="/documents"+ onOpen={(trigger) => openSource('setup', trigger)}+ />{' '}+ and our{' '}+ <HomepageMention+ kind="pdf"+ label="Macro overview.pdf"+ description="A short overview of Macro and how to get started."+ href="/documents"+ />+ .+ </p>+ <p>I’ve copied Julia, who can help with setup.</p>+ <p>+ See you Thursday,+ <br />+ Jacob+ </p>+ </>+ }+ />+ </div>+ </Show>+ </div>+ </div>+ <div class="email-agent-input">+ <ChannelComposer+ agent+ label="Message the email agent"+ placeholder="Ask a follow-up..."+ onReady={(handle) => {+ composer = handle;+ }}+ onSend={(text) => {+ playback.pause();+ setPrompt(text);+ showDraft();+ }}+ />+ </div>+ </div>+ </div>+ </EmailShell>+ <Show when={pointer()}>+ {(point) => (+ <DemoCursor+ class="email-demo-pointer"+ clicking={clicking()}+ style={{ transform: `translate(${point().x}px, ${point().y}px)` }}+ />+ )}+ </Show></div>);}diff --git a/apps/marketing/src/features/marketing/components/email/EmailAutoTagsDemo.tsx b/apps/marketing/src/features/marketing/components/email/EmailAutoTagsDemo.tsxdeleted file mode 100644index 53b4f367da..0000000000--- a/apps/marketing/src/features/marketing/components/email/EmailAutoTagsDemo.tsx+++ /dev/null@@ -1,206 +0,0 @@-import ArrowLeft from '@phosphor/arrow-left.svg';-import Check from '@phosphor/check.svg';-import Tag from '@phosphor/tag.svg';-import X from '@phosphor/x.svg';-import { Button } from '@ui';-import { createSignal, For, Show } from 'solid-js';-import {- type DemoEmail,- demoEmails,- type EmailTagId,- emailTags,-} from '../../core/demo-email';-import { createEmailWalkthrough } from '../../primitives/createEmailWalkthrough';-import { DemoCursor } from '../DemoCursor';-import { EmailRows } from './frozen/EmailRows';-import { EmailShell } from './frozen/EmailShell';-import { EmailThread } from './frozen/EmailThread';-import './email-feature-demos.css';-import './email-auto-tags-stage.css';--const incoming = demoEmails.slice(0, 4);--export function EmailAutoTagsDemo() {- let root!: HTMLDivElement;- const [tags, setTags] = createSignal<Record<string, EmailTagId[]>>({});- const [selected, setSelected] = createSignal(0);- const [menu, setMenu] = createSignal(false);- const [opened, setOpened] = createSignal(false);- const [step, setStep] = createSignal(0);- const emails = () =>- incoming.map((email) => ({ ...email, tags: tags()[email.id] ?? [] }));- const email = () => emails()[selected()];- const finish = () => {- setTags(- Object.fromEntries(incoming.map((email) => [email.id, email.tags ?? []]))- );- setMenu(false);- setStep(9);- };- const playback = createEmailWalkthrough({- root: () => root,- steps: 9,- reset: () => {- setTags({});- setSelected(0);- setMenu(false);- setOpened(false);- setStep(0);- },- reduced: finish,- advance: (next) => {- setStep(next);- if (next === 9) return finish();- const index = Math.floor((next - 1) / 2);- setSelected(index);- setMenu(next % 2 === 1);- if (next % 2 === 0)- setTags((previous) => ({- ...previous,- [incoming[index].id]: incoming[index].tags ?? [],- }));- },- });- const toggleTag = (tag: EmailTagId) => {- playback.pause();- const id = email().id;- const current = tags()[id] ?? [];- setTags({- ...tags(),- [id]: current.includes(tag)- ? current.filter((value) => value !== tag)- : [...current, tag],- });- };- const open = (item: DemoEmail) => {- playback.pause();- setSelected(incoming.findIndex((email) => email.id === item.id));- setMenu(false);- setOpened(true);- };- return (- <div- ref={root}- class="email-tags-demo email-feature-demo"- data-step={step()}- data-opened={opened()}- >- <div class="email-tag-stage">- <EmailShell label="Automatic email tagging demo" class="glass-input">- <header class="email-feature-toolbar">- <Show- when={opened()}- fallback={- <span>- Signal{' '}- <span class="email-toolbar-secondary">/ Incoming mail</span>- </span>- }- >- <Button- variant="plain"- size="icon-sm"- aria-label="Back to incoming email"- onClick={() => {- setOpened(false);- setMenu(false);- }}- >- <ArrowLeft />- </Button>- <span class="truncate">{email().subject}</span>- </Show>- <span class="email-tag-count" role="status">- {Object.values(tags()).filter((value) => value.length).length} /{' '}- {incoming.length} tagged- </span>- <Button- variant="ghost"- size="sm"- class="ml-auto"- aria-label="Edit selected email tags"- aria-expanded={menu()}- onClick={() => {- playback.pause();- setMenu(!menu());- }}- >- <Tag />- Tags- </Button>- </header>- <Show- when={opened()}- fallback={- <EmailRows- emails={emails()}- selectedId={email().id}- onOpen={open}- />- }- >- <EmailThread email={email()} hideHeader hideReply />- </Show>- <Show when={menu()}>- <div- class="email-auto-tag-menu"- role="group"- aria-label={`Tags for ${email().subject}`}- >- <div class="email-auto-tag-menu-title">- <span>Add tags</span>- <Button- variant="plain"- size="icon-sm"- aria-label="Close tags"- onClick={() => {- playback.pause();- setMenu(false);- }}- >- <X />- </Button>- </div>- <For each={emailTags}>- {(tag) => (- <button- type="button"- aria-pressed={email().tags.includes(tag.id)}- onClick={() => toggleTag(tag.id)}- >- <span- class="email-tag-dot"- style={{ background: tag.color }}- />- {tag.label}- <Show when={email().tags.includes(tag.id)}>- <Check />- </Show>- </button>- )}- </For>- </div>- </Show>- <Show when={playback.playing() && !playback.reducedMotion()}>- <div- class="email-agent-pointer"- data-menu={menu()}- style={{- '--email-cursor-row': selected(),- '--email-tag-index': Math.max(- 0,- emailTags.findIndex(- (tag) => tag.id === incoming[selected()].tags?.[0]- )- ),- }}- aria-hidden="true"- >- <DemoCursor />- </div>- </Show>- </EmailShell>- </div>- </div>- );-}diff --git a/apps/marketing/src/features/marketing/components/email/EmailComparison.tsx b/apps/marketing/src/features/marketing/components/email/EmailComparison.tsxindex 0f1169c7ce..7e09346721 100644--- a/apps/marketing/src/features/marketing/components/email/EmailComparison.tsx+++ b/apps/marketing/src/features/marketing/components/email/EmailComparison.tsx@@ -2,5 +2,10 @@ import { emailComparisons } from '../../core/feature-comparisons';import { FeatureComparisons } from '../comparisons/FeatureComparisons';export function EmailComparison() {- return <FeatureComparisons comparisons={emailComparisons} />;+ return (+ <FeatureComparisons+ title="Compare Email Clients"+ comparisons={emailComparisons}+ />+ );}diff --git a/apps/marketing/src/features/marketing/components/email/EmailDemoSource.tsx b/apps/marketing/src/features/marketing/components/email/EmailDemoSource.tsxnew file mode 100644index 0000000000..adc4197d4b--- /dev/null+++ b/apps/marketing/src/features/marketing/components/email/EmailDemoSource.tsx@@ -0,0 +1,79 @@+import { createSignal, Match, onMount, Switch } from 'solid-js';+import type { DummyWorkspace } from '../../primitives/createDummyWorkspace';+import {+ CallRecordBody,+ CallRecordTopBar,+ createCallPlayback,+} from '../calls/CallRecord';+import type { SampleCall } from '../calls/call-fixtures';+import { DocumentShareSheet } from '../documents/DocumentShareSheet';+import { WorkspaceDocuments } from '../workspace/WorkspaceDocuments';+import '../calls/call-stories.css';+import '../workspace/dummy-workspace.css';++const call: SampleCall = {+ title: 'Demo call',+ ended: 'Oct 14, 2026 · 9:20 AM',+ duration: 1200,+ people: ['jacob', 'valentina', 'julia'],+ summary:+ '- Valentina confirmed Thursday at 9.\n- Send the setup plan and Macro overview before the meeting.\n- Julia will help with setup.',+ segments: [+ {+ id: 'time',+ person: 'valentina',+ at: 30,+ text: 'Thursday at 9 works for me. Could you send the setup plan before we meet?',+ },+ {+ id: 'setup',+ person: 'julia',+ at: 45,+ text: 'I can help with setup. Connect your email, invite your teammates, and choose the documents to share.',+ },+ {+ id: 'followup',+ person: 'jacob',+ at: 65,+ text: 'I’ll send the setup plan and Macro overview, and copy Julia.',+ },+ ],+ poster: [+ { person: 'jacob', video: false },+ { person: 'valentina', video: false },+ { person: 'julia', video: false },+ ],+};++/** The existing native document and call viewers, opened from the draft's citations. */+export default function EmailDemoSource(props: {+ source: 'setup' | 'call';+ workspace: DummyWorkspace;+ onBack: () => void;+ onReady?: () => void;+}) {+ const playback = createCallPlayback(call.duration);+ onMount(() => props.onReady?.());+ const [sharing, setSharing] = createSignal(false);+ const workspace = { ...props.workspace, backToCollection: props.onBack };+ return (+ <Switch>+ <Match when={props.source === 'setup'}>+ <WorkspaceDocuments+ workspace={workspace}+ backLabel="Back to draft"+ onShare={() => setSharing(true)}+ />+ <DocumentShareSheet+ open={sharing()}+ title="Setup plan"+ onClose={() => setSharing(false)}+ />+ </Match>+ <Match when={props.source === 'call'}>+ <CallRecordTopBar title={call.title} onBack={props.onBack} />+ <CallRecordBody call={call} playback={playback} />+ </Match>+ </Switch>+ );+}diff --git a/apps/marketing/src/features/marketing/components/email/EmailDemos.test.tsx b/apps/marketing/src/features/marketing/components/email/EmailDemos.test.tsxindex 1706c7e74c..a8ab03cc1e 100644--- a/apps/marketing/src/features/marketing/components/email/EmailDemos.test.tsx+++ b/apps/marketing/src/features/marketing/components/email/EmailDemos.test.tsx@@ -11,6 +11,10 @@ const disconnect = vi.fn();beforeEach(() => {reducedMotion = false;vi.useFakeTimers();+ Object.defineProperty(HTMLElement.prototype, 'scrollTo', {+ configurable: true,+ value: vi.fn(),+ });vi.stubGlobal('fetch', vi.fn());vi.spyOn(document, 'hidden', 'get').mockReturnValue(false);vi.stubGlobal('matchMedia', () => ({@@ -50,19 +54,19 @@ it('combines account, tab and search filters and preserves them after opening aconst view = render(() => <EmailInboxDemo />);const accounts = within(view.getByRole('navigation', { name: 'Inboxes' }));const tabs = within(view.getByRole('navigation', { name: 'Email tabs' }));- fireEvent.click(- accounts.getByRole('button', { name: '[email protected]' })- );+ fireEvent.click(accounts.getByRole('button', { name: '[email protected]' }));expect(view.getAllByRole('button', { name: /^Read / })).toHaveLength(3);fireEvent.click(tabs.getByRole('button', { name: 'Noise' }));expect(view.getAllByRole('button', { name: /^Read / })).toHaveLength(2);fireEvent.click(accounts.getByRole('button', { name: 'All inboxes' }));fireEvent.click(tabs.getByRole('button', { name: 'All' }));fireEvent.input(view.getByLabelText('Search sample email'), {- target: { value: 'Dana' },+ target: { value: 'Valentina' },});expect(view.getAllByRole('button', { name: /^Read / })).toHaveLength(2);- fireEvent.click(view.getByRole('button', { name: /^Read Next steps/ }));+ fireEvent.click(+ view.getByRole('button', { name: /^Read Homepage feedback/ })+ );expect(view.getByText('Hi Jacob,')).toBeTruthy();fireEvent.click(view.getByRole('button', { name: 'Back to inbox' }));expect(view.getAllByRole('button', { name: /^Read / })).toHaveLength(2);@@ -110,10 +114,10 @@ it('shares into a channel, sends a local message, and opens the original conversexpect(send.hasAttribute('disabled')).toBe(true);fireEvent.click(view.getByRole('button', {- name: 'Open shared email: Next steps for our team',+ name: 'Open shared email: Thursday demo',}));- expect(view.getByText('Hi Jacob,')).toBeTruthy();+ expect(view.getByText(/Hi Jacob,/)).toBeTruthy();fireEvent.click(view.getByRole('button', { name: 'Back to inbox' }));expect(view.getByRole('textbox', { name: 'Message #launch' })).toBeTruthy();});@@ -134,13 +138,13 @@ it('pauses playback offscreen and after interaction, and cleans up its timer', (vi.advanceTimersByTime(10000);expect(phase()).toBe('0');setVisible(true);- vi.advanceTimersByTime(1800);+ advanceTo(() => phase() === '1');expect(phase()).toBe('1');setVisible(false);vi.advanceTimersByTime(10000);expect(phase()).toBe('1');setVisible(true);- vi.advanceTimersByTime(1100);+ advanceTo(() => phase() === '2');expect(phase()).toBe('2');fireEvent.click(view.getByRole('button', { name: 'Close share preview' }));vi.advanceTimersByTime(10000);@@ -150,23 +154,48 @@ it('pauses playback offscreen and after interaction, and cleans up its timer', (expect(vi.getTimerCount()).toBe(0);});-it('keeps the live reply in the shared thread and stops at the completed result', () => {+it('holds the live reply for reading before replay and keeps it available after takeover', () => {const view = render(() => <EmailSharingDemo />);setVisible(true);vi.advanceTimersByTime(10650);- expect(view.getByText('2 messages · New reply from Dana')).toBeTruthy();- vi.advanceTimersByTime(30000);- expect(view.getByText('2 messages · New reply from Dana')).toBeTruthy();- expect(vi.getTimerCount()).toBe(0);+ expect(+ view.getByRole('button', { name: 'Open shared email: Thursday demo' })+ .textContent+ ).toBe('Thursday demo');+ expect(view.queryByText('Live')).toBeNull();+ expect(view.queryByText(/2 messages|Open full thread/)).toBeNull();+ expect(+ view.queryByText(+ 'Valentina replied. Your whole team is already up to date.'+ )+ ).toBeNull();+ vi.advanceTimersByTime(3000);+ expect(+ view.getByRole('button', { name: 'Open shared email: Thursday demo' })+ .textContent+ ).toBe('Thursday demo');+ expect(view.queryByText('Live')).toBeNull();+ expect(view.queryByText(/2 messages|Open full thread/)).toBeNull();+ expect(vi.getTimerCount()).toBeGreaterThan(0);fireEvent.click(view.getByRole('button', {- name: 'Open shared email: Next steps for our team',+ name: 'Open shared email: Thursday demo',}));- expect(view.getByText('Hi Jacob,')).toBeTruthy();+ expect(view.getByText(/Hi Jacob,/)).toBeTruthy();expect(- view.getByText(/One more thing: could you include the onboarding guide/)+ view.getByText(/Could you also send a short setup guide/)).toBeTruthy();+ const messageDetails = view.getAllByRole('button', {+ name: 'Message details',+ });+ expect(messageDetails).toHaveLength(2);+ fireEvent.click(messageDetails[1]);+ expect(messageDetails[1].getAttribute('aria-expanded')).toBe('true');+ expect(messageDetails[0].getAttribute('aria-expanded')).toBe('false');+ expect(view.getAllByRole('heading', { name: 'Thursday demo' })).toHaveLength(+ 1+ );expect(view.queryByRole('button', { name: /Play|Pause|Replay/ })).toBeNull();});@@ -176,7 +205,7 @@ it('shows the shared result without autoplay for reduced motion', () => {setVisible(true);expect(view.getByRole('button', {- name: 'Open shared email: Next steps for our team',+ name: 'Open shared email: Thursday demo',})).toBeTruthy();expect(@@ -185,7 +214,7 @@ it('shows the shared result without autoplay for reduced motion', () => {vi.advanceTimersByTime(10000);expect(view.getByRole('button', {- name: 'Open shared email: Next steps for our team',+ name: 'Open shared email: Thursday demo',})).toBeTruthy();});@@ -228,3 +257,121 @@ it('does not send while composing text or inserting a line break', () => {fireEvent.keyDown(input, { key: 'Enter' });expect(onSend).toHaveBeenCalledWith('Ready for review');});++it('keeps existing channel messages mounted while the email walkthrough advances', () => {+ const view = render(() => <EmailSharingDemo />);+ const question = () =>+ view.getByText('What does Valentina need before Thursday?').closest('li');+ const original = question();+ const composer = view.getByRole('textbox', { name: 'Message #launch' });+ setVisible(true);+ vi.advanceTimersByTime(1800);+ expect(question()).toBe(original);+ advanceTo(() =>+ view.queryByRole('button', { name: 'Open shared email: Thursday demo' })+ );+ expect(question()).toBe(original);+ const shared = view.getByRole('button', {+ name: 'Open shared email: Thursday demo',+ });+ const sharedMessage = shared.closest('li');+ advanceTo(() =>+ view.queryByText('I’ll send the setup guide before the call.')+ );+ expect(question()).toBe(original);+ expect(+ view.getByRole('button', { name: 'Open shared email: Thursday demo' })+ ).toBe(shared);+ expect(shared.closest('li')).toBe(sharedMessage);+ const reply = view+ .getByText('I’ll send the setup guide before the call.')+ .closest('li');+ expect(view.getByRole('textbox', { name: 'Message #launch' })).toBe(composer);+ fireEvent.input(composer, { target: { value: 'Thanks, I’ll check it.' } });+ fireEvent.click(view.getByRole('button', { name: 'Send demo message' }));+ expect(view.getByText('Thanks, I’ll check it.')).toBeTruthy();+ expect(question()).toBe(original);+ expect(shared.closest('li')).toBe(sharedMessage);+ expect(+ view.getByText('I’ll send the setup guide before the call.').closest('li')+ ).toBe(reply);+});++function advanceTo(reached: () => unknown) {+ for (let elapsed = 0; elapsed < 30000 && !reached(); elapsed += 50)+ vi.advanceTimersByTime(50);+ expect(!!reached()).toBe(true);+}++it('types the share destination and message progressively and stops mid-draft on interaction', () => {+ const view = render(() => <EmailSharingDemo />);+ setVisible(true);+ advanceTo(+ () =>+ view.container.querySelector('.mail-recipient-input .text-ink')+ ?.textContent+ );+ expect(+ view.container.querySelector('.mail-recipient-input .text-ink')?.textContent+ ).toBe('l');+ advanceTo(() => view.container.querySelector('[data-share-message]'));+ const message = view.container.querySelector('[data-share-message]')!;+ expect(message.textContent).toBe('H');+ fireEvent.pointerDown(message);+ vi.advanceTimersByTime(30000);+ expect(message.textContent).toBe('H');+ expect(+ view.queryByRole('button', { name: 'Open shared email: Thursday demo' })+ ).toBeNull();+});++it('keeps the same pointer while opening Share, choosing a channel, and typing the message', () => {+ vi.spyOn(HTMLElement.prototype, 'getBoundingClientRect').mockImplementation(+ function (this: HTMLElement) {+ return this.matches('.mail-sharing-demo')+ ? new DOMRect(0, 0, 1000, 600)+ : new DOMRect(20, 20, 120, 32);+ }+ );+ const view = render(() => <EmailSharingDemo />);+ setVisible(true);+ vi.advanceTimersByTime(1250);+ const pointer = view.container.querySelector('.demo-cursor');+ expect(pointer).toBeTruthy();+ expect(view.queryByRole('group', { name: 'Share email preview' })).toBeNull();+ advanceTo(() => view.queryByRole('group', { name: 'Share email preview' }));+ expect(view.container.querySelector('.demo-cursor')).toBe(pointer);+ advanceTo(() => view.container.querySelector('[data-share-message]'));+ expect(view.container.querySelector('.demo-cursor')).toBe(pointer);+ fireEvent.pointerDown(view.getByRole('button', { name: 'Cancel' }));+ vi.advanceTimersByTime(20000);+ expect(view.container.querySelector('.demo-cursor')).toBeNull();+ expect(+ view.queryByRole('button', { name: 'Open shared email: Thursday demo' })+ ).toBeNull();+});++it('leaves two seconds between Valentina’s reply and Julia’s response', () => {+ const view = render(() => <EmailSharingDemo />);+ setVisible(true);+ advanceTo(+ () =>+ view.container+ .querySelector('.mail-sharing-demo')+ ?.getAttribute('data-phase') === '7'+ );+ expect(+ view.getByText(/Could you also send a short setup guide/)+ ).toBeTruthy();+ expect(+ view.queryByText('I’ll send the setup guide before the call.')+ ).toBeNull();+ vi.advanceTimersByTime(1900);+ expect(+ view.queryByText('I’ll send the setup guide before the call.')+ ).toBeNull();+ vi.advanceTimersByTime(100);+ expect(+ view.getByText('I’ll send the setup guide before the call.')+ ).toBeTruthy();+});diff --git a/apps/marketing/src/features/marketing/components/email/EmailDesktopDemo.tsx b/apps/marketing/src/features/marketing/components/email/EmailDesktopDemo.tsxindex 2abba0a8e0..35904c2e8e 100644--- a/apps/marketing/src/features/marketing/components/email/EmailDesktopDemo.tsx+++ b/apps/marketing/src/features/marketing/components/email/EmailDesktopDemo.tsx@@ -1,3 +1,4 @@+import { emailPageInbox } from '../../core/email-demo-story';import { WorkspaceDesktopDemo } from '../WorkspaceDesktopDemo';export function EmailDesktopDemo() {@@ -6,7 +7,16 @@ export function EmailDesktopDemo() {heroFrameview="email"label="Try Macro Mail"- caption="Your inbox, in context. Click around — this workspace is yours to explore."+ initialData={{+ emails: emailPageInbox.map((email) => ({+ ...email,+ folder: 'inbox',+ body:+ email.body ??+ `Hi Jacob,\n\n${email.snippet}\n\nThanks,\n${email.sender}`,+ replies: [],+ })),+ }}/>);}diff --git a/apps/marketing/src/features/marketing/components/email/EmailFeatureDemos.test.tsx b/apps/marketing/src/features/marketing/components/email/EmailFeatureDemos.test.tsxindex f654d11f6c..c7d6b24956 100644--- a/apps/marketing/src/features/marketing/components/email/EmailFeatureDemos.test.tsx+++ b/apps/marketing/src/features/marketing/components/email/EmailFeatureDemos.test.tsx@@ -1,6 +1,8 @@import { cleanup, fireEvent, render, within } from '@solidjs/testing-library';import { afterEach, beforeEach, expect, it, vi } from 'vitest';-import { EmailAutoTagsDemo } from './EmailAutoTagsDemo';+import { DemoInteractionBoundary } from '../DemoInteractionBoundary';+import { EmailAccountsDemo } from './EmailAccountsDemo';+import { EmailAgenticEditingDemo } from './EmailAgenticEditingDemo';import { EmailKeyboardDemo } from './EmailKeyboardDemo';let visible: IntersectionObserverCallback;@@ -8,6 +10,18 @@ let reduced = false;const disconnect = vi.fn();beforeEach(() => {vi.useFakeTimers();+ Object.defineProperty(HTMLElement.prototype, 'scrollTo', {+ configurable: true,+ value: vi.fn(),+ });+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ observe() {}+ disconnect() {}+ unobserve() {}+ }+ );reduced = false;vi.stubGlobal('fetch', vi.fn());vi.spyOn(document, 'hidden', 'get').mockReturnValue(false);@@ -19,10 +33,15 @@ beforeEach(() => {vi.stubGlobal('IntersectionObserver',class {- constructor(callback: IntersectionObserverCallback) {- visible = callback;+ constructor(private callback: IntersectionObserverCallback) {}+ observe(target: HTMLElement) {+ if (+ target.matches(+ '.email-accounts-demo, .email-keyboard-demo, .email-editing-stage'+ )+ )+ visible = this.callback;}- observe() {}disconnect = disconnect;});@@ -42,38 +61,102 @@ function setVisible(isIntersecting: boolean) {);}-it('tags incoming mail, pauses offscreen and preserves manual tag edits', () => {- const view = render(() => <EmailAutoTagsDemo />);- vi.advanceTimersByTime(3000);- expect(view.getByText('0 / 4 tagged')).toBeTruthy();- setVisible(true);- vi.advanceTimersByTime(2800);- expect(view.getByText('1 / 4 tagged')).toBeTruthy();- setVisible(false);- vi.advanceTimersByTime(5000);- expect(view.getByText('1 / 4 tagged')).toBeTruthy();- fireEvent.click(- view.getByRole('button', { name: 'Read Next steps for our team' })- );+it('adds a sample account, filters inboxes, and preserves a manual selection', () => {+ const view = render(() => <EmailAccountsDemo />);+ const accounts = within(view.getByRole('navigation', { name: 'Inboxes' }));+ expect(+ accounts.queryByRole('button', { name: '[email protected]' })+ ).toBeNull();fireEvent.click(- view.getByRole('button', { name: 'Edit selected email tags' })- );- const menu = within(- view.getByRole('group', { name: 'Tags for Next steps for our team' })+ view.getByRole('button', { name: 'Connect another account' }));- fireEvent.click(menu.getByRole('button', { name: 'Customers' }));- fireEvent.click(menu.getByRole('button', { name: 'Launch' }));expect(- menu.getByRole('button', { name: 'Customers' }).getAttribute('aria-pressed')- ).toBe('false');+ accounts+ .getByRole('button', { name: 'All inboxes' })+ .getAttribute('aria-current')+ ).toBe('true');+ fireEvent.click(accounts.getByRole('button', { name: '[email protected]' }));expect(- menu.getByRole('button', { name: 'Launch' }).getAttribute('aria-pressed')+ view.getByRole('button', { name: 'Read Your table is confirmed' })+ ).toBeTruthy();+ expect(view.queryByRole('button', { name: 'Read Thursday demo' })).toBeNull();+ setVisible(true);+ vi.advanceTimersByTime(20000);+ expect(+ accounts+ .getByRole('button', { name: '[email protected]' })+ .getAttribute('aria-current')).toBe('true');+ fireEvent.click(accounts.getByRole('button', { name: 'All inboxes' }));+ fireEvent.input(view.getByLabelText('Search across inboxes'), {+ target: { value: 'Thursday demo' },+ });+ fireEvent.click(view.getByRole('button', { name: 'Read Thursday demo' }));+ expect(view.getByText(/Thursday at 9 works for me/)).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Back to inbox' }));+ expect(view.getAllByRole('button', { name: /^Read / })).toHaveLength(1);+});++it('connects one inbox per click, then switches to an individual inbox and back', () => {+ const view = render(() => <EmailAccountsDemo />);+ const accounts = within(view.getByRole('navigation', { name: 'Inboxes' }));+ vi.advanceTimersByTime(20000);+ expect(+ accounts.queryByRole('button', { name: '[email protected]' })+ ).toBeNull();setVisible(true);+ advanceTo(+ () =>+ view.container+ .querySelector('.email-accounts-demo')+ ?.getAttribute('data-step') === '2'+ );+ expect(+ view.container+ .querySelector('.email-accounts-demo')+ ?.getAttribute('data-step')+ ).toBe('2');+ expect(view.getByRole('status').textContent).toBe('Account connected');+ expect(+ accounts.getByRole('button', { name: '[email protected]' })+ ).toBeTruthy();+ expect(+ accounts.queryByRole('button', { name: '[email protected]' })+ ).toBeNull();+ setVisible(false);vi.advanceTimersByTime(20000);+ expect(view.getByRole('status')).toBeTruthy();+ setVisible(true);+ advanceTo(+ () =>+ view.container+ .querySelector('.email-accounts-demo')+ ?.getAttribute('data-step') === '4'+ );+ expect(+ accounts.getByRole('button', { name: '[email protected]' })+ ).toBeTruthy();+ advanceTo(+ () =>+ accounts+ .getByRole('button', { name: '[email protected]' })+ .getAttribute('aria-current') === 'true'+ );+ advanceTo(+ () =>+ view.container+ .querySelector('.email-accounts-demo')+ ?.getAttribute('data-step') === '7'+ );expect(- menu.getByRole('button', { name: 'Launch' }).getAttribute('aria-pressed')+ accounts+ .getByRole('button', { name: 'All inboxes' })+ .getAttribute('aria-current')).toBe('true');+ expect(+ accounts.getByRole('button', { name: '[email protected]' })+ ).toBeTruthy();+ expect(vi.getTimerCount()).toBeGreaterThan(0);});it('navigates with J/K, opens threads and archives the selection through the empty state', () => {@@ -84,26 +167,18 @@ it('navigates with J/K, opens threads and archives the selection through the empfireEvent.keyDown(region, { key: 'j' });expect(view- .getByRole('button', { name: 'Read Launch announcement' })+ .getByRole('button', { name: 'Read Quick review' }).getAttribute('aria-current')).toBe('true');fireEvent.keyDown(region, { key: 'Enter' });- expect(- view.getByRole('heading', { name: 'Launch announcement' })- ).toBeTruthy();+ expect(view.getByRole('heading', { name: 'Quick review' })).toBeTruthy();fireEvent.keyDown(region, { key: 'k' });- expect(- view.getByRole('heading', { name: 'Next steps for our team' })- ).toBeTruthy();+ expect(view.getByRole('heading', { name: 'Thursday demo' })).toBeTruthy();fireEvent.keyDown(region, { key: 'e' });- expect(- view.getByRole('heading', { name: 'Launch announcement' })- ).toBeTruthy();+ expect(view.getByRole('heading', { name: 'Quick review' })).toBeTruthy();fireEvent.keyDown(region, { key: 'Escape' });- expect(- view.queryByRole('button', { name: 'Read Next steps for our team' })- ).toBeNull();- for (let count = 0; count < 3; count++)+ expect(view.queryByRole('button', { name: 'Read Thursday demo' })).toBeNull();+ for (let count = 0; count < 13; count++)fireEvent.keyDown(region, { key: 'e' });expect(view.getByText('All caught up.')).toBeTruthy();fireEvent.keyDown(region, { key: 'j' });@@ -118,7 +193,7 @@ it('does not capture page-wide, modified or composing keys', () => {fireEvent.keyDown(document.body, { key: 'e' });fireEvent.keyDown(region, { key: 'e', metaKey: true });fireEvent.keyDown(region, { key: 'e', isComposing: true });- expect(view.getAllByRole('button', { name: /^Read / })).toHaveLength(4);+ expect(view.getAllByRole('button', { name: /^Read / })).toHaveLength(14);});it('finishes keyboard playback and cleans up its timer', () => {@@ -126,22 +201,177 @@ it('finishes keyboard playback and cleans up its timer', () => {setVisible(true);vi.advanceTimersByTime(1400);expect(- view.getByRole('heading', { name: 'Next steps for our team' })- ).toBeTruthy();+ view+ .getByRole('button', { name: 'Read Quick review' })+ .getAttribute('aria-current')+ ).toBe('true');vi.advanceTimersByTime(7000);expect(view.queryByText('1 archived')).toBeNull();- expect(view.getAllByRole('button', { name: /^Read / })).toHaveLength(3);+ expect(view.getAllByRole('button', { name: /^Read / })).toHaveLength(13);expect(view.queryByRole('button', { name: /Play|Pause|Replay/ })).toBeNull();view.unmount();+ vi.advanceTimersByTime(20);expect(vi.getTimerCount()).toBe(0);expect(disconnect).toHaveBeenCalled();});-it('shows completed tagging without autoplay for reduced motion', () => {+it('shows all inboxes without autoplay for reduced motion', () => {+ reduced = true;+ const view = render(() => <EmailAccountsDemo />);+ setVisible(true);+ expect(view.getByRole('button', { name: '[email protected]' })).toBeTruthy();+ vi.advanceTimersByTime(20);+ expect(vi.getTimerCount()).toBe(0);+});++it('shows the source context before the editable draft and preserves edits', () => {+ const view = render(() => <EmailAgenticEditingDemo />);+ expect(view.queryByRole('textbox', { name: 'Email body' })).toBeNull();+ setVisible(true);+ vi.advanceTimersByTime(2100);+ const input = view.getByRole<HTMLTextAreaElement>('textbox', {+ name: 'Message the email agent',+ });+ expect(input.value).toBe('Draft ');+ expect(view.queryByRole('link', { name: 'Demo call' })).toBeNull();+ advanceTo(() => view.queryByRole('link', { name: 'Demo call' }));+ expect(view.getByRole('link', { name: 'Demo call' })).toBeTruthy();+ expect(view.queryByRole('textbox', { name: 'Email body' })).toBeNull();+ vi.advanceTimersByTime(2200);+ expect(+ view.getByRole<HTMLInputElement>('textbox', { name: 'To' }).value+ ).toBe('Valentina <[email protected]>');+ expect(+ view.getByRole<HTMLInputElement>('textbox', { name: 'Cc' }).value+ ).toBe('Julia <[email protected]>');+ const body = view.getByRole('textbox', { name: 'Email body' });+ expect(body.getAttribute('contenteditable')).toBe('true');+ expect(body.textContent).toContain('Thursday at 9');+ fireEvent.pointerDown(view.getByLabelText('Subject'));+ fireEvent.input(view.getByLabelText('Subject'), {+ target: { value: 'Thursday meeting details' },+ });+ setVisible(false);+ setVisible(true);+ vi.advanceTimersByTime(20000);+ expect(+ view.getByRole<HTMLInputElement>('textbox', { name: 'Subject' }).value+ ).toBe('Thursday meeting details');+});++it('lets the visitor type and send their own request without waiting for autoplay', () => {+ const view = render(() => <EmailAgenticEditingDemo />);+ fireEvent.input(+ view.getByRole('textbox', { name: 'Message the email agent' }),+ { target: { value: 'Draft a follow-up for Thursday.' } }+ );+ fireEvent.click(view.getByRole('button', { name: 'Send demo message' }));+ expect(view.getByRole('textbox', { name: 'Email body' })).toBeTruthy();+ expect(vi.getTimerCount()).toBeLessThanOrEqual(1);+});++it('stops the walkthrough when the visitor enters the demo', () => {+ const view = render(() => (+ <DemoInteractionBoundary>+ <EmailAccountsDemo />+ </DemoInteractionBoundary>+ ));+ setVisible(true);+ fireEvent.click(+ view.getByRole('button', {+ name: 'Interact with demo. Press Escape to return to page scrolling.',+ })+ );+ vi.advanceTimersByTime(20000);+ expect(+ view.container+ .querySelector('.email-accounts-demo')+ ?.getAttribute('data-step')+ ).toBe('0');+ expect(+ view.getByRole('button', { name: 'Connect another account' })+ ).toBeTruthy();+});++it('shows an editable draft immediately with reduced motion', () => {reduced = true;- const view = render(() => <EmailAutoTagsDemo />);+ const view = render(() => <EmailAgenticEditingDemo />);+ setVisible(true);+ expect(+ view.getByRole('textbox', { name: 'Email body' }).textContent+ ).toContain('Thursday at 9 works');+ expect(+ view+ .getByRole('textbox', { name: 'Email body' })+ .getAttribute('contenteditable')+ ).toBe('true');+ vi.advanceTimersByTime(20);+ expect(vi.getTimerCount()).toBe(0);+});++function advanceTo(reached: () => unknown) {+ for (let elapsed = 0; elapsed < 30000 && !reached(); elapsed += 50)+ vi.advanceTimersByTime(50);+ expect(!!reached()).toBe(true);+}++it('keeps one operating pointer through account connection and removes it on takeover', () => {+ vi.spyOn(HTMLElement.prototype, 'getBoundingClientRect').mockImplementation(+ function (this: HTMLElement) {+ if (this.matches('.email-accounts-mobile')) return new DOMRect();+ if (this.matches('.email-accounts-demo'))+ return new DOMRect(0, 0, 1000, 560);+ return new DOMRect(20, 20, 100, 32);+ }+ );+ const view = render(() => <EmailAccountsDemo />);setVisible(true);- expect(view.getByText('4 / 4 tagged')).toBeTruthy();- expect(view.queryByRole('button', { name: 'Pause tagging demo' })).toBeNull();- expect(view.getByText('4 / 4 tagged')).toBeTruthy();+ vi.advanceTimersByTime(1450);+ const pointer = view.container.querySelector('.demo-cursor');+ expect(pointer).toBeTruthy();+ expect(+ view.container+ .querySelector('.email-accounts-demo')+ ?.getAttribute('data-step')+ ).toBe('0');+ advanceTo(+ () =>+ view.container+ .querySelector('.email-accounts-demo')+ ?.getAttribute('data-step') === '2'+ );+ expect(view.container.querySelector('.demo-cursor')).toBe(pointer);+ fireEvent.pointerDown(+ view.getByRole('button', { name: 'Connect another account' })+ );+ vi.advanceTimersByTime(20000);+ expect(view.container.querySelector('.demo-cursor')).toBeNull();+ expect(+ view.container+ .querySelector('.email-accounts-demo')+ ?.getAttribute('data-step')+ ).toBe('2');+});++it('opens the setup document from the draft without losing the visitor’s email edits', async () => {+ reduced = true;+ const view = render(() => <EmailAgenticEditingDemo />);+ const body = view.getByRole('textbox', { name: 'Email body' });+ body.textContent = 'Keep my edited email.';+ fireEvent.input(body);+ fireEvent.click(view.getAllByRole('link', { name: 'Setup plan' })[0]);+ expect(body.isConnected).toBe(true);+ expect(view.getByRole('textbox', { name: 'Email body' })).toBe(body);+ const title = await view.findByRole(+ 'textbox',+ { name: 'Document title' },+ { timeout: 3000 }+ );+ expect(title.textContent).toBe('Setup plan');+ expect(+ view.getByRole('textbox', { name: 'Document body' }).textContent+ ).toContain('Connect your email inbox');+ fireEvent.click(view.getByRole('button', { name: 'Back to draft' }));+ expect(view.getByRole('textbox', { name: 'Email body' })).toBe(body);+ expect(body.textContent).toBe('Keep my edited email.');});diff --git a/apps/marketing/src/features/marketing/components/email/EmailInboxDemo.tsx b/apps/marketing/src/features/marketing/components/email/EmailInboxDemo.tsxindex 42f29be52a..d4bfacdfe7 100644--- a/apps/marketing/src/features/marketing/components/email/EmailInboxDemo.tsx+++ b/apps/marketing/src/features/marketing/components/email/EmailInboxDemo.tsx@@ -113,9 +113,8 @@ function Inbox(props: { signalNoise?: boolean }) {><option value="all">All inboxes</option><option value="work">[email protected]</option>- <option value="personal">- </option>+ <option value="personal">[email protected]</option>+ <option value="outlook">[email protected]</option></select></label><div class="mail-mobile-tabs">@@ -210,11 +209,6 @@ function Inbox(props: { signalNoise?: boolean }) {Move Product updates back to Signal</Show></Button>- <span role="status">- {moved()- ? 'Product updates is now in Noise.'- : 'Switch between Signal and Noise in the sidebar.'}- </span></div></Show></div>diff --git a/apps/marketing/src/features/marketing/components/email/EmailKeyboardDemo.tsx b/apps/marketing/src/features/marketing/components/email/EmailKeyboardDemo.tsxindex d34c96700a..7458d98790 100644--- a/apps/marketing/src/features/marketing/components/email/EmailKeyboardDemo.tsx+++ b/apps/marketing/src/features/marketing/components/email/EmailKeyboardDemo.tsx@@ -2,7 +2,7 @@ import ArrowLeft from '@phosphor/arrow-left.svg';import Check from '@phosphor/check.svg';import { Button } from '@ui';import { createSignal, For, Show } from 'solid-js';-import { demoEmails } from '../../core/demo-email';+import { emailPageInbox } from '../../core/email-demo-story';import { createEmailWalkthrough } from '../../primitives/createEmailWalkthrough';import { EmailRows } from './frozen/EmailRows';import { EmailShell } from './frozen/EmailShell';@@ -10,7 +10,7 @@ import { EmailThread } from './frozen/EmailThread';import './email-feature-demos.css';import './email-keyboard-stage.css';-const inbox = demoEmails.slice(0, 4);+const inbox = emailPageInbox.filter((email) => !email.noise).slice(0, 14);type Shortcut = 'j' | 'k' | 'e' | 'Enter' | 'Escape';export function EmailKeyboardDemo() {@@ -32,22 +32,40 @@ export function EmailKeyboardDemo() {setArchived([...archived(), selected().id]);setIndex(Math.max(0, Math.min(index(), emails().length - 1)));}+ queueMicrotask(() => {+ const row = root?.querySelector<HTMLElement>(+ '.mail-row[aria-current=true]'+ );+ const list = root?.querySelector<HTMLElement>('.email-keyboard-content');+ if (!row || !list) return;+ const rowBounds = row.getBoundingClientRect();+ const bounds = list.getBoundingClientRect();+ if (rowBounds.bottom > bounds.bottom)+ list.scrollTop += rowBounds.bottom - bounds.bottom;+ else if (rowBounds.top < bounds.top)+ list.scrollTop -= bounds.top - rowBounds.top;+ });};const playback = createEmailWalkthrough({root: () => root,steps: 6,+ visibilityThreshold: 0.45,+ loop: { hold: 5500 },+ delay: (step) => [1300, 900, 1000, 2600, 900, 1000][step - 1],reset: () => {setArchived([]);setIndex(0);setOpened(false);setLastKey(undefined);+ const list = root.querySelector<HTMLElement>('.email-keyboard-content');+ if (list) list.scrollTop = 0;},reduced: () => {setOpened(false);setLastKey(undefined);},advance: (step) =>- act((['Enter', 'j', 'j', 'k', 'e', 'Escape'] as const)[step - 1]),+ act((['j', 'k', 'Enter', 'Escape', 'e', 'j'] as const)[step - 1]),});const manual = (key: Shortcut) => {playback.pause();@@ -99,7 +117,7 @@ export function EmailKeyboardDemo() {onKeyDown={onKeyDown}><div class="email-keyboard-stage">- <EmailShell label="Keyboard email demo" class="glass-input">+ <EmailShell label="Keyboard email demo" showRail={false}><header class="email-feature-toolbar"><Show when={opened()} fallback={<span>Signal</span>}><Button@@ -128,7 +146,6 @@ export function EmailKeyboardDemo() {<div class="email-inbox-clear"><Check /><h3>All caught up.</h3>- <p>You’ve archived every email in this demo.</p></div>}>diff --git a/apps/marketing/src/features/marketing/components/email/EmailSharingDemo.tsx b/apps/marketing/src/features/marketing/components/email/EmailSharingDemo.tsxindex a0ce306e64..4e628f0dbb 100644--- a/apps/marketing/src/features/marketing/components/email/EmailSharingDemo.tsx+++ b/apps/marketing/src/features/marketing/components/email/EmailSharingDemo.tsx@@ -3,40 +3,48 @@ import Hash from '@phosphor/hash.svg';import PaperPlane from '@phosphor/paper-plane-tilt.svg';import X from '@phosphor/x.svg';import { Button } from '@ui';-import { createEffect, createSignal, onCleanup, onMount, Show } from 'solid-js';+import { createSignal, Show } from 'solid-js';+import { meetingEmail, meetingReply } from '../../core/email-demo-story';import { homepagePeople } from '../../core/homepage-demo-people';+import { createDemoPointer } from '../../primitives/createDemoPointer';+import { createEmailWalkthrough } from '../../primitives/createEmailWalkthrough';+import { demoTypingActions } from '../../primitives/demoTypingActions';import { DemoCursor } from '../DemoCursor';-import { HomepageConversation } from '../HomepageConversation';-import { demoEmails } from './email-fixtures';+import { DocMention } from '../documents/DocMention';+import {+ HomepageConversation,+ type HomepageMessage,+} from '../HomepageConversation';import { ChannelComposer } from './frozen/ChannelComposer';import { EmailShell } from './frozen/EmailShell';import { EmailThread } from './frozen/EmailThread';+import './email-feature-demos.css';import './email-demos.css';import './email-sharing-stage.css';-const phaseDuration = [1800, 1100, 1100, 1200, 1600, 650, 3200];-const incomingReply =- 'One more thing: could you include the onboarding guide? I’ll share it with the team before Thursday.';+const shareMessage = 'Here’s the email for Thursday.';// The Share form's markup/classes come from TopBar/ShareButton.tsx and// ForwardToChannel.tsx. The animation changes fixture state only; it never// invokes share permissions, sends messages, or mounts a live app context.function ShareForm(props: {phase: number;+ query: string;+ message: string;advance: () => void;cancel: () => void;}) {return (<div class="mail-share-scrim"><div- class="mail-share-form glass-input"+ class="mail-share-form"role="group"aria-label="Share email preview"><header class="px-4 flex h-12 items-center gap-1.5 text-sm font-medium"><span class="shrink-0">Share:</span><Envelope class="size-4 shrink-0" />- <span class="truncate">Next steps for our team</span>+ <span class="truncate">Thursday demo</span><Buttonvariant="plain"size="icon-sm"@@ -53,10 +61,7 @@ function ShareForm(props: {when={props.phase >= 3}fallback={<span class="text-ink-placeholder">- To:{' '}- <span class="text-ink">- {props.phase >= 2 ? 'launch' : ''}- </span>+ To: <span class="text-ink">{props.query}</span><span class="mail-typing-caret" /></span>}@@ -80,14 +85,17 @@ function ShareForm(props: {</button></Show><div class="grow shrink min-h-0 flex flex-col w-full border-t border-edge-muted">- <div class="grow shrink min-h-20 px-4 py-1.5 w-full text-sm">+ <div+ class="grow shrink min-h-20 px-4 py-1.5 w-full text-sm"+ data-share-message-input+ ><Showwhen={props.phase >= 4}fallback={<span class="text-ink-placeholder">Optional message</span>}>- Dana’s ready for Thursday. Here’s the conversation.+ <span data-share-message>{props.message}</span></Show></div><div class="shrink-0 flex w-full items-center px-4 py-4 gap-3 flex-wrap">@@ -119,8 +127,37 @@ function ShareForm(props: {);}-function ChannelResult(props: { onOpen: () => void; updated: boolean }) {- const [messages, setMessages] = createSignal<string[]>([]);+function ChannelResult(props: {+ shared: boolean;+ updated: boolean;+ onOpen: () => void;+}) {+ // Solid's For keys by object identity. Keep existing messages stable across phases.+ const question: HomepageMessage = {+ person: 'julia',+ text: 'What does Valentina need before Thursday?',+ };+ const sharedEmail: HomepageMessage = {+ person: 'jacob',+ text: (+ <>+ Here’s the email for Thursday:{' '}+ <button+ type="button"+ class="mail-shared-thread"+ onClick={() => props.onOpen()}+ aria-label="Open shared email: Thursday demo"+ >+ <DocMention item={{ kind: 'email', label: 'Thursday demo' }} />+ </button>+ </>+ ),+ };+ const followUp: HomepageMessage = {+ person: 'julia',+ text: 'I’ll send the setup guide before the call.',+ };+ const [messages, setMessages] = createSignal<HomepageMessage[]>([]);return (<div class="mail-channel"><header class="flex h-12 items-center gap-2 px-4 text-sm">@@ -142,45 +179,18 @@ function ChannelResult(props: { onOpen: () => void; updated: boolean }) {<div class="mail-channel-messages"><HomepageConversationmessages={[- { person: 'julia', text: 'What does Dana need before Thursday?' },- {- person: 'jacob',- text: (- <>- Dana’s ready for Thursday. Here’s the conversation.- <button- type="button"- class="mail-shared-thread glass-input"- onClick={props.onOpen}- aria-label="Open shared email: Next steps for our team"- >- <span class="mail-shared-thread-label">- <Envelope class="size-4" /> Email thread <span>Live</span>- </span>- <strong>Next steps for our team</strong>- <span>Dana · Jacob</span>- <span class="mail-shared-thread-preview">- {props.updated- ? incomingReply- : 'Thursday at 9 works. Could you share the rollout plan?'}- </span>- <span class="mail-shared-thread-footer">- {props.updated- ? '2 messages · New reply from Dana'- : '1 message · Open full thread'}{' '}- <span aria-hidden="true">↗</span>- </span>- </button>- </>- ),- },- ...messages().map((text) => ({ person: 'jacob' as const, text })),+ question,+ ...(props.shared ? [sharedEmail] : []),+ ...(props.updated ? [followUp] : []),+ ...messages(),]}/></div><div class="mail-channel-composer"><ChannelComposer- onSend={(message) => setMessages([...messages(), message])}+ onSend={(text) =>+ setMessages((previous) => [...previous, { person: 'jacob', text }])+ }/></div></div>@@ -189,188 +199,179 @@ function ChannelResult(props: { onOpen: () => void; updated: boolean }) {export function EmailSharingDemo(props: { onClose?: () => void } = {}) {const [phase, setPhase] = createSignal(0);- const [playing, setPlaying] = createSignal(true);const [opened, setOpened] = createSignal(false);+ const [query, setQuery] = createSignal('');+ const [message, setMessage] = createSignal('');let root!: HTMLDivElement;- let stage!: HTMLDivElement;- const [pointer, setPointer] = createSignal<{ x: number; y: number }>();- let timer: ReturnType<typeof setTimeout> | undefined;- let visible = false;- let reduced = false;- const clear = () => {- if (timer !== undefined) clearTimeout(timer);- timer = undefined;+ const [target, setTarget] = createSignal<string>();+ const [clicking, setClicking] = createSignal(false);+ const approach = (selector: string) => {+ setClicking(false);+ setTarget(selector);+ };+ const click = (run: () => void) => {+ setClicking(true);+ run();};- const schedule = () => {- clear();- if (!visible || !playing() || reduced || document.hidden || phase() >= 7)- return;- timer = setTimeout(() => {- setPhase(phase() + 1);- if (phase() >= 7) setPlaying(false);- schedule();- }, phaseDuration[phase()]);++ const finish = () => {+ setPhase(7);+ queueMicrotask(() => {+ const body = root.querySelector<HTMLElement>(+ '.mail-sharing-email > .mail-thread > .mail-thread-body'+ );+ body?.scrollTo({ top: body.scrollHeight, behavior: 'smooth' });+ });};+ const actions = [+ { delay: 1200, run: () => approach('[data-demo-share-trigger]') },+ { delay: 650, run: () => click(() => setPhase(1)) },+ { delay: 350, run: () => approach('.mail-recipient-input') },+ { delay: 650, run: () => click(() => {}) },+ ...demoTypingActions(+ 'launch',+ (text) => {+ setClicking(false);+ setPhase(2);+ setQuery(text);+ },+ 800+ ),+ { delay: 550, run: () => approach('.mail-recipient-option') },+ { delay: 650, run: () => click(() => setPhase(3)) },+ { delay: 350, run: () => approach('[data-share-message-input]') },+ { delay: 650, run: () => click(() => {}) },+ ...demoTypingActions(+ shareMessage,+ (text) => {+ setClicking(false);+ setPhase(4);+ setMessage(text);+ },+ 700+ ),+ {+ delay: 700,+ run: () => {+ approach('.mail-share-submit');+ setPhase(5);+ },+ },+ { delay: 650, run: () => click(() => setPhase(6)) },+ { delay: 350, run: () => setClicking(false) },+ { delay: 2600, run: finish },+ { delay: 2000, run: () => setPhase(8) },+ ];+ const playback = createEmailWalkthrough({+ root: () => root,+ steps: actions.length,+ visibilityThreshold: 0.45,+ delay: (step) => actions[step - 1].delay,+ loop: { hold: 8000 },+ reset: () => {+ setTarget(undefined);+ setClicking(false);+ setPhase(0);+ setOpened(false);+ setQuery('');+ setMessage('');+ root+ .querySelectorAll<HTMLElement>('.mail-thread-body, [role="log"]')+ .forEach((el) => {+ el.scrollTop = 0;+ });+ },+ reduced: () => setPhase(8),+ advance: (step) => actions[step - 1].run(),+ });const manual = (next: number) => {- clear();- setPlaying(false);+ playback.pause();setPhase(next);setOpened(false);+ setQuery('launch');+ setMessage(shareMessage);};- onMount(() => {- function positionPointer() {- const selectors = [- '[data-demo-share-trigger]',- '.mail-recipient-input',- '.mail-recipient-option',- '.mail-share-note',- '.mail-share-note',- '.mail-share-submit',- '.mail-shared-thread',- ];- const selector = selectors[phase()];- const target = selector && stage.querySelector<HTMLElement>(selector);- if (!playing() || !visible || reduced || !target) {- setPointer(undefined);- return;- }- const bounds = target.getBoundingClientRect();- const frame = stage.getBoundingClientRect();- setPointer({- x: bounds.left - frame.left + Math.min(bounds.width / 2, 100),- y: bounds.top - frame.top + bounds.height / 2,- });- }- // Measure actual controls so the walkthrough follows mobile and desktop layouts.- createEffect(() => {- phase();- if (!playing()) {- setPointer(undefined);- return;- }- const frame = requestAnimationFrame(positionPointer);- onCleanup(() => cancelAnimationFrame(frame));- });- const resize = new ResizeObserver(positionPointer);- resize.observe(stage);- const preference = matchMedia('(prefers-reduced-motion: reduce)');- const syncPreference = () => {- reduced = preference.matches;- if (reduced) {- clear();- setPlaying(false);- setPhase(7);- } else schedule();- };- syncPreference();- const observer = new IntersectionObserver(- ([entry]) => {- visible = entry.isIntersecting;- schedule();- positionPointer();- },- { threshold: 0.2 }- );- observer.observe(root);- preference.addEventListener('change', syncPreference);- document.addEventListener('visibilitychange', schedule);- onCleanup(() => {- clear();- observer.disconnect();- resize.disconnect();- preference.removeEventListener('change', syncPreference);- document.removeEventListener('visibilitychange', schedule);- });+ const pointer = createDemoPointer({+ frame: () => root,+ target,+ active: () => playback.playing() && !playback.reducedMotion(),});return (- <div ref={root} class="mail-sharing-demo" data-phase={phase()}>+ <div+ ref={root}+ class="mail-sharing-demo email-feature-demo"+ data-phase={phase()}+ onPointerDown={playback.pause}+ onFocusIn={playback.pause}+ ><div- ref={stage}class="mail-sharing-stage"- onPointerDown={() => {- clear();- setPlaying(false);- }}- onFocusIn={() => {- clear();- setPlaying(false);- }}data-result={phase() >= 6 && !opened()}data-opened={opened()}>- <EmailShell- class="glass-input"- label="Email sharing animation"- channel={phase() >= 6 && !opened()}- >- <Show- when={phase() >= 6 && !opened()}- fallback={+ <EmailShell showRail={false} label="Share a live email with your team">+ <div class="mail-sharing-splits">+ <section class="mail-sharing-email" aria-label="Customer email"><EmailThread- email={demoEmails[0]}+ email={meetingEmail}hideReplyonBack={opened() ? () => setOpened(false) : undefined}onShare={() => manual(2)}- sharing={phase() === 1}+ sharing={phase() === 0 && playback.playing()}>- <Show when={opened() && phase() >= 7}>- <div class="mail-arrived-reply glass-input">- <header>- <strong>Dana</strong>- <span>Just now</span>- </header>- <p>{incomingReply}</p>- </div>+ <Show when={phase() >= 7}>+ <EmailThread+ email={{+ ...meetingEmail,+ id: 'follow-up',+ time: 'Just now',+ body: meetingReply,+ }}+ hideHeader+ hideSubject+ hideReply+ /></Show></EmailThread>- }- >- <ChannelResult- updated={phase() >= 7}- onOpen={() => {- clear();- setPlaying(false);- setOpened(true);- }}- />- </Show>+ <Show when={phase() >= 1 && phase() <= 5}>+ <ShareForm+ phase={phase()}+ query={query()}+ message={message()}+ advance={() => manual(phase() < 3 ? 3 : 6)}+ cancel={() => manual(0)}+ />+ </Show>+ </section>+ <section class="mail-sharing-chat" aria-label="Team conversation">+ <ChannelResult+ shared={phase() >= 6}+ updated={phase() >= 8}+ onOpen={() => {+ playback.pause();+ setOpened(true);+ }}+ />+ </section>+ </div></EmailShell>- <Show when={phase() >= 1 && phase() <= 5}>- <ShareForm- phase={phase()}- advance={() => manual(phase() < 3 ? 3 : 6)}- cancel={() => manual(0)}- />- </Show>- <Show when={playing() && pointer()}>- {(position) => (- <div- class="mail-sharing-pointer"- data-clicking={phase() === 5}- aria-hidden="true"- style={{- transform: `translate(${position().x}px, ${position().y}px)`,- }}- >- <DemoCursor label="Jacob" clicking={phase() === 5} />- </div>- )}- </Show></div>- <div class="mail-demo-controls">- <span>- {phase() >= 7- ? 'Dana replied. Your whole team is already up to date.'- : phase() === 6- ? 'Shared. Open the email right from the channel.'- : 'Choose #launch, add a note, and share.'}- </span>- <Show when={props.onClose}>+ <Show when={props.onClose}>+ <div class="mail-demo-controls"><Button variant="plain" size="sm" onClick={props.onClose}>Back to inbox</Button>- </Show>- </div>+ </div>+ </Show>+ <Show when={pointer()}>+ {(point) => (+ <DemoCursor+ class="email-demo-pointer"+ clicking={clicking()}+ style={{ transform: `translate(${point().x}px, ${point().y}px)` }}+ />+ )}+ </Show></div>);}diff --git a/apps/marketing/src/features/marketing/components/email/email-accounts-demo.css b/apps/marketing/src/features/marketing/components/email/email-accounts-demo.cssnew file mode 100644index 0000000000..c3941422e7--- /dev/null+++ b/apps/marketing/src/features/marketing/components/email/email-accounts-demo.css@@ -0,0 +1,26 @@+.email-accounts-demo .mail-app { height: 560px; min-height: 0; }+.email-accounts-demo .mail-sidebar { flex-basis: 264px; width: 264px; }+.email-accounts-demo .mail-sidebar [data-view-sidebar-content] { overflow-y: auto; scrollbar-width: thin; }+.email-accounts-demo [data-connecting=true] { background: var(--color-active); outline: 1px solid var(--color-edge); outline-offset: -1px; }+.email-accounts-toolbar { min-width: 0; border-bottom: 1px solid var(--color-edge-muted); }+.email-accounts-toolbar > span:first-of-type { flex-shrink: 0; font-weight: 500; }+.email-accounts-toolbar .email-account-scope { margin-left: 4px; min-width: 0; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-ink-muted); font-size: 12px; }+.email-accounts-mobile, .email-account-mobile-tabs { display: none; }+.email-account-search { flex: none; padding: 18px 16px 8px; }+.email-account-list, .email-account-thread, .email-account-compose { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }+.email-account-compose { padding: 20px; }+.email-account-list .mail-rows { animation: mail-account-in 180ms ease-out; }+.email-account-connected { position: absolute; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--color-edge-muted); border-radius: 8px; background: var(--color-panel); box-shadow: 0 8px 24px #0002; font-size: 13px; }+.email-account-connected svg { width: 16px; height: 16px; }+@keyframes mail-account-in { from { opacity: .5; transform: translateY(3px); } to { opacity: 1; transform: none; } }+@media(max-width:699px) {+ .email-accounts-demo .mail-app { height: 540px; }+ .email-accounts-mobile { display: block; margin-left: auto; }+ .email-accounts-toolbar .email-account-scope { max-width: 45%; }+ .email-account-mobile-tabs { display:flex; gap: 4px; padding: 12px 12px 0; }+ .email-account-mobile-tabs button { display:flex; align-items:center; gap:6px; padding: 6px 10px; border-radius:6px; color:var(--color-ink-muted); font:inherit; font-size:13px; }+ .email-account-mobile-tabs button[aria-pressed=true] { background:var(--color-active); color:var(--color-ink); }+ .email-account-mobile-tabs svg { width:16px; height:16px; }+ .email-account-compose { padding:12px; }+}+@media(prefers-reduced-motion:reduce) { .email-account-list .mail-rows { animation:none; } }diff --git a/apps/marketing/src/features/marketing/components/email/email-agentic-editing.css b/apps/marketing/src/features/marketing/components/email/email-agentic-editing.cssindex 87f8233da7..4b547105ca 100644--- a/apps/marketing/src/features/marketing/components/email/email-agentic-editing.css+++ b/apps/marketing/src/features/marketing/components/email/email-agentic-editing.css@@ -1,27 +1,33 @@-#agentic-editing .homepage-feature-heading { max-width: 920px; margin-inline: auto; padding-inline: 24px; text-align: left; }-#agentic-editing .homepage-feature-title { justify-content: flex-start; }-#agentic-editing .homepage-section-break { display: block; }-#agentic-editing .homepage-section-break > span { display: none; }-#agentic-editing .homepage-section-break p { max-width: 490px; margin-inline: 0; white-space: pre-line; text-wrap: wrap; }--.email-editing-stage { position: relative; isolation: isolate; padding: 24px; }-.email-editing-stage::before {- content: ''; position: absolute; inset: 0 -24px; z-index: -1; pointer-events: none;- background: radial-gradient(ellipse at 50% 50%, #a0aabc08, transparent 70%);-}-.email-editing-stage::after {- content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;- background-image: radial-gradient(#d0d6e133 .6px, transparent .9px);- background-size: 8px 8px;- mask-image: radial-gradient(ellipse at 50% 40%, #000, transparent 70%);- opacity: .16;+/* The same user bubble and editable draft used by Macro's agent conversation. */+.email-editing-stage .mail-app { height: 700px; min-height: 0; }+.email-draft-title { border-bottom: 1px solid var(--color-edge-muted); }+.email-draft-title > svg { width: 16px; height: 16px; flex-shrink: 0; }+.email-draft-title > :last-child { margin-left: 0; }+.email-agent-scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }+.email-agent-content { width: min(760px, 100%); margin: auto; padding: 28px 24px; }+.email-agent-request { display: flex; justify-content: flex-end; margin-bottom: 28px; font-size: 14px; line-height: 1.6; }+.email-agent-request > * { max-width: 90%; }+.email-agent-context { margin: 0 0 24px; color: var(--color-ink-muted); font-size: 14px; line-height: 1.7; animation: mail-share-enter 180ms ease-out; }+.email-agent-draft { animation: mail-share-enter 180ms ease-out; }+.email-agent-draft .homepage-email-demo { --homepage-email-height: 430px; }+.email-agent-draft .homepage-email-body { white-space: normal; }+.email-agent-draft .homepage-email-body p + p { margin-top: 16px; }+.email-agent-input { flex: none; width: min(760px, 100%); align-self: center; padding: 0 24px 20px; }+.email-agent-input .mail-channel-input { font-size: 14px; }+@media (max-width:699px) {+ .email-editing-stage .mail-app { height: 700px; }+ .email-agent-content { padding: 20px 12px; }+ .email-agent-input { padding: 0 12px 12px; }+ .email-agent-request > * { max-width: 100%; }+ .email-agent-draft .homepage-email-demo { --homepage-email-height: 500px; }+ .email-agent-draft .homepage-email-label { flex-basis: 46px; }}-.email-editing-stage .homepage-conversation { width: 100%; }-.email-editing-stage .homepage-email-body p + p { margin-top: 16px; }+@media (prefers-reduced-motion:reduce) { .email-agent-context, .email-agent-draft { animation: none; } }-@media (max-width: 699px) {- #agentic-editing .homepage-feature-heading { padding-inline: 0; }- #agentic-editing .homepage-section-break p { max-width: 100%; white-space: normal; text-wrap: pretty; }- .email-editing-stage { padding: 12px 0 0; }- .email-editing-stage::before { inset: 0; }+.email-agent-splits { display:flex; min-width:0; min-height:0; height:100%; }+.email-agent-main { display:flex; flex-direction:column; flex:1; min-width:0; min-height:0; }+.email-agent-source { display:flex; flex-direction:column; flex:0 1 46%; min-width:0; min-height:0; border-right:1px solid var(--color-edge-muted); container:sample-main / inline-size; }+@media (max-width:899px) {+ .email-agent-splits[data-source-open=true] .email-agent-main { display:none; }+ .email-agent-source { flex:1; border:0; }}diff --git a/apps/marketing/src/features/marketing/components/email/email-auto-tags-stage.css b/apps/marketing/src/features/marketing/components/email/email-auto-tags-stage.cssdeleted file mode 100644index beb244f1d5..0000000000--- a/apps/marketing/src/features/marketing/components/email/email-auto-tags-stage.css+++ /dev/null@@ -1,73 +0,0 @@-/* A flat product scene with a soft background and shared glass edges. */-#auto-tags .homepage-section-break > span { display: none; }-#auto-tags .homepage-section-break { display: block; }-#auto-tags .homepage-feature-heading { max-width: 920px; margin-inline: auto; padding-inline: 24px; text-align: left; }-#auto-tags .homepage-feature-title { justify-content: flex-start; }-#auto-tags .homepage-section-break p { max-width: 580px; margin-inline: 0; white-space: pre-line; text-wrap: wrap; }--.email-tag-stage {- position: relative;- isolation: isolate;- padding: 58px 24px 18px;-}--.email-tag-stage::before {- content: '';- position: absolute;- inset: -48px -64px 0;- z-index: -2;- pointer-events: none;- background: radial-gradient(ellipse at 65% 31%, rgb(144 148 159 / 0.05), transparent 57%), radial-gradient(ellipse at 25% 60%, rgb(106 117 135 / 0.025), transparent 60%);- mask-image: linear-gradient(transparent, #000 18%, #000 60%, transparent);-}--.email-tag-stage::after {- content: '';- position: absolute;- inset: 0 -24px;- z-index: -1;- pointer-events: none;- background-image: radial-gradient(rgb(208 214 225 / 0.2) 0.6px, transparent 0.9px);- background-size: 8px 8px;- mask-image: radial-gradient(ellipse at 63% 34%, #000, transparent 69%);- opacity: 0.16;-}--.email-tags-demo .mail-app {- position: relative;- min-height: 450px;- overflow: visible;- border-radius: 12px;- border: 0;- background: linear-gradient(145deg, #17181b, #101112 55%);- box-shadow: var(--glass-shadow);- transform: none;- mask-image: linear-gradient(#000 68%, rgb(0 0 0 / 0.65) 84%, transparent 100%);- -webkit-mask-image: linear-gradient(#000 68%, rgb(0 0 0 / 0.65) 84%, transparent 100%);-}--/* The shared glass utility owns the rim; suppress the old demo outline. */-.email-tags-demo .mail-app::before { content: none; }-.email-tags-demo .mail-app-rail { display: none; }-.email-tags-demo .email-feature-toolbar { height: 62px; padding-inline: 24px; border-bottom: 1px solid rgb(255 255 255 / 0.045); }-.email-tags-demo .mail-rows { padding-top: 18px; }-.email-tags-demo .mail-date-group { padding-bottom: 18px; }-.email-tags-demo .mail-row { min-height: 54px; }-.email-tags-demo .mail-row[aria-current='true'] { background: linear-gradient(100deg, rgb(255 255 255 / 0.07), rgb(255 255 255 / 0.025)); box-shadow: inset 0 1px rgb(255 255 255 / 0.045); }-.email-tags-demo .email-auto-tag-menu { background: #1c1d20; border-color: rgb(255 255 255 / 0.13); box-shadow: 0 24px 50px #0009, 0 1px 0 rgb(255 255 255 / 0.06) inset; }--.email-tag-count { margin-left: auto; color: #82858a; font-size: 11px; white-space: nowrap; }-.email-tags-demo .mail-demo-controls { margin-top: 18px; }-.email-tags-demo[data-opened='true'] .mail-app { mask-image: none; -webkit-mask-image: none; }--@media (max-width: 699px) {- #auto-tags .homepage-section-break p { max-width: 100%; white-space: normal; text-wrap: pretty; }- #auto-tags .homepage-feature-heading { padding-inline: 0; }- .email-tag-stage { padding: 24px 0 0; }- .email-tag-stage::before { inset: 0 -12px; }- .email-tag-stage::after { inset: 0; }- .email-tags-demo .mail-app { transform: none; min-height: 650px; mask-image: linear-gradient(#000 78%, transparent); -webkit-mask-image: linear-gradient(#000 78%, transparent); }- .email-tags-demo .mail-row { min-height: 112px; }- .email-tags-demo .email-feature-toolbar { padding-inline: 14px; }- .email-tags-demo[data-opened='true'] .mail-app { min-height: 0; }-}diff --git a/apps/marketing/src/features/marketing/components/email/email-demos.css b/apps/marketing/src/features/marketing/components/email/email-demos.cssindex 368a555c36..e0e0ac3f9c 100644--- a/apps/marketing/src/features/marketing/components/email/email-demos.css+++ b/apps/marketing/src/features/marketing/components/email/email-demos.css@@ -60,7 +60,6 @@.mail-recipient-option { position: absolute; z-index: 1; top: 94px; left: 8px; right: 8px; padding: 12px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--color-edge-muted); border-radius: 8px; background: var(--color-panel); color: var(--color-ink); box-shadow: 0 5px 20px #0006; font-size: 14px; }.mail-typing-caret { border-right: 1px solid var(--color-accent); margin-left: 2px; }.mail-demo-controls { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: 12px; color: var(--color-ink-muted); }-.mail-demo-controls > span { font: 400 12px/1.5 'Inter Variable', Inter, sans-serif; margin-left: 8px; color: #737373; }.mail-channel { min-height: 718px; padding-bottom: 100px; display: flex; flex-direction: column; }.mail-channel-messages { flex: 1; display: flex; align-items: flex-end; padding: 28px 32px; }.mail-channel-messages .homepage-conversation { width: min(660px, 100%); margin: 0 auto; font-size: 14px; }@@ -104,7 +103,6 @@.mail-channel-composer { padding: 0 12px 16px; }.mail-share-scrim { padding: 10px; }.mail-demo-controls { flex-wrap: wrap; }- .mail-demo-controls > span { flex-basis: 100%; margin: 0; text-align: center; }}/* Keep the public site's unlayered button reset out of the frozen app UI.@@ -132,3 +130,10 @@/* Preserve dark arrow contrast when the shared button's generic hover applies. */.feature-page [data-input-action=send]:not(:disabled) { color: var(--color-composer-action-ink); }++/* Keep sender names readable when the same email opens in a narrow split. */+.mail-message-content { container: mail-message / inline-size; }+@container mail-message (max-width: 320px) {+ .mail-message-recipient { display: none; }+ .mail-message-text { padding-right: 0; }+}diff --git a/apps/marketing/src/features/marketing/components/email/email-desktop-demo.css b/apps/marketing/src/features/marketing/components/email/email-desktop-demo.cssindex b4eb2ea63b..0e6a85dc5d 100644--- a/apps/marketing/src/features/marketing/components/email/email-desktop-demo.css+++ b/apps/marketing/src/features/marketing/components/email/email-desktop-demo.css@@ -43,14 +43,12 @@.email-desktop-content .dummy-workspace[data-embedded=true] { height: 100%; border: 0; border-radius: 0; box-shadow: none; }.email-desktop-content .dummy-banner { display: none; }.email-desktop-loading { display: grid; place-items: center; height: 100%; color: #888; font-size: 14px; }-.email-desktop-demo .email-desktop-caption { margin-top: 20px; color: #777; font-size: 13px; line-height: 1.5; text-align: center; }@media (max-width: 699px) {.email-desktop-demo { --desktop-stage-width: calc(100vw - 24px); margin-bottom: 52px; }.email-desktop-wallpaper { padding: 28px 12px; border-radius: 8px; }.email-desktop-window { border-radius: 9px; }.email-desktop-content { height: 510px; }.email-desktop-content .dummy-sidebar { top: 42px; }- .email-desktop-demo .email-desktop-caption { max-width: 290px; margin: 16px auto 0; font-size: 12px; }}.email-desktop-canvas,@@ -71,6 +69,7 @@/* Opt-in hero frame: lower-page demos keep their own layout. */:root body .email-desktop-demo[data-hero-frame=true] {--desktop-stage-width: min(1200px, calc(100vw - 48px));+ --hero-content-height: 640px;}:root body .email-desktop-demo[data-hero-frame=true] .email-desktop-wallpaper {position: relative;@@ -97,7 +96,10 @@background: #171717;}:root body .email-desktop-demo[data-hero-frame=true] .email-desktop-content {- height: 640px;+ height: var(--hero-content-height);+}+:root body .email-desktop-demo[data-hero-frame=true][data-window-chrome=false] .email-desktop-content {+ height: calc(var(--hero-content-height) + 36px);}:root body .email-desktop-demo[data-hero-frame=true] .email-desktop-content .product-demo {height: 100%;@@ -114,6 +116,7 @@@media (max-width: 699px) {:root body .email-desktop-demo[data-hero-frame=true] {--desktop-stage-width: calc(100vw - 24px);+ --hero-content-height: 580px;}:root body .email-desktop-demo[data-hero-frame=true] .email-desktop-wallpaper {padding: 16px;@@ -122,7 +125,4 @@:root body .email-desktop-demo[data-hero-frame=true] .email-desktop-window {border-radius: 12px;}- :root body .email-desktop-demo[data-hero-frame=true] .email-desktop-content {- height: 580px;- }}diff --git a/apps/marketing/src/features/marketing/components/email/email-feature-demos.css b/apps/marketing/src/features/marketing/components/email/email-feature-demos.cssindex 2d71dfb71f..3621827801 100644--- a/apps/marketing/src/features/marketing/components/email/email-feature-demos.css+++ b/apps/marketing/src/features/marketing/components/email/email-feature-demos.css@@ -15,11 +15,18 @@}.email-feature-demo .mail-app {- min-height: 440px;+ min-height: 480px;+ border: 1px solid var(--color-edge-muted);+ border-radius: 12px;+ background: var(--color-panel);+ box-shadow: 0 12px 32px #0002;+ letter-spacing: normal;mask-image: none;-webkit-mask-image: none;}+.email-feature-demo .mail-app::before { content: none; }+.email-feature-demo .mail-main {position: relative;display: flex;@@ -30,9 +37,9 @@display: flex;align-items: center;gap: 8px;- height: 58px;+ height: 48px;flex-shrink: 0;- padding: 0 20px;+ padding: 0 16px;font-size: 14px;color: var(--color-ink);}@@ -43,15 +50,16 @@}.email-toolbar-secondary { color: var(--color-ink-extra-muted); }-.email-feature-demo .mail-row { min-height: 52px; }+.email-feature-demo .mail-row { min-height: 40px; }.email-feature-demo .mail-row[aria-current='true'] { background: var(--color-active); }-.email-feature-demo .mail-rows { padding-top: 16px; }-.email-feature-demo .mail-date-group { padding-bottom: 16px; }+.email-feature-demo .mail-rows { padding: 16px 8px 24px; }+.email-feature-demo .mail-date-group { padding-bottom: 8px; }+.email-feature-demo .mail-thread-body { width: 100%; max-width: 968px; margin: 0 auto; padding: 32px 24px; }.email-auto-tag-menu {position: absolute;z-index: 3;- top: 52px;+ top: 44px;right: 20px;width: 214px;padding: 6px;@@ -70,15 +78,6 @@.email-tag-summary > svg { width: 16px; height: 16px; }.email-tag-summary > :last-child { margin-left: auto; white-space: nowrap; }-.email-agent-pointer {- position: absolute;- z-index: 4;- pointer-events: none;- top: calc(119px + var(--email-cursor-row) * 52px);- left: 63%;- transition: top 650ms ease, left 650ms ease;-}-.email-agent-pointer[data-menu='true'] { top: calc(106px + var(--email-tag-index) * 36px); left: calc(100% - 95px); }.email-keyboard-demo:focus { outline: none; }.email-keyboard-demo:focus-visible .mail-app { outline: 1px solid var(--color-accent); outline-offset: 4px; }.email-keyboard-content { flex: 1; min-height: 440px; }@@ -100,16 +99,12 @@.email-feature-demo .mail-app-rail { display: none; }.email-feature-demo .mail-row { min-height: 100px; }.email-auto-tag-menu { right: 10px; }- .email-agent-pointer { top: calc(158px + var(--email-cursor-row) * 100px); }.email-shortcut-dock { flex-wrap: wrap; padding: 12px 8px; gap: 2px; }.email-shortcut-dock > button { gap: 5px; font-size: 11px; }.email-shortcut-dock kbd { min-width: 25px; height: 28px; }.email-tag-summary { padding: 20px 12px; gap: 6px; font-size: 11px; }.email-tag-summary > svg { display: none; }}-@media (prefers-reduced-motion: reduce) {- .email-agent-pointer { transition: none; }-}@media (max-width: 699px) {.email-feature-demo .mail-row-narrow .text-right {@@ -138,3 +133,12 @@@media (max-width: 699px) {.feature-page:has([aria-labelledby='email-faq-title']) > .homepage-feature-end { width: 100%; }}++@media (max-width: 699px) {+ .email-feature-demo .mail-thread-body { padding: 24px 12px; }+ .email-feature-demo .mail-rows { padding-inline: 0; }+}++/* Keep the operating pointer above local menus and inside its demo frame. */+.email-accounts-demo, .email-editing-stage { position: relative; }+.email-feature-demo > .email-demo-pointer { z-index: calc(var(--z-index-action-menu, 150) + 1); }diff --git a/apps/marketing/src/features/marketing/components/email/email-hero.css b/apps/marketing/src/features/marketing/components/email/email-hero.cssindex 0fad7a04b3..47f9396579 100644--- a/apps/marketing/src/features/marketing/components/email/email-hero.css+++ b/apps/marketing/src/features/marketing/components/email/email-hero.css@@ -20,7 +20,7 @@text-transform: uppercase;}-.email-page-hero-label > svg {+.product-home-link > svg {width: 20px;height: 20px;flex-shrink: 0;@@ -81,3 +81,17 @@display: none;}}++.product-home-link {+ display: inline-flex;+ align-items: center;+ gap: 10px;+ color: inherit;+ text-decoration: none;+ border-radius: 3px;+}+.product-home-link:hover { color: var(--color-ink); }+.product-home-link:focus-visible {+ outline: 2px solid currentColor;+ outline-offset: 5px;+}diff --git a/apps/marketing/src/features/marketing/components/email/email-keyboard-stage.css b/apps/marketing/src/features/marketing/components/email/email-keyboard-stage.cssindex ba3c2decbb..f84b673d25 100644--- a/apps/marketing/src/features/marketing/components/email/email-keyboard-stage.css+++ b/apps/marketing/src/features/marketing/components/email/email-keyboard-stage.css@@ -1,44 +1,15 @@-#keyboard-speed .homepage-feature-heading { max-width: 920px; margin-inline: auto; padding-inline: 24px; text-align: left; }-#keyboard-speed .homepage-feature-title { justify-content: flex-start; }-#keyboard-speed .homepage-section-break { display: block; }-#keyboard-speed .homepage-section-break > span { display: none; }-#keyboard-speed .homepage-section-break p { max-width: 348px; margin-inline: 0; white-space: pre-line; text-wrap: wrap; }--.email-keyboard-stage { position: relative; isolation: isolate; padding: 28px 24px 0; }-.email-keyboard-stage::before { content: ''; position: absolute; inset: -40px -40px 48px; z-index: -2; pointer-events: none; background: radial-gradient(ellipse at 60% 40%, #a6adbb0a, transparent 65%); mask-image: linear-gradient(transparent, #000 20%, #000 65%, transparent); }-.email-keyboard-stage::after { content: ''; position: absolute; inset: -10px 0 48px; z-index: -1; pointer-events: none; background: radial-gradient(#cfd8e32a .6px, transparent .9px) 0 0 / 8px 8px; mask-image: radial-gradient(ellipse at center, #000, transparent 70%); opacity: .16; }-.email-keyboard-stage .mail-app { min-height: 490px; border: 0; border-radius: 12px; background: linear-gradient(145deg, #17181b, #101112 60%); box-shadow: var(--glass-shadow); mask-image: linear-gradient(#000 80%, transparent); -webkit-mask-image: linear-gradient(#000 80%, transparent); }-.email-keyboard-stage .mail-app::before { content: none; }-.email-keyboard-stage .mail-app-rail { display: none; }-.email-keyboard-stage .email-feature-toolbar { height: 62px; padding-inline: 24px; border-bottom: 1px solid #ffffff0b; }-.email-keyboard-stage .email-keyboard-content { min-height: 428px; }-.email-keyboard-stage .mail-thread-body { padding: 28px 32px 72px; }-.email-keyboard-stage .mail-rows { padding: 18px 8px 70px; }-.email-keyboard-stage .mail-row { min-height: 60px; border: 0; border-radius: 12px; transition: background 160ms ease, box-shadow 160ms ease; }-.email-keyboard-stage .mail-row[aria-current='true'] { background: linear-gradient(120deg, #ffffff10, #ffffff04); box-shadow: inset 2px 0 #a8bcae, inset 0 1px #ffffff08; }-.email-keyboard-stage .email-shortcut-dock { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; padding: 8px 0 16px; border: 0; background: transparent; color: #a3a3a3; }-.email-keyboard-stage .email-shortcut-dock > button { flex-direction: row; gap: 8px; padding: 6px; font: 400 12px/1.5 'Inter Variable', Inter, sans-serif; color: #a3a3a3; transition: color 160ms ease; }-.email-keyboard-stage .email-shortcut-dock > button:hover,-.email-keyboard-stage .email-shortcut-dock > button[data-active='true'] { background: transparent; color: #f0f0f0; }-.email-keyboard-stage .email-shortcut-dock kbd { min-width: 36px; height: 36px; border: 0; border-radius: 8px; background: linear-gradient(#242528, #191a1c); box-shadow: inset 0 1px #ffffff24, inset 0 0 0 1px #ffffff09, 0 3px 0 #080809; color: #b9bbc0; transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease; }-.email-keyboard-stage .email-shortcut-dock > button[data-active='true'] kbd { background: #d8e0da; color: #151916; box-shadow: inset 0 1px #ffffff66, 0 1px 0 #080809; }-.email-keyboard-demo > .mail-demo-controls { padding-top: 0; }--@media (max-width: 699px) {- #keyboard-speed .homepage-section-break p { max-width: 100%; white-space: normal; text-wrap: pretty; }- #keyboard-speed .homepage-feature-heading { padding-inline: 0; }- .email-keyboard-stage { padding: 12px 0 0; }- .email-keyboard-stage::before { inset-inline: 0; }- .email-keyboard-stage .mail-app { min-height: 600px; }- .email-keyboard-stage .email-keyboard-content { min-height: 538px; }- .email-keyboard-stage .mail-row { min-height: 112px; }- .email-keyboard-stage .mail-thread-body { padding: 24px 14px 72px; }- .email-keyboard-stage .email-feature-toolbar { padding-inline: 16px; }- .email-keyboard-stage .email-shortcut-dock { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 2px; }- .email-keyboard-stage .email-shortcut-dock > button { flex-direction: column; font-size: 10px; padding-inline: 0; }+/* Shortcut hints belong below the app, not inside its inbox chrome. */+.email-keyboard-stage { position: relative; }+.email-keyboard-stage .mail-app { height: 560px; min-height: 0; }+.email-keyboard-stage .email-keyboard-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }+.email-keyboard-stage .email-shortcut-dock {+ display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;+ padding: 20px 0 0; border: 0; background: transparent;}-@media (prefers-reduced-motion: reduce) {- .email-keyboard-stage .mail-row,- .email-keyboard-stage .email-shortcut-dock > button,- .email-keyboard-stage .email-shortcut-dock kbd { transition: none; }+.email-keyboard-stage .email-shortcut-dock kbd { box-shadow: none; }+@media (max-width: 699px) {+ .email-keyboard-stage .email-shortcut-dock {+ display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px;+ }+ .email-keyboard-stage .email-shortcut-dock > button { flex-direction: column; padding-inline: 0; font-size: 10px; }}diff --git a/apps/marketing/src/features/marketing/components/email/email-sharing-stage.css b/apps/marketing/src/features/marketing/components/email/email-sharing-stage.cssindex f5a8de61b5..9926026fd4 100644--- a/apps/marketing/src/features/marketing/components/email/email-sharing-stage.css+++ b/apps/marketing/src/features/marketing/components/email/email-sharing-stage.css@@ -1,62 +1,41 @@-/* A readable walkthrough around the interactive product surfaces. */-#email-sharing .homepage-feature-heading { max-width: 920px; margin-inline: auto; padding-inline: 24px; text-align: left; }-#email-sharing .homepage-feature-title { justify-content: flex-start; }-#email-sharing .homepage-section-break { display: block; }-#email-sharing .homepage-section-break > span { display: none; }-#email-sharing .homepage-section-break p { max-width: 632px; margin-inline: 0; white-space: pre-line; text-wrap: wrap; }-.mail-sharing-stage { position: relative; isolation: isolate; padding: 28px 24px 60px; }-.mail-sharing-stage::before { content: ''; position: absolute; inset: -40px -40px 0; z-index: -2; pointer-events: none; background: radial-gradient(ellipse at 60% 40%, #a6adbb0a, transparent 65%); mask-image: linear-gradient(transparent, #000 20%, #000 65%, transparent); }-.mail-sharing-stage::after { content: ''; position: absolute; inset: -10px 0 0; z-index: -1; pointer-events: none; background: radial-gradient(#cfd8e32a .6px, transparent .9px) 0 0 / 8px 8px; mask-image: radial-gradient(ellipse at center, #000, transparent 70%); opacity: .16; }-.mail-sharing-stage .mail-app { height: 560px; min-height: 0; border: 0; border-radius: 12px; background: linear-gradient(145deg, #17181b, #101112 60%); box-shadow: var(--glass-shadow); transform: none; mask-image: linear-gradient(#000 83%, transparent); }-.mail-sharing-stage .mail-app::before { content: none; }-.mail-sharing-stage .mail-app-rail { display: none; }-.mail-sharing-stage .mail-thread-body { padding: 36px 32px 60px; }-.mail-sharing-stage .mail-share-scrim { inset: 28px 24px 60px; align-items: flex-start; padding: 112px 32px 24px; background: #0003; }-.mail-sharing-stage .mail-share-form { width: min(560px, 100%); border: 0; background: linear-gradient(135deg, #232427, #161719 85%); box-shadow: var(--glass-shadow); }-.mail-sharing-stage .mail-channel { height: 100%; min-height: 0; padding-bottom: 62px; }-.mail-sharing-stage .mail-channel > header { border-bottom: 1px solid #ffffff09; }-.mail-sharing-stage .mail-channel-messages { align-items: flex-start; padding: 26px 32px 20px; }-.mail-sharing-stage .mail-channel-messages .homepage-conversation { margin: 0 auto; width: min(660px, 100%); }-.mail-sharing-stage .mail-channel-messages .homepage-message { max-width: 100%; }-.mail-sharing-stage .mail-channel-composer { margin-inline: auto; width: min(724px, 100%); padding: 0 32px; }-.mail-shared-thread { display: flex; flex-direction: column; gap: 7px; width: 100%; min-width: 0; margin-top: 14px; padding: 16px; text-align: left; border: 0; border-radius: 10px; color: #bbbfc4; background: #161719; box-shadow: var(--glass-shadow); font: 400 12px/1.5 var(--font-sans); }-.mail-shared-thread > strong { color: #eee; font-size: 14px; font-weight: 500; }-.mail-shared-thread-label { display: flex; align-items: center; gap: 7px; color: #8c9198; font-size: 10px; }-.mail-shared-thread-label > span { margin-left: auto; color: #a8bcae; }-.mail-shared-thread-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #a1a5ac; }-.mail-shared-thread-footer { display: flex; justify-content: space-between; gap: 12px; color: #a8bcae; font-size: 10px; padding-top: 4px; }-.mail-sharing-stage[data-opened='true'] .mail-app { transform: none; mask-image: none; }-.mail-arrived-reply { margin-top: 18px; border-radius: 14px; padding: 20px; background: #191a1c; box-shadow: var(--glass-shadow); }-.mail-arrived-reply header { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; margin-bottom: 14px; }-.mail-arrived-reply header span { color: #8a8f97; }-.mail-arrived-reply p { font-size: 14px; line-height: 1.65; }-.mail-sharing-demo > .mail-demo-controls { padding-top: 0; margin-top: -16px; }-@media (max-width: 699px) {- #email-sharing .homepage-section-break p { max-width: 100%; white-space: normal; text-wrap: pretty; }- #email-sharing .homepage-feature-heading { padding-inline: 0; }- .mail-sharing-stage { padding: 12px 0 40px; }- .mail-sharing-stage::before { inset-inline: 0; }- .mail-sharing-stage .mail-app { transform: none; height: 600px; min-height: 0; }- .mail-sharing-stage .mail-share-scrim { inset: 12px 0 40px; padding: 108px 10px 10px; }- .mail-sharing-stage .mail-thread-body { padding: 28px 14px 50px; }- .mail-sharing-stage .mail-channel { min-height: 0; padding-bottom: 52px; }- .mail-sharing-stage .mail-channel-messages { padding: 24px 14px 20px; }- .mail-sharing-stage .mail-channel-messages .homepage-conversation { width: 100%; }- .mail-sharing-stage .mail-channel-composer { width: 100%; padding: 0 14px; }-}--/* Keep the page geometry constant through sharing, new replies, and local edits. */+/* Two real app splits: the customer thread and its internal channel discussion. */+.mail-sharing-stage { position: relative; }+.mail-sharing-stage .mail-app { height: 600px; min-height: 0; }+.mail-sharing-splits { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); height: 100%; min-height: 0; }+.mail-sharing-splits > section { min-width: 0; min-height: 0; }+.mail-sharing-email { position: relative; }+.mail-sharing-chat { border-left: 1px solid var(--color-edge-muted); }.mail-sharing-stage .mail-main,.mail-sharing-stage .mail-thread { display: flex; flex-direction: column; min-height: 0; height: 100%; }-.mail-sharing-stage .mail-thread-body { width: 100%; margin: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }+.mail-sharing-stage .mail-thread-body { width: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 28px 20px; scrollbar-width: thin; }+.mail-sharing-stage .mail-thread-body .mail-thread { height: auto; margin-top: 16px; animation: mail-share-enter 180ms ease-out; }+.mail-sharing-stage .mail-thread-body .mail-thread-body { padding: 0; }+.mail-sharing-stage .mail-share-scrim { inset: 0; align-items: flex-start; padding: 76px 12px 12px; border-radius: 0; }+.mail-sharing-stage .mail-share-form { width: 100%; }+.mail-sharing-stage .mail-channel { height: 100%; min-height: 0; padding-bottom: 0; }+.mail-sharing-stage .mail-channel > header { border-bottom: 1px solid var(--color-edge-muted); }.mail-sharing-stage .mail-channel > header,.mail-sharing-stage .mail-channel-composer { flex-shrink: 0; }-.mail-sharing-stage .mail-channel-messages { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }-.mail-sharing-demo > .mail-demo-controls { height: 48px; padding-inline: 12px; }-.mail-sharing-pointer { position: absolute; top: 0; left: 0; z-index: 8; pointer-events: none; transition: transform 650ms cubic-bezier(.2,.8,.2,1); }-@media (max-width: 699px) {- .mail-sharing-demo > .mail-demo-controls { height: 64px; }+.mail-sharing-stage .mail-channel-messages { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 20px; align-items: flex-start; scrollbar-width: thin; }+.mail-sharing-stage .mail-channel-messages .homepage-conversation { width: 100%; margin: 0; gap: 24px; }+.mail-sharing-stage .mail-channel-messages .homepage-message { max-width: 100%; animation: mail-share-enter 180ms ease-out both; }+/* One restrained entrance per new message, with no second bubble animation. */+.mail-sharing-stage .mail-channel-messages .homepage-message [data-user-message-bubble] { animation: none; }+.mail-sharing-stage .mail-channel-composer { width: 100%; padding: 12px 16px 20px; }+.mail-shared-thread { display: inline; max-width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }+.mail-shared-thread:hover .demo-mention-name { text-decoration-color: currentColor; }+.mail-shared-thread:focus-visible { outline: 1px solid var(--color-accent); outline-offset: 3px; border-radius: 2px; }+@media (max-width: 799px) {+ .mail-sharing-splits { grid-template-columns: minmax(0, 1fr); }+ .mail-sharing-stage .mail-app { height: 580px; }+ .mail-sharing-stage:not([data-result=true]) .mail-sharing-chat { display: none; }+ .mail-sharing-stage[data-result=true] .mail-sharing-email { display: none; }+ .mail-sharing-chat { border: 0; }+ .mail-sharing-stage .mail-channel-messages { padding: 20px 12px; }+ .mail-sharing-stage .mail-channel-composer { padding: 12px; }}@media (prefers-reduced-motion: reduce) {- .mail-sharing-pointer { display: none; transition: none; }+ .mail-sharing-stage .mail-thread-body .mail-thread,+ .mail-sharing-stage .mail-channel-messages .homepage-message,+ .mail-sharing-stage .mail-share-form { animation: none; }}diff --git a/apps/marketing/src/features/marketing/components/email/frozen/ChannelComposer.tsx b/apps/marketing/src/features/marketing/components/email/frozen/ChannelComposer.tsxindex 1728968ba1..6e14cc06d3 100644--- a/apps/marketing/src/features/marketing/components/email/frozen/ChannelComposer.tsx+++ b/apps/marketing/src/features/marketing/components/email/frozen/ChannelComposer.tsx@@ -10,13 +10,21 @@ import {onMount,Show,} from 'solid-js';-import { serializeDemoEditor } from '../../DemoMention';+import type { DemoMention } from '../../../core/demo-mentions';+import { createDemoComposerLayout } from '../../../primitives/createDemoComposerLayout';+import {+ createDemoMentionElement,+ serializeDemoEditor,+} from '../../DemoMention';import { InputActionButton } from './ActionButton';import { Layout } from './ComposerLayout';// The actual ChannelInput layout, ComposerSurface, InputActionButton and// SendAction presentation with a website-local draft instead of app commands.-export type ChannelComposerHandle = { setText: (text: string) => void };+export type ChannelComposerHandle = {+ setText: (text: string, leadingMention?: DemoMention) => void;+ send: () => void;+};export function ChannelComposer(props: {onSend: (message: string) => void;@@ -34,25 +42,46 @@ export function ChannelComposer(props: {const [attachments, setAttachments] = createSignal<string[]>([]);let filePicker: HTMLInputElement | undefined;let input: HTMLTextAreaElement | HTMLDivElement | undefined;- const resize = () => {- if (!input) return;- input.style.height = '24px';- input.style.height = `${Math.min(input.scrollHeight, 200)}px`;- };+ const layout = createDemoComposerLayout({+ input: () => input,+ text: draft,+ compact: () => props.compact,+ });+ const resize = layout.resize;onMount(() => {props.onReady?.({- setText: (text) => {+ send: () => send(),+ setText: (text, leadingMention) => {if (!input) return;- if (input instanceof HTMLTextAreaElement) input.value = text;- else input.textContent = text;- setDraft(text);+ const prefix = leadingMention+ ? `@${leadingMention.shortName ?? leadingMention.label}`+ : undefined;+ if (input instanceof HTMLTextAreaElement) {+ input.value = text;+ setDraft(text);+ } else {+ if (leadingMention && prefix && text.startsWith(prefix)) {+ const token = input.firstElementChild;+ if (+ token?.getAttribute('data-demo-mention') !== leadingMention.id+ ) {+ input.replaceChildren(+ createDemoMentionElement(leadingMention),+ document.createTextNode('')+ );+ }+ // Preserve the selected mention while the rest of the draft grows.+ const suffix = input.lastChild;+ if (suffix) suffix.textContent = text.slice(prefix.length);+ } else {+ input.textContent = text;+ }+ setDraft(serializeDemoEditor(input));+ }queueMicrotask(resize);},});onCleanup(() => props.onReady?.(undefined));- const observer = new ResizeObserver(resize);- if (input?.parentElement) observer.observe(input.parentElement);- onCleanup(() => observer.disconnect());});const send = () => {if (!draft().trim() && !attachments().length) return;@@ -105,13 +134,7 @@ export function ChannelComposer(props: {</Show><Layoutdata-agent-composer={props.agent || undefined}- oneLineInput={- props.compact ??- (!draft().includes('\n') &&- (input?.tagName === 'DIV'- ? (input.textContent?.length ?? 0)- : draft().length) < 70)- }+ oneLineInput={layout.compact()}><Layout.Body><Layout.Editor>diff --git a/apps/marketing/src/features/marketing/components/email/frozen/EmailAvatar.tsx b/apps/marketing/src/features/marketing/components/email/frozen/EmailAvatar.tsxindex 118c92a9e7..5cb1918174 100644--- a/apps/marketing/src/features/marketing/components/email/frozen/EmailAvatar.tsx+++ b/apps/marketing/src/features/marketing/components/email/frozen/EmailAvatar.tsx@@ -6,7 +6,6 @@ import { homepagePeople } from '../../../core/homepage-demo-people';// Existing website-owned portraits illustrate fictional sample contacts.const sampleContactPhotos: Record<string, string> = {- Dana: homepagePeople.valentina.photo,Maya: homepagePeople.julia.photo,Alex: panat,Sam: mark,diff --git a/apps/marketing/src/features/marketing/components/email/frozen/EmailRows.tsx b/apps/marketing/src/features/marketing/components/email/frozen/EmailRows.tsxindex 337328e526..6ff4f546d5 100644--- a/apps/marketing/src/features/marketing/components/email/frozen/EmailRows.tsx+++ b/apps/marketing/src/features/marketing/components/email/frozen/EmailRows.tsx@@ -1,7 +1,11 @@import Envelope from '@phosphor/envelope-open.svg';import { Badge } from '@ui/components/Badge';import { For, Show } from 'solid-js';-import { type EmailTagId, emailTags } from '../../../core/demo-email';+import {+ demoMailAccounts,+ type EmailTagId,+ emailTags,+} from '../../../core/demo-email';import { homepagePeople } from '../../../core/homepage-demo-people';import type { DemoEmail } from '../email-fixtures';@@ -15,9 +19,7 @@ export function InboxChip(props: { account: DemoEmail['account'] }) {src={homepagePeople.jacob.photo}alt=""title={- props.account === 'work'- ? '[email protected]'- : '[email protected]'+ demoMailAccounts.find((account) => account.id === props.account)?.label}/>);diff --git a/apps/marketing/src/features/marketing/components/email/frozen/EmailShell.tsx b/apps/marketing/src/features/marketing/components/email/frozen/EmailShell.tsxindex e767d038a6..23bb3a8f53 100644--- a/apps/marketing/src/features/marketing/components/email/frozen/EmailShell.tsx+++ b/apps/marketing/src/features/marketing/components/email/frozen/EmailShell.tsx@@ -13,11 +13,16 @@ import Plus from '@phosphor/plus.svg';import Sidebar from '@phosphor/sidebar-simple.svg';import Sparkle from '@phosphor/sparkle.svg';import Star from '@phosphor/star.svg';+import Tray from '@phosphor/tray.svg';import Users from '@phosphor/users-three.svg';import Signal from '@phosphor/wave-sine.svg';import Noise from '@phosphor/waveform.svg';import { For, type JSX, Show } from 'solid-js';-import { type EmailTagId, emailTags } from '../../../core/demo-email';+import {+ demoMailAccounts,+ type EmailTagId,+ emailTags,+} from '../../../core/demo-email';import { homepagePeople } from '../../../core/homepage-demo-people';import { ViewSidebar } from '../../DemoViewSidebar';@@ -76,6 +81,9 @@ export function EmailSidebar(props: {onAccount: (account: string) => void;onCompose: () => void;onToggleNavigation?: () => void;+ accounts?: readonly { id: string; label: string }[];+ onConnect?: () => void;+ connecting?: boolean;tag?: EmailTagId;onTag?: (tag: EmailTagId) => void;}) {@@ -86,49 +94,77 @@ export function EmailSidebar(props: {<h3 class="text-sm font-semibold tracking-[-0.03em] text-ink"></h3>- <ViewSidebar.Control- label="Collapse email navigation"- onClick={props.onToggleNavigation}- >- <Sidebar class="size-4 text-ink-muted" />- </ViewSidebar.Control>+ <Show when={props.onToggleNavigation}>+ <ViewSidebar.Control+ label="Collapse email navigation"+ onClick={props.onToggleNavigation}+ >+ <Sidebar class="size-4 text-ink-muted" />+ </ViewSidebar.Control>+ </Show></ViewSidebar.Header></header><ViewSidebar.Content class="overflow-visible">- <ViewSidebar.Nav aria-label="Inboxes">- <ViewSidebar.Item- active={props.account === 'all'}- onClick={() => props.onAccount('all')}- >- <ViewSidebar.Icon>- <Check class="text-accent" />- </ViewSidebar.Icon>- <span class="truncate">All inboxes</span>- </ViewSidebar.Item>- <For- each={[- { id: 'personal', label: '[email protected]' },- { id: 'work', label: '[email protected]' },- ]}- >- {(account) => (+ <div class="flex flex-col gap-(--sidebar-row-gap)">+ <ViewSidebar.Nav aria-label="Inboxes">+ <Show when={(props.accounts ?? demoMailAccounts).length > 1}><ViewSidebar.Item- active={props.account === account.id}- onClick={() => props.onAccount(account.id)}- title={account.label}+ active={props.account === 'all'}+ aria-current={props.account === 'all' ? 'true' : undefined}+ onClick={() => props.onAccount('all')}+ data-email-account="all"><ViewSidebar.Icon>- <img- class="size-5 rounded-full"- src={homepagePeople.jacob.photo}- alt=""- />+ <Show when={props.account === 'all'} fallback={<Tray />}>+ <Check class="text-accent" />+ </Show></ViewSidebar.Icon>- <span class="truncate">{account.label}</span>+ <span class="truncate">All inboxes</span></ViewSidebar.Item>- )}- </For>- </ViewSidebar.Nav>+ </Show>+ <For each={props.accounts ?? demoMailAccounts}>+ {(account) => (+ <ViewSidebar.Item+ active={props.account === account.id}+ aria-current={+ props.account === account.id ? 'true' : undefined+ }+ onClick={() => props.onAccount(account.id)}+ data-email-account={account.id}+ title={account.label}+ >+ <ViewSidebar.Icon>+ <Show+ when={props.account === account.id}+ fallback={+ <img+ class="size-5 rounded-full"+ src={homepagePeople.jacob.photo}+ alt=""+ />+ }+ >+ <Check class="text-accent" />+ </Show>+ </ViewSidebar.Icon>+ <span class="truncate">{account.label}</span>+ </ViewSidebar.Item>+ )}+ </For>+ </ViewSidebar.Nav>+ <Show when={props.onConnect}>+ <ViewSidebar.Item+ onClick={props.onConnect}+ data-email-connect+ data-connecting={props.connecting}+ >+ <ViewSidebar.Icon>+ <Plus />+ </ViewSidebar.Icon>+ <span>Connect another account</span>+ </ViewSidebar.Item>+ </Show>+ </div><div><ViewSidebar.Action onClick={props.onCompose}><ViewSidebar.Icon>@@ -180,6 +216,7 @@ export function EmailShell(props: {children: JSX.Element;sidebar?: JSX.Element;channel?: boolean;+ showRail?: boolean;label: string;class?: string;}) {@@ -190,7 +227,9 @@ export function EmailShell(props: {role="group"aria-label={props.label}>- <MailAppRail channel={props.channel} />+ <Show when={props.showRail !== false}>+ <MailAppRail channel={props.channel} />+ </Show><Show when={props.sidebar}>{props.sidebar}</Show><div class="mail-main">{props.children}</div></div>diff --git a/apps/marketing/src/features/marketing/components/email/frozen/EmailThread.tsx b/apps/marketing/src/features/marketing/components/email/frozen/EmailThread.tsxindex b89a5b0533..1c65d4cdf8 100644--- a/apps/marketing/src/features/marketing/components/email/frozen/EmailThread.tsx+++ b/apps/marketing/src/features/marketing/components/email/frozen/EmailThread.tsx@@ -6,6 +6,7 @@ import Link from '@phosphor/link.svg';import Users from '@phosphor/users-three.svg';import { Button } from '@ui';import { createSignal, type JSX, Show } from 'solid-js';+import { demoMailAccounts } from '../../../core/demo-email';import { homepagePeople } from '../../../core/homepage-demo-people';import type { DemoEmail } from '../email-fixtures';import { EmailAvatar } from './EmailAvatar';@@ -20,6 +21,7 @@ export function EmailThread(props: {sharing?: boolean;onReply?: () => void;hideHeader?: boolean;+ hideSubject?: boolean;hideReply?: boolean;replyContent?: JSX.Element;participants?: JSX.Element;@@ -64,9 +66,11 @@ export function EmailThread(props: {</div></Show><div class="mail-thread-body">- <h3 class="block w-full max-w-full min-w-0 text-pretty font-semibold tracking-tight text-ink leading-snug text-2xl mb-6">- {props.email.subject}- </h3>+ <Show when={!props.hideSubject}>+ <h3 class="block w-full max-w-full min-w-0 text-pretty font-semibold tracking-tight text-ink leading-snug text-2xl mb-6">+ {props.email.subject}+ </h3>+ </Show>{props.participants}<MessageCardmessageId={props.email.id}@@ -74,13 +78,13 @@ export function EmailThread(props: {allowHover={false}isTouch={false}>- <div class="flex flex-col min-w-0 gap-2 overflow-hidden">+ <div class="mail-message-content flex flex-col min-w-0 gap-2 overflow-hidden"><div class="flex items-center min-h-6 gap-2"><EmailAvatar name={sender()} /><div class="flex flex-row w-full min-w-0 flex-1 items-center gap-2 text-sm"><div class="flex flex-row items-center gap-1.5 min-w-0 flex-1"><span class="text-ink font-medium truncate">{sender()}</span>- <span class="text-ink-extra-muted/60 shrink-0">+ <span class="mail-message-recipient text-ink-extra-muted/60 shrink-0">to {sent() ? props.email.sender : 'me'}</span><Button@@ -114,7 +118,10 @@ export function EmailThread(props: {<div class="py-3 border-y border-ink-muted/8 text-xs text-ink-muted">From: {sender()}<br />- To: {sent() ? props.email.sender : 'Jacob <[email protected]>'}+ To:{' '}+ {sent()+ ? props.email.sender+ : `Jacob <${demoMailAccounts.find((account) => account.id === props.email.account)?.label}>`}</div></Show><div class="mail-message-text text-base text-ink pr-4">diff --git a/apps/marketing/src/features/marketing/components/feature-page.css b/apps/marketing/src/features/marketing/components/feature-page.cssindex c3d26d8ab0..3121a2959f 100644--- a/apps/marketing/src/features/marketing/components/feature-page.css+++ b/apps/marketing/src/features/marketing/components/feature-page.css@@ -12,10 +12,7 @@.feature-page-eyebrow { color: var(--color-ink-subtle); font-size: 12px; line-height: 1.6; }.feature-page-hero h1 { margin: 18px 0 24px; font: calc(315 + var(--cream-slab-weight-increase, 0)) clamp(40px, 5.4vw, 68px)/1.12 'Roboto Slab Variable', display, serif; letter-spacing: -.035em; text-wrap: balance; }.feature-page-hero > p:not(.feature-page-eyebrow) { max-width: 460px; color: var(--color-ink-muted); font-size: 16px; line-height: 1.8; text-wrap: balance; }-.feature-page-cta { display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-height: 52px; padding: 14px 25px; border-radius: 999px; background: #fafafa; color: #080808; font-size: 15px; font-weight: 500; line-height: 24px; text-decoration: none; transition: background 180ms; }-.feature-page .feature-page-cta { color: #080808; }-.feature-page-cta svg { width: 21px; height: 21px; }-.feature-page-cta:hover { background: #ddd; }+.feature-page .feature-page-cta { color: #1d1c1a; }.feature-page-hero .feature-page-cta { margin-top: 32px; }.feature-page-hero > small { display: block; margin-top: 18px; color: var(--color-ink-subtle); font-size: 11px; }.feature-page-jump-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 28px 0 32px; border-block: 1px solid color-mix(in srgb, var(--color-ink) 10%, transparent); }diff --git a/apps/marketing/src/features/marketing/components/homepage-agent-trace.css b/apps/marketing/src/features/marketing/components/homepage-agent-trace.cssindex 7b3b29b57f..b434df75f0 100644--- a/apps/marketing/src/features/marketing/components/homepage-agent-trace.css+++ b/apps/marketing/src/features/marketing/components/homepage-agent-trace.css@@ -4,9 +4,8 @@.homepage-agent-story .homepage-message-body { justify-self: start; }.homepage-message-reply { position: relative; grid-area: reply; min-width: 0; margin: 12px 0 0 22px; padding: 4px 0 0 16px; font-size: 14px; }.homepage-message-reply::before { content: ''; position: absolute; left: -20px; top: -20px; width: 24px; height: 48px; border-left: 1px solid var(--color-edge); border-bottom: 1px solid var(--color-edge); border-bottom-left-radius: 20px; pointer-events: none; }-.homepage-agent-reply-label, .homepage-agent-trace-hint { display: block; font-size: 11px; line-height: 1.5; color: var(--color-ink-extra-muted); }+.homepage-agent-reply-label { display: block; font-size: 11px; line-height: 1.5; color: var(--color-ink-extra-muted); }.homepage-agent-reply-label { margin: 0 0 8px 2px; }-.homepage-agent-trace-hint { margin: 10px 0 0 2px; }.homepage-agent-pr-link { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; vertical-align: baseline; border-radius: 4px; color: var(--color-ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--color-ink) 30%, transparent); text-underline-offset: 3px; }.homepage-agent-pr-link:hover { text-decoration-color: currentColor; }.homepage-agent-pr-link:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }diff --git a/apps/marketing/src/features/marketing/components/homepage-feature-details.css b/apps/marketing/src/features/marketing/components/homepage-feature-details.cssnew file mode 100644index 0000000000..2faa8686ff--- /dev/null+++ b/apps/marketing/src/features/marketing/components/homepage-feature-details.css@@ -0,0 +1,11 @@+.homepage-feature-more-group { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; }+.homepage-feature-more-label { margin-right: 6px; color: var(--color-ink-muted); font: 400 14px/1.5 'Inter Variable', Inter, sans-serif; }+.homepage-feature-more { display: flex; justify-content: center; }+.homepage-feature-more > a { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 46px; padding: 10px 16px; border: 1px solid color-mix(in srgb, var(--color-ink) 10%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--color-ink) 3%, transparent); color: var(--color-ink); font: 500 15px/1.5 'Inter Variable', Inter, sans-serif; cursor: pointer; text-decoration: none; }+.homepage-feature-more > a:hover { background: color-mix(in srgb, var(--color-ink) 7%, transparent); }+.homepage-feature-more > a > svg { width: 14px; height: 14px; color: var(--color-ink-muted); }+.homepage-feature-more > a:focus-visible { outline: 2px solid var(--color-ink-muted); outline-offset: 3px; }+@media (max-width: 479px) {+ .homepage-feature-more-label { width: 100%; margin: 0; text-align: center; }+ .homepage-feature-more > a { min-width: 116px; }+}diff --git a/apps/marketing/src/features/marketing/components/homepage-open-source.css b/apps/marketing/src/features/marketing/components/homepage-open-source.cssindex 8d445c5dce..346010d949 100644--- a/apps/marketing/src/features/marketing/components/homepage-open-source.css+++ b/apps/marketing/src/features/marketing/components/homepage-open-source.css@@ -45,3 +45,20 @@@media (prefers-reduced-motion: reduce) {.homepage-embedded-stage::after, .homepage-demo-slide-dot span { transition: none; }}++/* Preserve the original cream backdrop without altering the typography PR. */+html[data-palette='cream'] .homepage-embedded-wallpaper {+ background:+ radial-gradient(ellipse at 8% 20%, #e7dfd2 0%, transparent 53%),+ radial-gradient(ellipse at 72% 0%, #dde3da 0%, transparent 55%),+ radial-gradient(ellipse at 30% 100%, #e4e1d1 0%, transparent 57%),+ radial-gradient(ellipse at 100% 90%, #ebdfd0 0%, transparent 55%), #ebe6dc;+}+html[data-palette='cream'] .homepage-embedded-window { border-color: #1d1c1a1a; box-shadow: 0 32px 70px -24px #1d1c1a40; }+html[data-palette='cream'] .homepage-embedded-stage::after { background: linear-gradient(to bottom, transparent, #f5f1e855 35%, #f5f1e8bb 65%, #f5f1e8 96%); }+html[data-palette='cream'] .homepage-demo-slide-dot span { background: #cfcac0; }+html[data-palette='cream'] .homepage-demo-slide-dot[aria-pressed=true] span { background: #1d1c1a; }++/* Keep the restored agent composer above the decorative caption and fade. */+.homepage-embedded-demo:has(.homepage-demo-carousel[data-active-scene='Agents']) .homepage-embedded-window { box-sizing: border-box; padding-bottom: 136px; }+.homepage-embedded-demo:has(.homepage-demo-carousel[data-active-scene='Agents']) .homepage-embedded-stage::after { inset: calc(100% - 160px) 0 -1px; }diff --git a/apps/marketing/src/features/marketing/components/homepage-pipeline-demo.css b/apps/marketing/src/features/marketing/components/homepage-pipeline-demo.cssnew file mode 100644index 0000000000..98c6b6abe5--- /dev/null+++ b/apps/marketing/src/features/marketing/components/homepage-pipeline-demo.css@@ -0,0 +1,26 @@+.homepage-pipeline-demo {+ height: 500px;+ min-width: 0;+ overflow: hidden;+ border: 1px solid var(--color-edge);+ border-radius: 12px;+ background: var(--color-panel);+ box-shadow: 0 12px 36px #00000024;+ text-align: left;+}+.homepage-pipeline-demo > .homepage-crm-scene { height: 100%; flex-direction: row; }+@media (max-width: 650px) {+ .homepage-pipeline-demo { height: 480px; }+}++.homepage-pipeline-demo .homepage-pipeline-board {+ display: grid;+ grid-template-columns: repeat(3, minmax(0, 1fr));+ gap: 12px;+ padding: 16px;+}+.homepage-pipeline-demo .homepage-pipeline-board > section { width: auto; min-width: 0; }+.homepage-pipeline-demo .homepage-pipeline-company { font-size: 13px; }+@media (max-width: 699px) {+ .homepage-pipeline-demo .homepage-pipeline-board { grid-template-columns: repeat(3, 220px); }+}diff --git a/apps/marketing/src/features/marketing/components/homepage-scroll-cue.css b/apps/marketing/src/features/marketing/components/homepage-scroll-cue.cssindex d60cd45f64..7594aaf846 100644--- a/apps/marketing/src/features/marketing/components/homepage-scroll-cue.css+++ b/apps/marketing/src/features/marketing/components/homepage-scroll-cue.css@@ -1,12 +1,53 @@-.homepage-scroll-cue { position: absolute; bottom: max(48px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; gap: 8px; width: max-content; height: 44px; padding: 12px; border: 0; border-radius: 12px; background: none; color: var(--color-ink-muted); font: inherit; font-size: 12px; line-height: 20px; }+.homepage-scroll-cue { position: absolute; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 12px; border: 0; border-radius: 12px; background: none; color: var(--color-ink-muted); font: inherit; font-size: 12px; line-height: 20px; }.site-nav-start.homepage-hero-cta { font-family: 'Inter Variable', Inter, sans-serif; }+/* The hero keeps a quiet satin finish, with depth from edges rather than glow. */+.site-nav-start.homepage-primary-cta {+ position: relative; isolation: isolate; overflow: hidden;+ min-width: 212px; min-height: 64px; padding: 18px 32px; gap: 14px;+ font-family: 'Inter Variable', Inter, sans-serif;+ font-size: 17px; font-weight: 550; letter-spacing: -.015em;+ color: #252624;+ border-color: #ffffffc7;+ background: linear-gradient(180deg, #fff 0%, #f5f5f2 48%, #e7e8e4 100%);+ box-shadow: inset 0 1px 0 #fff, inset 0 -1px 1px #0000000d,+ 0 0 0 1px #ffffff1c, 0 5px 12px -6px #0000005c;+ transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;+}+.site-nav-start.homepage-primary-cta > span, .site-nav-start.homepage-primary-cta > svg { position: relative; z-index: 1; }+.site-nav-start.homepage-primary-cta svg { width: 18px; height: 18px; opacity: .72; }+@media (hover: hover) and (pointer: fine) {+ .site-nav-start.homepage-primary-cta:hover {+ transform: translateY(-1px);+ box-shadow: inset 0 1px 0 #fff, inset 0 -1px 1px #00000008,+ 0 0 0 1px #ffffff38, 0 7px 16px -7px #00000066;+ }+}+.site-nav-start.homepage-primary-cta:active {+ transform: translateY(0);+ background: linear-gradient(180deg, #eceee9, #f5f5f2);+ box-shadow: inset 0 1px 3px #00000017, 0 0 0 1px #ffffff14;+}+html[data-palette='cream'] .site-nav-start.homepage-primary-cta {+ border-color: #ffffffd9;+ box-shadow: inset 0 1px 0 #fff, inset 0 -1px 1px #0000000d,+ 0 0 0 1px #25262426, 0 5px 12px -6px #25262438;+}+html[data-palette='cream'] .site-nav-start.homepage-primary-cta:active {+ box-shadow: inset 0 1px 3px #00000017, 0 0 0 1px #25262426;+}+@media (prefers-reduced-motion: reduce) {+ .site-nav-start.homepage-primary-cta { transition: none; }+ .site-nav-start.homepage-primary-cta:hover { transform: none; }+}.homepage-hero-cta:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 4px; }+.ob-welcome:has(.homepage-primary-cta) > [data-welcome-copy] { margin-top: -12px; }.ob-welcome:has(.homepage-hero-cta) > [data-welcome-copy] > .homepage-hero-action { margin-top: 12px; padding-bottom: 8px; }+.ob-welcome:has(.homepage-primary-cta) > [data-welcome-copy] > .homepage-hero-action { margin-top: 0; padding-bottom: 0; }.homepage-scroll-cue:hover { color: var(--color-ink); }.homepage-scroll-cue:focus-visible { outline: 1px solid var(--color-ink-muted); outline-offset: 4px; }.homepage-scroll-cue { transition: opacity 240ms ease, visibility 0s 240ms; }.homepage-scroll-cue[data-dismissed=true] { opacity: 0; visibility: hidden; pointer-events: none; }-.homepage-scroll-cue svg { width: 20px; height: 20px; animation: homepage-scroll-nudge 2.4s ease-in-out infinite; }+.homepage-scroll-cue svg { width: 16px; height: 16px; animation: homepage-scroll-nudge 2.4s ease-in-out infinite; }.homepage-scroll-cue:not([data-visible=true]) svg,.homepage-scroll-cue[data-dismissed=true] svg { animation-play-state: paused; }@keyframes homepage-scroll-nudge { 0%, 25%, 100% { transform: translateY(0); } 55% { transform: translateY(5px); } 75% { transform: translateY(0); } }diff --git a/apps/marketing/src/features/marketing/components/homepage-spreadsheet.css b/apps/marketing/src/features/marketing/components/homepage-spreadsheet.cssindex 87fc3b0863..d4c834b452 100644--- a/apps/marketing/src/features/marketing/components/homepage-spreadsheet.css+++ b/apps/marketing/src/features/marketing/components/homepage-spreadsheet.css@@ -40,3 +40,11 @@.homepage-sheet-editor { overflow: clip; touch-action: pan-y pinch-zoom; }.homepage-sheet-toolbar, .homepage-sheet-grid { overflow: clip; overscroll-behavior: auto; }}++.homepage-sheet-mention { display: inline-flex; align-items: center; max-width: 100%; vertical-align: top; height: 16px; text-align: left; }+.homepage-sheet-mention .demo-inline-mention { max-width: 100%; height: 16px; font-size: 12px; line-height: 16px; padding-block: 0; }+.homepage-sheet-mention .demo-mention-icon { width: 13px; height: 13px; }+.homepage-sheet-mention:hover { text-decoration: underline; }+.homepage-sheet-mention:focus-visible { outline: 1px solid var(--color-accent); outline-offset: 1px; }+.homepage-sheet-record { display: flex; flex-direction: column; width: min(1040px, calc(100vw - 32px)); max-width: calc(100vw - 32px); height: min(640px, calc(100dvh - 40px)); padding: 0; overflow: hidden; background: var(--color-panel); border: 1px solid var(--color-edge); border-radius: 12px; }+.homepage-sheet-record-header { display: flex; align-items: center; justify-content: space-between; flex: none; padding: 12px 16px; border-bottom: 1px solid var(--color-edge-muted); font-size: 13px; }diff --git a/apps/marketing/src/features/marketing/components/homepage/CrmPipelineScene.test.tsx b/apps/marketing/src/features/marketing/components/homepage/CrmPipelineScene.test.tsxnew file mode 100644index 0000000000..6232663a8e--- /dev/null+++ b/apps/marketing/src/features/marketing/components/homepage/CrmPipelineScene.test.tsx@@ -0,0 +1,446 @@+import {+ cleanup,+ fireEvent,+ render,+ screen,+ within,+} from '@solidjs/testing-library';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { DemoInteractionBoundary } from '../DemoInteractionBoundary';+import HomepagePipelineDemo from '../HomepagePipelineDemo';+import CrmPipelineScene from './CrmPipelineScene';++let revealCompact: (() => void) | undefined;+let heroVisibility: ((ratio: number) => void) | undefined;+beforeEach(() => {+ revealCompact = undefined;+ heroVisibility = undefined;+ vi.stubGlobal('matchMedia', () => ({+ matches: false,+ addEventListener() {},+ removeEventListener() {},+ }));+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ observe() {}+ unobserve() {}+ disconnect() {}+ }+ );+ vi.stubGlobal(+ 'IntersectionObserver',+ class {+ constructor(private callback: IntersectionObserverCallback) {}+ observe(target: HTMLElement) {+ if (target.dataset.hero === 'true')+ heroVisibility = (ratio) =>+ this.callback(+ [+ {+ isIntersecting: ratio > 0,+ intersectionRatio: ratio,+ } as IntersectionObserverEntry,+ ],+ this as unknown as IntersectionObserver+ );+ if (target.dataset.compact === 'true')+ revealCompact = () =>+ this.callback(+ [+ {+ isIntersecting: true,+ intersectionRatio: 1,+ } as IntersectionObserverEntry,+ ],+ this as unknown as IntersectionObserver+ );+ }+ disconnect() {}+ }+ );+ vi.stubGlobal('fetch', vi.fn());+ Element.prototype.scrollIntoView = vi.fn();+});+afterEach(() => {+ cleanup();+ expect(fetch).not.toHaveBeenCalled();+ vi.unstubAllGlobals();+ vi.useRealTimers();+});++it('plays the hero once when visible, updates the deal, and returns from table to board', () => {+ vi.useFakeTimers();+ const view = render(() => <CrmPipelineScene hero />);+ heroVisibility?.(0.2);+ vi.advanceTimersByTime(15000);+ expect(+ within(view.getByRole('region', { name: 'Lead deals' })).getByRole(+ 'button',+ { name: 'Miller & Rowe' }+ )+ ).toBeTruthy();+ heroVisibility?.(1);+ vi.advanceTimersByTime(4500);+ const qualified = view.getByRole('region', { name: 'Qualified deals' });+ expect(+ within(qualified).getByRole('button', { name: 'Miller & Rowe' })+ ).toBeTruthy();+ expect(within(qualified).getByText('4')).toBeTruthy();+ expect(+ within(view.getByRole('region', { name: 'Lead deals' })).getByText('3')+ ).toBeTruthy();+ vi.advanceTimersByTime(2800);+ expect(view.getByRole('table', { name: 'New business' })).toBeTruthy();+ expect(+ view.getByRole('button', { name: 'Stage for Miller & Rowe' }).textContent+ ).toContain('Qualified');+ vi.advanceTimersByTime(3600);+ expect(view.getByRole('region', { name: 'New business board' })).toBeTruthy();+ expect(view.queryByRole('table', { name: 'New business' })).toBeNull();+ heroVisibility?.(0);+ heroVisibility?.(1);+ vi.advanceTimersByTime(30000);+ expect(view.getByRole('region', { name: 'New business board' })).toBeTruthy();+ expect(view.container.querySelector('.demo-cursor')).toBeNull();+});++it('stops the hero drag on the first activation click and preserves later choices', () => {+ vi.spyOn(HTMLElement.prototype, 'getBoundingClientRect').mockReturnValue({+ x: 0,+ y: 0,+ left: 0,+ top: 0,+ width: 800,+ height: 600,+ right: 800,+ bottom: 600,+ toJSON: () => ({}),+ });+ vi.useFakeTimers();+ const view = render(() => (+ <DemoInteractionBoundary label="CRM hero">+ <CrmPipelineScene hero />+ </DemoInteractionBoundary>+ ));+ heroVisibility?.(1);+ vi.advanceTimersByTime(3200);+ expect(view.container.querySelector('.demo-cursor')).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: /Interact with CRM hero/ }));+ expect(view.container.querySelector('.demo-cursor')).toBeNull();+ fireEvent.click(view.getByRole('button', { name: 'Q4 renewals Team' }));+ vi.advanceTimersByTime(30000);+ expect(view.getByRole('region', { name: 'Q4 renewals board' })).toBeTruthy();+});++it('stops autoplay when the visitor enters a hero control with the keyboard', () => {+ vi.useFakeTimers();+ const view = render(() => <CrmPipelineScene hero />);+ heroVisibility?.(1);+ vi.advanceTimersByTime(4500);+ fireEvent.focusIn(view.getByRole('searchbox', { name: 'Search pipeline' }));+ vi.advanceTimersByTime(30000);+ expect(view.getByRole('region', { name: 'New business board' })).toBeTruthy();+ expect(view.queryByRole('table', { name: 'New business' })).toBeNull();+});++it('shows the settled hero without animation for reduced motion', () => {+ vi.useFakeTimers();+ vi.stubGlobal('matchMedia', () => ({+ matches: true,+ addEventListener() {},+ removeEventListener() {},+ }));+ const view = render(() => <CrmPipelineScene hero />);+ heroVisibility?.(1);+ vi.advanceTimersByTime(30000);+ expect(+ within(view.getByRole('region', { name: 'Qualified deals' })).getByRole(+ 'button',+ { name: 'Miller & Rowe' }+ )+ ).toBeTruthy();+ expect(view.container.querySelector('.demo-cursor')).toBeNull();+ expect(view.queryByRole('table', { name: 'New business' })).toBeNull();+});++it('switches hero pipelines and keeps each deal’s edits independent', async () => {+ const view = render(() => <CrmPipelineScene hero />);+ fireEvent.click(view.getByRole('button', { name: 'All records' }));+ fireEvent.change(+ view.getByRole('textbox', { name: 'Revenue for Parlor Studio' }),+ {+ target: { value: '22000' },+ }+ );+ fireEvent.click(+ view.getByRole('button', { name: 'Studio partnerships Team' })+ );+ expect(+ view.queryByRole('textbox', { name: 'Revenue for Miller & Rowe' })+ ).toBeNull();+ expect(+ (+ view.getByRole('textbox', {+ name: 'Revenue for Parlor Studio',+ }) as HTMLInputElement+ ).value+ ).toBe('36000');+ fireEvent.click(view.getByRole('button', { name: 'Parlor Studio' }));+ expect(+ view.getByRole('article', { name: 'Studio partnerships entry' })+ ).toBeTruthy();+ fireEvent.keyDown(view.getByRole('button', { name: 'Change Stage' }), {+ key: 'Enter',+ });+ expect(+ await screen.findByRole('menuitem', { name: 'Customer' })+ ).toBeTruthy();+ expect(screen.queryByRole('menuitem', { name: 'Trial' })).toBeNull();+ fireEvent.keyDown(screen.getByRole('menuitem', { name: 'Customer' }), {+ key: 'Enter',+ });+ fireEvent.click(+ view.getByRole('button', { name: 'Back to Studio partnerships' })+ );+ expect(view.getByRole('table', { name: 'Studio partnerships' })).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'New business Team' }));+ expect(+ (+ view.getByRole('textbox', {+ name: 'Revenue for Parlor Studio',+ }) as HTMLInputElement+ ).value+ ).toBe('22000');+});++it('opens populated hero lists, searches them, and returns from a company', () => {+ const view = render(() => <CrmPipelineScene hero />);+ fireEvent.click(view.getByRole('button', { name: 'Design partners 4' }));+ expect(view.getByRole('heading', { name: 'Design partners' })).toBeTruthy();+ expect(view.getAllByRole('row')).toHaveLength(5);+ expect(view.queryByRole('button', { name: /Bookend Retail/ })).toBeNull();+ fireEvent.input(view.getByRole('searchbox', { name: 'Search records' }), {+ target: { value: 'Parlor' },+ });+ expect(view.getAllByRole('row')).toHaveLength(2);+ fireEvent.click(view.getByRole('button', { name: /Parlor Studio/ }));+ fireEvent.click(+ view.getByRole('button', { name: 'Back to Design partners' })+ );+ expect(view.getByRole('heading', { name: 'Design partners' })).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Q4 renewals Team' }));+ expect(view.getByRole('region', { name: 'Q4 renewals board' })).toBeTruthy();+ expect(view.getByRole('button', { name: 'Bookend Retail' })).toBeTruthy();+});++it('collapses the hero pipeline section without losing the active pipeline', () => {+ const view = render(() => <CrmPipelineScene hero />);+ fireEvent.click(view.getByRole('button', { name: 'Team expansion Private' }));+ fireEvent.click(view.getByRole('button', { name: 'Pipelines' }));+ expect(view.queryByRole('navigation', { name: 'CRM pipelines' })).toBeNull();+ expect(+ view.getByRole('region', { name: 'Team expansion board' })+ ).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Pipelines' }));+ expect(+ view+ .getByRole('button', { name: 'Team expansion Private' })+ .getAttribute('aria-current')+ ).toBe('page');+});++it('edits a pipeline deal without overwriting the company record fields', async () => {+ const view = render(() => <CrmPipelineScene />);+ expect(+ view.getByRole('region', { name: 'Sales pipeline board' })+ ).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'All records' }));+ fireEvent.keyDown(+ view.getByRole('button', { name: 'Stage for Miller & Rowe' }),+ {+ key: 'Enter',+ }+ );+ fireEvent.keyDown(+ await screen.findByRole('menuitem', { name: 'Negotiation' }),+ { key: 'Enter' }+ );+ expect(+ view.getByRole('button', { name: 'Stage for Miller & Rowe' }).textContent+ ).toContain('Negotiation');+ fireEvent.change(+ view.getByRole('textbox', { name: 'Revenue for Miller & Rowe' }),+ {+ target: { value: '32000' },+ }+ );+ fireEvent.click(view.getByRole('button', { name: 'Companies' }));+ const row = view+ .getByRole('button', { name: /Miller & Rowe/ })+ .closest('tr')!;+ expect(within(row).getByText('Lead')).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Sales pipeline Team' }));+ expect(+ (+ view.getByRole('textbox', {+ name: 'Revenue for Miller & Rowe',+ }) as HTMLInputElement+ ).value+ ).toBe('32000');+ expect(+ view.getByRole('button', { name: 'Stage for Miller & Rowe' }).textContent+ ).toContain('Negotiation');+});++it('opens a linked company record and returns to the same pipeline', () => {+ const view = render(() => <CrmPipelineScene />);+ expect(+ view.getByRole('region', { name: 'Sales pipeline board' })+ ).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'All records' }));+ fireEvent.click(view.getByRole('button', { name: /^Parlor Studio$/ }));+ expect(+ (view.getByRole('textbox', { name: 'Company name' }) as HTMLInputElement)+ .value+ ).toBe('Parlor Studio');+ fireEvent.click(view.getByRole('button', { name: 'Sales pipeline' }));+ expect(view.getByRole('table', { name: 'Sales pipeline' })).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'By stage' }));+ expect(view.queryByRole('table', { name: 'Sales pipeline' })).toBeNull();+ expect(view.getByRole('button', { name: 'Parlor Studio' })).toBeTruthy();+});++it('keeps empty stages available when moving a deal on the board', () => {+ const view = render(() => <CrmPipelineScene />);+ const lane = view.getByRole('region', { name: 'Churned deals' });+ fireEvent.drop(lane, { dataTransfer: { getData: () => 'northstar' } });+ expect(+ within(lane).getByRole('button', { name: 'Miller & Rowe' })+ ).toBeTruthy();+ expect(view.getByRole('region', { name: 'Lead deals' })).toBeTruthy();+ expect(view.getByRole('region', { name: 'No stage deals' })).toBeTruthy();+});++it('moves a fictional account through the native-style card menu', async () => {+ const view = render(() => <CrmPipelineScene />);+ expect(view.queryByText('Figma')).toBeNull();+ expect(view.queryByText('Northwind')).toBeNull();+ fireEvent.keyDown(view.getByRole('button', { name: 'Move Miller & Rowe' }), {+ key: 'Enter',+ });+ fireEvent.keyDown(await screen.findByRole('menuitem', { name: 'Trial' }), {+ key: 'Enter',+ });+ expect(+ within(view.getByRole('region', { name: 'Trial deals' })).getByRole(+ 'button',+ { name: 'Miller & Rowe' }+ )+ ).toBeTruthy();+});++it('keeps the landing pipeline to three stages with clickable records and no sidebar', () => {+ const view = render(() => <HomepagePipelineDemo />);+ expect(view.queryByRole('complementary')).toBeNull();+ expect(view.queryByRole('searchbox')).toBeNull();+ expect(view.getByRole('region', { name: 'Demo deals' })).toBeTruthy();+ expect(view.getByRole('region', { name: 'Negotiation deals' })).toBeTruthy();+ expect(view.getByRole('region', { name: 'Customer deals' })).toBeTruthy();+ expect(view.queryByRole('region', { name: 'Lead deals' })).toBeNull();+ fireEvent.click(view.getByRole('button', { name: 'Parlor Studio' }));+ expect(+ (view.getByRole('textbox', { name: 'Company name' }) as HTMLInputElement)+ .value+ ).toBe('Parlor Studio');+ fireEvent.click(view.getByRole('button', { name: 'Sales pipeline' }));+ expect(+ view.getByRole('region', { name: 'Sales pipeline board' })+ ).toBeTruthy();+});++it('moves deals, opens their context, and stops when a visitor takes over', () => {+ vi.useFakeTimers();+ const view = render(() => <HomepagePipelineDemo />);+ revealCompact?.();+ vi.advanceTimersByTime(4200);+ expect(+ within(view.getByRole('region', { name: 'Negotiation deals' })).getByRole(+ 'button',+ { name: 'Parlor Studio' }+ )+ ).toBeTruthy();+ vi.advanceTimersByTime(4200);+ expect(+ within(view.getByRole('region', { name: 'Customer deals' })).getByRole(+ 'button',+ { name: 'Bookend Retail' }+ )+ ).toBeTruthy();+ vi.advanceTimersByTime(2500);+ expect(+ (view.getByRole('textbox', { name: 'Company name' }) as HTMLInputElement)+ .value+ ).toBe('Parlor Studio');+ fireEvent.pointerDown(view.getByRole('textbox', { name: 'Company name' }));+ vi.advanceTimersByTime(12000);+ expect(view.getByRole('textbox', { name: 'Company name' })).toBeTruthy();+});++it('shows the email context and returns to the compact board when untouched', () => {+ vi.useFakeTimers();+ const view = render(() => <HomepagePipelineDemo />);+ revealCompact?.();+ vi.advanceTimersByTime(13600);+ expect(+ (+ view.getByRole('radio', {+ name: 'Emails',+ }) as HTMLInputElement+ ).checked+ ).toBe(true);+ vi.advanceTimersByTime(4500);+ expect(+ view.getByRole('region', { name: 'Sales pipeline board' })+ ).toBeTruthy();+});++it('edits the linked pipeline entry from a company record and returns to the same table', async () => {+ const view = render(() => <CrmPipelineScene />);+ fireEvent.click(view.getByRole('button', { name: 'All records' }));+ fireEvent.click(view.getByRole('button', { name: 'Parlor Studio' }));+ const entry = within(+ view.getByRole('article', { name: 'Sales pipeline entry' })+ );+ fireEvent.keyDown(entry.getByRole('button', { name: 'Change Stage' }), {+ key: 'Enter',+ });+ fireEvent.keyDown(+ await screen.findByRole('menuitem', { name: 'Negotiation' }),+ { key: 'Enter' }+ );+ fireEvent.change(entry.getByRole('textbox', { name: 'Pipeline revenue' }), {+ target: { value: '21000' },+ });+ fireEvent.click(entry.getByRole('button', { name: 'Open Sales pipeline' }));+ expect(+ view.getByRole('button', { name: 'Stage for Parlor Studio' }).textContent+ ).toContain('Negotiation');+ expect(+ (+ view.getByRole('textbox', {+ name: 'Revenue for Parlor Studio',+ }) as HTMLInputElement+ ).value+ ).toBe('21000');+});++it('keeps a mobile Back control available from every record tab', () => {+ const view = render(() => <CrmPipelineScene />);+ fireEvent.click(view.getByRole('button', { name: 'Parlor Studio' }));+ fireEvent.click(view.getByRole('radio', { name: 'Team' }));+ fireEvent.click(view.getByRole('button', { name: 'Back to Sales pipeline' }));+ expect(+ view.getByRole('region', { name: 'Sales pipeline board' })+ ).toBeTruthy();+});diff --git a/apps/marketing/src/features/marketing/components/homepage/CrmPipelineScene.tsx b/apps/marketing/src/features/marketing/components/homepage/CrmPipelineScene.tsxnew file mode 100644index 0000000000..b0afd4c5a9--- /dev/null+++ b/apps/marketing/src/features/marketing/components/homepage/CrmPipelineScene.tsx@@ -0,0 +1,983 @@+import Building from '@phosphor/building-office.svg';+import CaretDown from '@phosphor/caret-down.svg';+import Currency from '@phosphor/currency-dollar.svg';+import Grip from '@phosphor/dots-six-vertical.svg';+import Dots from '@phosphor/dots-three.svg';+import Sidebar from '@phosphor/sidebar-simple.svg';+import Table from '@phosphor/table.svg';+import Users from '@phosphor/users.svg';+import { Button, Dropdown } from '@ui';+import { createSignal, For, onCleanup, onMount, Show } from 'solid-js';+import { createStore } from 'solid-js/store';+import type { WorkspaceView } from '../../core/dummy-workspace';+import {+ type HomepagePersonId,+ homepagePeople,+} from '../../core/homepage-demo-people';+import { type DealStage, dealStages } from '../../core/workspace-fixtures';+import { createCrmDemoWorkspace } from '../../primitives/createCrmDemoWorkspace';+import { createDemoPointer } from '../../primitives/createDemoPointer';+import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';+import { CompanyPipelineEntry } from '../crm/CompanyPipelineEntry';+import { CrmHeroSidebar } from '../crm/CrmHeroSidebar';+import { crmHeroLists, crmHeroPipelines } from '../crm/crm-hero-data';+import { DemoCursor } from '../DemoCursor';+import { DEMO_INTERACTION_EVENT } from '../DemoInteractionBoundary';+import { ViewSidebar } from '../DemoViewSidebar';+import { ViewShell } from '../DemoWorkspaceChrome';+import { DocumentShareSheet } from '../documents/DocumentShareSheet';+import { SearchBar } from '../email/frozen/SearchBar';+import { StageIcon } from '../workspace/CompanyRecord';+import {+ type CompanySection,+ WorkspaceCompanies,+} from '../workspace/WorkspaceCompanies';+import { WorkspaceDocuments } from '../workspace/WorkspaceDocuments';+import { WorkspaceEmail } from '../workspace/WorkspaceEmail';+import './homepage-scenes.css';+import '../crm/pipeline-transfer.css';++type Deal = {+ pipelineId?: string;+ companyId: string;+ stage: DealStage;+ owner: HomepagePersonId | '';+ revenue: string;+};+const owners = ['julia', 'jacob', 'gabriel', 'teo'] as const;++/** Website-owned presentation from CRM's records, pipeline sidebar and database toolbar. */+export default function CrmPipelineScene(+ props: { compact?: boolean; hero?: boolean } = {}+) {+ let scene!: HTMLDivElement;+ let collectionScroll!: HTMLDivElement;+ const [pointerTarget, setPointerTarget] = createSignal<string>();+ const [operating, setOperating] = createSignal(true);+ const compactStages: DealStage[] = ['Demo', 'Negotiation', 'Customer'];+ const compactIds = [+ 'meadow',+ 'bluebird',+ 'sable',+ 'northwind',+ 'lumen',+ 'relay',+ 'pallet',+ ];+ const [pipelineId, setPipelineId] = createSignal(crmHeroPipelines[0].id);+ const selectedPipeline = () =>+ crmHeroPipelines.find((pipeline) => pipeline.id === pipelineId())!;+ const pipelineName = () =>+ props.hero ? selectedPipeline().name : 'Sales pipeline';+ const stages = () =>+ props.compact+ ? compactStages+ : props.hero+ ? selectedPipeline().stages+ : dealStages;+ const [transfer, setTransfer] = createSignal<{+ id: string;+ name: string;+ owner: HomepagePersonId | '';+ revenue: string;+ x: number;+ y: number;+ width: number;+ dx: number;+ dy: number;+ }>();+ const w = createCrmDemoWorkspace();+ const [recordSection, setRecordSection] =+ createSignal<CompanySection>('overview');++ const [sidebarOpen, setSidebarOpen] = createSignal(false);+ const [tab, setTab] = createSignal('pipeline');+ const [query, setQuery] = createSignal('');+ const [board, setBoard] = createSignal(true);+ const [share, setShare] = createSignal(false);+ const [linked, setLinked] = createSignal<{+ view: WorkspaceView;+ id: string;+ }>();+ // Pipeline fields belong to the deal, independently of the company record.+ const [deals, setDeals] = createStore<Deal[]>(+ props.hero+ ? crmHeroPipelines.flatMap((pipeline) =>+ pipeline.deals.map((deal) => ({ ...deal, pipelineId: pipeline.id }))+ )+ : w.data.companies+ .filter(+ (entry) =>+ entry.stage !== 'Churned' &&+ (!props.compact || compactIds.includes(entry.id))+ )+ .map((entry) => ({+ companyId: entry.id,+ stage:+ props.compact && entry.id === 'lumen'+ ? 'Negotiation'+ : entry.stage,+ owner: entry.owner,+ revenue: (entry.revenue ?? '').replaceAll(',', ''),+ }))+ );+ const matchesDeal = (deal: Deal, id: string) =>+ deal.companyId === id && (!props.hero || deal.pipelineId === pipelineId());+ const move = (id: string, stage: DealStage) => {+ setDeals((deal) => matchesDeal(deal, id), 'stage', stage);+ if (props.compact)+ w.setData('companies', (entry) => entry.id === id, 'stage', stage);+ };+ const startTransfer = (id: string, destination: DealStage) => {+ const card = scene.querySelector<HTMLElement>(+ `[data-pipeline-company="${id}"]`+ );+ const lane = scene.querySelector<HTMLElement>(+ `[aria-label="${destination} deals"]`+ );+ if (!card || !lane) return;+ const root = scene.getBoundingClientRect();+ const scaleX = scene.offsetWidth ? root.width / scene.offsetWidth : 1;+ const scaleY = scene.offsetHeight ? root.height / scene.offsetHeight : 1;+ const from = card.getBoundingClientRect();+ const to = lane.getBoundingClientRect();+ const first = lane.querySelector('article')?.getBoundingClientRect();+ const deal = deals.find((entry) => matchesDeal(entry, id));+ setPointerTarget('.landing-pipeline-transfer .homepage-pipeline-grip');+ setTransfer({+ id,+ name: w.data.companies.find((entry) => entry.id === id)?.name ?? '',+ owner: deal?.owner ?? '',+ revenue: deal?.revenue ?? '',+ x: (from.left - root.left) / scaleX,+ y: (from.top - root.top) / scaleY,+ width: from.width / scaleX,+ dx: ((first?.left ?? to.left + 9 * scaleX) - from.left) / scaleX,+ dy: ((first?.top ?? to.top + 54 * scaleY) - from.top) / scaleY,+ });+ };+ const approachCard = (id: string) => {+ const card = scene.querySelector<HTMLElement>(+ `[data-pipeline-company="${id}"]`+ );+ if (card && collectionScroll) {+ const bounds = card.getBoundingClientRect();+ const viewport = collectionScroll.getBoundingClientRect();+ if (bounds.left < viewport.left || bounds.right > viewport.right)+ collectionScroll.scrollTo({+ left: collectionScroll.scrollLeft + bounds.left - viewport.left - 16,+ behavior: 'smooth',+ });+ }+ setPointerTarget(`[data-pipeline-company="${id}"] .homepage-pipeline-grip`);+ };+ const showViewPointer = (view: 'table' | 'board') =>+ setPointerTarget(`[data-crm-view="${view}"]`);+ const pointer = createDemoPointer({+ frame: () => scene,+ target: pointerTarget,+ active: operating,+ followAnimation: () => !!transfer(),+ });+ const previewView = (showBoard: boolean) => {+ setPointerTarget(undefined);+ setBoard(showBoard);+ collectionScroll.scrollLeft = 0;+ collectionScroll.scrollTop = 0;+ };+ const walkthrough = props.compact+ ? createProductWalkthrough({+ root: () => scene,+ steps: 12,+ visibilityThreshold: 0.5,+ reset: () => {},+ delay: (step) =>+ [+ 0, 1800, 800, 1500, 1800, 800, 1500, 1800, 650, 2200, 650, 3500,+ 650,+ ][step] ?? 1400,+ reduced: () => {+ move('meadow', 'Negotiation');+ move('lumen', 'Customer');+ setTransfer(undefined);+ },+ advance: (step) => {+ if (step === 1) approachCard('meadow');+ if (step === 4) approachCard('lumen');+ if (step === 2) startTransfer('meadow', 'Negotiation');+ if (step === 3) {+ move('meadow', 'Negotiation');+ setTransfer(undefined);+ }+ if (step === 5) startTransfer('lumen', 'Customer');+ if (step === 6) {+ move('lumen', 'Customer');+ setTransfer(undefined);+ }+ if (step === 7) {+ setPointerTarget(+ '[data-pipeline-company="meadow"] .homepage-pipeline-company'+ );+ }+ if (step === 8) {+ w.setCompanyFilter('Sales pipeline');+ w.open('crm', 'meadow');+ }+ if (step === 9) setPointerTarget('[data-record-tab="emails"]');+ if (step === 10) setRecordSection('emails');+ if (step === 11)+ setPointerTarget('[aria-label="Back to Sales pipeline"]');+ if (step === 12) w.open('crm');+ },+ })+ : props.hero+ ? createProductWalkthrough({+ root: () => scene,+ steps: 7,+ visibilityThreshold: 0.5,+ reset: () => {},+ delay: (step) => [0, 2200, 800, 1500, 2200, 600, 3000, 600][step],+ reduced: () => {+ move('northstar', 'Qualified');+ setTransfer(undefined);+ setPointerTarget(undefined);+ setBoard(true);+ },+ advance: (step) => {+ if (step === 1) approachCard('northstar');+ if (step === 2) startTransfer('northstar', 'Qualified');+ if (step === 3) {+ move('northstar', 'Qualified');+ setTransfer(undefined);+ const lane = scene.querySelector<HTMLElement>(+ '[aria-label="Qualified deals"]'+ );+ if (lane) {+ const viewport = collectionScroll.getBoundingClientRect();+ const bounds = lane.getBoundingClientRect();+ if (bounds.right > viewport.right) {+ collectionScroll.scrollTo?.({+ left:+ collectionScroll.scrollLeft ++ bounds.left -+ viewport.left -+ 16,+ behavior: 'smooth',+ });+ }+ }+ }+ if (step === 4) showViewPointer('table');+ if (step === 5) previewView(false);+ if (step === 6) showViewPointer('board');+ if (step === 7) previewView(true);+ },+ })+ : undefined;+ const takeOver = () => {+ setOperating(false);+ walkthrough?.pause();+ setTransfer(undefined);+ setPointerTarget(undefined);+ };+ onMount(() => {+ if (!props.hero && !props.compact) return;+ const boundary = scene.closest('.demo-interaction-boundary');+ boundary?.addEventListener(DEMO_INTERACTION_EVENT, takeOver);+ onCleanup(() =>+ boundary?.removeEventListener(DEMO_INTERACTION_EVENT, takeOver)+ );+ });+ const company = (id: string) =>+ w.data.companies.find((item) => item.id === id)!;+ const shownDeals = () =>+ deals.filter(+ (deal) =>+ (!props.hero || deal.pipelineId === pipelineId()) &&+ company(deal.companyId)+ .name.toLowerCase()+ .includes(query().toLowerCase())+ );+ const selectedList = () =>+ crmHeroLists.find((list) => tab() === `list:${list.id}`);+ const collectionName = () =>+ tab() === 'pipeline'+ ? pipelineName()+ : tab() === 'contacts'+ ? 'Contacts'+ : tab() === 'customers'+ ? 'Customers'+ : (selectedList()?.name ?? 'All companies');+ const shownCompanies = () =>+ w.data.companies.filter(+ (item) =>+ (!selectedList() || selectedList()!.companyIds.includes(item.id)) &&+ `${item.name} ${item.domain}`+ .toLowerCase()+ .includes(query().toLowerCase())+ );+ const navigate = (next: string) => {+ setTab(next);+ setSidebarOpen(false);+ setQuery('');+ w.open('crm');+ setLinked(undefined);+ };+ const openCompany = (id: string) => {+ takeOver();+ setRecordSection('overview');+ w.setCompanyFilter(collectionName());+ w.open('crm', id);+ };+ const linkedWorkspace = {+ ...w,+ selected: () => linked()?.id,+ view: (): WorkspaceView => linked()?.view ?? 'crm',+ contentView: (): WorkspaceView => linked()?.view ?? 'crm',+ backToCollection: () => setLinked(undefined),+ };+ const stageCell = (deal: Deal) => (+ <Dropdown modal={false}>+ <Dropdown.Trigger+ variant="plain"+ size="sm"+ aria-label={`Stage for ${company(deal.companyId).name}`}+ >+ <StageIcon stage={deal.stage} />+ <span>{deal.stage}</span>+ <CaretDown class="size-3" />+ </Dropdown.Trigger>+ <Dropdown.Content portalScope="local">+ <Dropdown.Group>+ <For+ each={(props.hero ? stages() : dealStages).filter(+ (stage) => stage !== 'No stage'+ )}+ >+ {(stage) => (+ <Dropdown.Item+ onSelect={() =>+ setDeals(+ (item) => matchesDeal(item, deal.companyId),+ 'stage',+ stage+ )+ }+ >+ <StageIcon stage={stage} />+ {stage}+ </Dropdown.Item>+ )}+ </For>+ </Dropdown.Group>+ </Dropdown.Content>+ </Dropdown>+ );+ const ownerCell = (deal: Deal) => (+ <Dropdown modal={false}>+ <Dropdown.Trigger+ variant="plain"+ size="sm"+ aria-label={`Owner for ${company(deal.companyId).name}`}+ >+ <Show+ when={deal.owner ? homepagePeople[deal.owner] : undefined}+ fallback="Unassigned"+ >+ {(person) => (+ <>+ <img class="size-5 rounded-full" src={person().photo} alt="" />+ {person().name}+ </>+ )}+ </Show>+ </Dropdown.Trigger>+ <Dropdown.Content portalScope="local">+ <Dropdown.Group>+ <For each={owners}>+ {(owner) => (+ <Dropdown.Item+ onSelect={() =>+ setDeals(+ (item) => matchesDeal(item, deal.companyId),+ 'owner',+ owner+ )+ }+ >+ {homepagePeople[owner].name}+ </Dropdown.Item>+ )}+ </For>+ </Dropdown.Group>+ </Dropdown.Content>+ </Dropdown>+ );+ const revenueCell = (deal: Deal) => (+ <input+ class="homepage-crm-value"+ aria-label={`Revenue for ${company(deal.companyId).name}`}+ inputMode="decimal"+ value={deal.revenue}+ onChange={(event) => {+ const value = event.currentTarget.value.replace(/[$,\s]/g, '');+ if (value === '' || /^\d+(\.\d{0,2})?$/.test(value))+ setDeals(+ (item) => matchesDeal(item, deal.companyId),+ 'revenue',+ value+ );+ else event.currentTarget.value = deal.revenue;+ }}+ />+ );+ return (+ <div+ ref={scene}+ class="dummy-workspace homepage-crm-scene portal-scope"+ data-compact={props.compact}+ data-hero={props.hero}+ data-sidebar-open={sidebarOpen()}+ onPointerDown={takeOver}+ onKeyDown={takeOver}+ onClick={props.hero ? takeOver : undefined}+ onFocusIn={props.hero ? takeOver : undefined}+ >+ <Show when={!props.compact}>+ <aside class="homepage-crm-sidebar">+ <Show+ when={!props.hero}+ fallback={+ <CrmHeroSidebar+ tab={tab()}+ pipelineId={pipelineId()}+ onNavigate={navigate}+ onPipeline={(id) => {+ setPipelineId(id);+ navigate('pipeline');+ }}+ />+ }+ >+ <ViewSidebar.Root aria-label="CRM navigation">+ <ViewSidebar.Header>+ <ViewSidebar.Title>Customers</ViewSidebar.Title>+ </ViewSidebar.Header>+ <ViewSidebar.Content>+ <section>+ <p class="homepage-crm-section-label">Records</p>+ <ViewSidebar.Nav>+ <ViewSidebar.Item+ active={tab() === 'companies'}+ onClick={() => navigate('companies')}+ >+ <Building class="size-4" />+ Companies+ </ViewSidebar.Item>+ <ViewSidebar.Item+ active={tab() === 'contacts'}+ onClick={() => navigate('contacts')}+ >+ <Users class="size-4" />+ Contacts+ </ViewSidebar.Item>+ </ViewSidebar.Nav>+ </section>+ <section>+ <p class="homepage-crm-section-label">Pipelines</p>+ <ViewSidebar.Nav>+ <ViewSidebar.Item+ active={tab() === 'pipeline'}+ onClick={() => navigate('pipeline')}+ >+ <Table class="size-4" />+ <span class="flex-1">Sales pipeline</span>+ <span class="text-xs text-ink-extra-muted">Team</span>+ </ViewSidebar.Item>+ </ViewSidebar.Nav>+ </section>+ <section>+ <p class="homepage-crm-section-label">Lists</p>+ <ViewSidebar.Nav>+ <ViewSidebar.Item+ active={tab() === 'customers'}+ onClick={() => navigate('customers')}+ >+ <Users class="size-4" />+ Customers+ </ViewSidebar.Item>+ </ViewSidebar.Nav>+ </section>+ </ViewSidebar.Content>+ </ViewSidebar.Root>+ </Show>+ </aside>+ </Show>+ <main class="dummy-main homepage-crm-main">+ <Show+ when={!linked()}+ fallback={+ <>+ <ViewShell.TopBar>+ <Button+ variant="plain"+ size="sm"+ onClick={() => setLinked(undefined)}+ >+ Back to customer+ </Button>+ </ViewShell.TopBar>+ <Show+ when={linked()?.view === 'email'}+ fallback={<WorkspaceDocuments workspace={linkedWorkspace} />}+ >+ <WorkspaceEmail+ workspace={linkedWorkspace}+ tab="all"+ account="all"+ />+ </Show>+ </>+ }+ >+ <Show+ when={!w.selected()}+ fallback={+ <WorkspaceCompanies+ workspace={w}+ pipeline={(record) => {+ const deal = () =>+ deals.find((entry) => matchesDeal(entry, record.id));+ return (+ <Show when={deal()}>+ {(entry) => (+ <CompanyPipelineEntry+ name={pipelineName()}+ stages={props.hero ? stages() : undefined}+ value={entry()}+ onChange={(patch) =>+ setDeals(+ (item) => matchesDeal(item, record.id),+ patch+ )+ }+ onOpen={() => {+ w.open('crm');+ setTab('pipeline');+ }}+ />+ )}+ </Show>+ );+ }}+ section={props.compact ? recordSection() : undefined}+ onSectionChange={props.compact ? setRecordSection : undefined}+ onOpenItem={(view, id) => setLinked({ view, id })}+ />+ }+ >+ <ViewShell.TopBar class="homepage-crm-header">+ <Show when={!props.compact}>+ <Button+ class="homepage-crm-nav-toggle"+ variant="plain"+ size="icon-sm"+ aria-label="Toggle CRM navigation"+ aria-expanded={sidebarOpen()}+ onClick={() => setSidebarOpen((open) => !open)}+ >+ <Sidebar class="size-4" />+ </Button>+ </Show>+ <h1 class="text-sm font-semibold flex-1">{collectionName()}</h1>+ <Show when={tab() === 'pipeline'}>+ <Button+ variant="plain"+ size="sm"+ onClick={() => setShare(true)}+ >+ Share+ </Button>+ </Show>+ </ViewShell.TopBar>+ <Show when={!props.compact}>+ <Show+ when={tab() === 'pipeline'}+ fallback={+ <div class="homepage-crm-search">+ <SearchBar+ label="Search records"+ placeholder="Search records"+ value={query()}+ onValueChange={setQuery}+ />+ </div>+ }+ >+ <div class="homepage-crm-toolbar">+ <div class="flex items-center gap-1" aria-label="Views">+ <Button+ variant="ghost"+ size="md"+ aria-pressed={!board()}+ data-crm-view="table"+ onClick={() => setBoard(false)}+ >+ All records+ </Button>+ <Button+ variant="ghost"+ size="md"+ aria-pressed={board()}+ data-crm-view="board"+ onClick={() => setBoard(true)}+ >+ By stage+ </Button>+ </div>+ <div class={props.hero ? 'crm-hero-search' : undefined}>+ <SearchBar+ label="Search pipeline"+ placeholder="Search"+ value={query()}+ onValueChange={setQuery}+ />+ </div>+ </div>+ </Show>+ </Show>+ <div ref={collectionScroll} class="dummy-scroll">+ <Show+ when={tab() === 'pipeline'}+ fallback={+ <Show+ when={tab() === 'contacts'}+ fallback={+ <table class="homepage-crm-table">+ <thead>+ <tr>+ <th>Customer</th>+ <th>Stage</th>+ <th>Owner</th>+ <th>Revenue</th>+ <th>Last Interaction</th>+ </tr>+ </thead>+ <tbody>+ <For+ each={shownCompanies().filter(+ (item) =>+ tab() !== 'customers' ||+ item.stage === 'Customer'+ )}+ >+ {(item) => (+ <tr>+ <td>+ <button onClick={() => openCompany(item.id)}>+ <Building class="size-4" />+ <span>+ {item.name}+ <small>{item.domain}</small>+ </span>+ </button>+ </td>+ <td>+ <StageIcon stage={item.stage} /> {item.stage}+ </td>+ <td>+ {item.owner &&+ homepagePeople[item.owner].name}+ </td>+ <td>+ {item.revenue ? `$${item.revenue}` : ''}+ </td>+ <td>{item.updated}</td>+ </tr>+ )}+ </For>+ </tbody>+ </table>+ }+ >+ <table class="homepage-crm-table">+ <thead>+ <tr>+ <th>Contact</th>+ <th>Email</th>+ <th>Company</th>+ </tr>+ </thead>+ <tbody>+ <For each={shownCompanies()}>+ {(item) => (+ <For each={item.contacts}>+ {(contact) => (+ <tr>+ <td>{contact.name}</td>+ <td>{contact.email}</td>+ <td>+ <button+ onClick={() => openCompany(item.id)}+ >+ {item.name}+ </button>+ </td>+ </tr>+ )}+ </For>+ )}+ </For>+ </tbody>+ </table>+ </Show>+ }+ >+ <Show+ when={board()}+ fallback={+ <table+ class="homepage-crm-table"+ aria-label={pipelineName()}+ >+ <thead>+ <tr>+ <th>Company</th>+ <th>Stage</th>+ <th>Owner</th>+ <th>Revenue</th>+ </tr>+ </thead>+ <tbody>+ <For each={shownDeals()}>+ {(deal) => (+ <tr>+ <td>+ <button+ aria-label={company(deal.companyId).name}+ onClick={() => openCompany(deal.companyId)}+ >+ <Building class="size-4" />+ <span>+ {company(deal.companyId).name}+ <small>+ {company(deal.companyId).domain}+ </small>+ </span>+ </button>+ </td>+ <td>{stageCell(deal)}</td>+ <td>{ownerCell(deal)}</td>+ <td>{revenueCell(deal)}</td>+ </tr>+ )}+ </For>+ </tbody>+ </table>+ }+ >+ <div+ class="homepage-pipeline-board"+ role="region"+ aria-label={`${pipelineName()} board`}+ >+ <For each={stages()}>+ {(stage) => (+ <section+ aria-label={`${stage} deals`}+ onDragOver={(event) => event.preventDefault()}+ onDrop={(event) => {+ event.preventDefault();+ const id =+ event.dataTransfer?.getData('text/plain');+ if (id)+ setDeals(+ (deal) => matchesDeal(deal, id),+ 'stage',+ stage+ );+ }}+ >+ <header>+ <StageIcon stage={stage} />+ {stage}+ <span>+ {+ shownDeals().filter(+ (deal) => deal.stage === stage+ ).length+ }+ </span>+ </header>+ <For+ each={shownDeals().filter(+ (deal) => deal.stage === stage+ )}+ >+ {(deal) => (+ <article+ data-pipeline-company={deal.companyId}+ data-transferring={+ transfer()?.id === deal.companyId+ }+ draggable+ onDragStart={(event) =>+ event.dataTransfer?.setData(+ 'text/plain',+ deal.companyId+ )+ }+ >+ <div class="homepage-pipeline-card-header">+ <span+ class="homepage-pipeline-grip"+ title={`Drag ${company(deal.companyId).name}`}+ >+ <Grip class="size-4" />+ </span>+ <button+ class="homepage-pipeline-company"+ onClick={() => openCompany(deal.companyId)}+ >+ <Building class="size-4" />+ <span>{company(deal.companyId).name}</span>+ </button>+ <Dropdown modal={false}>+ <Dropdown.Trigger+ variant="ghost"+ size="icon-xs"+ aria-label={`Move ${company(deal.companyId).name}`}+ class="homepage-pipeline-actions"+ >+ <Dots class="size-4" />+ </Dropdown.Trigger>+ <Dropdown.Content portalScope="local">+ <Dropdown.Group>+ <Dropdown.GroupLabel>+ Move to+ </Dropdown.GroupLabel>+ <For each={stages()}>+ {(destination) => (+ <Dropdown.Item+ disabled={+ destination === deal.stage+ }+ onSelect={() =>+ setDeals(+ (entry) =>+ matchesDeal(+ entry,+ deal.companyId+ ),+ 'stage',+ destination+ )+ }+ >+ <StageIcon stage={destination} />+ {destination}+ </Dropdown.Item>+ )}+ </For>+ </Dropdown.Group>+ </Dropdown.Content>+ </Dropdown>+ </div>+ <div class="homepage-pipeline-fields">+ <Show when={deal.owner}>+ <div+ class="homepage-pipeline-field"+ title="Owner"+ >+ <Users class="size-3.5" />+ {ownerCell(deal)}+ </div>+ </Show>+ <Show when={deal.revenue}>+ <span+ class="homepage-pipeline-revenue"+ title="Revenue"+ >+ <Currency class="size-3.5" />+ {Number(deal.revenue || 0).toLocaleString(+ 'en-US'+ )}+ </span>+ </Show>+ </div>+ </article>+ )}+ </For>+ </section>+ )}+ </For>+ </div>+ </Show>+ </Show>+ </div>+ </Show>+ </Show>+ </main>++ <Show when={transfer()}>+ {(card) => (+ <div+ class="landing-pipeline-transfer"+ style={{+ left: `${card().x}px`,+ top: `${card().y}px`,+ width: `${card().width}px`,+ '--transfer-x': `${card().dx}px`,+ '--transfer-y': `${card().dy}px`,+ }}+ aria-hidden="true"+ >+ <div class="homepage-pipeline-card-header">+ <span class="homepage-pipeline-grip">+ <Grip class="size-4" />+ </span>+ <span class="homepage-pipeline-company">+ <Building class="size-4" />+ <span>{card().name}</span>+ </span>+ </div>+ <div class="homepage-pipeline-fields">+ <Show when={card().owner || undefined}>+ {(owner) => (+ <span class="homepage-pipeline-field">+ <Users class="size-3.5" />+ <img src={homepagePeople[owner()].photo} alt="" />+ {homepagePeople[owner()].name}+ </span>+ )}+ </Show>+ <Show when={card().revenue}>+ <span class="homepage-pipeline-revenue">+ <Currency class="size-3.5" />+ {Number(card().revenue).toLocaleString('en-US')}+ </span>+ </Show>+ </div>+ </div>+ )}+ </Show>+ <Show when={pointer()}>+ {(point) => (+ <DemoCursor+ class="crm-hero-pointer"+ style={{+ transform: `translate(${point().x}px, ${point().y}px)`,+ transition: transfer() ? 'none' : undefined,+ }}+ />+ )}+ </Show>+ <DocumentShareSheet+ open={share()}+ title={pipelineName()}+ entityLabel="pipeline"+ onClose={() => setShare(false)}+ />+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/homepage/HomepageScene.tsx b/apps/marketing/src/features/marketing/components/homepage/HomepageScene.tsxnew file mode 100644index 0000000000..19e46b3898--- /dev/null+++ b/apps/marketing/src/features/marketing/components/homepage/HomepageScene.tsx@@ -0,0 +1,87 @@+import {+ createSignal,+ lazy,+ Match,+ onCleanup,+ onMount,+ Switch,+} from 'solid-js';+import { homepageChatData } from '../../core/homepage-demo-content';+import {+ HOMEPAGE_DEMO_EVENT,+ type HomepageDemoView,+ isHomepageDemoView,+} from '../../core/homepage-demo-scenes';+import DummyWorkspace from '../workspace/DummyWorkspace';+import './homepage-scenes.css';++const Documents = lazy(async () => ({+ default: (await import('../documents/DocumentProjectDemo'))+ .DocumentProjectDemo,+}));+const Agents = lazy(async () => ({+ default: (await import('../agents/AgentWorkflowStories')).AgentMeetingStory,+}));+const Crm = lazy(() => import('./CrmPipelineScene'));++/** Each view reuses the corresponding native-style product demo, with local data. */+export default function HomepageScene(props: { initialView?: string } = {}) {+ const [view, setView] = createSignal<HomepageDemoView>(+ isHomepageDemoView(props.initialView) ? props.initialView : 'Inbox'+ );+ onMount(() => {+ const select = (event: Event) => {+ if ('detail' in event && isHomepageDemoView(event.detail))+ setView(event.detail);+ };+ window.addEventListener(HOMEPAGE_DEMO_EVENT, select);+ onCleanup(() => window.removeEventListener(HOMEPAGE_DEMO_EVENT, select));+ });+ return (+ <div+ data-homepage-demo+ data-homepage-scene={view()}+ class={`homepage-scene homepage-scene-${view().toLowerCase()}`}+ >+ <Switch>+ <Match when={view() === 'Inbox'}>+ <DummyWorkspace embedded />+ </Match>+ <Match when={view() === 'Chat'}>+ <DummyWorkspace+ initialView="messages"+ initialData={homepageChatData()}+ embedded+ />+ </Match>+ <Match when={view() === 'Docs'}>+ <DummyWorkspace+ initialView="documents"+ demoTitle="Website brief"+ embedded+ demoContent={<Documents />}+ />+ </Match>+ <Match when={view() === 'CRM'}>+ <DummyWorkspace+ initialView="crm"+ embedded+ demoIncludesSidebar+ demoContent={<Crm />}+ />+ </Match>+ <Match when={view() === 'Tasks'}>+ <DummyWorkspace tasksShowcase embedded />+ </Match>+ <Match when={view() === 'Agents'}>+ <DummyWorkspace+ initialView="agents"+ demoTitle="Tomorrow’s meetings"+ embedded+ demoContent={<Agents />}+ />+ </Match>+ </Switch>+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/homepage/homepage-scenes.css b/apps/marketing/src/features/marketing/components/homepage/homepage-scenes.cssnew file mode 100644index 0000000000..9c9c695e71--- /dev/null+++ b/apps/marketing/src/features/marketing/components/homepage/homepage-scenes.css@@ -0,0 +1,65 @@+.homepage-scene { height: 100%; min-height: 0; color: var(--color-ink); background: var(--color-panel); }+.homepage-scene .product-demo-stage::before { display: none; }+.homepage-scene-agents .product-demo { box-sizing: border-box; padding-bottom: 200px; }+.homepage-scene > .dummy-workspace { height: 100%; }+:is(.homepage-scene-docs, .homepage-scene-agents) .product-demo-stage { height: 100%; margin: 0; }+:is(.homepage-scene-docs, .homepage-scene-agents) .product-demo { height: 100%; min-height: 0; border: 0; border-radius: 0; box-shadow: none; mask-image: none; -webkit-mask-image: none; }+.homepage-crm-scene { position: relative; flex-direction: row; }+.homepage-crm-sidebar { width: 256px; flex: none; border-right: 1px solid var(--color-edge-muted); }+.homepage-crm-section-label { margin: 0 12px 8px; font-size: 12px; color: var(--color-ink-muted); }+.homepage-crm-main { min-width: 0; flex: 1; }+.homepage-crm-toolbar { gap: 12px; display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--color-edge-muted); }+.homepage-crm-toolbar [aria-pressed=true] { background: var(--color-active); color: var(--color-ink); }+.homepage-crm-toolbar > :last-child { flex: 0 1 240px; max-width: 44%; }+.homepage-crm-nav-toggle { display: none; }+.homepage-crm-search { padding: 12px 16px; }+.homepage-crm-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; white-space: nowrap; }+.homepage-crm-table th { height: 40px; padding: 8px 12px; color: var(--color-ink-extra-muted); font-size: 12px; font-weight: 400; border-bottom: 1px solid var(--color-edge-muted); }+.homepage-crm-table td { height: 52px; padding: 6px 12px; border-bottom: 1px solid var(--color-edge-muted); }+.homepage-crm-table td > button { display: flex; align-items: center; gap: 10px; text-align: left; }+.homepage-crm-table td > svg { display: inline-block; }+.homepage-crm-table small { display: block; margin-top: 3px; color: var(--color-ink-muted); font-size: 11px; }+.homepage-crm-table tr:hover td { background: var(--color-hover); }+.homepage-crm-value { width: 96px; padding: 7px; border: 0; border-radius: 4px; background: transparent; color: inherit; font: inherit; }+.homepage-crm-value:focus { outline: 1px solid var(--color-accent); background: var(--color-surface); }+/* Current database Kanban: 336px lanes, muted lane surfaces and 8px cards. */+.homepage-pipeline-board { display: flex; align-items: flex-start; min-height: 100%; gap: 16px; padding: 16px 20px; }+.homepage-pipeline-board > section { width: 336px; flex: none; padding: 8px; border: 1px solid var(--color-edge-frame); border-radius: 12px; background: color-mix(in oklch, var(--color-panel) 94%, var(--color-ink)); }+.homepage-pipeline-board header { display: flex; align-items: center; gap: 8px; padding: 4px 8px 8px; font-size: 14px; font-weight: 500; color: var(--color-ink); }+.homepage-pipeline-board header > span { font-size: 12px; font-weight: 400; color: var(--color-ink-muted); }+.homepage-pipeline-board article { padding: 12px; margin-top: 12px; border: 1px solid var(--color-edge-muted); border-radius: 8px; background: var(--color-surface-3); box-shadow: 0 1px 2px #0001; }+.homepage-pipeline-board article:hover { border-color: var(--color-edge); box-shadow: 0 2px 4px #0002; }+.homepage-pipeline-company { min-width: 0; display: flex; align-items: flex-start; gap: 8px; text-align: left; font-size: 14px; font-weight: 500; line-height: 24px; }+.homepage-pipeline-company > svg { width: 16px; height: 16px; margin-top: 4px; flex: none; color: var(--color-ink-muted); }+.homepage-pipeline-company:hover { text-decoration: underline; }+.homepage-pipeline-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-top: 8px; padding-left: 32px; color: var(--color-ink-muted); font-size: 12px; }+.homepage-pipeline-fields button { min-height: 24px; height: 24px; padding: 0 4px; font-size: 12px; }+.homepage-pipeline-fields img { width: 16px; height: 16px; }+.homepage-pipeline-revenue { display: flex; align-items: center; gap: 8px; min-height: 24px; padding: 0 6px; font-size: 12px; }+@media (max-width: 650px) {+ .homepage-crm-sidebar { display: none; position: absolute; z-index: 8; inset: 0 auto 0 0; width: 220px; background: var(--color-panel); box-shadow: 10px 0 30px #0006; }+ .homepage-crm-scene[data-sidebar-open=true] .homepage-crm-sidebar { display: block; }+}++.homepage-scene > .dummy-workspace[data-embedded=true],+.homepage-scene .product-demo.dummy-workspace {+ border: 0; border-radius: 0; box-shadow: none;+}++/* database-board.tsx: drag handle, title, actions, then property-icon metadata. */+.homepage-pipeline-card-header { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: start; }+.homepage-pipeline-grip { display: grid; place-items: center; width: 24px; height: 24px; color: var(--color-ink-muted); cursor: grab; }+.homepage-pipeline-actions { opacity: 0; }+.homepage-pipeline-board article:hover .homepage-pipeline-actions, .homepage-pipeline-board article:focus-within .homepage-pipeline-actions { opacity: 1; }+.homepage-pipeline-field { display: flex; align-items: center; gap: 8px; min-height: 24px; max-width: 160px; padding-left: 6px; }+.homepage-pipeline-field > svg, .homepage-pipeline-revenue > svg { color: var(--color-ink-placeholder); flex: none; }+.homepage-crm-main .homepage-crm-header { height: 48px; min-height: 48px; padding-inline: 16px; }+@media (hover: none) { .homepage-pipeline-actions { opacity: 1; } }++@media (max-width: 650px) {+ .homepage-crm-nav-toggle { display: inline-flex; }+ .homepage-crm-main [data-view-shell-top-bar] { display: flex; }+ .homepage-crm-sidebar { top: 48px; }+ .homepage-crm-toolbar { padding-inline: 10px; }+ .homepage-crm-toolbar [data-button] { padding-inline: 8px; }+}diff --git a/apps/marketing/src/features/marketing/components/product-feature-section.css b/apps/marketing/src/features/marketing/components/product-feature-section.cssnew file mode 100644index 0000000000..f83edb6f44--- /dev/null+++ b/apps/marketing/src/features/marketing/components/product-feature-section.css@@ -0,0 +1,82 @@+/* Restore the original product-chapter rhythm on lower subpage sections only. */+.feature-page[data-product-spacing=true] .feature-page-section {+ position: relative;+ width: min(1160px, calc(100vw - 80px));+ margin-block: 0;+ margin-inline: calc((100% - min(1160px, 100vw - 80px)) / 2);+ padding-block: 88px 76px;+}+.feature-page[data-product-spacing=true] :is(.feature-page-jump-links, .tasks-founder-letter) + .feature-page-section {+ margin-top: 48px;+}++.feature-page-section::before {+ content: '';+ position: absolute;+ inset: 0 auto auto 50%;+ width: 100vw;+ transform: translateX(-50%);+ border-top: 1px solid color-mix(in srgb, var(--color-ink) 18%, transparent);+ pointer-events: none;+}++.product-feature-intro {+ --feature-heading-size: clamp(32px, 3.1vw, 44px);+ display: grid;+ grid-template-columns: minmax(0, .96fr) minmax(0, 1fr);+ align-items: start;+ gap: 40px;+ margin-bottom: 52px;+ text-align: left;+}++.product-feature-intro h2 {+ margin: 0;+ max-width: none;+ font: calc(330 + var(--cream-slab-weight-increase, 0)) var(--feature-heading-size)/1.2 'Roboto Slab Variable', display, serif;+ letter-spacing: -.035em;+ text-wrap: initial;+}++.product-feature-intro p {+ max-width: none;+ color: var(--color-ink-muted);+ font: 400 clamp(17px, 1.3vw, 18px)/calc(var(--feature-heading-size) * .8) 'Inter Variable', Inter, sans-serif;+ text-wrap: pretty;+}++.feature-page .feature-page-section > .feature-page-visual {+ width: 100%;+}++/* Email's stages previously added a second inset and different top gaps. */+.feature-page-section :is(.email-accounts-demo, .mail-sharing-stage, .email-keyboard-stage, .email-editing-stage) {+ padding-top: 0;+ padding-inline: 0;+}+.feature-page-section .mail-sharing-stage .mail-share-scrim {+ inset-inline: 0;+ top: 0;+}++.product-feature-intro h2 > span { display: block; white-space: nowrap; }++/* Stack before either column becomes cramped; never clamp or hide copy. */+@media (max-width: 1199px) {+ .product-feature-intro { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-bottom: 32px; }+ .product-feature-intro h2 > span { white-space: normal; }+ .product-feature-intro p { max-width: 60ch; font-size: 18px; line-height: 1.55; }+}++@media (max-width: 799px) {+ .feature-page[data-product-spacing=true] .feature-page-section {+ width: calc(100% - 36px);+ margin-inline: auto;+ padding-block: 56px;+ }+ .product-feature-intro h2 { max-width: none; font-size: clamp(28px, 7.2vw, 42px); }+ .product-feature-intro p { max-width: 42ch; font-size: 17px; }+}+@media (max-width: 699px) {+ .feature-page[data-product-spacing=true] .product-page .feature-page-section { width: 100%; }+}diff --git a/apps/marketing/src/features/marketing/components/product-page-preview.css b/apps/marketing/src/features/marketing/components/product-page-preview.cssnew file mode 100644index 0000000000..f1d1c8ca7b--- /dev/null+++ b/apps/marketing/src/features/marketing/components/product-page-preview.css@@ -0,0 +1,7 @@+/* Only the existing product page opened inside a homepage drawer. */+body:has(.feature-page[data-product-preview='true']) .site-header,+body:has(.feature-page[data-product-preview='true']) .site-page-vignette,+.feature-page[data-product-preview='true'] .homepage-feature-end,+.feature-page[data-product-preview='true'] .feature-page-cta { display: none; }+.feature-page[data-product-preview='true'] .feature-page-hero { padding-top: 64px; padding-bottom: 32px; }+.feature-page[data-product-preview='true'] .feature-page-section { scroll-margin-top: 16px; }diff --git a/apps/marketing/src/features/marketing/components/product/ProductPage.tsx b/apps/marketing/src/features/marketing/components/product/ProductPage.tsxindex d77cdf7342..9404d5489e 100644--- a/apps/marketing/src/features/marketing/components/product/ProductPage.tsx+++ b/apps/marketing/src/features/marketing/components/product/ProductPage.tsx@@ -1,5 +1,6 @@import MacroLogo from '@icon/macro-logo.svg';import { type JSX, type ParentProps, Show } from 'solid-js';+import { DemoInteractionBoundary } from '../DemoInteractionBoundary';import { FeaturePage, FeaturePageCta } from '../FeaturePage';import '../email/email-hero.css';import './product-page.css';@@ -14,6 +15,25 @@ export function ProductPage(props: ParentProps) {);}+/** A home link distinct from the current product name. */+export function ProductBrand(props: { product: string }) {+ return (+ <p class="email-page-hero-label">+ <a+ href="/"+ target="_self"+ class="product-home-link"+ aria-label="Macro home"+ >+ <MacroLogo aria-hidden="true" />+ <span>Macro</span>+ </a>+ <span aria-hidden="true">/</span>+ <span>{props.product}</span>+ </p>+ );+}+export function ProductHero(props: {product: string;title: readonly [string, string];@@ -22,10 +42,7 @@ export function ProductHero(props: {}) {return (<header class="feature-page-hero email-page-hero">- <p class="email-page-hero-label">- <MacroLogo aria-hidden="true" />- <span>Macro {props.product}</span>- </p>+ <ProductBrand product={props.product} /><h1><span>{props.title[0]}</span><span>{props.title[1]}</span>@@ -61,7 +78,8 @@ export function ProductDemo(props: {mobileHeight?: number;}) {return (- <div+ <DemoInteractionBoundary+ label={props.label}ref={props.ref}class="product-demo-stage"role="group"@@ -82,6 +100,6 @@ export function ProductDemo(props: {><div class="dummy-main">{props.children}</div></div>- </div>+ </DemoInteractionBoundary>);}diff --git a/apps/marketing/src/features/marketing/components/productPagePreview.ts b/apps/marketing/src/features/marketing/components/productPagePreview.tsnew file mode 100644index 0000000000..4f0e54272e--- /dev/null+++ b/apps/marketing/src/features/marketing/components/productPagePreview.ts@@ -0,0 +1,10 @@+import { isServer } from 'solid-js/web';++/** Only the product pages embedded by the homepage use in-panel navigation. */+export function isEmbeddedProductPage() {+ return (+ !isServer &&+ window.self !== window.top &&+ new URLSearchParams(window.location.search).get('embed') === 'feature'+ );+}diff --git a/apps/marketing/src/features/marketing/components/reviews/GithubWorkflow.tsx b/apps/marketing/src/features/marketing/components/reviews/GithubWorkflow.tsxindex eeaa0e219a..4f8c786b8d 100644--- a/apps/marketing/src/features/marketing/components/reviews/GithubWorkflow.tsx+++ b/apps/marketing/src/features/marketing/components/reviews/GithubWorkflow.tsx@@ -47,6 +47,11 @@ export function GithubPrHero() {export function GithubConversationDemo(props: { agent?: boolean }) {const w = createGithubWorkspace(props.agent);const task = () => w.data.tasks.find((item) => item.id === GITHUB_TASK)!;+ const initialTask = {+ status: task().status,+ steps: task().steps.map((step) => ({ ...step })),+ };+ const initialMessages = [...w.data.channels[0].messages];let root!: HTMLDivElement;let trigger: HTMLElement | undefined;const [share, setShare] = createSignal(false);@@ -61,7 +66,14 @@ export function GithubConversationDemo(props: { agent?: boolean }) {const log = root?.querySelector<HTMLElement>('.github-conversation [role="log"]');- if (log) log.scrollTop = log.scrollHeight;+ if (!log) return;+ const issue = log.querySelector<HTMLElement>('[data-thread-id="bug"]');+ if (props.agent && phase() === 0 && issue) {+ log.scrollTop +=+ issue.getBoundingClientRect().top -+ log.getBoundingClientRect().top -+ 16;+ } else log.scrollTop = log.scrollHeight;});});const reply = () => {@@ -79,7 +91,7 @@ export function GithubConversationDemo(props: { agent?: boolean }) {person: 'cursor' as const,time: '10:14 AM',body: '',- replyTo: 'request',+ replyTo: 'bug',},]);queueMicrotask(() => {@@ -91,10 +103,20 @@ export function GithubConversationDemo(props: { agent?: boolean }) {const playback = createProductWalkthrough({root: () => root,steps: props.agent ? 2 : 5,- reset: () => {},+ loop: { hold: 8500 },+ reset: () => {+ w.updateTask(GITHUB_TASK, initialTask);+ w.setData('channels', 0, 'messages', [...initialMessages]);+ setPhase(0);+ setDetail(undefined);+ setChanges(false);+ setShare(false);+ setAutomatic(true);+ },reduced: () => {- if (props.agent) reply();- else {+ if (props.agent) {+ reply();+ } else {setDetail('pr');setChanges(true);}@@ -102,7 +124,7 @@ export function GithubConversationDemo(props: { agent?: boolean }) {},delay: (step) =>props.agent- ? ([0, 3500, 1200][step] ?? 1000)+ ? ([0, 4200, 1400][step] ?? 1000): ([0, 2600, 1000, 1600, 900, 1000][step] ?? 1000),advance: (step) => {setPhase(step);@@ -306,7 +328,11 @@ export function GithubConversationDemo(props: { agent?: boolean }) {<AgentTurn><AgentToolGroupcalls={[- { kind: 'read-channel', channel: 'website', count: 7 },+ {+ kind: 'read-channel',+ channel: 'website',+ count: initialMessages.length,+ },{ kind: 'read-document', title: 'Fix mobile sign-in' },{kind: 'action',@@ -348,7 +374,6 @@ export function GithubConversationDemo(props: { agent?: boolean }) {<Show when={pointer()}>{(point) => (<DemoCursor- label="Julia"class="review-flow-pointer"clicking={phase() === 2 || phase() === 4}style={{ transform: `translate(${point().x}px, ${point().y}px)` }}@@ -384,7 +409,18 @@ export function GithubTaskDemo() {const playback = createProductWalkthrough({root: () => root,steps: 8,- reset: () => {},+ loop: { hold: 8000 },+ reset: () => {+ setLinked(false);+ setMerged(false);+ setPrOpen(false);+ setConfirm(false);+ setPhase(0);+ setAutomatic(true);+ setShare(false);+ setSource(false);+ w.updateTask(GITHUB_TASK, { status: 'In Progress' });+ },reduced: () => {link();merge();@@ -514,7 +550,6 @@ export function GithubTaskDemo() {<Show when={pointer()}>{(point) => (<DemoCursor- label="Julia"class="review-flow-pointer"clicking={[3, 5, 7].includes(phase())}style={{ transform: `translate(${point().x}px, ${point().y}px)` }}diff --git a/apps/marketing/src/features/marketing/components/reviews/ReviewHome.tsx b/apps/marketing/src/features/marketing/components/reviews/ReviewHome.tsxindex de7e169b2d..fd7f14031d 100644--- a/apps/marketing/src/features/marketing/components/reviews/ReviewHome.tsx+++ b/apps/marketing/src/features/marketing/components/reviews/ReviewHome.tsx@@ -97,7 +97,7 @@ const row = {email: {id: 'email-dana',kind: 'email',- label: 'Next steps for our team',+ label: 'Homepage feedback',time: '9:41 AM',unread: true,open: { view: 'email', id: 'dana' },@@ -120,7 +120,7 @@ const row = {comment: {id: 'comment-plan',kind: 'comment',- label: 'Valentina commented on Q3 launch plan',+ label: 'Valentina commented on Website launch plan',time: '8:52 AM',open: { view: 'documents', id: 'plan' },},@@ -269,6 +269,19 @@ export function createHomeInbox(options: {toast,dismissToast: () => setToast(undefined),rowsOf,+ reset: () =>+ batch(() => {+ setRead([]);+ setDone([]);+ setPending(options.pending ?? []);+ setToast(undefined);+ home();+ const initial = all.find((item) => item.id === options.initial);+ if (initial) {+ open(initial);+ setPane('list');+ }+ }),reveal: (id: string) => {if (pending().includes(id))setPending((ids) => ids.filter((x) => x !== id));@@ -313,7 +326,7 @@ function RowIcon(props: { row: HomeRow }) {);}-/** "Julia in #launch", "Valentina commented on Q3 launch plan". */+/** "Julia in #launch", "Valentina commented on Website launch plan". */function ActorTitle(props: { label: string; joiner: string }) {const parts = () => props.label.split(props.joiner);return (diff --git a/apps/marketing/src/features/marketing/components/reviews/ReviewStories.test.tsx b/apps/marketing/src/features/marketing/components/reviews/ReviewStories.test.tsxindex 89745aa54a..d63bc065cc 100644--- a/apps/marketing/src/features/marketing/components/reviews/ReviewStories.test.tsx+++ b/apps/marketing/src/features/marketing/components/reviews/ReviewStories.test.tsx@@ -210,3 +210,28 @@ it('uses completed local states for reduced motion', () => {).toContain('Completed');expect(view.container.querySelector('.demo-cursor')).toBeNull();});++it('keeps Julia’s request and one completed Cursor PR response in the original bug thread', () => {+ const view = render(() => <GithubConversationDemo agent />);+ const thread = view.container.querySelector<HTMLElement>(+ '[data-thread-id="bug"]'+ )!;+ expect(+ within(thread).getByText(+ 'sign-in button does nothing on my phone. desktop is fine'+ )+ ).toBeTruthy();+ expect(within(thread).getByText(/can you fix this/)).toBeTruthy();+ expect(view.container.querySelector('[data-thread-id="request"]')).toBeNull();+ visible(true);+ vi.advanceTimersByTime(1400);+ expect(thread.querySelectorAll('[data-agent="cursor"]')).toHaveLength(0);+ expect(within(thread).queryByText('#491 · Fix mobile sign-in')).toBeNull();+ vi.advanceTimersByTime(2800);+ expect(within(thread).getByText('#491 · Fix mobile sign-in')).toBeTruthy();+ expect(thread.querySelectorAll('[data-agent="cursor"]')).toHaveLength(1);+ expect(within(thread).queryByText(/more replies/)).toBeNull();+ vi.advanceTimersByTime(9900);+ expect(within(thread).queryByText('#491 · Fix mobile sign-in')).toBeNull();+ expect(within(thread).getByText(/can you fix this/)).toBeTruthy();+});diff --git a/apps/marketing/src/features/marketing/components/reviews/ReviewStories.tsx b/apps/marketing/src/features/marketing/components/reviews/ReviewStories.tsxindex a3a9a712c4..e67198141d 100644--- a/apps/marketing/src/features/marketing/components/reviews/ReviewStories.tsx+++ b/apps/marketing/src/features/marketing/components/reviews/ReviewStories.tsx@@ -1,11 +1,5 @@-import {- type Accessor,- createEffect,- createSignal,- onCleanup,- onMount,- Show,-} from 'solid-js';+import { createSignal, Show } from 'solid-js';+import { createDemoPointer } from '../../primitives/createDemoPointer';import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';import { DemoCursor } from '../DemoCursor';import { ProductDemo } from '../product/ProductPage';@@ -21,55 +15,6 @@ import {import '../workspace/dummy-workspace.css';import './review-stories.css';-type Point = { x: number; y: number };--/**- * Keeps an overlay on a target inside `frame`, re-measured whenever the- * target selector changes or the frame resizes (the TaskCreationFlow model).- */-function trackTarget(options: {- frame: () => HTMLElement;- selector: Accessor<string | undefined>;- measure: (target: DOMRect, frame: DOMRect) => Point;-}) {- const [point, setPoint] = createSignal<Point>();- onMount(() => {- const position = () => {- const selector = options.selector();- const target = selector- ? options.frame().querySelector<HTMLElement>(selector)- : null;- const bounds = target?.getBoundingClientRect();- // A target hidden by the narrow layout has no box to point at.- if (!bounds || (bounds.width === 0 && bounds.height === 0)) {- setPoint(undefined);- return;- }- setPoint(- options.measure(bounds, options.frame().getBoundingClientRect())- );- };- createEffect(() => {- options.selector();- const timer = requestAnimationFrame(position);- onCleanup(() => cancelAnimationFrame(timer));- });- const resize = new ResizeObserver(position);- resize.observe(options.frame());- options.frame().addEventListener('scroll', position, true);- onCleanup(() => {- resize.disconnect();- options.frame().removeEventListener('scroll', position, true);- });- });- return point;-}--const pointAt = (target: DOMRect, frame: DOMRect): Point => ({- x: target.left - frame.left + Math.min(target.width / 2, 72),- y: target.top - frame.top + target.height / 2,-});-/*** A review request arrives at the top of Home. Jacob opens it, reads the PR,* then the demo stays put until the visitor marks it done.@@ -93,7 +38,12 @@ export function ReviewInboxDemo() {const playback = createProductWalkthrough({root: () => root,steps: 3,- reset: () => {},+ loop: { hold: 8500 },+ reset: () => {+ inbox.reset();+ setPhase(0);+ setAutomatic(true);+ },// A still frame is most useful with the pull request open.reduced: openRequest,delay: (step) => [0, 900, 1200, 800, 2600][step] ?? 1400,@@ -109,9 +59,10 @@ export function ReviewInboxDemo() {arrive();playback.pause();};- const pointer = trackTarget({+ const pointer = createDemoPointer({frame: () => frame,- selector: () =>+ active: automatic,+ target: () =>automatic()? [undefined,@@ -120,7 +71,6 @@ export function ReviewInboxDemo() {'[data-home-row="pr-491"]',][phase()]: undefined,- measure: pointAt,});return (<div ref={root} class="review-flow">@@ -149,7 +99,6 @@ export function ReviewInboxDemo() {<Show when={pointer()}>{(p) => (<DemoCursor- label="Jacob"class="review-flow-pointer"clicking={phase() === 3}style={{ transform: `translate(${p().x}px, ${p().y}px)` }}diff --git a/apps/marketing/src/features/marketing/components/reviews/githubProject.ts b/apps/marketing/src/features/marketing/components/reviews/githubProject.tsindex fb07764e0d..4625a2cef6 100644--- a/apps/marketing/src/features/marketing/components/reviews/githubProject.ts+++ b/apps/marketing/src/features/marketing/components/reviews/githubProject.ts@@ -100,6 +100,7 @@ export function createGithubWorkspace(agent = false) {person: 'julia' as const,time: '9:54 AM',body: '@[Cursor](demo-mention:cursor) can you fix this?',+ replyTo: 'bug',taskId: GITHUB_TASK,},]@@ -118,6 +119,7 @@ export function createGithubWorkspace(agent = false) {]);w.openItem('messages', 'website');w.setChannel('website');+ if (agent) w.setChannelThread('bug');return w;}diff --git a/apps/marketing/src/features/marketing/components/reviews/review-stories.css b/apps/marketing/src/features/marketing/components/reviews/review-stories.cssindex 7edb4c635a..d50e5c4c22 100644--- a/apps/marketing/src/features/marketing/components/reviews/review-stories.css+++ b/apps/marketing/src/features/marketing/components/reviews/review-stories.css@@ -66,7 +66,7 @@/* Walkthrough overlays sit over the window, measured from their targets. */.review-flow-frame { position: relative; }-.review-flow-pointer { position: absolute; top: 0; left: 0; z-index: 9; pointer-events: none; transition: transform 600ms cubic-bezier(.2, .8, .2, 1); }+.review-flow-pointer { position: absolute; top: 0; left: 0; z-index: 9; pointer-events: none; }.review-flow-card { position: absolute; top: 0; left: 0; z-index: 10; animation: review-card-in 160ms ease-out both; }@keyframes review-card-in { from { opacity: 0; } }.review-channel-log .sample-channel-thread { margin-bottom: 12px; }diff --git a/apps/marketing/src/features/marketing/components/site-navigation.css b/apps/marketing/src/features/marketing/components/site-navigation.cssindex 74911ee011..b0d965a8c7 100644--- a/apps/marketing/src/features/marketing/components/site-navigation.css+++ b/apps/marketing/src/features/marketing/components/site-navigation.css@@ -17,7 +17,14 @@.site-page-vignette::before, .site-page-vignette::after { content: ''; position: absolute; inset-inline: 0; height: clamp(80px, 12vh, 132px); }.site-page-vignette::before { top: 0; background: linear-gradient(to bottom, #000 0%, #000d 25%, #0006 58%, transparent 100%); }.site-page-vignette::after { bottom: 0; background: linear-gradient(to top, #000 0%, #000d 22%, #0006 55%, transparent 100%); }-.site-menu { position: relative; pointer-events: auto; }+.site-menu { position: relative; display: flex; align-items: center; pointer-events: auto; }+/* Keep the hover path connected across the gap to the dropdown. */+.site-header[data-menu-open=true] .site-menu::after { content: ''; position: absolute; top: 100%; left: 0; width: min(560px, calc(100vw - 64px)); height: 12px; }+.site-menu-toggle { display: none; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--nav-ink); cursor: pointer; }+.site-menu-toggle svg { width: 18px; height: 18px; }+.site-menu-toggle[aria-expanded=true] svg { transform: rotate(180deg); }+@media (hover: none), (max-width: 767px) { .site-menu-toggle { display: grid; } }+.site-menu-trigger { display: grid; place-items: center; width: 68px; height: 68px; margin-inline: -10px; padding: 0; border: 0; background: transparent; color: var(--nav-ink); border-radius: 50%; transition: background-color 180ms ease; }.site-menu-trigger:is(:hover, :focus-visible, [aria-expanded=true]) { background: color-mix(in srgb, var(--nav-ink) 8%, transparent); }.site-menu-mark { position: relative; display: block; width: 36px; height: 36px; }@@ -29,28 +36,78 @@.site-menu-panel a { display: block; color: var(--nav-ink); padding: 9px 10px; border-radius: 10px; font: inherit; font-size: 14px; line-height: 20px; text-decoration: none; }.site-menu-panel a:hover { background: #ffffff0a; }.site-header-actions { display: flex; align-items: center; gap: 12px; pointer-events: auto; }-.site-nav-demo { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 56px; box-sizing: border-box; padding: 12px 22px; border: 0; border-radius: 999px; background: var(--nav-surface); box-shadow: inset 0 1px 0 #ffffff12, inset 0 -1px 1px #0006; color: var(--nav-muted); font: inherit; font-size: 16px; line-height: 24px; white-space: nowrap; text-decoration: none; }-.site-nav-demo::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, #ffffff59 0%, #ffffff1f 24%, #ffffff05 60%, #ffffff14 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; pointer-events: none; }-.site-nav-demo:hover { color: var(--nav-ink); }-.site-nav-start { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-width: 172px; min-height: 56px; box-sizing: border-box; padding: 12px 22px; border: 0; border-radius: 999px; color: #000; background: linear-gradient(165deg, #fff 35%, #ededee 100%); box-shadow: inset 0 1px 0 #fff, inset 0 -2px 2px #00000018, 0 1px 0 #ffffff26, 0 10px 24px -12px #0008; font: inherit; font-size: 16px; font-weight: 500; line-height: 24px; white-space: nowrap; text-decoration: none; transition: filter 180ms ease; }-/* The standard one-pixel glass rim, without an extruded base. */-.site-nav-start::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, #ffffffb3 0%, #ffffff33 24%, #0000000a 60%, #00000038 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; pointer-events: none; }-.site-nav-start svg { flex-shrink: 0; width: 24px; height: 24px; }-/* Keep the legacy page-wide anchor reset from washing out the white CTA. */-.site-header a.site-nav-start { color: #000; }-/* The highlight is clipped to the pill and sits beneath its text and rim. */-.site-nav-start, .site-nav-demo { isolation: isolate; }-.site-nav-start::before, .site-nav-demo::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 220ms ease; }-.site-nav-demo::before { background: radial-gradient(ellipse 70% 150% at var(--glow-x, 50%) var(--glow-y, 50%), rgb(255 255 255 / 16%), rgb(255 255 255 / 5%) 42%, transparent 75%); }-.site-nav-start::before { background: radial-gradient(ellipse 70% 150% at var(--glow-x, 50%) var(--glow-y, 50%), rgb(185 201 222 / 30%), rgb(255 255 255 / 75%) 38%, transparent 75%); }-@media (hover: hover) and (pointer: fine) {- .site-nav-start:hover::before, .site-nav-demo:hover::before { opacity: .4; }+/* Public actions share soft pill shapes and short, CSS-only feedback. */+.site-nav-start, .site-nav-demo {+ display: inline-flex; align-items: center; justify-content: center; gap: 12px;+ min-height: 52px; box-sizing: border-box; padding: 13px 20px;+ border: 1px solid transparent; border-radius: 999px;+ font-family: 'Inter Variable', Inter, sans-serif; font-size: 15px;+ font-weight: 500; line-height: 24px; letter-spacing: -.01em;+ white-space: nowrap; text-decoration: none;+ transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;}-.site-nav-start:focus-visible::before, .site-nav-demo:focus-visible::before { opacity: .4; }-@media (prefers-reduced-motion: reduce) {- .site-nav-start::before, .site-nav-demo::before { transition: none; }+.site-nav-start {+ min-width: 160px; background: #f5f3ee; color: #1d1c1a;+ border-color: #ffffffb3;+ box-shadow: inset 0 1px 0 #fff, 0 1px 2px #00000014;+}+.site-nav-start svg { flex-shrink: 0; width: 20px; height: 20px; transition: transform 140ms ease; }+.site-nav-demo {+ background: color-mix(in srgb, var(--nav-ink) 8%, transparent); color: var(--nav-ink);+ border-color: var(--nav-edge); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--nav-ink) 4%, transparent);+}+.site-header :is(.site-nav-start, .site-nav-demo) { min-height: 48px; padding: 11px 18px; }+.site-header a.site-nav-open {+ --cta-footer-width: 172px;+ position: relative; isolation: isolate;+ min-width: 0; padding-inline: 18px; gap: 8px;+ background: transparent; border-color: transparent; color: #1d1c1a; box-shadow: none;+}+/* Match the primary action palette and fade with the label at the footer. */+.site-header a.site-nav-open::before {+ content: ''; position: absolute; inset: -1px; z-index: -1; pointer-events: none;+ border: 1px solid #1d1c1a26;+ border-radius: inherit; background: #f5f3ee;+ box-shadow: inset 0 1px 0 #fff, 0 1px 2px #00000014;+ opacity: clamp(0, calc(1 - var(--cta-landing, 0) * 2), 1);+ transition: background-color 140ms ease, border-color 140ms ease;+}+/* Fade the header label out fully before the footer presentation appears. */+.site-nav-open-label { opacity: clamp(0, calc(1 - var(--cta-landing, 0) * 2), 1); }+/* Original filled button presentation, revealed by the existing landing motion. */+.site-nav-open-footer {+ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);+ display: inline-flex; align-items: center; justify-content: center; gap: 16px;+ width: var(--cta-footer-width); min-height: 56px; box-sizing: border-box;+ padding: 12px 22px; border: 0; border-radius: 999px;+ color: #000; background: linear-gradient(165deg, #fff 35%, #ededee 100%);+ box-shadow: inset 0 1px 0 #fff, inset 0 -2px 2px #00000018, 0 1px 0 #ffffff26, 0 10px 24px -12px #0008;+ font: inherit; font-size: 16px; font-weight: 500; line-height: 24px;+ opacity: clamp(0, calc(var(--cta-landing, 0) * 2 - 1), 1); pointer-events: none;+}+.site-nav-open-footer::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, #ffffffb3 0%, #ffffff33 24%, #0000000a 60%, #00000038 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; pointer-events: none; }+.site-header a.site-nav-open[data-cta-footer] .site-nav-open-footer { pointer-events: auto; }+.site-header a.site-nav-open[data-cta-footer]:focus-visible { outline: none; }+.site-header a.site-nav-open:focus-visible .site-nav-open-footer { outline: 2px solid var(--nav-ink); outline-offset: 3px; }+.site-header a.site-nav-open .site-nav-open-footer svg { width: 24px; height: 24px; }+@media (max-width: 600px) {+ .site-header a.site-nav-open { --cta-footer-width: 144px; }+ .site-nav-open-footer { min-height: 48px; padding: 10px 18px; gap: 12px; font-size: 15px; }+ .site-header a.site-nav-open .site-nav-open-footer svg { width: 22px; height: 22px; }+}+@media (hover: hover) and (pointer: fine) {+ .site-nav-start:hover { background-color: #fff; border-color: #fff; }+ .site-nav-start:hover svg { transform: translateX(2px); }+ .site-nav-demo:hover { background-color: color-mix(in srgb, var(--nav-ink) 12%, transparent); border-color: color-mix(in srgb, var(--nav-ink) 25%, transparent); }+ .site-header a.site-nav-open:hover { background-color: transparent; border-color: transparent; }+ .site-header a.site-nav-open:hover::before { background-color: #fff; }}-.site-nav-start:active { filter: brightness(.93); }+.site-nav-open:active .site-nav-open-footer { filter: brightness(.93); }+.site-nav-start:active { background-color: #e9e6df; box-shadow: inset 0 1px 2px #0000001a; }+.site-nav-demo:active { background-color: color-mix(in srgb, var(--nav-ink) 16%, transparent); }+.site-header a.site-nav-open:active { background-color: transparent; box-shadow: none; }+.site-header a.site-nav-open:active::before { background-color: #e9e6df; }+.site-nav-start:focus-visible, .site-nav-demo:focus-visible { outline: 2px solid var(--nav-ink, var(--color-ink)); outline-offset: 4px; }@keyframes site-menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }.site-header :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }@media (min-width: 640px) { .site-header { left: 40px; } }@@ -59,16 +116,16 @@.site-menu-trigger { width: 54px; height: 54px; margin-inline: -5px; }.site-menu-mark { width: 32px; height: 32px; }.site-header-actions { gap: 8px; }- .site-nav-demo { min-height: 40px; padding: 8px 12px; font-size: 13px; }+ .site-header :is(.site-nav-start, .site-nav-demo) { min-height: 44px; padding: 9px 12px; font-size: 13px; }.site-nav-start { min-width: 144px; min-height: 48px; padding: 10px 18px; gap: 12px; font-size: 15px; }.site-nav-start svg { width: 22px; height: 22px; }- .site-header .site-nav-start { min-width: 0; min-height: 40px; padding: 8px 14px; gap: 8px; font-size: 13px; }+ .site-header a.site-nav-open { padding-inline: 14px; gap: 8px; }.site-header .site-nav-start svg { width: 18px; height: 18px; }.site-menu-panel { grid-template-columns: 1fr 1.2fr; width: calc(100vw - 32px); max-height: calc(100dvh - 96px); padding: 20px 14px; gap: 20px 12px; }.site-menu-group:first-child { grid-row: span 2; }}@media (prefers-reduced-motion: reduce) {- .site-menu-trigger, .site-menu-mark > span, .site-nav-start { transition: none; }+ .site-menu-trigger, .site-menu-mark > span, .site-nav-start, .site-nav-demo, .site-nav-start svg, .site-header a.site-nav-open::before { transition: none; }.site-menu-panel { animation: none; }}.site-menu-mark > span:nth-child(1) { clip-path: polygon(12.500% 20.833%, 50.000% 20.833%, 87.500% 20.833%, 87.500% 25.000%, 87.500% 29.167%, 50.000% 29.167%, 12.500% 29.167%, 12.500% 25.000%, 12.500% 20.833%); }@@ -86,7 +143,7 @@.onboarding-flow:has(.site-header[data-menu-open=true]) > .overflow-y-auto { overflow: hidden; }.site-header[data-menu-open=true]::before { content: ''; position: fixed; inset: 0 0 auto; height: calc(84px + env(safe-area-inset-top, 0px)); z-index: 2; background: #000; }.site-header[data-menu-open=true] .site-header-actions { visibility: hidden; pointer-events: none; }- .site-header[data-menu-open=true] .site-menu-trigger { position: relative; z-index: 3; background: transparent; }+ .site-header[data-menu-open=true] :is(.site-menu-trigger, .site-menu-toggle) { position: relative; z-index: 3; background: transparent; }.site-menu-panel {position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column;width: 100%; height: 100dvh; max-height: none; gap: 26px;@@ -99,10 +156,6 @@.site-menu-panel a { padding: 16px 4px; border-radius: 0; border-bottom: 1px solid var(--nav-edge); font-size: 19px; font-weight: 400; line-height: 26px; letter-spacing: .01em; }.site-menu-panel a:last-child { border-bottom: 0; }.site-menu-panel a:active { opacity: .55; }- .site-menu-trigger[aria-expanded=true] .site-menu-mark > span { display: none; }- .site-menu-trigger[aria-expanded=true] .site-menu-mark::before,- .site-menu-trigger[aria-expanded=true] .site-menu-mark::after { content: ''; position: absolute; left: 4px; right: 4px; top: calc(50% - 1px); height: 2px; background: currentColor; transform: rotate(45deg); }- .site-menu-trigger[aria-expanded=true] .site-menu-mark::after { transform: rotate(-45deg); }}@media (max-width: 767px) and (prefers-reduced-motion: reduce) {.site-menu-panel { animation: none; }diff --git a/apps/marketing/src/features/marketing/components/spreadsheet-demo-data.ts b/apps/marketing/src/features/marketing/components/spreadsheet-demo-data.tsindex 77b08d927c..bae48880df 100644--- a/apps/marketing/src/features/marketing/components/spreadsheet-demo-data.ts+++ b/apps/marketing/src/features/marketing/components/spreadsheet-demo-data.ts@@ -1,5 +1,6 @@export type DemoCell = {value: string;+ reference?: { kind: 'person' | 'company'; row: number };bold?: boolean;italic?: boolean;underline?: boolean;@@ -19,44 +20,44 @@ export const CUSTOMERS: Record<string, DemoCell> = {D1: header('Last active'),E1: header('Events'),F1: header('Plan'),- A2: { value: 'Dana' },- B2: { value: 'Northwind' },- C2: { value: '[email protected]' },+ A2: { value: 'Valentina', reference: { kind: 'person', row: 2 } },+ B2: { value: 'Coparse', reference: { kind: 'company', row: 2 } },+ C2: { value: '[email protected]' },D2: { value: 'Today' },E2: { value: '1842', format: 'number', decimals: 0 },F2: { value: 'Team' },- A3: { value: 'Maya' },- B3: { value: 'Lumen' },+ A3: { value: 'Maya', reference: { kind: 'person', row: 3 } },+ B3: { value: 'Lumen', reference: { kind: 'company', row: 3 } },C3: { value: '[email protected]' },D3: { value: 'Yesterday' },E3: { value: '1204', format: 'number', decimals: 0 },F3: { value: 'Team' },- A4: { value: 'Owen Park' },- B4: { value: 'Fieldnote' },+ A4: { value: 'Owen Park', reference: { kind: 'person', row: 4 } },+ B4: { value: 'Fieldnote', reference: { kind: 'company', row: 4 } },C4: { value: '[email protected]' },D4: { value: 'Sep 20' },E4: { value: '986', format: 'number', decimals: 0 },F4: { value: 'Pro' },- A5: { value: 'Priya Shah' },- B5: { value: 'Harbor' },+ A5: { value: 'Priya Shah', reference: { kind: 'person', row: 5 } },+ B5: { value: 'Harbor', reference: { kind: 'company', row: 5 } },C5: { value: '[email protected]' },D5: { value: 'Sep 19' },E5: { value: '874', format: 'number', decimals: 0 },F5: { value: 'Team' },- A6: { value: 'Leo Martins' },- B6: { value: 'Kindred' },+ A6: { value: 'Leo Martins', reference: { kind: 'person', row: 6 } },+ B6: { value: 'Kindred', reference: { kind: 'company', row: 6 } },C6: { value: '[email protected]' },D6: { value: 'Sep 18' },E6: { value: '731', format: 'number', decimals: 0 },F6: { value: 'Pro' },- A7: { value: 'Sam Okonkwo' },- B7: { value: 'Relay' },+ A7: { value: 'Sam Okonkwo', reference: { kind: 'person', row: 7 } },+ B7: { value: 'Relay', reference: { kind: 'company', row: 7 } },C7: { value: '[email protected]' },D7: { value: 'Sep 17' },E7: { value: '655', format: 'number', decimals: 0 },F7: { value: 'Team' },- A8: { value: 'Elena Voss' },- B8: { value: 'Paperplane' },+ A8: { value: 'Elena Voss', reference: { kind: 'person', row: 8 } },+ B8: { value: 'Paperplane', reference: { kind: 'company', row: 8 } },C8: { value: '[email protected]' },D8: { value: 'Sep 15' },E8: { value: '512', format: 'number', decimals: 0 },diff --git a/apps/marketing/src/features/marketing/components/tasks/TaskContextDemo.test.tsx b/apps/marketing/src/features/marketing/components/tasks/TaskContextDemo.test.tsxindex 3007f499cc..5f8cec838d 100644--- a/apps/marketing/src/features/marketing/components/tasks/TaskContextDemo.test.tsx+++ b/apps/marketing/src/features/marketing/components/tasks/TaskContextDemo.test.tsx@@ -1,5 +1,6 @@import { cleanup, fireEvent, render } from '@solidjs/testing-library';import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { DemoMentionMenu } from '../DemoMentionMenu';import { TaskContextDemo } from './TaskContextDemo';let reduced = true;@@ -7,6 +8,10 @@ let intersections: IntersectionObserverCallback[];beforeEach(() => {reduced = true;intersections = [];+ Object.defineProperty(Range.prototype, 'getClientRects', {+ configurable: true,+ value: () => [],+ });vi.stubGlobal('IntersectionObserver',class {@@ -39,6 +44,8 @@ afterEach(() => {expect(fetch).not.toHaveBeenCalled();vi.unstubAllGlobals();vi.useRealTimers();+ Reflect.deleteProperty(Range.prototype, 'getClientRects');+ Reflect.deleteProperty(Range.prototype, 'getBoundingClientRect');});it('opens the brief from an inline task mention and restores focus on close', async () => {@@ -122,30 +129,55 @@ it('returns to the task list if the sample task is deleted', async () => {expect(await view.findByText('No matching tasks.')).toBeTruthy();});-it('types the sharing line, opens mentions at @, and ends with the channel inserted', () => {+it('inserts the document, email, and channel through their mention menus, then resets the full sequence', () => {reduced = false;vi.useFakeTimers();const view = render(() => <TaskContextDemo />);- const input = view.getByRole('textbox', { name: 'Task sharing instruction' });- expect(input.textContent).toBe('');for (const callback of intersections)callback([{ isIntersecting: true } as IntersectionObserverEntry],{} as IntersectionObserver);- vi.advanceTimersByTime(1600);- expect(input.textContent).toContain('Share the draft for review in');- expect(view.queryByRole('listbox')).toBeNull();- vi.advanceTimersByTime(250);- expect(view.getByRole('listbox', { name: 'Mentions' })).toBeTruthy();+ vi.advanceTimersByTime(1900);+ expect(+ view.getByRole('textbox', { name: 'Task document reference' }).textContent+ ).toBe('Us');+ advanceTo(() => view.queryByRole('option', { name: 'Customer brief' }));+ expect(view.getByRole('option', { name: 'Customer brief' })).toBeTruthy();+ vi.advanceTimersByTime(1100);+ expect(+ view.getByRole('button', { name: 'Open Customer brief' })+ ).toBeTruthy();+ expect(+ view.queryByRole('button', { name: 'Open Proposal request' })+ ).toBeNull();+ advanceTo(() => view.queryByRole('option', { name: 'Proposal request' }));+ expect(view.getByRole('option', { name: 'Proposal request' })).toBeTruthy();+ vi.advanceTimersByTime(1100);+ expect(+ view.getByRole('button', { name: 'Open Proposal request' })+ ).toBeTruthy();+ advanceTo(() => view.queryByRole('option', { name: 'sales' }));expect(view.getByRole('option', { name: 'sales' })).toBeTruthy();- vi.advanceTimersByTime(1200);- expect(view.queryByRole('listbox')).toBeNull();+ vi.advanceTimersByTime(1100);expect(view.getByRole('button', { name: 'Open sales' })).toBeTruthy();+ expect(view.queryByRole('listbox')).toBeNull();+ advanceTo(() =>+ view+ .getByRole('textbox', { name: 'Task sharing instruction' })+ .textContent?.endsWith('sales.')+ );expect(view.getByRole('textbox', { name: 'Task sharing instruction' }).textContent).toContain('Share the draft for review in sales.');- vi.advanceTimersByTime(20000);+ advanceTo(() => !view.queryByRole('button', { name: 'Open Customer brief' }));+ expect(+ view.queryByRole('button', { name: 'Open Customer brief' })+ ).toBeNull();+ expect(+ view.queryByRole('button', { name: 'Open Proposal request' })+ ).toBeNull();+ expect(view.queryByRole('button', { name: 'Open sales' })).toBeNull();expect(view.queryByRole('region', { name: 'Linked task source' })).toBeNull();});@@ -166,3 +198,40 @@ it('keeps a visitor’s sharing instruction instead of continuing playback', ()expect(input.textContent).toBe('Keep my own instruction.');expect(view.queryByRole('button', { name: 'Open sales' })).toBeNull();});++function advanceTo(reached: () => unknown) {+ for (let elapsed = 0; elapsed < 30000 && !reached(); elapsed += 50)+ vi.advanceTimersByTime(50);+ expect(!!reached()).toBe(true);+}++it('uses only the task’s mention picker when typing a channel reference', async () => {+ reduced = false;+ Object.defineProperty(Range.prototype, 'getBoundingClientRect', {+ configurable: true,+ value: () => new DOMRect(),+ });+ const view = render(() => (+ <>+ <DemoMentionMenu />+ <TaskContextDemo />+ </>+ ));+ const input = view.getByRole('textbox', { name: 'Task sharing instruction' });+ fireEvent.pointerDown(input);+ input.focus();+ input.textContent = 'Share the draft for review in @';+ const range = document.createRange();+ range.selectNodeContents(input);+ range.collapse(false);+ window.getSelection()?.removeAllRanges();+ window.getSelection()?.addRange(range);+ fireEvent.input(input);+ await Promise.resolve();+ expect(view.getAllByRole('listbox')).toHaveLength(1);+ expect(view.getByRole('option', { name: 'sales' })).toBeTruthy();+ fireEvent.keyDown(input, { key: 'Enter' });+ expect(view.getByRole('button', { name: 'Open sales' })).toBeTruthy();+ expect(view.queryByRole('listbox')).toBeNull();+ Reflect.deleteProperty(Range.prototype, 'getBoundingClientRect');+});diff --git a/apps/marketing/src/features/marketing/components/tasks/TaskContextDemo.tsx b/apps/marketing/src/features/marketing/components/tasks/TaskContextDemo.tsxindex 5dd86a237c..1acba20e9b 100644--- a/apps/marketing/src/features/marketing/components/tasks/TaskContextDemo.tsx+++ b/apps/marketing/src/features/marketing/components/tasks/TaskContextDemo.tsx@@ -2,15 +2,19 @@ import Envelope from '@phosphor/envelope.svg';import X from '@phosphor/x.svg';import { Button } from '@ui';import {+ createEffect,createSignal,+ For,Match,onCleanup,onMount,Show,Switch,} from 'solid-js';+import { createStore } from 'solid-js/store';import type { WorkspaceView } from '../../core/dummy-workspace';import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';+import { demoTypingActions } from '../../primitives/demoTypingActions';import { createDemoPointer } from '../agents/createDemoPointer';import { DemoCursor } from '../DemoCursor';import { ViewShell } from '../DemoWorkspaceChrome';@@ -48,54 +52,171 @@ export function TaskContextDemo() {: mentions[value];const [narrow, setNarrow] = createSignal(true);let root!: HTMLDivElement;- const prefix = 'Share the draft for review in ';- const [draft, setDraft] = createSignal('');- const [channelLinked, setChannelLinked] = createSignal(false);- const [pickerOpen, setPickerOpen] = createSignal(false);+ const lines = [+ {+ id: 'brief',+ prefix: 'Use ',+ suffix: ' for the scope.',+ label: 'Task document reference',+ group: 'Documents, Agents, & Tasks',+ },+ {+ id: 'email',+ prefix: 'The deadline is in ',+ suffix: '.',+ label: 'Task email reference',+ group: 'Emails',+ },+ {+ id: 'channel',+ prefix: 'Share the draft for review in ',+ suffix: '.',+ label: 'Task sharing instruction',+ group: 'Channels',+ },+ ] as const;+ const [drafts, setDrafts] = createStore<Record<Source, string>>({+ brief: '',+ email: '',+ channel: '',+ });+ const [linked, setLinked] = createStore<Record<Source, boolean>>({+ brief: false,+ email: false,+ channel: false,+ });+ const [picker, setPicker] = createSignal<Source>();+ const [pickerOffset, setPickerOffset] = createSignal(0);+ const positionPicker = () => {+ const current = picker();+ if (!current || !root?.isConnected) return;+ const line = root.querySelector<HTMLElement>(+ `[data-context-line="${current}"]`+ );+ const editor = line?.querySelector<HTMLElement>('[role="textbox"]');+ if (!line || !editor) return;+ const range = document.createRange();+ range.selectNodeContents(editor);+ const rects = range.getClientRects();+ const lastLine = rects[rects.length - 1];+ const bounds = line.getBoundingClientRect();+ const menuWidth = Math.min(320, line.clientWidth);+ setPickerOffset(+ Math.max(+ 0,+ Math.min(+ (lastLine?.right ?? bounds.left) - bounds.left,+ line.clientWidth - menuWidth+ )+ )+ );+ };+ createEffect(() => {+ if (picker()) queueMicrotask(positionPicker);+ });+ const [typing, setTyping] = createSignal<Source>();const [automatic, setAutomatic] = createSignal(true);- const [step, setStep] = createSignal(0);- const frames = Math.ceil(prefix.length / 2);- const selectChannel = () => {- setChannelLinked(true);- setPickerOpen(false);- setAutomatic(false);+ const [target, setTarget] = createSignal<string>();+ const [clicking, setClicking] = createSignal(false);+ const [suffixes, setSuffixes] = createStore<Record<Source, string>>({+ brief: '',+ email: '',+ channel: '',+ });+ const selectSource = (id: Source, manual = true) => {+ setLinked(id, true);+ setPicker(undefined);+ setTyping(manual ? undefined : id);+ if (manual) setSuffixes(id, lines.find((line) => line.id === id)!.suffix);};+ const actions = lines.flatMap((line) => [+ {+ delay: 1200,+ run: () => {+ setClicking(false);+ setTarget(`[data-context-line="${line.id}"] [role="textbox"]`);+ },+ },+ {+ delay: 550,+ run: () => {+ setClicking(true);+ setTyping(line.id);+ },+ },+ ...demoTypingActions(line.prefix, (text) => setDrafts(line.id, text)),+ {+ delay: 250,+ run: () => {+ setDrafts(line.id, line.prefix + '@');+ setPicker(line.id);+ },+ },+ {+ delay: 450,+ run: () => {+ setClicking(false);+ setTarget(`[data-context-line="${line.id}"] [role="option"]`);+ },+ },+ {+ delay: 650,+ run: () => {+ setClicking(true);+ selectSource(line.id, false);+ },+ },+ ...demoTypingActions(+ line.suffix,+ (text) => {+ setClicking(false);+ setSuffixes(line.id, text);+ },+ 350+ ),+ { delay: 200, run: () => setTyping(undefined) },+ ]);const playback = createProductWalkthrough({root: () =>- root.querySelector<HTMLElement>('.task-context-share-line') ?? root,+ root.querySelector<HTMLElement>('[data-context-line="channel"]') ?? root,visibilityThreshold: 1,- steps: frames + 3,- reset: () => {},- reduced: selectChannel,- delay: (next) =>- next === 1- ? 900- : next <= frames- ? 45- : next === frames + 1- ? 250- : next === frames + 2- ? 900- : 220,- advance: (next) => {- setStep(next);- if (next <= frames) setDraft(prefix.slice(0, next * 2));- else if (next === frames + 1) {- setDraft(prefix + '@');- setPickerOpen(true);- } else if (next === frames + 3) selectChannel();+ steps: actions.length,+ loop: { hold: 6500 },+ reset: () => {+ setDrafts({ brief: '', email: '', channel: '' });+ setSuffixes({ brief: '', email: '', channel: '' });+ setLinked({ brief: false, email: false, channel: false });+ setPicker(undefined);+ setTyping(undefined);+ setSource(undefined);+ setSharing(false);+ setTarget(undefined);+ setClicking(false);+ setAutomatic(true);+ },+ reduced: () => {+ setLinked({ brief: true, email: true, channel: true });+ for (const line of lines) setSuffixes(line.id, line.suffix);+ setPicker(undefined);+ setTyping(undefined);+ setAutomatic(false);},+ onTakeover: () => {+ setAutomatic(false);+ setTyping(undefined);+ },+ delay: (next) => actions[next - 1].delay,+ advance: (next) => actions[next - 1].run(),});const pause = () => {playback.pause();setAutomatic(false);+ setTyping(undefined);};const pointer = createDemoPointer({frame: () => root,- target: () =>- automatic() && pickerOpen()- ? '.task-context-picker [role="option"]'- : undefined,+ target,+ active: automatic,});let closeButton: HTMLButtonElement | undefined;let trigger: HTMLButtonElement | undefined;@@ -105,7 +226,7 @@ export function TaskContextDemo() {};const open = (value: Source, button: HTMLButtonElement) => {pause();- setPickerOpen(false);+ setPicker(undefined);trigger = button;setSource(value);queueMicrotask(() => closeButton?.focus({ preventScroll: true }));@@ -122,7 +243,10 @@ export function TaskContextDemo() {</button>);onMount(() => {- const measure = () => setNarrow(root.clientWidth < 760);+ const measure = () => {+ setNarrow(root.clientWidth < 760);+ positionPicker();+ };const observer = new ResizeObserver(measure);observer.observe(root);measure();@@ -150,7 +274,7 @@ export function TaskContextDemo() {data-source-open={!!source()}onPointerDown={(event) => {if (!(event.target as Element).closest('.task-context-share-line'))- setPickerOpen(false);+ setPicker(undefined);}}onKeyDown={(event) => {if (event.key === 'Escape' && source() && !event.defaultPrevented) {@@ -193,82 +317,100 @@ export function TaskContextDemo() {>{currentTask.description}</div>- <p class="task-context-reference">- Use {mention('brief')} for the scope.- </p>- <p class="task-context-reference">- The deadline is in {mention('email')}.- </p>- <div class="task-context-reference task-context-share-line">- <Show- when={channelLinked()}- fallback={- <p- contentEditable- role="textbox"- aria-label="Task sharing instruction"- aria-autocomplete="list"- class="task-context-sharing-editor"- data-typing={automatic() && !!draft()}- textContent={draft()}- onInput={(event) =>- setPickerOpen(- (- event.currentTarget.textContent ?? ''- ).includes('@')- )- }- onKeyDown={(event) => {- if (pickerOpen() && event.key === 'Enter') {- event.preventDefault();- selectChannel();- }- if (pickerOpen() && event.key === 'Escape') {- event.preventDefault();- event.stopPropagation();- setPickerOpen(false);- }- }}- />- }- >- <p- contentEditable- role="textbox"- aria-label="Task sharing instruction"- class="task-context-sharing-editor"- >- {prefix}- {mention('channel')}.- </p>- </Show>- <Show when={pickerOpen()}>+ <For each={lines}>+ {(line) => (<div- class="task-context-picker"- onClick={(event) => {- if (- (event.target as Element).closest(- '[role="option"]'- )- )- selectChannel();- }}+ class="task-context-reference task-context-share-line"+ data-context-line={line.id}+ data-demo-mentions="off">- <DocMentionMenu- groups={[- { label: 'Channels', rows: [mentions.channel] },- ]}- selected={0}- style={{- position: 'absolute',- left: '0',- bottom: 'calc(100% + 6px)',- width: 'min(320px, 100%)',- }}- />+ <Show+ when={linked[line.id]}+ fallback={+ <p+ contentEditable+ role="textbox"+ aria-label={line.label}+ aria-autocomplete="list"+ class="task-context-sharing-editor"+ data-typing={+ automatic() && typing() === line.id+ }+ textContent={drafts[line.id]}+ onInput={(event) => {+ setPicker(+ (+ event.currentTarget.textContent ?? ''+ ).includes('@')+ ? line.id+ : undefined+ );+ queueMicrotask(positionPicker);+ }}+ onKeyDown={(event) => {+ if (+ picker() === line.id &&+ event.key === 'Enter'+ ) {+ event.preventDefault();+ selectSource(line.id);+ }+ if (+ picker() === line.id &&+ event.key === 'Escape'+ ) {+ event.preventDefault();+ event.stopPropagation();+ setPicker(undefined);+ }+ }}+ />+ }+ >+ <p+ contentEditable+ role="textbox"+ aria-label={line.label}+ class="task-context-sharing-editor"+ data-typing={automatic() && typing() === line.id}+ >+ {line.prefix}+ {mention(line.id)}+ {suffixes[line.id]}+ </p>+ </Show>+ <Show when={picker() === line.id}>+ <div+ class="task-context-picker"+ onClick={(event) => {+ if (+ (event.target as Element).closest(+ '[role="option"]'+ )+ )+ selectSource(line.id);+ }}+ >+ <DocMentionMenu+ groups={[+ {+ label: line.group,+ rows: [mentionItem(line.id)],+ },+ ]}+ selected={0}+ style={{+ position: 'absolute',+ left: `${pickerOffset()}px`,+ bottom: 'calc(100% + 6px)',+ width: 'min(320px, 100%)',+ }}+ />+ </div>+ </Show></div>- </Show>- </div>+ )}+ </For></>}/>@@ -327,9 +469,8 @@ export function TaskContextDemo() {<Show when={pointer()}>{(point) => (<DemoCursor- label="Jacob"class="task-context-pointer"- clicking={step() === frames + 2}+ clicking={clicking()}style={{ transform: `translate(${point().x}px, ${point().y}px)` }}/>)}diff --git a/apps/marketing/src/features/marketing/components/tasks/TaskCreationFlow.tsx b/apps/marketing/src/features/marketing/components/tasks/TaskCreationFlow.tsxindex 266d762667..a135906c69 100644--- a/apps/marketing/src/features/marketing/components/tasks/TaskCreationFlow.tsx+++ b/apps/marketing/src/features/marketing/components/tasks/TaskCreationFlow.tsx@@ -1,6 +1,7 @@-import { createEffect, createSignal, onCleanup, onMount, Show } from 'solid-js';+import { createSignal, onCleanup, onMount, Show } from 'solid-js';import { createStore } from 'solid-js/store';import type { WorkspaceTask } from '../../core/dummy-workspace';+import { createDemoPointer } from '../../primitives/createDemoPointer';import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';import { DemoCursor } from '../DemoCursor';import { ProductDemo } from '../product/ProductPage';@@ -14,7 +15,7 @@ import {} from './taskProject';import './task-creation-flow.css';-/** One request becomes an owned task, then a completed link in the plan. */+/** A channel request becomes an owned task connected to its original brief. */export function TaskCreationFlow() {let root!: HTMLDivElement;let frame!: HTMLDivElement;@@ -24,8 +25,10 @@ export function TaskCreationFlow() {const [phase, setPhase] = createSignal(0);const [automatic, setAutomatic] = createSignal(true);const [taskId, setTaskId] = createSignal<string>();- const [pointer, setPointer] = createSignal<{ x: number; y: number }>();- const [draft, setDraft] = createStore<WorkspaceTask>({+ const [target, setTarget] = createSignal<string>();+ const [clicking, setClicking] = createSignal(false);+ const [priorityOpen, setPriorityOpen] = createSignal(false);+ const initialDraft: WorkspaceTask = {id: 'task-draft',title: REQUEST_TASK,description: '',@@ -37,14 +40,20 @@ export function TaskCreationFlow() {tags: [],steps: [],comments: [],- });- const [dueDate, setDueDate] = createSignal<string>();+ };+ const [draft, setDraft] = createStore<WorkspaceTask>({ ...initialDraft });const create = () => {let id = taskId();if (!id) {id = 'proposal';w.setData('tasks', [- { ...draft, id, description: REQUEST_CONTEXT, tags: ['Customers'] },+ {+ ...draft,+ id,+ description: REQUEST_CONTEXT,+ tags: ['Customers'],+ relatedDocumentIds: ['customer-brief'],+ },]);w.setData('channels', 0, 'messages', 1, 'taskId', id);setTaskId(id);@@ -60,76 +69,105 @@ export function TaskCreationFlow() {};const finish = () => {if (!taskId()) create();- w.updateTask(taskId()!, {- status: 'Completed',- description: 'Proposal ready: scope, pricing, and a delivery timeline.',+ w.open('tasks', taskId());+ setPhase(4);+ };+ const updateDraft = (patch: Partial<WorkspaceTask>) => setDraft(patch);+ const openComposer = () => setPhase(2);+ const approach = (selector: string) => {+ setClicking(false);+ setTarget(selector);+ };+ const click = (run: () => void) => {+ setClicking(true);+ run();+ };+ const revealRequest = () => {+ const log = frame.querySelector<HTMLElement>('[role="log"]');+ log?.scrollTo({ top: 0, behavior: 'smooth' });+ setPhase(1);+ };+ let scrollFrame = 0;+ const showRequest = () => {+ cancelAnimationFrame(scrollFrame);+ scrollFrame = requestAnimationFrame(() => {+ const log = frame.querySelector<HTMLElement>('[role="log"]');+ if (log) log.scrollTop = 0;});- setPhase(6);- setAutomatic(false);};+ onMount(() => {+ showRequest();+ onCleanup(() => cancelAnimationFrame(scrollFrame));+ });+ // Delays are reading/movement time BEFORE the named action.+ const actions = [+ { delay: 1400, run: revealRequest },+ {+ delay: 650,+ run: () => approach('[data-hovered=true] [aria-label="Task"]'),+ },+ { delay: 650, run: () => click(openComposer) },+ { delay: 900, run: () => approach('[aria-label="Change priority"]') },+ { delay: 650, run: () => click(() => setPriorityOpen(true)) },+ {+ delay: 450,+ run: () => approach('[data-demo-property-value="priority:High"]'),+ },+ {+ delay: 650,+ run: () =>+ click(() => {+ updateDraft({ priority: 'High' });+ setPriorityOpen(false);+ }),+ },+ { delay: 650, run: () => approach('[data-task-submit]') },+ { delay: 650, run: () => click(create) },+ { delay: 2200, run: () => approach('.task-plan-link') },+ {+ delay: 650,+ run: () =>+ click(() => {+ w.open('documents', 'customer-brief');+ setPhase(5);+ }),+ },+ { delay: 2600, run: () => approach('.sample-task-mention-inline') },+ { delay: 650, run: () => click(finish) },+ ];const playback = createProductWalkthrough({root: () => root,- steps: 7,- reset: () => {},- reduced: finish,- delay: (step) =>- [0, 1200, 1600, 1500, 1500, 2200, 2500, 2400][step] ?? 1400,- advance: (step) => {- if (step === 3) {- setDraft('priority', 'High');- setDueDate('Friday');- }- if (step === 4) create();- else if (step === 5) {- w.updateTask(taskId()!, {- status: 'In Progress',- description: 'Adding pricing and delivery dates to the proposal.',- });- setPhase(step);- } else if (step === 6) finish();- else if (step === 7) {- w.open('documents', 'customer-brief');- setPhase(step);- } else setPhase(step);+ steps: actions.length,+ loop: { hold: 6500 },+ reset: () => {+ w.setData('tasks', []);+ w.setData('channels', 0, 'messages', 1, 'taskId', undefined);+ w.open('messages', 'sales');+ setTaskId(undefined);+ setDraft({ ...initialDraft });+ setPhase(0);+ setAutomatic(true);+ setPriorityOpen(false);+ setTarget(undefined);+ setClicking(false);+ showRequest();},+ reduced: () => {+ finish();+ setAutomatic(false);+ },+ onTakeover: () => setAutomatic(false),+ delay: (step) => actions[step - 1].delay,+ advance: (step) => actions[step - 1].run(),});const pause = () => {setAutomatic(false);playback.pause();};- onMount(() => {- const position = () => {- const selector = [- undefined,- '[data-hovered=true] [aria-label="Task"]',- '[aria-label="Change priority"]',- '[data-task-submit]',- '[aria-label="Task description"]',- '[aria-label="Change status"]',- ][phase()];- const target = selector- ? frame.querySelector<HTMLElement>(selector)- : undefined;- if (!automatic() || !target) {- setPointer(undefined);- return;- }- const bounds = target.getBoundingClientRect();- const parent = frame.getBoundingClientRect();- setPointer({- x: bounds.left - parent.left + Math.min(bounds.width / 2, 40),- y: bounds.top - parent.top + bounds.height / 2,- });- };- createEffect(() => {- phase();- automatic();- const timer = requestAnimationFrame(position);- onCleanup(() => cancelAnimationFrame(timer));- });- const resize = new ResizeObserver(position);- resize.observe(frame);- onCleanup(() => resize.disconnect());+ const pointer = createDemoPointer({+ frame: () => frame,+ target,+ active: automatic,});return (<div ref={root} class="task-creation-flow">@@ -157,7 +195,7 @@ export function TaskCreationFlow() {}}><ProductDemo- label="Follow a request from message to completion"+ label="Create a task from a request and open its linked brief"onInteract={pause}height={560}mobileHeight={620}@@ -174,7 +212,7 @@ export function TaskCreationFlow() {? REQUEST_TASK: message.body);- setPhase(2);+ openComposer();}}/><Show when={phase() >= 2}>@@ -182,8 +220,13 @@ export function TaskCreationFlow() {<TaskComposerdraft={draft}sourceChannel="sales"- dueDateLabel={dueDate()}- update={(patch) => setDraft(patch)}+ dueDateLabel="Friday"+ update={updateDraft}+ priorityPlayback={{+ open: priorityOpen(),+ onOpenChange: setPriorityOpen,+ automatic: automatic(),+ }}submit={() => {pause();create();@@ -200,9 +243,8 @@ export function TaskCreationFlow() {<Show when={automatic() && pointer()}>{(p) => (<DemoCursor- label={phase() >= 4 ? 'Julia' : 'Jacob'}class="task-flow-pointer"- clicking={phase() === 3}+ clicking={clicking()}style={{ transform: `translate(${p().x}px, ${p().y}px)` }}/>)}diff --git a/apps/marketing/src/features/marketing/components/tasks/TaskProjectView.tsx b/apps/marketing/src/features/marketing/components/tasks/TaskProjectView.tsxindex 1246042a4f..1da65a2bfc 100644--- a/apps/marketing/src/features/marketing/components/tasks/TaskProjectView.tsx+++ b/apps/marketing/src/features/marketing/components/tasks/TaskProjectView.tsx@@ -1,15 +1,15 @@-import ArrowLeft from '@phosphor/arrow-left.svg';import CalendarBlank from '@phosphor/calendar-blank.svg';-import FileText from '@phosphor/file-text.svg';import X from '@phosphor/x.svg';import { Button } from '@ui';import { createEffect, createSignal, For, Match, Show, Switch } from 'solid-js';import type { DummyWorkspace } from '../../primitives/createDummyWorkspace';-import { ViewShell } from '../DemoWorkspaceChrome';+import { DocMention } from '../documents/DocMention';+import { DocumentShareSheet } from '../documents/DocumentShareSheet';import { ProductWorkspace } from '../product/ProductWorkspace';import { WorkspaceDesktopDemo } from '../WorkspaceDesktopDemo';import { TaskMention } from '../workspace/frozen/TaskMention';import { TaskNotebook } from '../workspace/frozen/TaskNotebook';+import { WorkspaceDocuments } from '../workspace/WorkspaceDocuments';import { REQUEST_DOCUMENT } from './taskProject';import './task-stories.css';@@ -30,6 +30,10 @@ export function TaskProjectView(props: {const w = props.workspace;let root!: HTMLDivElement;const [returnId, setReturnId] = createSignal<string>();+ const [sharing, setSharing] = createSignal(false);+ const brief = () =>+ w.data.documents.find((doc) => doc.id === 'customer-brief');+ const documentTitle = () => brief()?.title ?? REQUEST_DOCUMENT;let returnLabel = 'From sales';const selected = () =>w.contentView() === 'tasks'@@ -47,7 +51,9 @@ export function TaskProjectView(props: {const button = [...root.querySelectorAll<HTMLButtonElement>('button'),].find(- (item) => item.textContent?.replace(/\s+/g, ' ').trim() === returnLabel+ (item) =>+ item.textContent?.replace(/\s+/g, ' ').trim() === returnLabel ||+ item.matches('.task-plan-link'));button?.focus({ preventScroll: true });});@@ -89,11 +95,12 @@ export function TaskProjectView(props: {props.documentSource ? (<buttontype="button"- class="task-plan-link dummy-entity-link"+ class="task-plan-link sample-inline-reference"onClick={() => w.open('documents', 'customer-brief')}>- <FileText class="size-4" />- {REQUEST_DOCUMENT}+ <DocMention+ item={{ kind: 'document', label: documentTitle() }}+ /></button>) : undefined}@@ -106,9 +113,9 @@ export function TaskProjectView(props: {<Show when={!props.documentSource}><buttontype="button"- class="task-plan-link dummy-entity-link"+ class="task-plan-link sample-inline-reference"onClick={() => {- returnLabel = REQUEST_DOCUMENT;+ returnLabel = documentTitle();w.open('documents', 'customer-brief');queueMicrotask(() =>root@@ -119,8 +126,9 @@ export function TaskProjectView(props: {);}}>- <FileText class="size-4" />- {REQUEST_DOCUMENT}+ <DocMention+ item={{ kind: 'document', label: documentTitle() }}+ /></button></Show>}@@ -128,39 +136,39 @@ export function TaskProjectView(props: {)}</Match><Match when={w.contentView() === 'documents'}>- <ViewShell.TopBar>- <Button- variant="plain"- size="icon-sm"- label="Back to task"- onClick={close}- >- <ArrowLeft />- </Button>- <FileText class="size-4 text-note" />- <span class="truncate text-sm">{REQUEST_DOCUMENT}</span>- </ViewShell.TopBar>- <div class="dummy-scroll task-checklist-doc">- <h1>{REQUEST_DOCUMENT}</h1>- <p class="task-checklist-after">- Update the homepage and pricing page. Send a proposal by Friday.- </p>- <h2>Next step</h2>- <ul class="task-checklist-list">- <For each={w.data.tasks}>- {(task) => (- <li>- <TaskMention- task={task}- onOpen={() => w.open('tasks', task.id)}- />- </li>- )}- </For>- </ul>- </div>+ <WorkspaceDocuments+ workspace={{+ ...w,+ selected: () => 'customer-brief',+ backToCollection: close,+ }}+ backLabel="Back to task"+ onShare={() => setSharing(true)}+ sharingDescription="Shared with #sales"+ relatedContent={+ <div class="mt-6 md">+ <h2 class="text-[1.125em] font-semibold mb-2">Next step</h2>+ <For each={w.data.tasks}>+ {(task) => (+ <p>+ <TaskMention+ inline+ task={task}+ onOpen={() => w.open('tasks', task.id)}+ />+ </p>+ )}+ </For>+ </div>+ }+ /></Match></Switch>+ <DocumentShareSheet+ open={sharing()}+ title={documentTitle()}+ onClose={() => setSharing(false)}+ /><Show when={sourceOpen() && w.contentView() === 'messages'}><Buttonclass="task-source-close"diff --git a/apps/marketing/src/features/marketing/components/tasks/TaskStories.test.tsx b/apps/marketing/src/features/marketing/components/tasks/TaskStories.test.tsxindex 1732972ba4..7daf7517bb 100644--- a/apps/marketing/src/features/marketing/components/tasks/TaskStories.test.tsx+++ b/apps/marketing/src/features/marketing/components/tasks/TaskStories.test.tsx@@ -78,7 +78,7 @@ function reduce() {it('turns a message into a task with its title, assignee, and source channel', () => {const view = render(() => <TaskFromMessageDemo />);visible(true);- vi.advanceTimersByTime(1300);+ vi.advanceTimersByTime(1500);expect(view.container.querySelector('[data-hovered="true"] [aria-label="Task"]')).toBeTruthy();@@ -90,7 +90,11 @@ it('turns a message into a task with its title, assignee, and source channel', (expect(view.getAllByRole('button', { name: 'Change assignee' })[0].textContent).toContain('Julia');- vi.advanceTimersByTime(3200);+ vi.advanceTimersByTime(1500);+ expect(view.getByRole('menu')).toBeTruthy();+ expect(view.getByRole('menuitem', { name: 'High' })).toBeTruthy();+ vi.advanceTimersByTime(2300);+ expect(view.queryByRole('menu')).toBeNull();expect(view.getByRole('textbox', { name: 'Task title' }).textContent).toBe('Prepare the customer proposal');@@ -98,8 +102,9 @@ it('turns a message into a task with its title, assignee, and source channel', (expect(view.getAllByRole('button', { name: 'Change priority' })[0].textContent).toContain('High');+ expect(vi.getTimerCount()).toBeGreaterThan(0);+ fireEvent.pointerDown(view.getByRole('textbox', { name: 'Task title' }));vi.advanceTimersByTime(30000);- expect(vi.getTimerCount()).toBe(0);});it('keeps a visitor’s task draft instead of advancing over it', () => {@@ -135,10 +140,14 @@ it('types Jacob’s requests into the composer before sending them', () => {vi.advanceTimersByTime(1400);expect(input.textContent).toContain('@Macro');expect(log.queryByText(/make tasks for this proposal/)).toBeNull();- vi.advanceTimersByTime(2300);+ advanceTo(() => log.queryByText(/make tasks for this proposal/));expect(input.textContent).toBe('');expect(log.getByText(/make tasks for this proposal/)).toBeTruthy();- vi.advanceTimersByTime(3100);+ advanceTo(() =>+ view+ .queryByRole('textbox', { name: 'Thread reply' })+ ?.textContent?.includes('Julia')+ );const threadInput = view.getByRole('textbox', { name: 'Thread reply' });expect(threadInput.textContent).toContain('Julia');expect(threadInput.textContent).not.toContain('@Macro');@@ -191,25 +200,33 @@ it('moves the task to In Review, then Completed, as its pull request changes', (expect(view.getByText('company/website#491')).toBeTruthy();});-it('finishes the human task and keeps its completed status in the plan', () => {+it('opens the linked brief and returns through its inline task mention without completing the work', () => {const view = render(() => <TaskFromMessageDemo />);visible(true);- vi.advanceTimersByTime(15000);- fireEvent.click(- view.getByRole('button', { name: 'Prepare the customer proposal' })- );+ vi.advanceTimersByTime(10000);+ const link = view.getByRole('button', {+ name: 'Prepare the customer proposal',+ });+ expect(link.classList.contains('sample-task-mention-inline')).toBe(true);+ expect(link.classList.contains('dummy-entity-link')).toBe(false);+ fireEvent.pointerDown(link);+ fireEvent.click(link);expect(view.getAllByRole('button', { name: 'Change status' })[0].textContent- ).toContain('Completed');+ ).toContain('Not Started');expect(view.getByRole('textbox', { name: 'Task description' }).textContent- ).toContain('Proposal ready: scope, pricing');+ ).toContain('They need a proposal by Friday.');+ const documentLink = view.getByRole('button', { name: 'Customer brief' });+ expect(+ documentLink.querySelector('.demo-inline-mention.mention-document')+ ).toBeTruthy();});it('changes the existing proposal task to Julia after an explicit request', () => {const view = render(() => <TaskAgentChannelDemo />);visible(true);- vi.advanceTimersByTime(24000);+ advanceTo(() => view.queryByText('The proposal is now assigned to Julia.'));expect(view.getByText('The proposal is now assigned to Julia.')@@ -235,6 +252,33 @@ it('changes the existing proposal task to Julia after an explicit request', () =).toContain('Julia');});+it('keeps edits to the linked brief and reflects its new name on the task', () => {+ const w = createTaskProject();+ const view = render(() => <TaskProjectView workspace={w} />);+ fireEvent.click(view.getByRole('button', { name: 'Customer brief' }));+ const title = view.getByRole('textbox', { name: 'Document title' });+ Object.defineProperty(title, 'innerText', {+ value: 'Customer scope',+ configurable: true,+ });+ fireEvent.blur(title);+ const body = view.getByRole('textbox', { name: 'Document body' });+ body.innerHTML = '<p>Include the mobile signup flow.</p>';+ fireEvent.blur(body);+ fireEvent.click(view.getByRole('button', { name: 'Back to task' }));+ const link = view.getByRole('button', { name: 'Customer scope' });+ expect(+ link.querySelector('.demo-inline-mention.mention-document')+ ).toBeTruthy();+ fireEvent.click(link);+ expect(+ view.getByRole('textbox', { name: 'Document title' }).textContent+ ).toBe('Customer scope');+ expect(+ view.getByRole('textbox', { name: 'Document body' }).textContent+ ).toContain('Include the mobile signup flow.');+});+it('does not perform the scripted reassignment after the visitor takes over', () => {const view = render(() => <TaskAgentChannelDemo />);visible(true);@@ -320,9 +364,15 @@ it('resumes the same agent draft after leaving view without skipping or duplicatexpect(input.textContent).toBe(draft);expect(view.queryByText('Created and assigned both tasks.')).toBeNull();visible(true);- vi.advanceTimersByTime(20000);+ advanceTo(() => view.queryByText('The proposal is now assigned to Julia.'));expect(view.getByRole('log', { name: 'Channel sales' }).querySelectorAll('article')).toHaveLength(4);expect(view.getByText('The proposal is now assigned to Julia.')).toBeTruthy();});++function advanceTo(reached: () => unknown) {+ for (let elapsed = 0; elapsed < 30000 && !reached(); elapsed += 50)+ vi.advanceTimersByTime(50);+ expect(!!reached()).toBe(true);+}diff --git a/apps/marketing/src/features/marketing/components/tasks/TaskStories.tsx b/apps/marketing/src/features/marketing/components/tasks/TaskStories.tsxindex d214788b26..e4dcab32e9 100644--- a/apps/marketing/src/features/marketing/components/tasks/TaskStories.tsx+++ b/apps/marketing/src/features/marketing/components/tasks/TaskStories.tsx@@ -6,6 +6,7 @@ import type {} from '../../core/dummy-workspace';import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';+import { demoTypingActions } from '../../primitives/demoTypingActions';import { PrStatusIcon } from '../DemoPrDocument';import type { ChannelComposerHandle } from '../email/frozen/ChannelComposer';import { ProductDemo } from '../product/ProductPage';@@ -157,17 +158,12 @@ export function TaskAgentChannelDemo() {]);follow();};- const typeMessage = (text: string, delay: number) =>- Array.from({ length: Math.ceil(text.length / 2) }, (_, index) => ({- delay: index === 0 ? delay : 35,- run: () => writeDraft(text.slice(0, (index + 1) * 2)),- }));const steps = [- ...typeMessage(firstRequest, 600),+ ...demoTypingActions(firstRequest, writeDraft, 600),{ delay: 450, run: sendRequest },{ delay: 1400, run: create },{ delay: 2200, run: beginReply },- ...typeMessage(secondRequest, 300),+ ...demoTypingActions(secondRequest, writeDraft, 300),{ delay: 450, run: requestUpdate },{ delay: 1400, run: update },];@@ -176,7 +172,20 @@ export function TaskAgentChannelDemo() {root.querySelector<HTMLElement>('.sample-chat-composer') ?? root,visibilityThreshold: 1,steps: steps.length,- reset: () => {},+ loop: { hold: 8500 },+ reset: () => {+ if (scrollFrame !== undefined) cancelAnimationFrame(scrollFrame);+ scrollFrame = undefined;+ writeDraft('');+ setReplyTarget(undefined);+ w.setData('tasks', []);+ w.setData('channels', 0, 'messages', []);+ w.setChannelThread(undefined);+ ids = [];+ setTyping(false);+ const log = root.querySelector('[role="log"]');+ if (log) log.scrollTop = 0;+ },reduced: () => {smooth = false;sendRequest();@@ -269,7 +278,12 @@ export function TaskGithubDemo() {const playback = createProductWalkthrough({root: () => root,steps: 3,- reset: () => {},+ loop: { hold: 8000 },+ reset: () => {+ setPr('none');+ w.updateTask('invite', { status: 'In Progress' });+ w.open('tasks', 'invite');+ },reduced: () => {move('merged', 'Completed');},diff --git a/apps/marketing/src/features/marketing/components/tasks/TasksComparison.tsx b/apps/marketing/src/features/marketing/components/tasks/TasksComparison.tsxindex 38ddd00be7..c215838407 100644--- a/apps/marketing/src/features/marketing/components/tasks/TasksComparison.tsx+++ b/apps/marketing/src/features/marketing/components/tasks/TasksComparison.tsx@@ -2,5 +2,10 @@ import { taskComparisons } from '../../core/feature-comparisons';import { FeatureComparisons } from '../comparisons/FeatureComparisons';export function TasksComparison() {- return <FeatureComparisons comparisons={taskComparisons} />;+ return (+ <FeatureComparisons+ title="Compare Task Managers"+ comparisons={taskComparisons}+ />+ );}diff --git a/apps/marketing/src/features/marketing/components/tasks/task-context.css b/apps/marketing/src/features/marketing/components/tasks/task-context.cssindex 9db8b6d3cd..b097433a5c 100644--- a/apps/marketing/src/features/marketing/components/tasks/task-context.css+++ b/apps/marketing/src/features/marketing/components/tasks/task-context.css@@ -16,7 +16,7 @@.task-context-layout { position:relative; }.task-context-share-line { position:relative; min-height:1.8em; }.task-context-sharing-editor { min-height:1.8em; outline:none; }-.task-context-pointer { position:absolute; top:0; left:0; z-index:260; pointer-events:none; transition:transform 550ms ease; }+.task-context-pointer { position:absolute; top:0; left:0; z-index:260; pointer-events:none; }.task-context-sharing-editor[data-typing=true]::after { content: ''; display:inline-block; height:1em; vertical-align:-0.12em; border-right:1px solid currentColor; }@media(prefers-reduced-motion:reduce) { .task-context-pointer { display:none; transition:none; } }.task-context-picker .demo-mention-menu { background:var(--color-menu); backdrop-filter:blur(16px); }diff --git a/apps/marketing/src/features/marketing/components/tasks/task-creation-flow.css b/apps/marketing/src/features/marketing/components/tasks/task-creation-flow.cssindex dc0889e9c5..23ddfb10be 100644--- a/apps/marketing/src/features/marketing/components/tasks/task-creation-flow.css+++ b/apps/marketing/src/features/marketing/components/tasks/task-creation-flow.css@@ -1,6 +1,6 @@.task-flow-frame { position: relative; }.task-flow-chat { flex: 1; }-.task-flow-pointer { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 9; transition: transform 600ms cubic-bezier(.2,.8,.2,1); }+.task-flow-pointer { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 9; }/* ComposeTask opens as a popover split over the conversation. */.task-flow-popover { position: absolute; inset: 48px 0 0; z-index: 4; display: grid; place-items: start center; padding: 40px 24px; background: rgb(8 9 11 / 0.45); }diff --git a/apps/marketing/src/features/marketing/components/tasks/tasks-page.css b/apps/marketing/src/features/marketing/components/tasks/tasks-page.cssindex 101fccd772..fbb067999e 100644--- a/apps/marketing/src/features/marketing/components/tasks/tasks-page.css+++ b/apps/marketing/src/features/marketing/components/tasks/tasks-page.css@@ -171,6 +171,7 @@}.tasks-founder-card-article > span:last-child { color: #aaa; white-space: nowrap; }.tasks-founder-card:hover .tasks-founder-card-article > span:last-child { color: #fff; }+@media (max-width: 699px) {.tasks-founder-card-body { padding: 24px; }.tasks-page .tasks-founder-card h2 { font-size: 25px; margin-bottom: 18px; }diff --git a/apps/marketing/src/features/marketing/components/workspace/CompanyRecord.tsx b/apps/marketing/src/features/marketing/components/workspace/CompanyRecord.tsxindex b4dcb26fbf..6ee34cf882 100644--- a/apps/marketing/src/features/marketing/components/workspace/CompanyRecord.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/CompanyRecord.tsx@@ -1,3 +1,4 @@+import ArrowLeft from '@phosphor/arrow-left.svg';import BuildingOffice from '@phosphor/building-office.svg';import CaretDown from '@phosphor/caret-down.svg';import CaretRight from '@phosphor/caret-right.svg';@@ -11,6 +12,7 @@ import Files from '@phosphor/files.svg';import Globe from '@phosphor/globe.svg';import LinkIcon from '@phosphor/link.svg';import ListBullets from '@phosphor/list-bullets.svg';+import ListChecks from '@phosphor/list-checks.svg';import Phone from '@phosphor/phone.svg';import PhoneCall from '@phosphor/phone-call.svg';import Plus from '@phosphor/plus.svg';@@ -30,6 +32,7 @@ import {onMount,Show,} from 'solid-js';+import { Dynamic } from 'solid-js/web';import type {WorkspaceComment,WorkspaceView,@@ -45,6 +48,7 @@ import {type SampleCompany,} from '../../core/workspace-fixtures';import type { DummyWorkspace } from '../../primitives/createDummyWorkspace';+import type { ChannelComposerHandle } from '../email/frozen/ChannelComposer';import { ChannelComposer } from '../email/frozen/ChannelComposer';import { SearchBar } from '../email/frozen/SearchBar';import { PanelGrid, PanelRow } from './frozen/DetailPanel';@@ -168,6 +172,8 @@ function Description(props: { text: string }) {function Discussion(props: {comments: WorkspaceComment[];onChange: (comments: WorkspaceComment[]) => void;+ onComposerReady?: (handle: ChannelComposerHandle | undefined) => void;+ richComposer?: boolean;}) {const [expanded, setExpanded] = createSignal(true);const [replying, setReplying] = createSignal<string>();@@ -297,6 +303,8 @@ function Discussion(props: {<div class="mt-4" data-discussion-composer><ChannelComposerlabel="Comment on company"+ richMentions={props.richComposer}+ onReady={props.onComposerReady}placeholder="Leave a comment..."onSend={(body) => send(body)}/>@@ -706,7 +714,10 @@ function CompanyTeam(props: { company: SampleCompany }) {);}-function CompanyTasks(props: { company: SampleCompany }) {+function CompanyTasks(props: {+ company: SampleCompany;+ onOpen?: (id: string) => void;+}) {const [search, setSearch] = createSignal('');const tasks = () =>(props.company.tasks ?? []).filter((task) =>@@ -753,10 +764,15 @@ function CompanyTasks(props: { company: SampleCompany }) {</div><For each={group.tasks}>{(task) => (- <div class="sample-record-task">- <PropertyValueIcon- optionId={STATUS_IDS[task.status]}- class="size-4"+ <Dynamic+ component={props.onOpen ? 'button' : 'div'}+ type={props.onOpen ? 'button' : undefined}+ class="sample-record-task"+ onClick={() => props.onOpen?.(task.id)}+ >+ <ListChecks+ class="size-4 shrink-0 text-task"+ aria-label="Task"/><span class="truncate font-medium">{task.title}</span><span class="sample-record-task-priority">@@ -770,7 +786,7 @@ function CompanyTasks(props: { company: SampleCompany }) {<PersonIcon person={task.owner} /><span>{homepagePeople[task.owner].shortName}</span></span>- </div>+ </Dynamic>)}</For></>@@ -814,6 +830,12 @@ export function CompanyRecord(props: {panelOpen: boolean;onPanelChange: (open: boolean) => void;onOpenItem: (view: WorkspaceView, id: string) => void;+ pipeline?: JSX.Element;+ onComposerReady?: (handle: ChannelComposerHandle | undefined) => void;+ richComposer?: boolean;+ hideCopyLink?: boolean;+ onOpenCall?: (id: string) => void;+ onOpenTask?: (id: string) => void;}) {const w = props.workspace;const update = (patch: Partial<SampleCompany>) =>@@ -839,6 +861,15 @@ export function CompanyRecord(props: {data-panel-open={props.panelOpen ? 'true' : 'false'}><div class="sample-company-topbar">+ <Button+ class="sample-company-mobile-back"+ variant="ghost"+ size="icon-sm"+ label={`Back to ${w.companyFilter()}`}+ onClick={() => w.open('crm')}+ >+ <ArrowLeft />+ </Button><nav aria-label="CRM record location" class="sample-company-crumbs"><buttontype="button"@@ -885,22 +916,24 @@ export function CompanyRecord(props: {/></div><div class="ml-auto flex shrink-0 items-center gap-1">- <Button- variant="outline"- size="sm"- class="sample-company-copy shrink-0 bg-surface"- label="Copy company link"- onClick={() =>- void navigator.clipboard- ?.writeText(- `${location.origin}/demo#company-${props.company.id}`- )- .catch(() => {})- }- >- <LinkIcon class="size-3.5" />- <span>Copy link</span>- </Button>+ <Show when={!props.hideCopyLink}>+ <Button+ variant="outline"+ size="sm"+ class="sample-company-copy shrink-0 bg-surface"+ label="Copy company link"+ onClick={() =>+ void navigator.clipboard+ ?.writeText(+ `${location.origin}/demo#company-${props.company.id}`+ )+ .catch(() => {})+ }+ >+ <LinkIcon class="size-3.5" />+ <span>Copy link</span>+ </Button>+ </Show><Buttonvariant="ghost"size="icon-md"@@ -950,7 +983,10 @@ export function CompanyRecord(props: {{(text) => <Description text={text()} />}</Show></div>+ {props.pipeline}<Discussion+ onComposerReady={props.onComposerReady}+ richComposer={props.richComposer}comments={props.company.comments}onChange={(comments) => update({ comments })}/>@@ -1007,7 +1043,7 @@ export function CompanyRecord(props: {</RecordSection></Show><Show when={props.section === 'tasks'}>- <CompanyTasks company={props.company} />+ <CompanyTasks company={props.company} onOpen={props.onOpenTask} /></Show><Show when={props.section === 'calls'}><RecordSection title="Calls">@@ -1023,6 +1059,11 @@ export function CompanyRecord(props: {<PhoneCall class="size-4 shrink-0 text-ink-muted" />}title={call.title}+ onOpen={+ props.onOpenCall+ ? () => props.onOpenCall?.(call.id)+ : undefined+ }label={`${call.title} ${call.time}`}detail={<>diff --git a/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.test.tsx b/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.test.tsxindex 53cdd0c0b3..ba65c59d56 100644--- a/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.test.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.test.tsx@@ -48,7 +48,7 @@ it('opens the same palette from Search and ⌘K without changing the underlyingexpect(screen.queryByRole('dialog')).toBeNull();fireEvent.keyDown(document.body, { key: 'k', ctrlKey: true });fireEvent.input(screen.getByRole('combobox'), {- target: { value: 'Q3 launch' },+ target: { value: 'Website launch' },});fireEvent.keyDown(screen.getByRole('combobox'), { key: 'Enter' });expect(screen.queryByRole('dialog')).toBeNull();@@ -195,3 +195,22 @@ it('supports Chat search, collapsible groups, and opening a thread from the side?.getAttribute('data-thread-open')).toBe('true');});++it('keeps the workspace sidebar usable around a featured document', () => {+ render(() => (+ <DummyWorkspace+ initialView="documents"+ embedded+ demoTitle="Website brief"+ demoContent={<p>Featured collaborative document</p>}+ />+ ));+ expect(+ screen.getByRole('navigation', { name: 'Workspace navigation' })+ ).toBeTruthy();+ expect(screen.getByText('Featured collaborative document')).toBeTruthy();+ fireEvent.click(screen.getByRole('button', { name: 'Website launch plan' }));+ expect(screen.queryByText('Featured collaborative document')).toBeNull();+ fireEvent.click(screen.getByRole('button', { name: 'Website brief' }));+ expect(screen.getByText('Featured collaborative document')).toBeTruthy();+});diff --git a/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.tsx b/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.tsxindex 7fea7adfa5..66d1de087d 100644--- a/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.tsx@@ -25,6 +25,7 @@ import { Button } from '@ui';import {createSignal,For,+ type JSX,Match,onCleanup,onMount,@@ -82,6 +83,10 @@ export default function DummyWorkspace(props: {tasksShowcase?: boolean;chatSplits?: boolean;embedded?: boolean;+ /** Homepage scenes reuse this workspace chrome around their focused content. */+ demoContent?: JSX.Element;+ demoIncludesSidebar?: boolean;+ demoTitle?: string;}) {let workspaceElement!: HTMLDivElement;const showcase =@@ -451,7 +456,12 @@ export default function DummyWorkspace(props: {class="size-8 rounded-full"/></div>- <Show when={sidebar()}>+ <Show+ when={+ sidebar() &&+ !(props.demoIncludesSidebar && w.view() === props.initialView)+ }+ ><div class="dummy-sidebar"><Showwhen={w.view() === 'email'}@@ -461,6 +471,11 @@ export default function DummyWorkspace(props: {fallback={<WorkspaceSidebarworkspace={w}+ demoTitle={+ w.view() === props.initialView+ ? props.demoTitle+ : undefined+ }title={title()}collapse={() => setSidebar(false)}create={create}@@ -552,60 +567,75 @@ export default function DummyWorkspace(props: {</Button></div></Show>- <Switch>- <Match when={w.contentView() === 'tasks'}>- <Show- when={taskWorkspace}- fallback={<WorkspaceTasks workspace={w} filter={filter()} />}- >- {(controller) => <TasksWorkspaceMain state={controller()} />}- </Show>- </Match>- <Match when={w.contentView() === 'email'}>- <WorkspaceEmail- workspace={w}- tag={mailTag()}- onClearTag={() => setMailTag(undefined)}- tab={mailTab()}- account={account()}- navigationOpen={sidebar()}- onToggleNavigation={() => setSidebar(!sidebar())}- />- </Match>- <Match when={w.contentView() === 'spreadsheet'}>- <WorkspaceSpreadsheet workspace={w} />- </Match>- <Match when={w.contentView() === 'documents'}>- <WorkspaceDocuments workspace={w} />- </Match>- <Match when={w.contentView() === 'messages'}>- <Show- when={showcase && w.channel() === 'product-feedback'}- fallback={+ <Show+ when={+ props.demoContent &&+ w.view() === props.initialView &&+ !w.selected()+ }+ fallback={+ <Switch>+ <Match when={w.contentView() === 'tasks'}><Show- when={props.chatSplits}- fallback={<WorkspaceChannel workspace={w} />}+ when={taskWorkspace}+ fallback={+ <WorkspaceTasks workspace={w} filter={filter()} />+ }>- <ChannelWorkSurface workspace={w} />+ {(controller) => (+ <TasksWorkspaceMain state={controller()} />+ )}</Show>- }- >- <AgentFeedbackWorkflow workspace={w} />- </Show>- </Match>- <Match when={w.contentView() === 'agents'}>- <WorkspaceAgents workspace={w} />- </Match>- <Match when={w.contentView() === 'home'}>- <WorkspaceAgents workspace={w} home />- </Match>- <Match when={w.contentView() === 'calendar'}>- <WorkspaceCalendar workspace={w} />- </Match>- <Match when={w.contentView() === 'crm'}>- <WorkspaceCompanies workspace={w} />- </Match>- </Switch>+ </Match>+ <Match when={w.contentView() === 'email'}>+ <WorkspaceEmail+ workspace={w}+ tag={mailTag()}+ onClearTag={() => setMailTag(undefined)}+ tab={mailTab()}+ account={account()}+ navigationOpen={sidebar()}+ onToggleNavigation={() => setSidebar(!sidebar())}+ />+ </Match>+ <Match when={w.contentView() === 'spreadsheet'}>+ <WorkspaceSpreadsheet workspace={w} />+ </Match>+ <Match when={w.contentView() === 'documents'}>+ <WorkspaceDocuments workspace={w} />+ </Match>+ <Match when={w.contentView() === 'messages'}>+ <Show+ when={showcase && w.channel() === 'product-feedback'}+ fallback={+ <Show+ when={props.chatSplits}+ fallback={<WorkspaceChannel workspace={w} />}+ >+ <ChannelWorkSurface workspace={w} />+ </Show>+ }+ >+ <AgentFeedbackWorkflow workspace={w} />+ </Show>+ </Match>+ <Match when={w.contentView() === 'agents'}>+ <WorkspaceAgents workspace={w} />+ </Match>+ <Match when={w.contentView() === 'home'}>+ <WorkspaceAgents workspace={w} home />+ </Match>+ <Match when={w.contentView() === 'calendar'}>+ <WorkspaceCalendar workspace={w} />+ </Match>+ <Match when={w.contentView() === 'crm'}>+ <WorkspaceCompanies workspace={w} />+ </Match>+ </Switch>+ }+ >+ {props.demoContent}+ </Show></div></div></div>diff --git a/apps/marketing/src/features/marketing/components/workspace/WorkspaceCompanies.tsx b/apps/marketing/src/features/marketing/components/workspace/WorkspaceCompanies.tsxindex 9aa848ff3e..c0ee0bc9f1 100644--- a/apps/marketing/src/features/marketing/components/workspace/WorkspaceCompanies.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/WorkspaceCompanies.tsx@@ -1,9 +1,10 @@import BuildingOffice from '@phosphor/building-office.svg';-import { createEffect, createSignal, For, on, Show } from 'solid-js';+import { createEffect, createSignal, For, type JSX, on, Show } from 'solid-js';import type { WorkspaceView } from '../../core/dummy-workspace';import { homepagePeople } from '../../core/homepage-demo-people';import { dealStages, type SampleCompany } from '../../core/workspace-fixtures';import type { DummyWorkspace } from '../../primitives/createDummyWorkspace';+import type { ChannelComposerHandle } from '../email/frozen/ChannelComposer';import { SearchBar } from '../email/frozen/SearchBar';import { CompanyRecord, type CompanySection, StageIcon } from './CompanyRecord';@@ -32,6 +33,12 @@ const byRecency = (a: SampleCompany, b: SampleCompany) =>*/export function WorkspaceCompanies(props: {workspace: DummyWorkspace;+ hideCopyLink?: boolean;+ onComposerReady?: (handle: ChannelComposerHandle | undefined) => void;+ richComposer?: boolean;+ onOpenCall?: (id: string) => void;+ onOpenTask?: (id: string) => void;+ pipeline?: (company: SampleCompany) => JSX.Element;/** The floating details panel is closed by default, as in the app. */initialPanelOpen?: boolean;section?: CompanySection;@@ -205,8 +212,14 @@ export function WorkspaceCompanies(props: {>{(company) => (<CompanyRecord+ onComposerReady={props.onComposerReady}+ richComposer={props.richComposer}workspace={w}company={company()}+ onOpenCall={props.onOpenCall}+ onOpenTask={props.onOpenTask}+ hideCopyLink={props.hideCopyLink}+ pipeline={props.pipeline?.(company())}section={props.section ?? localSection()}onSectionChange={(section) => {setLocalSection(section);diff --git a/apps/marketing/src/features/marketing/components/workspace/WorkspaceDocuments.tsx b/apps/marketing/src/features/marketing/components/workspace/WorkspaceDocuments.tsxindex 6122ed53cf..4131cde5e0 100644--- a/apps/marketing/src/features/marketing/components/workspace/WorkspaceDocuments.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/WorkspaceDocuments.tsx@@ -58,6 +58,7 @@ export function WorkspaceDocuments(props: {onShare?: () => void;sharingDescription?: string;hideCollectionNavigation?: boolean;+ backLabel?: string;}) {const w = props.workspace;const [panel, setPanel] = createSignal<boolean>();@@ -177,7 +178,10 @@ export function WorkspaceDocuments(props: {<Buttonvariant="plain"size="icon-sm"- label={w.view() === 'home' ? 'Back to Home' : 'Back to files'}+ label={+ props.backLabel ??+ (w.view() === 'home' ? 'Back to Home' : 'Back to files')+ }onClick={() => w.backToCollection('documents')}><ArrowLeft />@@ -211,6 +215,7 @@ export function WorkspaceDocuments(props: {);w.openItem('messages');}}+ data-document-share><Show when={props.onShare} fallback={<Hash />}><Share />diff --git a/apps/marketing/src/features/marketing/components/workspace/WorkspaceEmail.test.tsx b/apps/marketing/src/features/marketing/components/workspace/WorkspaceEmail.test.tsxindex 444f066251..801aeedca6 100644--- a/apps/marketing/src/features/marketing/components/workspace/WorkspaceEmail.test.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/WorkspaceEmail.test.tsx@@ -68,9 +68,7 @@ it('edits sample tags in the details panel and keeps them after reopening', asynaccount="all"/>));- fireEvent.click(- view.getByRole('button', { name: 'Read Next steps for our team' })- );+ fireEvent.click(view.getByRole('button', { name: 'Read Homepage feedback' }));fireEvent.click(view.getByRole('button', { name: 'Toggle email details' }));fireEvent.pointerDown(view.getByRole('button', { name: 'Add tags' }), {button: 0,@@ -93,7 +91,7 @@ it('edits sample tags in the details panel and keeps them after reopening', asyn));const row = view.getByRole('button', {- name: 'Read Next steps for our team',+ name: 'Read Homepage feedback',});expect(within(row).getAllByText('Launch').length).toBeGreaterThan(0);expect(within(row).queryByText('Customers')).toBeNull();diff --git a/apps/marketing/src/features/marketing/components/workspace/WorkspaceEventDetails.tsx b/apps/marketing/src/features/marketing/components/workspace/WorkspaceEventDetails.tsxindex 40363a89da..240e9003fe 100644--- a/apps/marketing/src/features/marketing/components/workspace/WorkspaceEventDetails.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/WorkspaceEventDetails.tsx@@ -84,8 +84,8 @@ export function WorkspaceEventDetails(props: {<Calendar /><span>{props.event.calendar === 'personal'- ? '[email protected]'- : '[email protected]'}+ ? '[email protected]'+ : '[email protected]'}</span></div><div class="sample-event-detail-row">diff --git a/apps/marketing/src/features/marketing/components/workspace/WorkspaceSidebar.tsx b/apps/marketing/src/features/marketing/components/workspace/WorkspaceSidebar.tsxindex 513e500f03..a0d78bd52d 100644--- a/apps/marketing/src/features/marketing/components/workspace/WorkspaceSidebar.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/WorkspaceSidebar.tsx@@ -39,6 +39,7 @@ function Group(props: { title: string; children: JSX.Element }) {function WorkspaceSidebarOther(props: {workspace: DummyWorkspace;title: string;+ demoTitle?: string;collapse: () => void;create: () => void;navigate: (view: WorkspaceView, id?: string) => void;@@ -215,6 +216,14 @@ function WorkspaceSidebarOther(props: {</For></ViewSidebar.Nav><Group title="Favorites">+ <Show when={props.demoTitle}>+ <ViewSidebar.Item+ active={!w.selected()}+ onClick={() => props.navigate(w.view())}+ >+ <span class="truncate">{props.demoTitle}</span>+ </ViewSidebar.Item>+ </Show><For each={w.data.documents.slice(0, 3)}>{(doc) => (<ViewSidebar.Item@@ -331,6 +340,14 @@ function WorkspaceSidebarOther(props: {/></Show><ViewSidebar.Nav aria-label="Recent conversations">+ <Show when={props.demoTitle}>+ <ViewSidebar.Item+ active={!w.selected()}+ onClick={() => props.navigate(w.view())}+ >+ <span class="truncate">{props.demoTitle}</span>+ </ViewSidebar.Item>+ </Show><Foreach={sampleAgentSessions.filter((session) =>session.title@@ -447,7 +464,7 @@ function WorkspaceSidebarOther(props: {<Group title="Calendars"><div class="flex items-center gap-2 px-2 py-2 text-sm"><Calendar class="size-4" /></div><label class="flex items-center gap-2 px-2 text-sm"><inputdiff --git a/apps/marketing/src/features/marketing/components/workspace/frozen/TaskComposer.tsx b/apps/marketing/src/features/marketing/components/workspace/frozen/TaskComposer.tsxindex 813e8a1ac7..4164a620ab 100644--- a/apps/marketing/src/features/marketing/components/workspace/frozen/TaskComposer.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/frozen/TaskComposer.tsx@@ -28,6 +28,11 @@ export function TaskComposer(props: {update: (patch: Partial<WorkspaceTask>) => void;submit: () => void;close: () => void;+ priorityPlayback?: {+ open: boolean;+ onOpenChange: (open: boolean) => void;+ automatic?: boolean;+ };}) {const [createMore, setCreateMore] = createSignal(false);const [shared, setShared] = createSignal(true);@@ -95,6 +100,7 @@ export function TaskComposer(props: {/><TaskPriorityMenutask={props.draft}+ playback={props.priorityPlayback}onSave={(priority) => props.update({ priority })}/><TaskOwnerMenudiff --git a/apps/marketing/src/features/marketing/components/workspace/frozen/TaskProperties.tsx b/apps/marketing/src/features/marketing/components/workspace/frozen/TaskProperties.tsxindex 3e6a01c972..f7b350c4aa 100644--- a/apps/marketing/src/features/marketing/components/workspace/frozen/TaskProperties.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/frozen/TaskProperties.tsx@@ -57,9 +57,18 @@ function PropertyMenu<T extends string>(props: {icon: (value: T) => JSX.Element;inline?: boolean;display?: (value: T) => string;+ playback?: {+ open: boolean;+ onOpenChange: (open: boolean) => void;+ automatic?: boolean;+ };}) {return (- <Dropdown modal={false}>+ <Dropdown+ modal={false}+ open={props.playback?.open}+ onOpenChange={props.playback?.onOpenChange}+ ><Dropdown.Triggeraria-label={`Change ${props.label}`}data-slot="property-pill"@@ -84,12 +93,21 @@ function PropertyMenu<T extends string>(props: {depth={3}class="max-h-96 overflow-hidden flex flex-col w-56 max-w-70 p-0 text-sm"portalScope="local"+ onOpenAutoFocus={(event) => {+ if (props.playback?.automatic) event.preventDefault();+ }}+ onCloseAutoFocus={(event) => {+ if (props.playback?.automatic) event.preventDefault();+ }}><Dropdown.Group><Dropdown.GroupLabel>{props.label}</Dropdown.GroupLabel><For each={props.options}>{(value) => (- <Dropdown.Item onSelect={() => props.onSave(value)}>+ <Dropdown.Item+ data-demo-property-value={`${props.label}:${value}`}+ onSelect={() => props.onSave(value)}+ >{props.icon(value)}<span>{props.display?.(value) ?? value}</span><span class="ml-auto text-ink-muted">@@ -128,6 +146,11 @@ export function TaskPriorityMenu(props: {task: WorkspaceTask;onSave: (value: TaskPriority) => void;inline?: boolean;+ playback?: {+ open: boolean;+ onOpenChange: (open: boolean) => void;+ automatic?: boolean;+ };}) {return (<PropertyMenu@@ -136,6 +159,7 @@ export function TaskPriorityMenu(props: {options={Object.keys(PRIORITY_IDS) as TaskPriority[]}onSave={props.onSave}inline={props.inline}+ playback={props.playback}icon={(value) => (<PropertyValueIconoptionId={PRIORITY_IDS[value]}diff --git a/apps/marketing/src/features/marketing/components/workspace/workspace-companies.css b/apps/marketing/src/features/marketing/components/workspace/workspace-companies.cssindex 2d0957ecc9..ab5a1a64af 100644--- a/apps/marketing/src/features/marketing/components/workspace/workspace-companies.css+++ b/apps/marketing/src/features/marketing/components/workspace/workspace-companies.css@@ -76,7 +76,7 @@ button.sample-record-row:hover, div.sample-record-row:hover { background: var(--.sample-record-row-content { display: flex; align-items: center; gap: 8px; min-width: 0; }.sample-record-row-title { flex-shrink: 0; max-width: 45%; }.sample-record-row-detail { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: color-mix(in srgb, var(--color-ink) 50%, transparent); }-.sample-record-row-detail > .text-ink { flex-shrink: 0; }+.sample-record-row-detail > .text-ink { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.sample-record-row-time { text-align: right; font-size: 12px; color: var(--color-ink-extra-muted); }.sample-record-people { display: inline-flex; flex-shrink: 0; }.sample-record-people > * { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--color-panel); object-fit: cover; }@@ -117,3 +117,6 @@ button.sample-record-row:hover, div.sample-record-row:hover { background: var(--.sample-company-row[data-header] > span { white-space: nowrap; }.sample-company-row > :nth-child(3), .sample-company-row > :nth-child(4), .sample-company-row-domain { display: none; }}++.sample-company-mobile-back { display: none; }+@media (max-width: 699px) { .sample-company-mobile-back { display: inline-flex; flex: none; } }diff --git a/apps/marketing/src/features/marketing/core/crm-demo.ts b/apps/marketing/src/features/marketing/core/crm-demo.tsindex 2bd3730f13..3e7bd3b988 100644--- a/apps/marketing/src/features/marketing/core/crm-demo.ts+++ b/apps/marketing/src/features/marketing/core/crm-demo.ts@@ -2,29 +2,29 @@ export const CRM_DEMO_DURATION = 14000;export const CRM_DEMO_COMPANIES = [{id: 'northwind',- name: 'Northwind',- domain: 'northwind.example',+ name: 'Keystone Mechanical',+ domain: 'keystone.example',stage: 0,- initials: 'N',+ initials: 'K',},{id: 'fieldnote',- name: 'Fieldnote',- domain: 'fieldnote.example',+ name: 'Panelwork Research',+ domain: 'panelwork.example',stage: 0,- initials: 'F',+ initials: 'P',},{id: 'lumen',- name: 'Lumen',- domain: 'lumen.example',+ name: 'Bookend Retail',+ domain: 'bookend.example',stage: 1,- initials: 'L',+ initials: 'B',},{id: 'relay',- name: 'Relay',- domain: 'relay.example',+ name: 'Replywell',+ domain: 'replywell.example',stage: 2,initials: 'R',},@@ -62,9 +62,9 @@ export function crmDemoFrame(t: number) {lumenStage: t >= 10600 ? 2 : 1,status:t >= 10600- ? 'Northwind → Proposal · Lumen → Closed won'+ ? 'Keystone Mechanical → Proposal · Bookend Retail → Closed won': second- ? 'Moving Lumen to Closed won'- : 'Moving Northwind to Proposal',+ ? 'Moving Bookend Retail to Closed won'+ : 'Moving Keystone Mechanical to Proposal',};}diff --git a/apps/marketing/src/features/marketing/core/demo-email.ts b/apps/marketing/src/features/marketing/core/demo-email.tsindex b64c7c7e28..b23b4b4794 100644--- a/apps/marketing/src/features/marketing/core/demo-email.ts+++ b/apps/marketing/src/features/marketing/core/demo-email.ts@@ -1,4 +1,9 @@// Demonstration data only; no customer inbox content or app service access.+export const demoMailAccounts = [+ { id: 'work', label: '[email protected]' },+ { id: 'personal', label: '[email protected]' },+ { id: 'outlook', label: '[email protected]' },+] as const;export const emailTags = [{ id: 'launch', label: 'Launch', color: '#F5D90A' },{ id: 'customers', label: 'Customers', color: '#E93D82' },@@ -13,7 +18,7 @@ export type DemoEmail = {subject: string;snippet: string;time: string;- account: 'work' | 'personal';+ account: 'work' | 'personal' | 'outlook';tags?: EmailTagId[];favorite?: boolean;unread?: boolean;@@ -25,9 +30,10 @@ export const demoEmails: readonly DemoEmail[] = [id: 'dana',tags: ['customers', 'follow-up'],favorite: true,- sender: 'Dana',- subject: 'Next steps for our team',- snippet: 'Thursday at 9 works. Could you share the rollout plan?',+ sender: 'Valentina',+ subject: 'Homepage feedback',+ snippet:+ 'The demo is looking good. Can we make the mobile scroll feel more natural?',time: '9:41 AM',account: 'work',unread: true,@@ -83,7 +89,7 @@ export const demoEmails: readonly DemoEmail[] = [id: 'plan',tags: ['launch', 'customers'],favorite: true,- sender: 'Julia, Dana',+ sender: 'Julia, Valentina',subject: 'Team rollout plan',snippet: 'Here are the next steps we discussed on the call.',time: 'Sep 28',diff --git a/apps/marketing/src/features/marketing/core/demo-mentions.ts b/apps/marketing/src/features/marketing/core/demo-mentions.tsindex d78b6c9c6d..830a32c755 100644--- a/apps/marketing/src/features/marketing/core/demo-mentions.ts+++ b/apps/marketing/src/features/marketing/core/demo-mentions.ts@@ -28,7 +28,7 @@ export const demoMentions: DemoMention[] = [shortName: homepagePeople[id].shortName,})),- { id: 'plan', label: 'Q3 launch plan', kind: 'document' },+ { id: 'plan', label: 'Website launch plan', kind: 'document' },{id: 'announcement',label: 'Write the launch announcement',@@ -43,7 +43,7 @@ export const demoMentions: DemoMention[] = [kind: 'task',status: 'Not Started',},- { id: 'claude', label: 'Claude', kind: 'agent' },+ { id: 'claude', label: 'Claude', kind: 'person' },{ id: 'notes', label: 'Demo call notes', kind: 'document' },{id: 'deploy',diff --git a/apps/marketing/src/features/marketing/core/dummy-workspace.ts b/apps/marketing/src/features/marketing/core/dummy-workspace.tsindex c35be8e29e..fb849391bd 100644--- a/apps/marketing/src/features/marketing/core/dummy-workspace.ts+++ b/apps/marketing/src/features/marketing/core/dummy-workspace.ts@@ -123,11 +123,11 @@ export function dummyData(): DummyData {],['follow-up',- 'Send Dana the rollout plan',+ 'Send Valentina the rollout plan','Not Started','Medium','jacob',- 'Share the rollout plan with Dana and confirm the follow-up meeting.',+ 'Share the rollout plan with Valentina and confirm the follow-up meeting.',],['deploy',@@ -179,11 +179,11 @@ export function dummyData(): DummyData {],['design',- 'Review the mobile navigation',+ 'Fix mobile demo scrolling','In Progress','High','valentina',- 'Review touch targets and the task detail on smaller screens.',+ 'Keep page scrolling natural around the interactive homepage demo. Check touch targets and the transition at phone widths.',],['metrics',@@ -287,7 +287,7 @@ export function dummyData(): DummyData {{id: 'plan',tags: ['Launch', 'Product'],- title: 'Q3 launch plan',+ title: 'Website launch plan',body: 'One shared workspace. One great launch.\n\n## Launch checklist\n\n- [x] Finalize the product story\n- [x] Review the launch announcement\n- [ ] Send the customer email\n- [ ] Publish the changelog\n\n## Owners\n\n**Julia** — announcement and customer email\n**Teo** — deploy and release checks\n**Jacob** — customer conversations',comments: [],},@@ -302,7 +302,7 @@ export function dummyData(): DummyData {id: 'notes',tags: ['Customers', 'Follow up'],title: 'Demo call notes',- body: '## The Meadow\n\nDana’s team wants email, tasks, and documents in one workspace.\n\n## Follow-up\n\nShare the rollout plan. Julia will help with setup. Thursday at 9 works for the follow-up.',+ body: '## The Meadow\n\nValentina’s team wants email, tasks, and documents in one workspace.\n\n## Follow-up\n\nShare the rollout plan. Julia will help with setup. Thursday at 9 works for the follow-up.',comments: [],},...extraWorkspaceDocuments(),diff --git a/apps/marketing/src/features/marketing/core/email-demo-story.ts b/apps/marketing/src/features/marketing/core/email-demo-story.tsnew file mode 100644index 0000000000..c80c5630da--- /dev/null+++ b/apps/marketing/src/features/marketing/core/email-demo-story.ts@@ -0,0 +1,248 @@+import { type DemoEmail, demoEmails } from './demo-email';++/** One fictional customer conversation, reused across the Mail page stories. */+export const meetingEmail = {+ ...demoEmails[0],+ subject: 'Thursday demo',+ snippet: 'Thursday at 9 works. Could you send the setup plan?',+ body: 'Hi Jacob,\n\nThursday at 9 works for me. Could you send the setup plan before we meet?\n\nThanks,\nValentina',+};+export const meetingReply =+ 'Could you also send a short setup guide? I’ll read it before Thursday.';+export const meetingDraft = {+ subject: 'Re: Thursday demo',+ to: 'Valentina <[email protected]>',+ cc: 'Julia <[email protected]>',+ body: 'Hi Valentina,\n\nThursday at 9 works. Here’s the setup plan and Macro overview. I’ve copied Julia, who can help with setup.\n\nSee you Thursday,\nJacob',+};++/** Three populated, fictional inboxes, isolated to the Mail page. */+export const emailPageInbox: readonly (DemoEmail & { body?: string })[] = [+ meetingEmail,+ ...demoEmails.slice(1).map((email) => ({+ ...email,+ ...(email.id === 'julia'+ ? {+ subject: 'Quick review',+ snippet: 'Can you check the draft before I send it?',+ }+ : {}),+ ...(email.id === 'teo'+ ? {+ subject: 'Meeting notes',+ snippet:+ 'Here are the notes from this morning. Let me know if I missed anything.',+ }+ : {}),+ ...(email.id === 'plan'+ ? {+ subject: 'Setup plan',+ snippet: 'I added the steps we discussed on the call.',+ }+ : {}),+ })),+ {+ id: 'pilot-seats',+ sender: 'Alex',+ subject: 'Access for the team',+ snippet: 'Here’s the list of people who need access.',+ time: '8:52 AM',+ account: 'outlook',+ unread: true,+ tags: ['customers'],+ },+ {+ id: 'onboarding',+ sender: 'Julia',+ subject: 'Checklist for Thursday',+ snippet: 'I added the setup steps. Can you check the last two items?',+ time: '8:46 AM',+ account: 'work',+ tags: ['follow-up'],+ },+ {+ id: 'proposal-review',+ sender: 'Maya',+ subject: 'A question about the plan',+ snippet: 'Could we talk through the dates before I share this?',+ time: '8:35 AM',+ account: 'outlook',+ unread: true,+ },+ {+ id: 'design-review',+ sender: 'Teo',+ subject: 'Ready for review',+ snippet: 'The changes are ready. I left a few notes in the document.',+ time: '8:21 AM',+ account: 'work',+ tags: ['product'],+ },+ {+ id: 'invite-list',+ sender: 'Olivia',+ subject: 'Re: Invitations',+ snippet: 'I added the last two names. Ready to send.',+ time: '8:08 AM',+ account: 'personal',+ },+ {+ id: 'research-notes',+ sender: 'Sam',+ subject: 'Notes from our call',+ snippet: 'I wrote up the questions we discussed.',+ time: '7:54 AM',+ account: 'work',+ tags: ['product'],+ },+ {+ id: 'training',+ sender: 'Priya',+ subject: 'Meeting agenda',+ snippet: 'Can we start with email and leave time for questions?',+ time: '7:45 AM',+ account: 'outlook',+ unread: true,+ },+ {+ id: 'case-study',+ sender: 'Alex',+ subject: 'Draft for review',+ snippet: 'I made your changes. Could you check the introduction?',+ time: '7:31 AM',+ account: 'work',+ },+ {+ id: 'pilot-feedback',+ sender: 'Valentina',+ subject: 'First-week feedback',+ snippet: 'Here are a few things we noticed this week.',+ time: 'Yesterday',+ account: 'personal',+ yesterday: true,+ tags: ['customers'],+ },+ {+ id: 'release-check',+ sender: 'Teo',+ subject: 'Final checklist',+ snippet: 'Everything is checked off except the announcement.',+ time: 'Yesterday',+ account: 'work',+ yesterday: true,+ tags: ['launch'],+ },+ {+ id: 'security-review',+ sender: 'Noah',+ subject: 'Access approved',+ snippet: 'The team has access now. Let me know if anyone is missing.',+ time: 'Yesterday',+ account: 'outlook',+ yesterday: true,+ },+ {+ id: 'budget',+ sender: 'Julia',+ subject: 'October budget review',+ snippet: 'I updated the figures with the latest estimates.',+ time: 'Yesterday',+ account: 'work',+ yesterday: true,+ },+ {+ id: 'meeting-notes',+ sender: 'Olivia',+ subject: 'Team meeting notes',+ snippet: 'We agreed to start on Monday. I added the next steps.',+ time: 'Yesterday',+ account: 'personal',+ yesterday: true,+ },+ {+ id: 'launch-assets',+ sender: 'Maya',+ subject: 'Final screenshots',+ snippet: 'Here are the exports for the launch page and customer email.',+ time: 'Yesterday',+ account: 'work',+ yesterday: true,+ tags: ['launch'],+ },+ {+ id: 'renewal',+ sender: 'Priya',+ subject: 'Next steps',+ snippet: 'Could we schedule a quick call next week?',+ time: 'Yesterday',+ account: 'outlook',+ yesterday: true,+ tags: ['follow-up'],+ },+ {+ id: 'metrics',+ sender: 'Alex',+ subject: 'Weekly report',+ snippet: 'The report is ready. The summary is on the first page.',+ time: 'Yesterday',+ account: 'work',+ yesterday: true,+ },+ {+ id: 'docs-feedback',+ sender: 'Sam',+ subject: 'Setup guide edits',+ snippet: 'I shortened the first section and added two screenshots.',+ time: 'Yesterday',+ account: 'work',+ yesterday: true,+ },+ {+ id: 'contract',+ sender: 'Noah',+ subject: 'Updated agreement',+ snippet: 'I updated the agreement with the revised start date.',+ time: 'Yesterday',+ account: 'outlook',+ yesterday: true,+ },+ {+ id: 'product-digest',+ sender: 'Product Brief',+ subject: 'Your weekly product roundup',+ snippet: 'New releases and ideas from teams building collaboration tools.',+ time: 'Yesterday',+ account: 'work',+ yesterday: true,+ noise: true,+ },+ {+ id: 'workspace-report',+ sender: 'Workspace updates',+ subject: 'Your weekly activity summary',+ snippet: 'Here’s what changed across your projects this week.',+ time: 'Yesterday',+ account: 'personal',+ yesterday: true,+ noise: true,+ },+ {+ id: 'invoice',+ sender: 'Billing',+ subject: 'Your October receipt',+ snippet: 'Your payment has been received. Thank you.',+ time: 'Yesterday',+ account: 'personal',+ yesterday: true,+ noise: true,+ },+ {+ id: 'feedback-followup',+ sender: 'Valentina',+ subject: 'Re: Shared email permissions',+ snippet: 'That answers our question. Thanks for walking us through it.',+ time: 'Yesterday',+ account: 'work',+ yesterday: true,+ },+];diff --git a/apps/marketing/src/features/marketing/core/feature-comparisons.ts b/apps/marketing/src/features/marketing/core/feature-comparisons.tsindex 0d70793cf9..a08a7fa88c 100644--- a/apps/marketing/src/features/marketing/core/feature-comparisons.ts+++ b/apps/marketing/src/features/marketing/core/feature-comparisons.ts@@ -1,13 +1,24 @@+// Workflow comparisons reviewed 2026-10-20 against official product docs below.+// A partial mark describes a concrete scope, setup, or product-boundary difference.+// Do not turn subjective speed or quality claims into check/slash ratings.export type FeatureComparison = {id: string;question: string;competitor: string;- rows: readonly { feature: string; macro: boolean; competitor: boolean }[];+ rows: readonly {+ feature: string;+ macro: boolean | 'partial';+ competitor: boolean | 'partial';+ macroNote?: string;+ competitorNote?: string;+ }[];article?: { label: string; href: string };/** Evidence for maintainers; the public table stays compact. */sources: readonly string[];};+// Compare verified multi-account support, not a combined feed: Superhuman's+// Help Center and general blog contradict each other on a unified inbox.export const emailComparisons: readonly FeatureComparison[] = [{id: 'superhuman',@@ -15,30 +26,29 @@ export const emailComparisons: readonly FeatureComparison[] = [competitor: 'Superhuman Mail',rows: [{- feature: 'Use your existing Gmail address',+ feature: 'Keyboard navigation and command menu',macro: true,competitor: true,},- { feature: 'Multiple email accounts', macro: true, competitor: true },{- feature: 'Unified inbox across email accounts',+ feature: 'Manage multiple email accounts',macro: true,- competitor: false,+ competitor: true,},- { feature: 'Keyboard shortcuts', macro: true, competitor: true },- { feature: 'AI email drafting', macro: true, competitor: true },{- feature: 'Agents that draft and send email',+ feature: 'Share live email threads with teammates',macro: true,competitor: true,},{- feature: 'Share individual live threads without forwarding',+ feature: 'Draft replies using docs and meeting context',macro: true,- competitor: true,+ competitor: 'partial',+ competitorNote:+ 'Broader document and meeting context comes through Superhuman Go and its connectors, beyond Mail itself.',},{- feature: 'Email, tasks, and chat in one inbox',+ feature: 'Email, tasks, and chat in one feed',macro: true,competitor: false,},@@ -48,7 +58,11 @@ export const emailComparisons: readonly FeatureComparison[] = [href: '/posts/superhuman-alternative',},sources: [+ 'https://help.superhuman.com/hc/en-us/articles/46005789591693-Speed-Up-With-Shortcuts',+ 'https://help.superhuman.com/hc/en-us/articles/46242137727757-Explore-Superhuman-Go-agents-and-connectors','https://help.superhuman.com/hc/en-us/articles/46005777934733-Managing-Accounts',+ 'https://help.superhuman.com/hc/en-us/articles/46005722297229-Unified-Inbox-Workaround',+ 'https://blog.superhuman.com/web-email-client-guide/','https://help.superhuman.com/hc/en-us/articles/46005593675917-Shared-Conversations-and-Team-Comments','https://help.superhuman.com/hc/en-us/articles/46005696690317-Superhuman-Mail-MCP-Server',],@@ -59,30 +73,36 @@ export const emailComparisons: readonly FeatureComparison[] = [competitor: 'Gmail',rows: [{- feature: 'Use your existing Gmail address',+ feature: 'Keyboard navigation and command menu',macro: true,- competitor: true,+ competitor: 'partial',+ competitorNote:+ 'Gmail supports navigation and action shortcuts after enabling them. Its shortcut help lists commands rather than offering a searchable action menu.',},- { feature: 'Keyboard shortcuts', macro: true, competitor: true },- { feature: 'AI email drafting', macro: true, competitor: true },{- feature: 'Read email beside your inbox',+ feature: 'Manage multiple email accounts',macro: true,competitor: true,},{- feature: 'Share individual live threads without forwarding',+ feature: 'Share live email threads with teammates',macro: true,competitor: false,},{- feature: 'Email, tasks, and chat in one inbox',+ feature: 'Draft replies using docs and meeting context',+ macro: true,+ competitor: true,+ },+ {+ feature: 'Email, tasks, and chat in one feed',macro: true,competitor: false,},- { feature: 'Open source', macro: true, competitor: false },],sources: [+ 'https://support.google.com/mail/answer/6078445',+ 'https://support.google.com/accounts/answer/1721977','https://support.google.com/mail/answer/6594','https://support.google.com/mail/answer/14355636','https://support.google.com/mail/answer/6115187',@@ -97,41 +117,41 @@ export const documentComparisons: readonly FeatureComparison[] = [question: 'How does Macro compare with Notion?',competitor: 'Notion',rows: [- { feature: 'Live document collaboration', macro: true, competitor: true },- {- feature: 'Agents that create and edit docs',- macro: true,- competitor: true,- },- { feature: 'Markdown import and export', macro: true, competitor: true },- {- feature: 'Upload PDFs, images, and other files',- macro: true,- competitor: true,- },{- feature: 'Organize docs and files in folders',+ feature: 'Dedicated task manager',macro: true,- competitor: false,+ competitor: 'partial',+ competitorNote:+ 'Notion supports task databases, My tasks, and sprints. Set up or duplicate a database/template and map its task properties.',},{- feature: 'One set of tags across docs, email, and tasks',+ feature: 'Dedicated CRM',macro: true,- competitor: false,+ competitor: 'partial',+ competitorNote:+ 'Build or duplicate a CRM with Notion databases and templates. Macro has dedicated company, contact, and pipeline tools.',},{- feature: 'Read live email threads beside a doc',+ feature: 'Read live email beside your document',macro: true,- competitor: false,+ competitor: 'partial',+ competitorNote:+ 'Notion Mail and email connectors provide email access separately; they are not a live mailbox pane beside the document.',},+ { feature: 'Live document collaboration', macro: true, competitor: true },{- feature: 'Share doc access through channel mentions',+ feature: 'Agents that edit documents with you',macro: true,- competitor: false,+ competitor: true,},+ { feature: 'Custom pages and databases', macro: true, competitor: true },],article: { label: 'Macro vs. Notion', href: '/posts/notion-alternative' },sources: [+ 'https://www.notion.com/help/sprints',+ 'https://www.notion.com/help/guides/getting-started-with-templates-for-your-team',+ 'https://www.notion.com/help/guides/simple-crm-for-strengthening-client-relationships-and-managing-work',+ 'https://www.notion.com/help/get-started-with-notion-mail','https://www.notion.com/help/images-files-and-media','https://www.notion.com/help/import-data-into-notion','https://www.notion.com/help/export-your-content',@@ -151,31 +171,36 @@ export const taskComparisons: readonly FeatureComparison[] = [competitor: 'Linear',rows: [{- feature: 'Status, priority, and assignees',+ feature: 'Create tasks in built-in team chat',macro: true,- competitor: true,+ competitor: 'partial',+ competitorNote:+ 'Linear supports issue creation and synced conversations through its Slack integration; team chat is a separate app.',},- { feature: 'Create tasks from email', macro: true, competitor: true },{- feature: 'Create tasks from chat messages',+ feature: 'Keep the live email thread with a task',macro: true,- competitor: true,+ competitor: 'partial',+ competitorNote:+ 'Linear Asks supports two-way email threads for configured intake addresses. It is not a connection to your full personal or work inbox.',},{- feature: 'Update task status from GitHub',+ feature: 'Agents create and update tasks',macro: true,competitor: true,},- { feature: 'Full email client', macro: true, competitor: false },+ { feature: 'GitHub updates task status', macro: true, competitor: true },{- feature: 'Built-in team chat / channels',+ feature: 'Tasks, email, and messages in one inbox',macro: true,competitor: false,},- { feature: 'Open source', macro: true, competitor: false },],article: { label: 'Macro vs. Linear', href: '/posts/linear-alternative' },sources: [+ 'https://linear.app/docs/linear-asks-email',+ 'https://linear.app/docs/mcp',+ 'https://linear.app/docs/agents-in-linear','https://linear.app/docs/creating-issues','https://linear.app/docs/slack','https://linear.app/docs/github',@@ -187,26 +212,34 @@ export const taskComparisons: readonly FeatureComparison[] = [competitor: 'Jira',rows: [{- feature: 'Status, priority, and assignees',+ feature: 'Create tasks in built-in team chat',macro: true,- competitor: true,+ competitor: 'partial',+ competitorNote:+ 'Create work items from Slack through Atlassian integrations; team chat remains a separate app.',+ },+ {+ feature: 'Keep the live email thread with a task',+ macro: true,+ competitor: 'partial',+ competitorNote:+ 'Email handlers and Jira Service Management turn configured incoming mail into work items and comments, rather than opening your full email thread in a mailbox pane.',},- { feature: 'Task due dates', macro: true, competitor: true },- { feature: 'Create tasks from email', macro: true, competitor: true },{- feature: 'Update task status from GitHub',+ feature: 'Agents create and update tasks',macro: true,competitor: true,},- { feature: 'Full email client', macro: true, competitor: false },+ { feature: 'GitHub updates task status', macro: true, competitor: true },{- feature: 'Built-in team chat / channels',+ feature: 'Tasks, email, and messages in one inbox',macro: true,competitor: false,},- { feature: 'Open source', macro: true, competitor: false },],sources: [+ 'https://support.atlassian.com/jira-software-cloud/docs/create-work-items-with-rovo/',+ 'https://support.atlassian.com/rovo/docs/use-a-rovo-agent-to-sync-conversations-between-slack-and-jsm/','https://support.atlassian.com/jira-cloud-administration/docs/create-issues-and-comments-from-email/','https://support.atlassian.com/jira-cloud-administration/docs/integrate-with-github/','https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/',@@ -221,35 +254,39 @@ export const chatComparisons: readonly FeatureComparison[] = [competitor: 'Slack',rows: [{- feature: 'Channels, threads, and reactions',+ feature: 'Share a live email thread in chat',macro: true,- competitor: true,+ competitor: 'partial',+ competitorNote:+ 'Slack can receive forwarded emails or email-app posts. That is different from sharing the original mailbox thread with later replies.',},{- feature: 'Thread replies shown inline by default',+ feature: 'Read thread replies inline',macro: true,- competitor: false,+ competitor: 'partial',+ competitorNote:+ 'Slack primarily opens replies in a thread pane. Individual replies can also be sent to the channel.',},{- feature: 'Share docs and tasks with a channel',+ feature: 'Open docs and tasks beside the conversation',macro: true,competitor: true,},- { feature: 'Video calls', macro: true, competitor: true },{- feature: 'Agents that act on workspace content',+ feature: 'Agents create work in the conversation',macro: true,competitor: true,},- { feature: 'Full email client', macro: true, competitor: false },{- feature: 'Email, tasks, and chat in one inbox',+ feature: 'Chat, email, and task updates in one inbox',macro: true,competitor: false,},],article: { label: 'Macro vs. Slack', href: '/posts/slack-alternative' },sources: [+ 'https://slack.com/help/articles/206819278-Send-emails-to-Slack',+ 'https://slack.com/help/articles/27452748828179-Use-lists-in-Slack','https://slack.com/help/articles/115000769927-Use-threads-to-organize-discussions-','https://slack.com/help/articles/15678967614611-Manage-access-permissions-for-canvases-and-lists','https://slack.com/help/articles/4402059015315-Use-huddles-in-Slack',@@ -257,3 +294,123 @@ export const chatComparisons: readonly FeatureComparison[] = [],},];++// Reviewed 2026-10-20 against the sources below and docs/agent-guide/crm.md.+// A partial reporting mark means agent-generated summaries, not dedicated dashboards.+// Connected workspace tools receive partial credit rather than a cross.+export const crmComparisons: readonly FeatureComparison[] = [+ {+ id: 'salesforce',+ question: 'How does Macro compare with Salesforce?',+ competitor: 'Salesforce',+ rows: [+ {+ feature: 'Sales pipelines and custom fields',+ macro: true,+ competitor: true,+ },+ {+ feature: 'Draft follow-ups using customer context',+ macro: true,+ competitor: true,+ },+ {+ feature: 'Sales reporting',+ macro: 'partial',+ competitor: true,+ macroNote:+ 'Agent-generated pipeline summaries; no dedicated sales reporting dashboard.',+ },+ {+ feature: 'CRM, email, chat, docs, and calls in one app',+ macro: true,+ competitor: 'partial',+ competitorNote:+ 'CRM activity is linked to collaboration tools and connected apps. Macro keeps email, calls, documents, and team chat in the same workspace.',+ },+ ],+ sources: [+ 'https://www.salesforce.com/sales/cloud/guide/',+ 'https://help.salesforce.com/s/articleView?id=sf.einstein_sales_emails_draft.htm&language=en_US&type=5',+ 'https://help.salesforce.com/s/articleView?id=sf.collaboration_admin_welcome.htm&language=en_US&type=5',+ 'https://trailhead.salesforce.com/content/learn/projects/customize-a-sales-path-for-your-team/work-with-opportunities-in-the-kanban-view',+ 'https://help.salesforce.com/s/articleView?id=xcloud.lex_pro_tips_activity_timeline.htm&language=en_US&type=5',+ ],+ },+ {+ id: 'hubspot',+ question: 'How does Macro compare with HubSpot?',+ competitor: 'HubSpot',+ rows: [+ {+ feature: 'Sales pipelines and custom fields',+ macro: true,+ competitor: true,+ },+ {+ feature: 'Draft follow-ups using customer context',+ macro: true,+ competitor: true,+ },+ {+ feature: 'Sales reporting',+ macro: 'partial',+ competitor: true,+ macroNote:+ 'Agent-generated pipeline summaries; no dedicated sales reporting dashboard.',+ },+ {+ feature: 'CRM, email, chat, docs, and calls in one app',+ macro: true,+ competitor: 'partial',+ competitorNote:+ 'CRM activity is linked to collaboration tools and connected apps. Macro keeps email, calls, documents, and team chat in the same workspace.',+ },+ ],+ sources: [+ 'https://knowledge.hubspot.com/object-settings/select-properties-to-show-on-records-in-board-view',+ 'https://www.hubspot.com/products/email-integration',+ 'https://www.hubspot.com/products/sales/sales-reports',+ 'https://knowledge.hubspot.com/generate-sales-email-templates-with-ai-assistant',+ 'https://knowledge.hubspot.com/integrations/connect-google-drive-to-hubspot',+ ],+ },+ {+ id: 'attio',+ question: 'How does Macro compare with Attio?',+ competitor: 'Attio',+ rows: [+ {+ feature: 'Sales pipelines and custom fields',+ macro: true,+ competitor: true,+ },+ {+ feature: 'Draft follow-ups using customer context',+ macro: true,+ competitor: true,+ },+ {+ feature: 'Sales reporting',+ macro: 'partial',+ competitor: true,+ macroNote:+ 'Agent-generated pipeline summaries; no dedicated sales reporting dashboard.',+ },+ {+ feature: 'CRM, email, chat, docs, and calls in one app',+ macro: true,+ competitor: 'partial',+ competitorNote:+ 'CRM activity is linked to collaboration tools and connected apps. Macro keeps email, calls, documents, and team chat in the same workspace.',+ },+ ],+ sources: [+ 'https://attio.com/help/reference/managing-your-data/attributes/create-manage-attributes',+ 'https://attio.com/help/academy/introduction/reports',+ 'https://attio.com/help/reference/attio-ai/ask-attio/chat-with-ask-attio',+ 'https://attio.com/help/reference/apps/communication-apps/slack-app',+ 'https://attio.com/help/reference/apps/data-and-enrichment-apps/notion-app',+ ],+ },+];diff --git a/apps/marketing/src/features/marketing/core/homepage-demo-content.ts b/apps/marketing/src/features/marketing/core/homepage-demo-content.tsnew file mode 100644index 0000000000..8c29c4f26a--- /dev/null+++ b/apps/marketing/src/features/marketing/core/homepage-demo-content.ts@@ -0,0 +1,55 @@+import { dummyData } from './dummy-workspace';++/** Curated sample conversation about the website work, not copied private messages. */+export function homepageChatData() {+ const data = dummyData();+ const launch = data.channels.find((channel) => channel.id === 'launch');+ if (launch)+ launch.messages = [+ {+ id: 'website-review',+ person: 'jacob',+ time: '9:34 AM',+ body: 'Can we collect the website feedback here before we make another pass?',+ },+ {+ id: 'website-design',+ person: 'valentina',+ time: '9:36 AM',+ body: 'The layout is close. The demo should use the same screens people see in the app.',+ },+ {+ id: 'website-crm',+ person: 'teo',+ time: '9:38 AM',+ body: 'CRM has pipelines now. I’ll check the demo against the new view.',+ },+ {+ id: 'website-copy',+ person: 'julia',+ time: '9:40 AM',+ body: 'I’ll keep the captions short. Each one should explain what you can do with that screen.',+ },+ {+ id: 'website-plan',+ person: 'jacob',+ time: '9:42 AM',+ body: 'Thanks. I put the remaining checks in the launch plan.',+ documentId: 'plan',+ },+ {+ id: 'website-check',+ person: 'valentina',+ time: '9:44 AM',+ body: 'I’ll review the light version and the phone layout after this pass.',+ replyTo: 'website-plan',+ },+ {+ id: 'website-ready',+ person: 'teo',+ time: '9:46 AM',+ body: 'Sounds good. Let’s use the actual task list too, not a separate mockup.',+ },+ ];+ return data;+}diff --git a/apps/marketing/src/features/marketing/core/homepage-demo-scenes.ts b/apps/marketing/src/features/marketing/core/homepage-demo-scenes.tsnew file mode 100644index 0000000000..471e602b1e--- /dev/null+++ b/apps/marketing/src/features/marketing/core/homepage-demo-scenes.ts@@ -0,0 +1,16 @@+export const HOMEPAGE_DEMO_EVENT = 'macro-homepage-demo-view';+export const HOMEPAGE_DEMO_VIEWS = [+ 'Inbox',+ 'Chat',+ 'Docs',+ 'CRM',+ 'Tasks',+ 'Agents',+] as const;+export type HomepageDemoView = (typeof HOMEPAGE_DEMO_VIEWS)[number];+export function isHomepageDemoView(value: unknown): value is HomepageDemoView {+ return (+ typeof value === 'string' &&+ HOMEPAGE_DEMO_VIEWS.some((view) => view === value)+ );+}diff --git a/apps/marketing/src/features/marketing/core/workspace-chat-fixtures.ts b/apps/marketing/src/features/marketing/core/workspace-chat-fixtures.tsindex 506d7b9235..1a342da695 100644--- a/apps/marketing/src/features/marketing/core/workspace-chat-fixtures.ts+++ b/apps/marketing/src/features/marketing/core/workspace-chat-fixtures.ts@@ -140,7 +140,7 @@ export function sampleWorkspaceChannels(): DummyData['channels'] {'teo-case-reply','jacob','8:23 AM',- 'that’s the one Dana hit right?'+ 'that’s the one Valentina hit right?'),message('teo-confirm', 'teo', '8:24 AM', 'Yep. I’ve got a repro now.'),message(@@ -309,7 +309,7 @@ export function sampleWorkspaceChannels(): DummyData['channels'] {'m3','jacob','9:41 AM',- 'Dana confirmed Thursday. Sharing the rollout plan here.',+ 'Valentina confirmed Thursday. Sharing the rollout plan here.',{ documentId: 'rollout' }),message(@@ -492,7 +492,7 @@ export function sampleWorkspaceChannels(): DummyData['channels'] {'m5','julia','8:09 AM',- 'Meadow is starting the team rollout this week. Dana wants to begin with email and customer follow-ups.',+ 'Meadow is starting the team rollout this week. Valentina wants to begin with email and customer follow-ups.',{ documentId: 'rollout' }),message(@@ -527,7 +527,7 @@ export function sampleWorkspaceChannels(): DummyData['channels'] {'customers-invite','teo','9:02 AM',- 'Dana’s invite issue is fixed. Existing members land in the selected team after signing in.',+ 'Valentina’s invite issue is fixed. Existing members land in the selected team after signing in.',{ taskId: 'invite' }),message(@@ -587,7 +587,7 @@ export function sampleWorkspaceChannels(): DummyData['channels'] {'customers-followup','julia','10:48 AM',- 'Dana confirmed the time. I’m sending the setup steps ahead of the call.',+ 'Valentina confirmed the time. I’m sending the setup steps ahead of the call.',{ taskId: 'follow-up' }),message('customers-response', 'jacob', '10:50 AM', 'great. thanks'),diff --git a/apps/marketing/src/features/marketing/core/workspace-fixtures.ts b/apps/marketing/src/features/marketing/core/workspace-fixtures.tsindex 9ede896f1c..fc410179db 100644--- a/apps/marketing/src/features/marketing/core/workspace-fixtures.ts+++ b/apps/marketing/src/features/marketing/core/workspace-fixtures.ts@@ -191,15 +191,15 @@ export function sampleCompanies(): SampleCompany[] {'18,000'),contacts: [- { name: 'Dana', email: '[email protected]' },- { name: 'Alex', email: '[email protected]' },- { name: 'Priya', email: '[email protected]' },+ { name: 'Valentina', email: '[email protected]' },+ { name: 'Alex', email: '[email protected]' },+ { name: 'Priya', email: '[email protected]' },],comments: [{id: 'meadow-pricing',person: 'julia',- body: 'Dana asked about pricing for 12 seats now and the studio team in November. I quoted the annual team rate. @[Jacob](demo-mention:jacob) can we hold it through the end of the year?',+ body: 'Valentina asked about pricing for 12 seats now and the studio team in November. I quoted the annual team rate. @[Jacob](demo-mention:jacob) can we hold it through the end of the year?',time: '8:47 AM',},{@@ -237,7 +237,7 @@ export function sampleCompanies(): SampleCompany[] {},{id: 'meadow-invite',- sender: 'Dana',+ sender: 'Valentina',subject: 'Invitation: The Meadow · Demo',snippet: 'Thursday, October 1 · 9:00 – 10:00 AM',time: 'Sep 26',@@ -255,14 +255,14 @@ export function sampleCompanies(): SampleCompany[] {id: 'meadow-recap',sender: 'Jacob',subject: 'Recap from today',- snippet: 'Thanks for the time, Dana. Here’s what we covered.',+ snippet: 'Thanks for the time, Valentina. Here’s what we covered.',time: 'Sep 22',signal: true,mine: true,},{id: 'meadow-intro',- sender: 'Dana',+ sender: 'Valentina',subject: 'Intro from Sam',snippet:'Sam mentioned you’re building something for studios like ours.',@@ -278,7 +278,7 @@ export function sampleCompanies(): SampleCompany[] {time: 'Sep 28',duration: '18m 40s',people: ['jacob', 'julia'],- guests: ['Dana', 'Alex'],+ guests: ['Valentina', 'Alex'],},{id: 'meadow-pricing-call',@@ -286,7 +286,7 @@ export function sampleCompanies(): SampleCompany[] {time: 'Sep 25',duration: '12m 4s',people: ['julia'],- guests: ['Dana'],+ guests: ['Valentina'],},{id: 'meadow-design-review',@@ -302,7 +302,7 @@ export function sampleCompanies(): SampleCompany[] {time: 'Sep 22',duration: '31m 12s',people: ['jacob'],- guests: ['Dana'],+ guests: ['Valentina'],},],files: [@@ -484,7 +484,7 @@ export function sampleEvents(): SampleEvent[] {start: 9,duration: 1,calendar: 'work',- description: 'Walk Dana and the team through the new workspace.',+ description: 'Walk Valentina and the team through the new workspace.',},{id: 'design-review',diff --git a/apps/marketing/src/features/marketing/core/workspace-parity-fixtures.ts b/apps/marketing/src/features/marketing/core/workspace-parity-fixtures.tsindex 687bda8bd6..3d96e2041e 100644--- a/apps/marketing/src/features/marketing/core/workspace-parity-fixtures.ts+++ b/apps/marketing/src/features/marketing/core/workspace-parity-fixtures.ts@@ -54,7 +54,7 @@ export const sampleAgentSessions = [provider: 'chatgpt',prompt: 'Summarize the Meadow conversation and suggest next steps.',answer:- 'Dana confirmed the Thursday check-in. Share the team rollout plan, introduce Julia, and confirm the workspace owner before the meeting.',+ 'Valentina confirmed the Thursday check-in. Share the team rollout plan, introduce Julia, and confirm the workspace owner before the meeting.',},{id: 'release-notes',diff --git a/apps/marketing/src/features/marketing/primitives/createCrmDemoWorkspace.ts b/apps/marketing/src/features/marketing/primitives/createCrmDemoWorkspace.tsnew file mode 100644index 0000000000..99e2113150--- /dev/null+++ b/apps/marketing/src/features/marketing/primitives/createCrmDemoWorkspace.ts@@ -0,0 +1,51 @@+import { createDummyWorkspace } from './createDummyWorkspace';++/** Fictional CRM accounts with the same linked records across website demos. */+export function createCrmDemoWorkspace() {+ const w = createDummyWorkspace('crm');+ // Fictional accounts for the public demo; IDs retain the linked sample records.+ const accountNames: Record<string, string> = {+ northstar: 'Miller & Rowe',+ harbor: 'Juniper Dental',+ ridgeline: 'Eastbank Architecture',+ copperleaf: 'Acorn Accounting',+ orbit: 'Fieldstone Software',+ tidewater: 'Cedar Grove Physio',+ fernway: 'Roamwell Travel',+ meadow: 'Parlor Studio',+ bluebird: 'Westport Freight',+ sable: 'Paperhouse Creative',+ lumen: 'Bookend Retail',+ foxglove: 'Atelier Finch',+ northwind: 'Keystone Mechanical',+ granite: 'Benton Legal',+ relay: 'Replywell',+ pallet: 'Canopy Coffee',+ fieldnote: 'Panelwork Research',+ cedar: 'Studio Morrow',+ fieldwork: 'Commonroom Offices',+ brightline: 'Oaklane Tutoring',+ };+ let sampleData = JSON.stringify(w.data);+ for (const entry of w.data.companies) {+ const name = accountNames[entry.id];+ if (name) sampleData = sampleData.replaceAll(entry.name, name);+ }+ sampleData = sampleData+ .replaceAll('Valentina', 'Ava Chen')+ .replaceAll('[email protected]', '[email protected]');+ w.setData(JSON.parse(sampleData));+ w.setData('companies', (entries) =>+ entries.map((entry) => ({+ ...entry,+ owner: entry.owner === 'valentina' ? 'gabriel' : entry.owner,+ domain: `${(accountNames[entry.id] ?? entry.name).toLowerCase().replace(/[^a-z0-9]/g, '')}.example`,+ contacts: entry.contacts.map((contact) => ({+ ...contact,+ email: `${contact.email.split('@')[0]}@${(accountNames[entry.id] ?? entry.name).toLowerCase().replace(/[^a-z0-9]/g, '')}.example`,+ })),+ }))+ );++ return w;+}diff --git a/apps/marketing/src/features/marketing/primitives/createDemoComposerLayout.test.tsx b/apps/marketing/src/features/marketing/primitives/createDemoComposerLayout.test.tsxnew file mode 100644index 0000000000..2a50d62bb2--- /dev/null+++ b/apps/marketing/src/features/marketing/primitives/createDemoComposerLayout.test.tsx@@ -0,0 +1,81 @@+import { cleanup, fireEvent, render } from '@solidjs/testing-library';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import {+ ChannelComposer,+ type ChannelComposerHandle,+} from '../components/email/frozen/ChannelComposer';++let compactHeight = 24;+beforeEach(() => {+ compactHeight = 24;+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ observe() {}+ disconnect() {}+ }+ );+ vi.spyOn(Element.prototype, 'clientWidth', 'get').mockReturnValue(600);+ vi.spyOn(Element.prototype, 'scrollHeight', 'get').mockImplementation(+ function (this: Element) {+ return this.closest('[data-composer-compact]')?.getAttribute(+ 'data-composer-compact'+ ) === 'true'+ ? compactHeight+ : 24;+ }+ );+});+afterEach(() => {+ cleanup();+ vi.restoreAllMocks();+ vi.unstubAllGlobals();+});++it('uses measured wrapping rather than a character limit and does not repeatedly collapse the live input', async () => {+ let composer: ChannelComposerHandle | undefined;+ const view = render(() => (+ <ChannelComposer+ onSend={() => {}}+ onReady={(handle) => {+ composer = handle;+ }}+ />+ ));+ await Promise.resolve();+ const input = view.getByRole('textbox');+ const layout = input.closest('[data-input-layout]')!;+ composer!.setText('a'.repeat(80));+ await Promise.resolve();+ expect(layout.getAttribute('data-composer-compact')).toBe('true');+ expect(input.style.height).toBe('24px');+ compactHeight = 48;+ composer!.setText('a'.repeat(30));+ await Promise.resolve();+ expect(layout.getAttribute('data-composer-compact')).toBe('false');+ expect(input.style.height).toBe('24px');+ expect(+ view.container.querySelector('[aria-hidden="true"][data-input-layout]')+ ).toBeNull();+});++it('keeps the user selection and mention nodes intact when measuring an edited rich composer', async () => {+ const view = render(() => <ChannelComposer richMentions onSend={() => {}} />);+ const input = view.getByRole('textbox');+ const mention = document.createElement('span');+ mention.dataset.demoMention = 'teo';+ mention.contentEditable = 'false';+ mention.textContent = '@Teo';+ const text = document.createTextNode(' please review');+ input.append(mention, text);+ const range = document.createRange();+ range.setStart(text, 7);+ range.collapse(true);+ window.getSelection()!.removeAllRanges();+ window.getSelection()!.addRange(range);+ fireEvent.input(input);+ await Promise.resolve();+ expect(input.querySelector('[data-demo-mention]')).toBe(mention);+ expect(window.getSelection()!.anchorNode).toBe(text);+ expect(window.getSelection()!.anchorOffset).toBe(7);+});diff --git a/apps/marketing/src/features/marketing/primitives/createDemoComposerLayout.ts b/apps/marketing/src/features/marketing/primitives/createDemoComposerLayout.tsnew file mode 100644index 0000000000..68f76598b5--- /dev/null+++ b/apps/marketing/src/features/marketing/primitives/createDemoComposerLayout.ts@@ -0,0 +1,117 @@+import { createEffect, createSignal, onCleanup, onMount } from 'solid-js';++type Editor = HTMLTextAreaElement | HTMLDivElement;++/** Native-editor equivalent of the app's createComposerLayout compact probe. */+export function createDemoComposerLayout(options: {+ input: () => Editor | undefined;+ text: () => string;+ compact: () => boolean | undefined;+}) {+ const [compact, setCompact] = createSignal(true);+ let queued = false;+ let disposed = false;+ const measure = () => {+ const input = options.input();+ const layout = input?.closest<HTMLElement>('[data-input-layout]');+ if (!input || !layout?.parentElement || !layout.clientWidth) return;+ // Measure compact width without briefly collapsing the visible editor.+ const probe = layout.cloneNode(true) as HTMLElement;+ probe.removeAttribute('id');+ probe.setAttribute('data-composer-compact', 'true');+ probe.inert = true;+ probe.setAttribute('aria-hidden', 'true');+ for (const child of probe.querySelectorAll('[id]'))+ child.removeAttribute('id');+ for (const child of probe.querySelectorAll<HTMLElement>('*')) {+ child.style.transition = 'none';+ child.style.animation = 'none';+ }+ for (const child of probe.querySelectorAll<HTMLElement>(+ '[contenteditable]'+ ))+ child.contentEditable = 'false';+ Object.assign(probe.style, {+ position: 'absolute',+ visibility: 'hidden',+ pointerEvents: 'none',+ top: '0',+ left: '0',+ width: `${layout.clientWidth}px`,+ height: 'auto',+ minHeight: '0',+ maxHeight: 'none',+ overflow: 'hidden',+ });+ const editor = probe.querySelector<Editor>('.mail-channel-input');+ if (!editor) return;+ if (editor instanceof HTMLTextAreaElement) editor.value = options.text();+ Object.assign(editor.style, {+ height: '0px',+ minHeight: '0px',+ maxHeight: 'none',+ overflow: 'hidden',+ });+ layout.parentElement.append(probe);+ try {+ const lineHeight =+ Number.parseFloat(getComputedStyle(editor).lineHeight) || 24;+ const next =+ options.compact() ??+ (!options.text().includes('\n') &&+ editor.scrollHeight <= lineHeight + 1);+ setCompact(next);+ // The same probe measures the final layout, keeping the live input stable.+ probe.setAttribute('data-composer-compact', String(next));+ const height = Math.max(lineHeight, Math.min(editor.scrollHeight, 200));+ if (input.style.height !== `${height}px`)+ input.style.height = `${height}px`;+ } finally {+ probe.remove();+ }+ };+ const schedule = () => {+ if (queued || disposed) return;+ queued = true;+ queueMicrotask(() => {+ queued = false;+ if (!disposed) measure();+ });+ };+ createEffect(() => {+ options.text();+ options.compact();+ schedule();+ });+ onMount(() => {+ const input = options.input();+ const layout = input?.closest<HTMLElement>('[data-input-layout]');+ if (!input || !layout) return;+ let width = -1;+ const observer = new ResizeObserver(() => {+ // Height changes caused by sizing must not trigger another sizing cycle.+ if (layout.clientWidth === width) return;+ width = layout.clientWidth;+ schedule();+ });+ observer.observe(layout);+ const changes = new MutationObserver(schedule);+ changes.observe(layout, {+ childList: true,+ characterData: true,+ subtree: true,+ });+ const fonts = input.ownerDocument.fonts;+ fonts?.addEventListener('loadingdone', schedule);+ schedule();+ onCleanup(() => {+ observer.disconnect();+ changes.disconnect();+ fonts?.removeEventListener('loadingdone', schedule);+ });+ });+ onCleanup(() => {+ disposed = true;+ });+ return { compact, resize: schedule };+}diff --git a/apps/marketing/src/features/marketing/primitives/createDemoPointer.test.tsx b/apps/marketing/src/features/marketing/primitives/createDemoPointer.test.tsxnew file mode 100644index 0000000000..8b7ca71b98--- /dev/null+++ b/apps/marketing/src/features/marketing/primitives/createDemoPointer.test.tsx@@ -0,0 +1,121 @@+import { cleanup, render } from '@solidjs/testing-library';+import { createSignal, Show } from 'solid-js';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { DemoCursor } from '../components/DemoCursor';+import { createDemoPointer } from './createDemoPointer';++let resize: () => void;+let select: (value: string | undefined) => void;+let targetLeft = 100;+beforeEach(() => {+ vi.useFakeTimers();+ targetLeft = 100;+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ constructor(callback: () => void) {+ resize = callback;+ }+ observe() {}+ disconnect() {}+ }+ );+ vi.spyOn(HTMLElement.prototype, 'getBoundingClientRect').mockImplementation(+ function (this: HTMLElement) {+ const frame = this.hasAttribute('data-frame');+ const x = frame ? 0 : targetLeft;+ const width = frame ? 800 : 80,+ height = frame ? 600 : 40;+ return {+ x,+ y: 0,+ left: x,+ top: 0,+ width,+ height,+ right: x + width,+ bottom: height,+ toJSON: () => ({}),+ };+ }+ );+});+afterEach(() => {+ cleanup();+ vi.useRealTimers();+ vi.restoreAllMocks();+ vi.unstubAllGlobals();+});+function Scene() {+ let frame!: HTMLDivElement;+ const [target, setTarget] = createSignal<string | undefined>(+ '[data-control]'+ );+ select = setTarget;+ const point = createDemoPointer({ frame: () => frame, target });+ return (+ <div class="demo-interaction-boundary">+ <div ref={frame} data-frame>+ <button data-control>Open menu</button>+ <Show when={point()}>+ {(p) => (+ <DemoCursor+ style={{ transform: `translate(${p().x}px, ${p().y}px)` }}+ />+ )}+ </Show>+ </div>+ </div>+ );+}+it('keeps the same pointer node and position while a target is replaced, then follows layout changes', () => {+ const view = render(Scene);+ vi.advanceTimersByTime(32);+ const cursor = view.container.querySelector('.demo-cursor');+ expect(cursor?.getAttribute('style')).toContain('136px');+ select(undefined);+ vi.advanceTimersByTime(32);+ expect(view.container.querySelector('.demo-cursor')).toBe(cursor);+ targetLeft = 300;+ select('[data-control]');+ vi.advanceTimersByTime(32);+ expect(cursor?.getAttribute('style')).toContain('336px');+ targetLeft = 400;+ resize();+ vi.advanceTimersByTime(32);+ expect(cursor?.getAttribute('style')).toContain('436px');+});+it('does not bring the demonstration pointer back after visitor takeover', () => {+ const view = render(Scene);+ vi.advanceTimersByTime(32);+ view.container+ .querySelector('.demo-interaction-boundary')!+ .dispatchEvent(new CustomEvent('macro-demo-interaction'));+ expect(view.container.querySelector('.demo-cursor')).toBeNull();+ resize();+ select('[data-control]');+ vi.advanceTimersByTime(32);+ expect(view.container.querySelector('.demo-cursor')).toBeNull();+});++it('hides the pointer during the result hold and starts fresh for the next untouched sequence', () => {+ const view = render(Scene);+ const frame = view.container.querySelector('[data-frame]')!;+ vi.advanceTimersByTime(32);+ expect(view.container.querySelector('.demo-cursor')).toBeTruthy();+ frame.dispatchEvent(+ new CustomEvent('macro-demo-finished', { bubbles: true })+ );+ resize();+ vi.advanceTimersByTime(32);+ expect(view.container.querySelector('.demo-cursor')).toBeNull();+ frame.dispatchEvent(new CustomEvent('macro-demo-reset', { bubbles: true }));+ vi.advanceTimersByTime(32);+ expect(view.container.querySelector('.demo-cursor')).toBeTruthy();+ view.container+ .querySelector('.demo-interaction-boundary')!+ .dispatchEvent(new CustomEvent('macro-demo-interaction'));+ frame.dispatchEvent(new CustomEvent('macro-demo-reset', { bubbles: true }));+ vi.advanceTimersByTime(32);+ expect(view.container.querySelector('.demo-cursor')).toBeNull();+});diff --git a/apps/marketing/src/features/marketing/primitives/createDemoPointer.ts b/apps/marketing/src/features/marketing/primitives/createDemoPointer.tsnew file mode 100644index 0000000000..df587c89f4--- /dev/null+++ b/apps/marketing/src/features/marketing/primitives/createDemoPointer.ts@@ -0,0 +1,139 @@+import { createEffect, createSignal, onCleanup, onMount } from 'solid-js';+import {+ DEMO_SEQUENCE_FINISHED,+ DEMO_SEQUENCE_RESET,+} from './createEmailWalkthrough';+import { observeDemoTakeover } from './observeDemoTakeover';++export type DemoPoint = { x: number; y: number };++/** One pointer per sequence. A missing target means rest, not disappear. */+export function createDemoPointer(options: {+ frame: () => HTMLElement | undefined;+ target: () => string | undefined;+ active?: () => boolean;+ track?: () => unknown;+ place?: (rect: DOMRect) => DemoPoint;+ /** Track a dragged element while its own transform animation is running. */+ followAnimation?: () => boolean;+}) {+ const [point, setPoint] = createSignal<DemoPoint>();+ let stopped = false;+ let finished = false;+ onMount(() => {+ const frame = options.frame();+ if (!frame) return;+ const measure = () => {+ if (stopped || finished || options.active?.() === false) {+ setPoint(undefined);+ return;+ }+ const selector = options.target();+ const target = selector+ ? [...frame.querySelectorAll<HTMLElement>(selector)].find((element) => {+ const rect = element.getBoundingClientRect();+ return (+ !element.closest('[hidden]') && rect.width > 0 && rect.height > 0+ );+ })+ : undefined;+ if (!target) return;+ const bounds = target.getBoundingClientRect();+ const parent = frame.getBoundingClientRect();+ if (!parent.width || !parent.height) return;+ const scaleX = frame.offsetWidth ? parent.width / frame.offsetWidth : 1;+ const scaleY = frame.offsetHeight+ ? parent.height / frame.offsetHeight+ : 1;+ const position = options.place?.(bounds) ?? {+ x: bounds.left + Math.min(bounds.width / 2, 36 * scaleX),+ y: bounds.top + bounds.height / 2,+ };+ const x = (position.x - parent.left) / scaleX;+ const y = (position.y - parent.top) / scaleY;+ if (+ x < 0 ||+ y < 0 ||+ x > (frame.clientWidth || parent.width) ||+ y > (frame.clientHeight || parent.height)+ )+ return;+ setPoint((previous) =>+ previous &&+ Math.abs(previous.x - x) < 0.5 &&+ Math.abs(previous.y - y) < 0.5+ ? previous+ : { x, y }+ );+ };+ let raf = 0;+ const requestMeasure = () => {+ cancelAnimationFrame(raf);+ const tick = () => {+ measure();+ if (+ !stopped &&+ !finished &&+ options.active?.() !== false &&+ options.followAnimation?.()+ )+ raf = requestAnimationFrame(tick);+ };+ raf = requestAnimationFrame(tick);+ };+ createEffect(() => {+ options.target();+ options.active?.();+ options.track?.();+ options.followAnimation?.();+ requestMeasure();+ });+ const resize = new ResizeObserver(requestMeasure);+ resize.observe(frame);+ const mutation = new MutationObserver((records) => {+ if (+ records.some(+ (record) =>+ !(record.target instanceof Element) ||+ !record.target.closest('.demo-cursor')+ )+ )+ requestMeasure();+ });+ mutation.observe(frame, { childList: true, subtree: true });+ const stop = () => {+ stopped = true;+ cancelAnimationFrame(raf);+ setPoint(undefined);+ };+ const releaseTakeover = observeDemoTakeover(frame, stop);+ const endSequence = (event: Event) => {+ const target = event.target;+ if (+ !(target instanceof Element) ||+ (!frame.contains(target) && !target.contains(frame))+ )+ return;+ finished = event.type === DEMO_SEQUENCE_FINISHED;+ cancelAnimationFrame(raf);+ setPoint(undefined);+ if (!finished && !stopped) requestMeasure();+ };+ frame.ownerDocument.addEventListener(DEMO_SEQUENCE_FINISHED, endSequence);+ frame.ownerDocument.addEventListener(DEMO_SEQUENCE_RESET, endSequence);+ frame.addEventListener('scroll', requestMeasure, true);+ onCleanup(() => {+ cancelAnimationFrame(raf);+ resize.disconnect();+ mutation.disconnect();+ releaseTakeover();+ frame.ownerDocument.removeEventListener(+ DEMO_SEQUENCE_FINISHED,+ endSequence+ );+ frame.ownerDocument.removeEventListener(DEMO_SEQUENCE_RESET, endSequence);+ frame.removeEventListener('scroll', requestMeasure, true);+ });+ });+ return point;+}diff --git a/apps/marketing/src/features/marketing/primitives/createDummyWorkspace.test.ts b/apps/marketing/src/features/marketing/primitives/createDummyWorkspace.test.tsindex af73d7cb3b..8e6cb4c25f 100644--- a/apps/marketing/src/features/marketing/primitives/createDummyWorkspace.test.ts+++ b/apps/marketing/src/features/marketing/primitives/createDummyWorkspace.test.ts@@ -44,7 +44,7 @@ describe('sample workspace commands', () => {w.sendEmail('Re: Next steps','Scheduled reply',- 'Dana',+ 'Valentina','dana','Tomorrow at 9 AM',{ cc: '[email protected]' }@@ -52,11 +52,11 @@ describe('sample workspace commands', () => {expect(w.data.emails[0]).toMatchObject({folder: 'scheduled',scheduled: 'Tomorrow at 9 AM',- to: 'Dana',+ to: 'Valentina',cc: '[email protected]',});expect(original.replies).toHaveLength(replies);- w.sendEmail('Re: Next steps', 'Ready now', 'Dana', 'dana', undefined, {+ w.sendEmail('Re: Next steps', 'Ready now', 'Valentina', 'dana', undefined, {cc: '[email protected]',bcc: '[email protected]',});@@ -64,7 +64,7 @@ describe('sample workspace commands', () => {w.data.emails.find((email) => email.id === 'dana')!.replies.at(-1)).toMatchObject({body: 'Ready now',- to: 'Dana',+ to: 'Valentina',cc: '[email protected]',bcc: '[email protected]',});@@ -121,7 +121,7 @@ describe('sample workspace commands', () => {it('records replies in their thread and Sent, rejecting blank sends', () => {const w = setup();const count = w.data.emails.length;- w.sendEmail('Re: Next steps', 'See you Thursday.', 'Dana', 'dana');+ w.sendEmail('Re: Next steps', 'See you Thursday.', 'Valentina', 'dana');expect(w.data.emails).toHaveLength(count + 1);expect(w.data.emails[0]).toMatchObject({folder: 'sent',@@ -131,7 +131,7 @@ describe('sample workspace commands', () => {w.data.emails.find((item) => item.id === 'dana')?.replies.at(-1)?.body).toBe('See you Thursday.');expect(w.selected()).toBe('dana');- w.sendEmail('', 'No subject', 'Dana');+ w.sendEmail('', 'No subject', 'Valentina');expect(w.data.emails).toHaveLength(count + 1);});diff --git a/apps/marketing/src/features/marketing/primitives/createEmailDemoGeneration.ts b/apps/marketing/src/features/marketing/primitives/createEmailDemoGeneration.tsindex c2c1dd0a03..72df071e7c 100644--- a/apps/marketing/src/features/marketing/primitives/createEmailDemoGeneration.ts+++ b/apps/marketing/src/features/marketing/primitives/createEmailDemoGeneration.ts@@ -1,8 +1,9 @@import { createSignal, onCleanup, onMount } from 'solid-js';+import { observeDemoTakeover } from './observeDemoTakeover';export type EmailDemoToken = string | { kind: 'pdf' | 'md'; label: string };const parts: EmailDemoToken[] = [- 'Hi Dana,\n',+ 'Hi Valentina,\n','Thanks for joining the demo on September 14. Great meeting your team!\n','Here’s our ',{ kind: 'pdf', label: 'Macro sales overview.pdf' },@@ -33,6 +34,7 @@ export function createEmailDemoGeneration(let index = 0;let timer: ReturnType<typeof setTimeout> | undefined;let reduced: MediaQueryList | undefined;+ let takenOver = false;const stop = () => {clearTimeout(timer);@@ -40,7 +42,7 @@ export function createEmailDemoGeneration(};const run = () => {stop();- if (phase() === 'complete') return;+ if (takenOver || phase() === 'complete') return;if (reduced?.matches) {append(tokens.slice(index));index = tokens.length;@@ -63,12 +65,18 @@ export function createEmailDemoGeneration(onMount(() => {const root = element();if (!root) return;+ const takeOver = () => {+ takenOver = true;+ stop();+ setPhase('complete');+ };+ const releaseTakeover = observeDemoTakeover(root, takeOver);reduced = window.matchMedia('(prefers-reduced-motion: reduce)');reduced.addEventListener('change', run);document.addEventListener('visibilitychange', run);const observer = new IntersectionObserver(([entry]) => {- visible = entry.isIntersecting;+ visible = entry.isIntersecting && entry.intersectionRatio >= 0.2;run();},{ threshold: 0.2 }@@ -80,6 +88,7 @@ export function createEmailDemoGeneration(observer.disconnect();reduced?.removeEventListener('change', run);document.removeEventListener('visibilitychange', run);+ releaseTakeover();});});return { phase };diff --git a/apps/marketing/src/features/marketing/primitives/createEmailWalkthrough.test.tsx b/apps/marketing/src/features/marketing/primitives/createEmailWalkthrough.test.tsxnew file mode 100644index 0000000000..7bfba2acf7--- /dev/null+++ b/apps/marketing/src/features/marketing/primitives/createEmailWalkthrough.test.tsx@@ -0,0 +1,151 @@+import { cleanup, render } from '@solidjs/testing-library';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { createEmailWalkthrough } from './createEmailWalkthrough';++let observe: IntersectionObserverCallback;+let syncMotion: () => void;+let hidden = false;+let reduced = false;+beforeEach(() => {+ hidden = false;+ reduced = false;+ vi.useFakeTimers();+ vi.spyOn(document, 'hidden', 'get').mockImplementation(() => hidden);+ vi.stubGlobal(+ 'IntersectionObserver',+ class {+ constructor(callback: IntersectionObserverCallback) {+ observe = callback;+ }+ observe() {}+ disconnect() {}+ }+ );+ vi.stubGlobal('matchMedia', () => ({+ get matches() {+ return reduced;+ },+ addEventListener: (_: string, callback: () => void) => {+ syncMotion = callback;+ },+ removeEventListener: vi.fn(),+ }));+});+afterEach(() => {+ cleanup();+ expect(vi.getTimerCount()).toBe(0);+ vi.useRealTimers();+ vi.restoreAllMocks();+ vi.unstubAllGlobals();+});+function visibility(ratio: number) {+ observe(+ [+ {+ isIntersecting: ratio > 0,+ intersectionRatio: ratio,+ } as IntersectionObserverEntry,+ ],+ {} as IntersectionObserver+ );+}+function Scene(props: {+ advance: (step: number) => void;+ reset: () => void;+ reduced: () => void;+ loop?: { hold: number };+ entered?: boolean;+}) {+ let root!: HTMLDivElement;+ createEmailWalkthrough({+ ...props,+ root: () => root,+ steps: 2,+ delay: () => 1000,+ });+ return (+ <div+ class="demo-interaction-boundary"+ data-outer+ data-demo-interacted={props.entered}+ >+ <div class="demo-interaction-boundary">+ <div ref={root} />+ </div>+ </div>+ );+}+it('retains the remaining reading time offscreen and in hidden tabs', () => {+ const advance = vi.fn();+ render(() => <Scene advance={advance} reset={vi.fn()} reduced={vi.fn()} />);+ visibility(0.1);+ vi.advanceTimersByTime(3000);+ expect(advance).not.toHaveBeenCalled();+ visibility(1);+ vi.advanceTimersByTime(600);+ hidden = true;+ document.dispatchEvent(new Event('visibilitychange'));+ vi.advanceTimersByTime(5000);+ hidden = false;+ document.dispatchEvent(new Event('visibilitychange'));+ vi.advanceTimersByTime(399);+ expect(advance).not.toHaveBeenCalled();+ vi.advanceTimersByTime(1);+ expect(advance).toHaveBeenLastCalledWith(1);+});++it('does not start a deferred scene after its containing demo was already entered', () => {+ const advance = vi.fn();+ render(() => (+ <Scene entered advance={advance} reset={vi.fn()} reduced={vi.fn()} />+ ));+ visibility(1);+ vi.advanceTimersByTime(10000);+ expect(advance).not.toHaveBeenCalled();+});+it('holds the result before a complete reset and starts the next sequence at step one', () => {+ const advance = vi.fn(),+ reset = vi.fn();+ render(() => (+ <Scene+ advance={advance}+ reset={reset}+ reduced={vi.fn()}+ loop={{ hold: 5000 }}+ />+ ));+ visibility(1);+ vi.advanceTimersByTime(6999);+ expect(advance.mock.calls).toEqual([[1], [2]]);+ expect(reset).not.toHaveBeenCalled();+ vi.advanceTimersByTime(1);+ expect(reset).toHaveBeenCalledTimes(1);+ vi.advanceTimersByTime(1000);+ expect(advance.mock.calls).toEqual([[1], [2], [1]]);+});+it('outer-boundary takeover permanently protects visitor edits from loops and motion changes', () => {+ const advance = vi.fn(),+ reset = vi.fn(),+ finish = vi.fn();+ const view = render(() => (+ <Scene+ advance={advance}+ reset={reset}+ reduced={finish}+ loop={{ hold: 5000 }}+ />+ ));+ visibility(1);+ vi.advanceTimersByTime(1000);+ view.container+ .querySelector('[data-outer]')!+ .dispatchEvent(new CustomEvent('macro-demo-interaction'));+ reduced = true;+ syncMotion();+ visibility(0);+ visibility(1);+ vi.advanceTimersByTime(20000);+ expect(advance.mock.calls).toEqual([[1]]);+ expect(reset).not.toHaveBeenCalled();+ expect(finish).not.toHaveBeenCalled();+});diff --git a/apps/marketing/src/features/marketing/primitives/createEmailWalkthrough.ts b/apps/marketing/src/features/marketing/primitives/createEmailWalkthrough.tsindex fc4a792b5a..ec68eef5c4 100644--- a/apps/marketing/src/features/marketing/primitives/createEmailWalkthrough.ts+++ b/apps/marketing/src/features/marketing/primitives/createEmailWalkthrough.ts@@ -1,4 +1,8 @@import { createSignal, onCleanup, onMount } from 'solid-js';+import { observeDemoTakeover } from './observeDemoTakeover';++export const DEMO_SEQUENCE_FINISHED = 'macro-demo-finished';+export const DEMO_SEQUENCE_RESET = 'macro-demo-reset';/** Finite, visibility-aware playback for the isolated email feature demos. */export function createEmailWalkthrough(options: {@@ -11,35 +15,78 @@ export function createEmailWalkthrough(options: {reduced: () => void;/** Milliseconds before the given step; defaults to 1400ms per step. */delay?: (step: number) => number;+ /** Only opt in when reset restores the complete scene, including menus. */+ loop?: { hold: number };+ /** Called once when the visitor takes control, including through a boundary. */+ onTakeover?: () => void;}) {const [playing, setPlaying] = createSignal(true);const [reducedMotion, setReducedMotion] = createSignal(false);let step = 0;let visible = false;+ let takenOver = false;+ let remaining: number | undefined;+ let started = 0;let timer: ReturnType<typeof setTimeout> | undefined;- const clear = () => {+ const clear = (preserve = false) => {+ if (preserve && timer !== undefined && remaining !== undefined)+ remaining = Math.max(0, remaining - (performance.now() - started));clearTimeout(timer);timer = undefined;};- const pause = () => {+ const pauseClock = () => {clear();setPlaying(false);};+ const pause = () => {+ if (takenOver) return;+ takenOver = true;+ pauseClock();+ options.onTakeover?.();+ };const schedule = () => {- clear();- if (!visible || !playing() || reducedMotion() || document.hidden) return;- timer = setTimeout(- () => {- options.advance(++step);- if (step >= options.steps) pause();- else schedule();- },- options.delay?.(step + 1) ?? 1400- );+ clear(true);+ if (+ !visible ||+ !playing() ||+ reducedMotion() ||+ document.hidden ||+ takenOver+ )+ return;+ remaining ??=+ step >= options.steps+ ? (options.loop?.hold ?? 5000)+ : (options.delay?.(step + 1) ?? 1400);+ started = performance.now();+ timer = setTimeout(() => {+ timer = undefined;+ remaining = undefined;+ if (step >= options.steps) {+ replay();+ return;+ }+ options.advance(++step);+ if (step >= options.steps) {+ options+ .root()+ .dispatchEvent(+ new CustomEvent(DEMO_SEQUENCE_FINISHED, { bubbles: true })+ );+ }+ if (step >= options.steps && !options.loop) pauseClock();+ else schedule();+ }, remaining);};const replay = () => {+ if (takenOver) return;+ clear();+ remaining = undefined;step = 0;options.reset();+ options+ .root()+ .dispatchEvent(new CustomEvent(DEMO_SEQUENCE_RESET, { bubbles: true }));if (reducedMotion()) {options.reduced();return;@@ -48,7 +95,8 @@ export function createEmailWalkthrough(options: {schedule();};const toggle = () => {- if (playing()) pause();+ if (takenOver) return;+ if (playing()) pauseClock();else if (step >= options.steps) replay();else {setPlaying(true);@@ -59,9 +107,14 @@ export function createEmailWalkthrough(options: {const media = matchMedia('(prefers-reduced-motion: reduce)');const sync = () => {setReducedMotion(media.matches);- if (media.matches) {- pause();+ if (media.matches && !takenOver) {+ pauseClock();options.reduced();+ options+ .root()+ .dispatchEvent(+ new CustomEvent(DEMO_SEQUENCE_FINISHED, { bubbles: true })+ );}};sync();@@ -69,18 +122,21 @@ export function createEmailWalkthrough(options: {([entry]) => {visible =entry.isIntersecting &&- (options.visibilityThreshold === undefined ||- (entry.intersectionRatio ?? 1) >= options.visibilityThreshold);+ (entry.intersectionRatio ?? 1) >=+ (options.visibilityThreshold ?? 0.5);schedule();},- { threshold: options.visibilityThreshold ?? 0.25 }+ { threshold: options.visibilityThreshold ?? 0.5 });observer.observe(options.root());+ const root = options.root();+ const releaseTakeover = observeDemoTakeover(root, pause);media.addEventListener('change', sync);document.addEventListener('visibilitychange', schedule);onCleanup(() => {clear();observer.disconnect();+ releaseTakeover();media.removeEventListener('change', sync);document.removeEventListener('visibilitychange', schedule);});diff --git a/apps/marketing/src/features/marketing/primitives/demoTypingActions.test.ts b/apps/marketing/src/features/marketing/primitives/demoTypingActions.test.tsnew file mode 100644index 0000000000..7fbd72e443--- /dev/null+++ b/apps/marketing/src/features/marketing/primitives/demoTypingActions.test.ts@@ -0,0 +1,28 @@+import { expect, it } from 'vitest';+import { demoTypingActions } from './demoTypingActions';++it('adds one character per action and pauses after spaces and punctuation', () => {+ const values: string[] = [];+ const actions = demoTypingActions(+ 'Hi, Ava. 👋',+ (text) => values.push(text),+ 1200+ );+ for (const action of actions) action.run();+ expect(values).toEqual([+ 'H',+ 'Hi',+ 'Hi,',+ 'Hi, ',+ 'Hi, A',+ 'Hi, Av',+ 'Hi, Ava',+ 'Hi, Ava.',+ 'Hi, Ava. ',+ 'Hi, Ava. 👋',+ ]);+ expect(actions[0].delay).toBe(1200);+ expect(actions[3].delay).toBeGreaterThan(actions[2].delay);+ expect(actions[8].delay).toBeGreaterThan(actions[3].delay);+ expect(demoTypingActions('', () => {})).toEqual([]);+});diff --git a/apps/marketing/src/features/marketing/primitives/demoTypingActions.ts b/apps/marketing/src/features/marketing/primitives/demoTypingActions.tsnew file mode 100644index 0000000000..19942a0e08--- /dev/null+++ b/apps/marketing/src/features/marketing/primitives/demoTypingActions.ts@@ -0,0 +1,21 @@+/** Character-by-character human input, scheduled by the scene's existing clock. */+export function demoTypingActions(+ text: string,+ write: (value: string) => void,+ lead = 80+) {+ const characters = Array.from(text);+ return characters.map((_, index) => ({+ delay:+ index === 0+ ? lead+ : /[.!?]/.test(characters[index - 1])+ ? 230+ : /[,;:]/.test(characters[index - 1])+ ? 150+ : characters[index - 1] === ' '+ ? 95+ : 42 + ((index * 7) % 5) * 9,+ run: () => write(characters.slice(0, index + 1).join('')),+ }));+}diff --git a/apps/marketing/src/features/marketing/primitives/observeDemoTakeover.ts b/apps/marketing/src/features/marketing/primitives/observeDemoTakeover.tsnew file mode 100644index 0000000000..1a27f4839e--- /dev/null+++ b/apps/marketing/src/features/marketing/primitives/observeDemoTakeover.ts@@ -0,0 +1,25 @@+/** Listen through nested preview boundaries without treating page scrolling as input. */+export function observeDemoTakeover(root: HTMLElement, takeOver: () => void) {+ const scopes: Element[] = [root];+ for (let node = root.parentElement; node; node = node.parentElement)+ if (node.matches('.demo-interaction-boundary')) scopes.push(node);+ const input = (event: Event) => {+ if (event.isTrusted) takeOver();+ };+ for (const scope of scopes)+ scope.addEventListener('macro-demo-interaction', takeOver);+ for (const event of ['pointerdown', 'keydown', 'input'])+ root.addEventListener(event, input, true);+ if (+ scopes.some(+ (scope) => scope.getAttribute('data-demo-interacted') === 'true'+ )+ )+ takeOver();+ return () => {+ for (const scope of scopes)+ scope.removeEventListener('macro-demo-interaction', takeOver);+ for (const event of ['pointerdown', 'keydown', 'input'])+ root.removeEventListener(event, input, true);+ };+}diff --git a/apps/marketing/src/features/marketing/views/ProductAgentsPage.tsx b/apps/marketing/src/features/marketing/views/ProductAgentsPage.tsxindex 9bd12eb4f5..178cd5c764 100644--- a/apps/marketing/src/features/marketing/views/ProductAgentsPage.tsx+++ b/apps/marketing/src/features/marketing/views/ProductAgentsPage.tsx@@ -7,6 +7,7 @@ import {AgentMeetingStory,AgentTeamworkStory,} from '../components/agents/AgentWorkflowStories';+import { DemoInteractionBoundary } from '../components/DemoInteractionBoundary';import { FeaturePageFaq, FeaturePageSection } from '../components/FeaturePage';import { HomepageClosing } from '../components/HomepageClosing';import {@@ -21,20 +22,53 @@ import './agents-page.css';const agentsFaq = [{- q: 'Can I choose a different model?',- a: 'Yes. Choose from the models in Macro’s agent picker when starting or continuing a conversation. A connected agent uses the models supported by its own runtime.',+ q: 'What can Macro’s agents do?',+ a: 'Search workspace context, draft emails, edit documents, create tasks, and update customer records. Start a conversation in Agents or mention an available agent in a team channel.',},{- q: 'Whose permissions does an agent use?',- a: 'Hosted agents use the conversation owner’s access. Someone else prompting a shared conversation may need the owner’s approval. Connected agents also follow their own permission settings.',+ q: 'Can I use my existing AI client?',+ a: (+ <>+ Yes. Connect an MCP-compatible client to your Macro account so it can+ work with your workspace. Follow the{' '}+ <a href="https://docs.macro.com/AI/mcp/overview">MCP setup guide</a>.+ Running a local agent inside Macro is a separate feature; check the{' '}+ <a href="https://docs.macro.com/AI/bring-your-own">local agent guide</a>{' '}+ for availability.+ </>+ ),},{- q: 'Can I review an email before it goes out?',- a: 'Yes. Review and edit the draft in the conversation, then send it. In a channel or document discussion, the agent asks for confirmation in the thread. External clients have their own review controls.',+ q: 'Can I choose the model?',+ a: 'Yes. Use the model picker in an agent conversation. Available models and usage limits depend on your plan. A connected agent uses the models its own runtime supports.',},{- q: 'Can an agent work while I’m away?',- a: 'Hosted agents can continue after you close the app. Local agents need your machine to stay online. Routines let you schedule recurring work.',+ q: 'What can an agent access?',+ a: 'Hosted agents use the conversation owner’s access. Someone else prompting a shared session may need the owner’s approval. Connected clients and local agents also follow their own permission settings.',+ },+ {+ q: 'Can I review an email before it is sent?',+ a: (+ <>+ Yes. Ask for a draft, review it, and make edits before sending.+ Connected AI clients have their own approval controls. See{' '}+ <a href="/email">Macro Mail</a>.+ </>+ ),+ },+ {+ q: 'Can agents work while I’m away?',+ a: 'Hosted agents can continue after you close the app, and scheduled routines can run recurring work. Local agents need their computer and runtime to stay online.',+ },+ {+ q: 'How much agent usage is included?',+ a: (+ <>+ Macro has a free plan with limited AI usage. Paid plans offer more usage+ and model options. See{' '}+ <a href="/pricing">current plans and AI limits</a>.+ </>+ ),},];@@ -108,30 +142,33 @@ export function RouteAgents() {</nav><FeaturePageSectionid="agent-sources"- title="An agent that knows where to look."- description="Your agent can follow connections across your company’s work and act on what it finds. A question about tomorrow’s calls can draw on your calendar, earlier conversations, and the latest customer messages."+ title={['Give your agent the full', 'context of your team’s work.']}+ description="Macro gives your agent access to your team’s calendar, conversations, and files, so it can use the full context of your work to help you get more done.">- <div class="feature-page-visual">- <AgentMeetingStory />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <AgentMeetingStory />}+ /></FeaturePageSection><FeaturePageSectionid="agent-actions"- title="Work alongside your agent"- description="Your team can open the same document, add context, and ask an agent to update it. Changes happen in the shared file."+ title={['Work with your agent', 'across the workspace.']}+ description="Work with your agent in the chats and documents your team already uses. Add context, ask for updates, and review the result without leaving your workspace.">- <div class="feature-page-visual">- <AgentDeliverableStory />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <AgentDeliverableStory />}+ /></FeaturePageSection><FeaturePageSectionid="agent-collaboration"- title="Bring your agents into team chat."- description="Ask Macro for a mockup, give feedback, then tag Cursor to build it."+ title={['Turn conversations', 'into finished work.']}+ description="Bring design and implementation into the team conversation. Ask Macro for a mockup, give feedback together, then tag Cursor to build it using the context already in the channel.">- <div class="feature-page-visual">- <AgentTeamworkStory />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <AgentTeamworkStory />}+ /></FeaturePageSection><FeaturePageSectionid="existing-agents"@@ -184,7 +221,7 @@ export function RouteAgents() {</FeaturePageSection><FeaturePageFaqid="agents-faq-title"- title="Models, permissions, and control."+ title="Questions about Macro Agents"items={agentsFaq}/><HomepageClosing />diff --git a/apps/marketing/src/features/marketing/views/ProductCallsPage.tsx b/apps/marketing/src/features/marketing/views/ProductCallsPage.tsxindex 64c8be9afe..966b646559 100644--- a/apps/marketing/src/features/marketing/views/ProductCallsPage.tsx+++ b/apps/marketing/src/features/marketing/views/ProductCallsPage.tsx@@ -6,6 +6,7 @@ import {} from '../components/calls/CallStories';import { CallsComparison } from '../components/calls/CallsComparison';import { CallTeamMemoryDemo } from '../components/calls/CallTeamMemoryDemo';+import { DemoInteractionBoundary } from '../components/DemoInteractionBoundary';import { FeaturePageFaq, FeaturePageSection } from '../components/FeaturePage';import { HomepageClosing } from '../components/HomepageClosing';import {@@ -18,27 +19,47 @@ import './calls-page.css';const callsFaq = [{- q: 'Can I bring my Granola transcripts into Macro?',- a: 'Yes. Bring your Granola transcripts into Macro so your agents can use them alongside your tasks, docs, and email. You can keep using Granola with your current meeting app.',+ q: 'How do I start a call?',+ a: (+ <>+ Start from Calls, a channel, or a direct message. You can also create a+ meeting link for an instant or scheduled call. See the{' '}+ <a href="https://docs.macro.com/product/calls">calls guide</a>.+ </>+ ),},{- q: 'Are calls recorded automatically?',- a: 'Yes. Macro records, transcribes, and summarizes calls. Participants see a recording and transcription notice.',+ q: 'Can someone join without a Macro account?',+ a: 'Yes. Guests can join standalone meeting links in their browser without an account. Channel-linked calls require sign-in.',},{- q: 'Who can access the recording and transcript?',- a: 'The organizer and signed-in participants have access to the saved call. Additional access depends on the call’s sharing settings. Agents can only read calls you have access to.',+ q: 'Are calls recorded and transcribed?',+ a: 'Yes. Participants see a recording and transcription notice. After the call, open its recording, transcript, and summary in Calls.',},{- q: 'Can guests join without a Macro account?',- a: 'Yes. Share a link to an instant or scheduled meeting and guests can join in their browser without creating an account.',+ q: 'Can an agent turn a call into next steps?',+ a: (+ <>+ Yes. Ask an agent to use an accessible transcript to draft a follow-up,+ create tasks, or update customer records. See{' '}+ <a href="/agents">Macro Agents</a>.+ </>+ ),+ },+ {+ q: 'Who can read the recording and transcript?',+ a: 'Channel calls share with the creator’s team by default; turn off Share with team to prevent that. Standalone meetings are not shared to the wider team automatically. Signed-in participants retain access to their recordings.',},{- q: 'Are calls included in the free plan?',+ q: 'Can I use transcripts from another meeting app?',+ a: 'You can bring a transcript into Macro as a document and use it as agent context. This is separate from recording a call in Macro.',+ },+ {+ q: 'Which plan includes calls?',a: (<>- Calls, recording, and transcription are included in the paid plan. See{' '}- <a href="/pricing">pricing</a> for details.+ Calls, recording, and transcription are included in paid plans. See{' '}+ <a href="/pricing">current pricing</a> for details.</>),},@@ -79,13 +100,13 @@ export function RouteCalls() {<ProductHerocta="calls_hero_get_started"product="Calls"- title={['Turn your conversations into', 'tasks and updates.']}+ title={['Call from anywhere in Macro', 'with every call recorded.']}description={[- 'Macro records and transcribes your calls.',- 'Ask your agent to handle the follow-up.',+ 'Macro records and transcribes your calls',+ 'so your agent can handle what comes next.',]}/>- <CallHeroDemo />+ <DemoInteractionBoundary render={() => <CallHeroDemo />} /><nav class="feature-page-jump-links" aria-label="On this page"><a href="#call-start" onClick={revisitSection}><CallGraphic />@@ -102,32 +123,36 @@ export function RouteCalls() {</nav><FeaturePageSectionid="call-start"- title="Start a call in one click."- description={'Click Call in a channel or DM.'}+ title={[+ 'Start a call in channels, DMs,',+ 'or through meeting links.',+ ]}+ description="You can start calls from channels, DMs, or through meeting links. People outside of Macro can join your meeting links. Create your own booking links so people can set up times with you.">- <div class="feature-page-visual">- <CallStartDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <CallStartDemo />}+ /></FeaturePageSection><FeaturePageSectionid="call-followup"- title="Update tasks from your calls."- description="Ask an agent to update the owner and next steps from your call."+ title={['Turn what was said on', 'your calls into next steps.']}+ description="Tell your agent to turn what was said on a call into tasks, follow-up emails, and CRM updates. Your agent can read the transcript and determine who said what.">- <div class="feature-page-visual">- <CallFollowupDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <CallFollowupDemo />}+ /></FeaturePageSection><FeaturePageSectionid="call-default"- title="Your team can catch up without being there."- description={- 'Share a call’s recording, transcript, and summary with your team.'- }+ title={['View call recordings', 'after they finish.']}+ description="After calls finish, you can go back and watch the recording, review the transcript, or get a summary of what was said. Call recordings are shareable across your team.">- <div class="feature-page-visual">- <CallTeamMemoryDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <CallTeamMemoryDemo />}+ /></FeaturePageSection><CallsComparison /><FeaturePageFaqdiff --git a/apps/marketing/src/features/marketing/views/ProductChannelsPage.tsx b/apps/marketing/src/features/marketing/views/ProductChannelsPage.tsxindex ebebd6043d..ff9ffe1878 100644--- a/apps/marketing/src/features/marketing/views/ProductChannelsPage.tsx+++ b/apps/marketing/src/features/marketing/views/ProductChannelsPage.tsx@@ -7,6 +7,7 @@ import {ChannelThreadDemo,} from '../components/channels/ChannelStories';import { FeatureComparisons } from '../components/comparisons/FeatureComparisons';+import { DemoInteractionBoundary } from '../components/DemoInteractionBoundary';import { FeaturePageFaq, FeaturePageSection } from '../components/FeaturePage';import { HomepageClosing } from '../components/HomepageClosing';import {@@ -29,7 +30,7 @@ export function RouteChannels() {<ProductPage><ProductHeroproduct="Chat"- title={['Team chat, wired into', 'everything else.']}+ title={['Team chat connected to', 'the rest of your work.']}description={['@mention a doc, task, person, or company','and the whole channel can open it natively.',@@ -57,94 +58,104 @@ export function RouteChannels() {</nav><FeaturePageSectionid="shared-work"- title="Open docs, tasks, and email straight from chat."- description="Click a mention to open the work beside the conversation."+ title={['Open all your work', 'straight from chat.']}+ description="Share work in your team channels. Click on a document, task, email, company, person, or any file to see it beside your chat.">- <div class="feature-page-visual channel-wide-demo">- <ChannelSharedWorkDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual channel-wide-demo"+ render={() => <ChannelSharedWorkDemo />}+ /></FeaturePageSection><FeaturePageSectionid="channel-access"- title="Access follows the channel."- description="Mention a doc, task, or email to give the channel access. New members get access too."+ title={['Easily share files', 'with your team.']}+ description="After sharing files in a conversation, anyone in that chat automatically gets access. Anyone added later will gain access, and anyone you remove will lose access.">- <div class="feature-page-visual">- <ChannelPermissionsDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <ChannelPermissionsDemo />}+ /></FeaturePageSection><FeaturePageSectionid="channel-agents"- title="Agents are first-class participants."- description="Use Macro’s agents or bring your own. The team can follow the work in the channel."+ title={['Bring your agents', 'into the conversation.']}+ description="Tag your agent to ask for help, add context, assign a task, or get something done. You can use the Macro agent or bring your own.">- <div class="feature-page-visual">- <ChannelAgentDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <ChannelAgentDemo />}+ /></FeaturePageSection><FeaturePageSectionid="catch-up"- title="Catch up without opening every thread."- description="Read replies inline and respond in the same conversation."+ title={['Read and reply to', 'every thread inline.']}+ description="Read replies inline, follow the full thread, and respond without opening each conversation."><span id="channel-threads" /><span id="chat-inbox" />- <div class="feature-page-visual">- <ChannelThreadDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <ChannelThreadDemo />}+ /></FeaturePageSection>- <FeatureComparisons comparisons={chatComparisons} />+ <FeatureComparisons+ title="Compare Team Chat Apps"+ comparisons={chatComparisons}+ /><FeaturePageFaqid="channels-faq-title"- title="FAQ"+ title="Questions about Macro Chat"items={[{- q: 'What happens when I share an email?',- a: (- <>- The channel can read the full thread, including new replies. See{' '}- <a href="/email">email sharing</a>.- </>- ),+ q: 'How do I start a channel with my team?',+ a: 'Create a channel and invite people by name or email. Choose a team channel for conversations teammates can discover, or a private channel for invited people only.',},{- q: 'Can a message become a task?',+ q: 'Can I bring conversations from another app?',a: (<>- Yes. Use a message’s Task action, or ask an agent to create one.- See <a href="/tasks">Macro Tasks</a>.+ See <a href="/migrate">migration options</a> for supported+ imports and what carries over. Importing conversation history is+ separate from keeping another app in sync.</>),},{- q: 'Can I quiet a noisy channel?',- a: 'Yes. Mute or snooze notifications for any channel from its menu.',- },- {- q: 'Which agents can I mention?',+ q: 'Can I share emails, documents, and tasks in chat?',a: (<>- Macro’s agents, or agents you connect to your workspace. See how- to <a href="/agents">bring your own agent</a>.+ Yes. Mention workspace items to open them beside the+ conversation. A shared email includes the thread and later+ replies, but does not let recipients send from your mailbox. See{' '}+ <a href="/email">email sharing</a>.</>),},{- q: 'How do we get started?',+ q: 'Can agents help in a channel?',a: (<>- Create a channel and invite your team by email. Bringing work- over from another app? See{' '}- <a href="/migrate">how to move to Macro</a>.+ Yes. Mention an available agent to answer questions, draft work,+ or create and update tasks from the conversation. See{' '}+ <a href="/agents">Macro Agents</a>.</>),},{- q: 'Can I join as a Guest for free?',+ q: 'Who can see a channel and its files?',+ a: 'Team channels are discoverable by the team; private channels are limited to invited members. New members can read the channel’s history. Sharing files in a channel gives members access, so check membership before sharing sensitive work.',+ },+ {+ q: 'Can I mute a busy channel?',+ a: 'Yes. Mute or snooze its notifications from the channel menu without leaving the conversation.',+ },+ {+ q: 'Can I try Macro for free?',a: (<>- Yes. Guest access is free. See <a href="/pricing">pricing</a>{' '}- for current access and limits.+ Yes. Macro has a free plan with usage limits. See{' '}+ <a href="/pricing">plans and limits</a> before choosing a plan+ for your team.</>),},diff --git a/apps/marketing/src/features/marketing/views/ProductDocumentsPage.tsx b/apps/marketing/src/features/marketing/views/ProductDocumentsPage.tsxindex 2584609b47..3f9d3c7623 100644--- a/apps/marketing/src/features/marketing/views/ProductDocumentsPage.tsx+++ b/apps/marketing/src/features/marketing/views/ProductDocumentsPage.tsx@@ -1,5 +1,6 @@import { setPageSeo } from '../../../app/utils/utilSeo';import { FeatureComparisons } from '../components/comparisons/FeatureComparisons';+import { DemoInteractionBoundary } from '../components/DemoInteractionBoundary';import { DocumentOrganizationDemo } from '../components/documents/DocumentOrganizationDemo';import { DocumentProjectDemo } from '../components/documents/DocumentProjectDemo';import {@@ -19,35 +20,48 @@ import { documentComparisons } from '../core/feature-comparisons';const documentsFaq = [{- q: 'How is organizing docs different from Notion?',- a: 'Notion stores uploaded files in pages or database properties. Importing a supported document converts its contents into a Notion page. Macro keeps docs and files as workspace items you can put in folders and tag alongside emails and tasks. Both support Markdown import and export.',+ q: 'What can I write in Macro?',+ a: 'Create notes, briefs, proposals, and handbooks with headings, checklists, tables, images, and code. Link relevant emails, tasks, and files directly in your document.',},{- q: 'What can I write in Macro?',- a: 'Notes, briefs, proposals, handbooks, and everyday drafts. Use headings, checklists, tables, images, code, and Markdown shortcuts. Write together in real time and leave comments on specific text.',+ q: 'Can I import and export my documents?',+ a: (+ <>+ Import Notion pages or upload files. Export native Macro documents as+ Markdown. See <a href="/migrate">migration options</a> for your current+ tools.+ </>+ ),},{- q: 'How does live collaboration work?',- a: 'Macro uses CRDTs to merge edits from people and agents, even within the same paragraph. Everyone sees changes as they happen. You can also browse earlier versions of a doc and make a new copy from one.',+ q: 'Can my team and agents edit together?',+ a: (+ <>+ Yes. People and agents can edit the same document in real time, and+ teammates can comment on specific text. Ask an agent to update the+ document while you keep writing. See <a href="/agents">Macro Agents</a>.+ </>+ ),},{- q: 'Can I keep writing offline?',- a: 'Yes. Keep editing an open doc when your connection drops. Changes save on your device and merge with your team’s edits when you reconnect.',+ q: 'Who can access a document I share?',+ a: 'Choose view, comment, or edit access when sharing. Mentioning a document in a channel gives its members access. Sources linked inside it keep their own permissions.',},{- q: 'Who can open a doc I share?',- a: 'Share with individuals or mention the doc in a channel to give its members access. Choose view, comment, or edit access. Sources linked inside the doc keep their own permissions.',+ q: 'Can I share a document outside my team?',+ a: 'Yes. Share by email address, or enable a public link for a document preview people can view without an account. Check the sharing settings before making private work public.',},{- q: 'Can I share with someone outside Macro?',- a: 'Yes. Share by email address or enable a public link. People can view the public document preview without creating an account.',+ q: 'Can I keep writing offline?',+ a: 'You can keep editing an open document if your connection drops. Changes save on your device and sync when you reconnect.',},{- q: 'Can I bring my docs in and take them out?',+ q: 'Can I try Macro for free?',a: (<>- Import Notion pages or upload files. Export native Macro docs as- Markdown. See <a href="/migrate">moving to Macro</a>.+ Yes. Macro has a free plan with usage limits. See{' '}+ <a href="/pricing">plans and limits</a> before choosing a plan for your+ team.</>),},@@ -65,20 +79,16 @@ export function RouteDocuments() {<div class="docs-page"><ProductHeroproduct="Docs"- title={['Write with your team', 'and your agents.']}- description={[- 'Write together using your emails, tasks,',- 'and conversations already in Macro.',- ]}+ title={['Fast collaborative docs', 'for your team and agents.']}+ description="Link emails, chats, tasks, and files to your documents."cta="documents_hero_get_started"/><WorkspaceDesktopDemoheroFrameview="documents"label="Explore Macro Docs"- >- <DocumentProjectDemo />- </WorkspaceDesktopDemo>+ render={() => <DocumentProjectDemo teamEditing />}+ /><navclass="feature-page-jump-links docs-jump-links"aria-label="On this page"@@ -98,41 +108,47 @@ export function RouteDocuments() {</nav><FeaturePageSectionid="document-agents"- title="Write alongside your agent."- description="Ask it to use your emails and tasks to update the doc. Both of you can edit the same paragraph, with changes merging as you type."+ title={['Edit docs with your', 'agent in real time.']}+ description="Ask your agent to update a doc and watch it update in real time. You and your team can continue editing the document while the agent writes.">- <div class="feature-page-visual">- <DocumentAgentDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <DocumentAgentDemo />}+ /></FeaturePageSection><FeaturePageSectionid="document-links"- title="Open emails and tasks beside your doc."- description="Link to the work you’re writing about. Open the original email, task, or conversation without closing your doc."+ title={['Tag emails, files,', 'and chats in your docs.']}+ description="Link to the work you’re writing about and open it beside your document. Read the original email, task, or conversation while you write.">- <div class="feature-page-visual docs-wide-demo">- <DocumentMentionsDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual docs-wide-demo"+ render={() => <DocumentMentionsDemo />}+ /></FeaturePageSection><FeaturePageSectionid="document-organization"- title="Organize docs with folders and tags."- description="Keep a doc in its folder and find it through any of its tags, alongside related emails and tasks."+ title={['Organize docs', 'with folders and tags.']}+ description="Keep documents in folders and use tags to find them across projects. A brief can stay in its home folder while appearing beside related emails and tasks under the tags your team uses.">- <div class="feature-page-visual">- <DocumentOrganizationDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <DocumentOrganizationDemo />}+ /></FeaturePageSection><sectionid="documents-comparison"aria-label="Compare Macro and Notion">- <FeatureComparisons comparisons={documentComparisons} />+ <FeatureComparisons+ title="Compare Workspaces"+ comparisons={documentComparisons}+ /></section><div><FeaturePageFaqid="documents-faq-title"- title="Frequently asked questions"+ title="Questions about Macro Docs"items={documentsFaq}/></div>diff --git a/apps/marketing/src/features/marketing/views/ProductReviewsPage.tsx b/apps/marketing/src/features/marketing/views/ProductReviewsPage.tsxindex 8d11ac05fc..1806a70e18 100644--- a/apps/marketing/src/features/marketing/views/ProductReviewsPage.tsx+++ b/apps/marketing/src/features/marketing/views/ProductReviewsPage.tsx@@ -1,4 +1,5 @@import { setPageSeo } from '../../../app/utils/utilSeo';+import { DemoInteractionBoundary } from '../components/DemoInteractionBoundary';import { FeaturePageFaq, FeaturePageSection } from '../components/FeaturePage';import { HomepageClosing } from '../components/HomepageClosing';import {@@ -19,41 +20,48 @@ import { WorkspaceDesktopDemo } from '../components/WorkspaceDesktopDemo';const githubFaq = [{q: 'How do I connect GitHub?',- a: 'Link your GitHub account in Settings under Account.',+ a: 'Link your GitHub account in Macro’s Settings. Your GitHub permissions determine which repositories and pull requests you can access.',},{- q: 'What stays on GitHub?',- a: 'Your repositories, branches, CI, and repository permissions stay on GitHub. Macro brings pull requests, code changes, and review discussions into your workspace. Submit approvals and review comments on GitHub.',+ q: 'What can I do with pull requests in Macro?',+ a: 'Open a linked pull request from chat, inspect its changes, and read the discussion alongside your work. Your repositories, branches, CI, and repository settings stay on GitHub.',},{- q: 'How do pull requests link to tasks?',+ q: 'How do pull requests update tasks?',a: (<>Include the task ID in the branch name, PR title, or description.- Opening the PR moves the linked task to In Review. Merging it marks the- task Completed. Closing it without merging returns the task to Not- Started. <a href="/tasks">More about tasks</a>.+ Opening the PR moves the task to In Review; merging completes it.+ Closing without merging returns it to Not Started. See{' '}+ <a href="/tasks">Macro Tasks</a>.</>),},{- q: 'Can I merge a pull request in Macro?',- a: 'Yes. Open the PR and choose Merge. You confirm before it merges, and GitHub applies your repository permissions and merge requirements.',- },- {- q: 'Which coding agents can I use?',+ q: 'Can a coding agent work from a team conversation?',a: (<>- Bring coding agents such as Cursor or Claude Code into your channels.{' '}- <a href="/agents">See how to connect your agents</a>.+ Yes. Give an available coding agent the conversation and relevant work+ as context. It can prepare a change and link the resulting pull request.+ See <a href="/agents">agent connections and availability</a>.</>),},{- q: 'Is there a free plan?',+ q: 'Who can merge a pull request?',+ a: 'Users with the required GitHub access can merge eligible pull requests in Macro after confirming. GitHub’s branch protections still apply. Macro’s Merge button requires a ready PR with passing checks.',+ },+ {+ q: 'Can I submit a code review in Macro?',+ a: 'You can inspect changes and read the review discussion in Macro. Submit formal approvals and review comments on GitHub.',+ },+ {+ q: 'Can I try Macro for free?',a: (<>- Yes. See <a href="/pricing">pricing</a> for current limits.+ Yes. Macro has a free plan with usage limits. See{' '}+ <a href="/pricing">plans and limits</a> before choosing a plan for your+ team.</>),},@@ -71,7 +79,7 @@ export function RouteGithub() {<div class="github-page"><ProductHeroproduct="for GitHub"- title={['Open pull requests', 'right in Macro.']}+ title={['Write code, review PRs,', 'and ship in Macro.']}description={['Read the discussion, inspect code changes,','and keep linked tasks up to date.',@@ -82,9 +90,8 @@ export function RouteGithub() {heroFrameview="home"label="Explore GitHub in Macro"- >- <GithubPrHero />- </WorkspaceDesktopDemo>+ render={() => <GithubPrHero />}+ /><nav class="feature-page-jump-links" aria-label="On this page"><a href="#pr-links"><ContextGraphic />@@ -105,26 +112,28 @@ export function RouteGithub() {</nav><FeaturePageSectionid="pr-links"- title="Open the PR from the conversation."- description="Share a pull request in chat. Its status stays current, and the changes are a click away."+ title={['Review pull requests', 'without leaving chat.']}+ description="Share a GitHub pull request in chat and open it from the conversation. Read the discussion and inspect the code changes while the linked PR’s status stays up to date.">- <div class="feature-page-visual">- <GithubConversationDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <GithubConversationDemo />}+ /></FeaturePageSection><FeaturePageSectionid="pr-tasks"- title="Merge the PR and the task updates."- description="Link a PR to a task. The task moves to In Review when the PR is created, and Completed when it merges."+ title={['Link pull requests', 'to tasks.']}+ description="Keep implementation and task tracking connected. Link a pull request to its task, then let opening, merging, or closing the PR update the task’s status.">- <div class="feature-page-visual">- <GithubTaskDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <GithubTaskDemo />}+ /></FeaturePageSection><FeaturePageSectionid="coding-agents"- title="Ask an agent to fix a bug."- description="Tag @Cursor in the conversation. Open its pull request to see what changed."+ title={['Turn bug reports and', 'feature requests into PRs.']}+ description="Ask your coding agent to fix a bug as it comes up in your team conversations. It’ll see what was said and understand your request, then put up a PR."><div class="feature-page-visual"><GithubConversationDemo agent />@@ -132,16 +141,17 @@ export function RouteGithub() {</FeaturePageSection><FeaturePageSectionid="review-inbox"- title="Review requests in your inbox."- description="See GitHub review requests, comments, and mentions alongside your messages, tasks, and email."+ title={['See review requests', 'in one inbox.']}+ description="Find GitHub mentions, comments, and requested reviews alongside the rest of your work.">- <div class="feature-page-visual">- <ReviewInboxDemo />- </div>+ <DemoInteractionBoundary+ class="feature-page-visual"+ render={() => <ReviewInboxDemo />}+ /></FeaturePageSection><FeaturePageFaqid="github-faq"- title="Frequently asked questions"+ title="Questions about Macro for GitHub"items={githubFaq}/></div>diff --git a/apps/marketing/src/features/setup/Homepage.tsx b/apps/marketing/src/features/setup/Homepage.tsxindex 3cca7bbe61..71cd5f858b 100644--- a/apps/marketing/src/features/setup/Homepage.tsx+++ b/apps/marketing/src/features/setup/Homepage.tsx@@ -1,8 +1,9 @@+import ArrowRight from '@phosphor/arrow-right.svg';import { createSignal } from 'solid-js';import { HomepageScrollCue } from '../marketing/components/HomepageScrollCue';-import { routePhoneToMobileSignup } from '../marketing/core/navigation';import { HomepageSections } from '../marketing/components/HomepageSections';import { HomepageUnification } from '../marketing/components/HomepageUnification';+import { routePhoneToMobileSignup } from '../marketing/core/navigation';import { OnboardingShell } from './components/OnboardingShell';import { WelcomeStep } from './components/WelcomeSteps';@@ -36,11 +37,12 @@ export function Homepage() {action={<div class="homepage-hero-action mt-6 flex justify-center pb-5"><a- class="site-nav-start homepage-hero-cta"+ class="site-nav-start homepage-hero-cta homepage-primary-cta"href="/app/signup"onClick={routePhoneToMobileSignup}>- Get Started+ <span>Get started</span>+ <ArrowRight aria-hidden="true" /></a></div>}diff --git a/apps/marketing/src/features/setup/cream-preview.css b/apps/marketing/src/features/setup/cream-preview.cssindex 1d4703c95a..0308d608c8 100644--- a/apps/marketing/src/features/setup/cream-preview.css+++ b/apps/marketing/src/features/setup/cream-preview.css@@ -65,14 +65,10 @@ html[data-palette='cream'] .site-header {--nav-menu-shadow: 0 20px 60px #1d1c1a26, inset 0 1px 0 #ffffff80;--nav-edge: rgb(29 28 26 / 10%);}-html[data-palette='cream'] .site-nav-demo { color: #1d1c1a; background: linear-gradient(165deg, #f3f0e9 35%, #ebe7df 100%); }-html[data-palette='cream'] .site-nav-demo::after { background: linear-gradient(135deg, #ffffff60 0%, #ffffff1c 24%, #00000005 60%, #0000001c 100%); }html[data-palette='cream'] .site-menu-panel a:hover { background: #1d1c1a0a; }html[data-palette='cream'] .site-header :focus-visible { outline-color: #1d1c1a; }html[data-palette='cream'] .site-header[data-menu-open=true]::before { background: #f5f1e8; }-/* The primary CTA stays raised; the secondary keeps a quieter cream finish. */-html[data-palette='cream'] :is(.site-nav-start, .site-nav-demo) { box-shadow: inset 0 1px 0 #fff, inset 0 -2px 2px #0000000f, 0 0 0 1px #1d1c1a14, 0 10px 24px -14px #1d1c1a59; }-html[data-palette='cream'] .site-nav-demo { box-shadow: inset 0 1px 0 #ffffff40, inset 0 -1px 1px #00000003, 0 0 0 1px #1d1c1a09, 0 3px 10px -6px #1d1c1a0a; }+html[data-palette='cream'] .site-nav-start:not(.site-nav-open) { border-color: #1d1c1a26; }/* ---- Email composer -------------------------------------------------- */html[data-palette='cream'] .homepage-email-surface { background: var(--color-surface-1); color: #1d1c1a; box-shadow: 0 10px 40px -12px #1d1c1a26; }@@ -114,8 +110,8 @@ html[data-palette='cream'] .homepage-sheet-add-rows { background: #1d1c1a08; bor/* ---- GitHub / open source -------------------------------------------- */html[data-palette='cream'] .homepage-github-mark { background: var(--color-surface-3); box-shadow: 0 0 0 7px #1d1c1a05; color: #1d1c1a; }-html[data-palette='cream'] .homepage-embedded-window { background: #faf8f3; border-color: #1d1c1a1a; box-shadow: 0 32px 70px -24px #1d1c1a40; }-html[data-palette='cream'] .homepage-embedded-stage::after { background: linear-gradient(to bottom, transparent, #f5f1e855 35%, #f5f1e8bb 65%, #f5f1e8 96%); }+html[data-palette='cream'] .homepage-embedded-demo { --demo-page: #f5f1e8; }+html[data-palette='cream'] .homepage-embedded-window { background: #faf8f3; }html[data-palette='cream'] .homepage-demo-slide-copy h2 { color: #1d1c1a; }/* ---- Sample workspace (/demo, embedded on the homepage) ----------------@@ -144,24 +140,14 @@ html[data-palette='cream'] .dummy-route {/* ---- Demo backdrops ---------------------------------------------------The frames fade from the ink color, which is near-black here; use a faint- ink wash instead. The embedded workspace's purple/teal wallpaper becomes- the warm neutrals of the ad set. */+ ink wash instead. */html[data-palette='cream'] .homepage-crm .mdf-frame {background: linear-gradient(to bottom, #1d1c1a12 0%, #1d1c1a08 45%, #1d1c1a03 78%, transparent 100%);}html[data-palette='cream'] .homepage-crm .mdf-frame::before {background: linear-gradient(to bottom, #1d1c1a14 0%, #1d1c1a0a 45%, transparent 100%);}-html[data-palette='cream'] .homepage-embedded-wallpaper {- background:- radial-gradient(ellipse at 8% 20%, #e7dfd2 0%, transparent 53%),- radial-gradient(ellipse at 72% 0%, #dde3da 0%, transparent 55%),- radial-gradient(ellipse at 30% 100%, #e4e1d1 0%, transparent 57%),- radial-gradient(ellipse at 100% 90%, #ebdfd0 0%, transparent 55%),- #ebe6dc;-}-html[data-palette='cream'] .homepage-demo-slide-dot span { background: #cfcac0; }-html[data-palette='cream'] .homepage-demo-slide-dot[aria-pressed=true] span { background: #1d1c1a; }+html[data-palette='cream'] .homepage-demo-slide-copy h2 { color: var(--color-ink); }/* ---- Chat bubbles ------------------------------------------------------Match dark mode's hierarchy with warm cream tones: sent messages have a@@ -240,10 +226,10 @@ html[data-palette='cream'] .site-menu-trigger { color: #1d1c1a; }as the homepage, including the menus revealed by interaction. */html[data-palette='cream'] :is(.mail-sharing-stage .mail-app,- .email-tags-demo .mail-app,+ .email-accounts-demo .mail-app,+ .email-editing-stage .mail-app,.email-keyboard-stage .mail-app,.mail-sharing-stage .mail-share-form,- .mail-shared-thread,.mail-arrived-reply,.crm-pipeline-frame,.tasks-conversation-demo .tlc-frame@@ -251,20 +237,13 @@ html[data-palette='cream'] :is(background: var(--color-surface-1) !important;color: var(--color-ink);}-html[data-palette='cream'] .email-tags-demo .email-auto-tag-menu {- background: var(--color-surface-2);- border-color: var(--color-edge);- box-shadow: 0 16px 40px #1d1c1a26;-}html[data-palette='cream'] :is(- .email-tags-demo .mail-row[aria-current='true'],.email-keyboard-stage .mail-row[aria-current='true']) {background: var(--color-active);box-shadow: inset 2px 0 var(--color-accent);}html[data-palette='cream'] :is(- .mail-shared-thread > strong,.chat-shortcut-dock > button:hover,.chat-shortcut-dock > button[data-active='true'],.email-keyboard-stage .email-shortcut-dock > button[data-active='true'],@@ -289,7 +268,6 @@ html[data-palette='cream'] :is(.homepage-email-generating,.homepage-email-toolbar button,.homepage-email-sent,- .email-desktop-caption,.homepage-demo-carousel button,.homepage-demo-launch) { color: var(--color-ink-muted); }@@ -299,10 +277,6 @@ html[data-palette='cream'] .homepage-history svg text { fill: var(--color-ink-muhtml[data-palette='cream'] .homepage-history .docs-timeline-stamp { fill: #42658a; }html[data-palette='cream'] .homepage-embedded-loading { color: var(--color-ink-muted); }html[data-palette='cream'] :is(- .mail-shared-thread-label,- .mail-shared-thread-label > span,- .mail-shared-thread-preview,- .mail-shared-thread-footer,.mail-arrived-reply header span,.email-tag-count) { color: var(--color-ink-muted); }@@ -435,7 +409,7 @@ html[data-palette='cream'] .homepage-sheet-toolbar .homepage-sheet-tool {color: var(--color-ink-muted);}-/* Slab display copy stays pure black across every cream page, including+/* Slab display copy uses warm near-black across every cream page, includingsecondary headline lines that otherwise inherit a muted text color. */html[data-palette='cream'] :is(h1, h2, h3,@@ -451,7 +425,7 @@ html[data-palette='cream'] :is(.unification-before,.sales-calc-saved strong) :is(span, em, strong, a) {- color: #000 !important;+ color: #1d1c1a !important;}/* Orbit surfaces previously mixed dark ink into the page.@@ -463,8 +437,6 @@ html[data-palette='cream'] :is(.ob-welcome-logo, .ob-orbit-tile) {/* One primary CTA finish across the public site. Legacy pages use inlineskins and important flat-button rules, so override that skin here. */html[data-palette='cream'] :is(- .site-nav-start,- .feature-page-cta,.home-hero-cta:not([href^='mailto:']),.base-header-pill-cta,.pricing-cta-button,@@ -492,8 +464,6 @@ html[data-palette='cream'] :is(0 0 0 1px #1d1c1a11, 0 10px 24px -14px #1d1c1a4c !important;}html[data-palette='cream'] :is(- .site-nav-start,- .feature-page-cta,.home-hero-cta:not([href^='mailto:']),.base-header-pill-cta,.pricing-cta-button,@@ -597,9 +567,9 @@ html[data-palette='cream'] .feature-flow {}/* Add weight to the existing slab styles without changing their type scale. */-html[data-palette='cream'] { --cream-slab-weight-increase: 15; }-html[data-palette='cream'] [class*='font-[Roboto_Slab'] { font-weight: 330; }-html[data-palette='cream'] .tasks-founder-card h2 { font-weight: 415; }+html[data-palette='cream'] { --cream-slab-weight-increase: 45; }+html[data-palette='cream'] [class*='font-[Roboto_Slab'] { font-weight: 360; }+html[data-palette='cream'] .tasks-founder-card h2 { font-weight: 445; }/* Product walkthroughs sit above the cream canvas, like the homepage composer. */html[data-palette='cream'] :is(.product-page, .feature-page) :is(