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): unify product pages and interactive demos (#7859)
Chaitanya Agarwal1615f4068b04
diff --git a/apps/marketing/README.md b/apps/marketing/README.mdindex 1f36176475..de6c8bc06d 100644--- a/apps/marketing/README.md+++ b/apps/marketing/README.md@@ -356,3 +356,311 @@ search mode, revealing direct creation keys. Escape or clicking outside dismisseit. `C` is ignored while editing text or while a dialog is open. Section-specificNew task/New email buttons retain their direct creation actions. The dialog portalmounts inside the workspace so the scoped UI styles and theme remain available.++## Migration page++`/migrate` explains what to bring over, how connected agents find relevant work,+and how to review the imported result and bring the team over. `MigrationPaths`+owns source-specific instructions; `MigrationPathSelector` owns responsive+selection and keyboard focus. Individual comparisons belong at the end of+product FAQs. The compact all-tools overview stays visible on migration.++The Notion page importer copies supported page content into native docs and+excludes databases. Linear imports stage issue metadata and create native tasks;+the CSV route has a preview and assignee mapping. Pipedream supplies connected+app tools to agents. Connecting, importing a copy, and ongoing Gmail sync are+different behaviors; do not promise a complete workspace clone or ongoing sync+for imported Notion pages and Linear tasks. Check implementation before changing+these claims. Verify paths, dropdown dismissal, keyboard navigation, practical+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+stays 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+are not shown in the UI. Icon-only comparison tables are not exported as prose+FAQ answers. Verify table columns, keyboard focus, scrolling, and existing+functional FAQs after moving or adding a comparison.+++## Agents page and shared agent sample++`/agents` shows three fictional workflows based on observed product use:+- A channel mention consolidates customer support, testing notes, and existing+ work into an editable client file upload brief.+- A personal agent progressively checks the calendar, reads the email and call,+ then presents its findings and creates the brief. Visitors can inspect those+ sources. 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+ of 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.++`AgentWorkflowStories.tsx` owns these scenes and `workflowData.ts` their local+records. The hero uses `DummyWorkspace` with `agentShowcase`; its open-workspace+link uses `/demo?scene=agents` to show the same conversation and records. Plain+`/demo` keeps its usual starting view. Existing Northwind samples remain available+in the general workspace but are no longer the Agents page’s story.++All scenes start in one pane. Record buttons open native document, email, task,+channel, or calendar viewers. Back and Escape return to the conversation and+restore focus. Edited documents persist when reopened. Agent-authored prose uses no inline bold emphasis. Generated files are inline document+mentions, opening the existing editor; do not replace them with custom summary+cards or source strips. The fourth navigation item, Tools to act, continues the hero: Julia mentions the agent in the document’s own discussion. The agent replies+to Julia, types three test checks into the existing editor with a named remote+caret, then confirms the edit in that thread. The cursor follows the insertion+point while the discussion is kept in view on every update. Scroll anchoring is+disabled in these two scenes; extra scroll room keeps output above the site’s+viewport fade. Pointer, keyboard, or wheel input stops playback.+The compact document keeps the edits and discussion visible together. Input+stops the update and preserves the visitor’s edits. Channel scenes reuse WorkspaceChannel, including its tabs,+thread layout, composer, and message controls. Scene input+stops autoplay; reduced motion shows the complete collaboration immediately.+The approval message precedes the coding result. The PR stays open for review;+no real agents, messages, repositories, or services are invoked.++Browser checks: follow the hero’s sources and brief, edit and reopen the brief,+inspect both meeting sources and the calendar, then open the mockup, coding+session, and PR. Test keyboard return, composer input, sidebar navigation,+phone widths, and the standalone demo link. Keep source and output records in+agreement; never use private customer records or internal screenshots as assets.++Presentation and behavior were reviewed against app commit `9d06e08e`. The source+map lives in `scripts/agent-ui-sources.json`. After fetching a new app reference,+run `./marketing check:agent-ui` from the repository root (or pass a Git ref).+This reads Git objects, so it works in sparse checkouts. Changed or missing source+fails the check and identifies the demo to review. It does not assert pixel parity+or that the app commit has shipped. Review changed source and desktop/mobile+screens before updating individual baseline hashes. No app modules are imported+into the website at runtime.++Agent conversation rows follow AgentSessionRow: 32px normally, 48px minimum with+code metadata, a timestamp on the right, and an empty leading status slot for+completed/read sessions. The transcript's turns must not flex-shrink; overflow+scrolls above the composer. At less than 720px of available app-view width, the+sidebar collapses. Measure the embedded container, not the browser viewport.+Check the hero around 895px browser width and source panes after resizing.+++The Agents hero keeps a 1000×640 desktop canvas at browser widths of 700px and+above, scaled proportionally inside its frame. Its sidebar must remain visible+at 768px and 895px; the canvas must not trigger a narrow app layout. Phones use+the responsive workspace and navigation drawer. Verify menu anchoring as well as+sidebar visibility after resizing. BYOA presents macrod and external MCP as two+connection paths, side by side on desktop and stacked on phones. Both setup links+remain visible. MCP commands reuse `AgentMcpSetup` inside an optional disclosure+without a fixed-height demo window. Verify each client expands and copies its+command. The closing FAQ answers model, access, review, and background-work questions.++## 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,+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.+The source demo uses the same wide frame as Chat and opens email and task panes+beside the persistent editor. Each source closes independently. Narrow screens+show the active pane and return through the remaining panes on close. References link back to #website.+An unboxed prompt and progressive tool calls lead into the shared editor. Search+results stay mounted and can be opened. Agent and human insertions overlap within+one paragraph; manual interaction freezes playback before input. Tool calls finish+before the pricing rewrite starts and compact on completion. The prompt has no+entrance movement, and the transcript plus final paragraph reserve their layout+space while edits run. Completion folds the tools and their reserved space away+with the same transition; text and headings inside the doc retain their positions.++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.++Verify folder and tag navigation, search, source open/close with Escape and focus+restoration, edits surviving navigation, local sharing, tool inspection,+offscreen pause, and reduced motion. Compare desktop and mobile without a fade+covering the editor. Tests: `DocumentStories.test.tsx`. The checkmark comparison covers document capabilities. Notion uploads live in+page blocks or database properties; imports can convert supported files to pages.+Both tools support file uploads and Markdown import/export. The comparison makes+the folder and cross-workspace differences explicit without claiming file formats+are unsupported or comparing plan-specific upload limits.++## Calls page walkthrough++Three sections follow the navigation: start a call, act on decisions, and find+past calls. Recording playback and clickable transcripts stay in the hero’s+After the call view and the records opened from call history. Calls omits the hero CTA; the header and closing CTA remain.+Participant tiles are equal-sized in the marketing call grid, including You.+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 holds+the chat, then an unnamed pointer moves to Call and clicks. Connecting and+participants 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.++`/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's+In 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+local and has no call audio or network effects.++The hero shows camera-off participants and call controls, with no screen-share+scene. Never stretch profile photos into video feeds or animate them as+speakers. The marketing call controls omit team sharing and disable camera and+background and screen-sharing settings that need real media. Call history stops on its list;+opening a record is a visitor action.++The follow-up changes training ownership from Teo to Julia and adds three+unchecked next steps. Replies reuse the agent answer renderer with named call+and task mentions, subtle name underlines, call timestamps, and task properties.+Tool rows use plain Read call transcript text and bordered ItemPreview chips;+the group collapses when the run finishes. It starts and finishes in one pane, including with reduced+motion. Only clicking a linked call or task opens a detail pane. Phones show+one pane at a time. Close and Escape return focus and preserve task edits. Arbitrary messages stay+local and do not trigger the scripted task update. Check call controls, channel+tabs, transcript seeking, source links, task ownership/checklists, and FAQs on+desktop, tablet, and phones. Confirm all controls stay above the visual fade.++Copy distinguishes automatic recording/transcription and agent access from+requested task/document edits. Team sharing for channel calls is separate from+channel membership; standalone calls do not automatically enter team memory.+Guests can join instant or scheduled meetings through a link without an account.+Guest participation does not grant access to the channel or saved recording. Keep plan details in the FAQ; the Calls hero and demos have+no pricing footnote or explanatory captions.++## Tasks page walkthrough++`/tasks` follows a customer proposal: draft the scope and delivery timeline,+then review pricing. Examples use substantive work without fictional customer+backstory. The context section opens a task with native inline mentions of its+Customer brief, Proposal request email, and sales conversation. Sources open beside+the task on wide frames and replace it on phones; Close and Escape restore focus+and preserve task and linked-document edits. Renaming the brief also updates its+inline mention. The checklist-conversion section is no longer on the page. Tasks-only fixtures+live in `components/tasks/taskProject.ts`; each demo has independent local state.+The hero uses the native Tasks and Projects presentation in `TasksWorkspace*`,+with three project records and twelve tasks seeded by `tasksWorkspaceData.ts`.+`createTasksWorkspace.ts` owns local navigation, project membership, filters, and+per-project layout settings. The sidebar has Task views, My projects, and Tags;+project detail has Overview and Tasks tabs, with native breadcrumbs back from tasks.+The toolbar has separate layout/sort/group/filter menus. Project task search expands+from its icon and clears on Escape; Add existing tasks is an anchored selector.+New tasks inherit their current project. Edits and project moves remain visible+across the main list, project lists, and board. `WorkspaceDesktopDemo` opts this+hero into the Tasks presentation; other feature demos keep their own fixtures.+Keep the frozen presentation aligned with `apps/web/src/features/tasks-view`,+`features/projects`, and `components/view-shell`, without importing application+providers or service clients into the website.+Source navigation shares task state; Close and Escape return to the task and+restore focus. The channel agent creates proposal and pricing tasks, then reassigns the proposal+only after the illustrated request. Both responses are threaded replies to+Jacob. The first request types into the channel composer. The follow-up is a+plain-text reply in that same thread, without another @Macro mention. Playback+waits 1.4 seconds before each agent reply and holds the first result for 2.2+seconds before the follow-up. It starts when the main composer is fully visible.+Composer handles and explicit reply state drive playback; no synthetic input or+Reply/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;+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-detail+frames grow to fit the discussion and composer above the decorative fade; verify+no inner scrolling or horizontal clipping at desktop and phone widths. The full+workspace list keeps its normal scrolling. Jacob’s quote links to his Linear article.++Verify task edits, source navigation, owner/status menus, inline source links and+return navigation, the agent’s reassignment, and comparison FAQs on desktop and mobile.+Comparisons live in individual FAQ answers for Jira, Linear, Notion, and ClickUp;+keep them specific to workflows. Notion supports task databases, subtasks, and+dependencies. Do not describe it as lacking granular tasks or imply that all+Macro tasks complete automatically. Keep migration, pricing, and comparison links.++## Chat page++`/channels` leads with opening referenced work, then channel-based access, agents,+and a combined catch-up section. Keep docs, tasks, and email references inline+in messages. Chat fixtures include original, scrollable history. The opening+walkthrough starts full-width, scrolls back, then moves and clicks the shared+cursor to open a doc and an email in the split. Manual input stops it.+The document stays mounted when email opens in a third split. The hero uses the+same split surface through its opt-in `chatSplits` prop, retaining native sidebar+navigation and the page-owned channel/DM fixtures. Wide layouts divide the+available content width equally among all open panes; widths below 240px per+pane 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+continues from Macro creating Julia’s task to Julia mentioning Cursor and Cursor+investigating 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,+without the Home sidebar or inbox shortcuts. Three original conversations show+visible reply previews. Threads expand when the visitor selects more replies;+there is no automatic scroll or expansion. The initial scroll position starts at the first conversation, while the+composer and remaining history stay available. Verify thread expansion, a reply+staying in its original thread, reactions, keyboard dismissal, and mobile wrapping. Keep examples+short and conversational; omit under-demo captions. All interactions are local.++## GitHub page walkthrough++`/github` follows one mobile sign-in fix through its channel, task, pull request,+and coding-agent session. The hero opens the PR beside its Changes pane. Channel+playback begins unsplit, opens the inline PR, then opens Changes; interaction+stops playback. Narrow panes show the active view, and Back/Escape return to the+channel without discarding its conversation. The task demo links the PR before+moving 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.++GitHub presentation follows `block-pr/PrDetail` and `features/changes` at+`e2bd582d5f991896bbc69921ee2447def7360636`. Diffs are frozen Pierre renderer output,+regenerated by `bun scripts/generate-github-diff.ts`. No GitHub service is called;+merging and all edits are local. Verify file selection, split/expanded changes,+merge cancel/confirm, task source links, reduced motion, manual takeover, and+390px/768px/desktop layouts. Keep captions and repeated explanatory paragraphs+off this page. Source fixtures are isolated from the Tasks and Agents pages.+++Product heroes opt into `WorkspaceDesktopDemo`'s `heroFrame`: a 1200px maximum+outer width, graphite Monterey background, 50px desktop inset, and 640px content+height. Mobile heroes use 16px insets and 580px content height. The shared frame+preserves each demo's own state and the Tasks/Agents desktop canvas scaling.++Lower product demos use the standard 872px feature window, including Chat,+Docs, and GitHub. The earlier GitHub desktop-surround prototype is no longer+mounted. Chat and Docs retain equal-width source panes; when a pane would be+narrower than 240px, they use the existing single-pane navigation. Verify opening+and closing sources at desktop and phone widths, without remounting the original+conversation or document. Display names use first names. All product pages use+`HomepageClosing` for the bottom Open app CTA and the shared feature heading styles.++Chat sidebar parity: `workspace/ChatSidebar.tsx` adapts the app's+`channels-view/components/rail/ExpandedChannelsRail.tsx` with local fixtures.+It uses the shared Tabs and ViewSidebar controls, 32px section headers and a 4px+header-to-list gap. Channels and DMs scroll independently. Verify search,+section collapse, Threads navigation, and opening a mentioned source after+switching channels. Message text uses the app's 15px/24px reading size; dark+surface and edge tokens are frozen from `apps/web/src/index.css`.++Cursor replies in the Agents, Channels, and GitHub walkthroughs share+`DemoAgentChip`, adapted from the current `MagicChipView` in the app. It uses+the settled 88px rounded session card, Open session action, and an output/PR+row. Cursor mentions are participant mentions (`@Cursor`), not agent-session+links. The surrounding conversations use local fictional fixtures; verify+the session link and returning to the same conversation after playback.++The third Calls section uses `CallTeamMemoryDemo`: Julia's channel call starts+with Share with team enabled, ends into Gabriel's missed-call list, opens the+summary, then seeks the recording to Julia's decision at 1:02. Gabriel is not+an attendee. Turning sharing off leaves his list empty. Manual input pauses+automation; reduced motion opens the saved summary. Verify the checkbox,+recording navigation, transcript seeking, and phone layout. CRM linking remains+on the CRM page; this scene demonstrates channel-call team sharing only.diff --git a/apps/marketing/package.json b/apps/marketing/package.jsonindex e4c09693e4..8ee6d703f0 100644--- a/apps/marketing/package.json+++ b/apps/marketing/package.json@@ -9,7 +9,8 @@"type-check": "tsc --noEmit -p tsconfig.json","test": "vitest run -c vitest.config.ts","check:seo": "bun scripts/verify-seo.ts",- "check:seo:live": "bun scripts/verify-seo-live.ts"+ "check:seo:live": "bun scripts/verify-seo-live.ts",+ "check:agent-ui": "bun scripts/check-agent-ui.ts"},"dependencies": {"@floating-ui/dom": "^1.7.4",diff --git a/apps/marketing/scripts/agent-ui-sources.json b/apps/marketing/scripts/agent-ui-sources.jsonnew file mode 100644index 0000000000..833b32020c--- /dev/null+++ b/apps/marketing/scripts/agent-ui-sources.json@@ -0,0 +1,176 @@+{+ "commit": "9d06e08e2b914f11e167d2ad6fcd95ac0f35f13d",+ "scope": "Reviewed presentation subset and scripted behavior; not a full copy of the authenticated app.",+ "sources": [+ {+ "path": "apps/web/src/features/agents-view/components/AgentsSidebar.tsx",+ "blob": "205d0f91e21b7617300a852683add59699ade167",+ "consumer": "WorkspaceSidebar.tsx"+ },+ {+ "path": "apps/web/src/features/agents-view/components/ChatComposer.tsx",+ "blob": "c3e63b272944c8e1083685ba28fb3cdcca06c932",+ "consumer": "AgentComposer.tsx / frozen ChannelComposer"+ },+ {+ "path": "apps/web/src/features/agents-view/views/AgentPicker.tsx",+ "blob": "644caefe607e81eb8e416bbe3e339c985e53decd",+ "consumer": "AgentComposer.tsx"+ },+ {+ "path": "apps/web/src/features/agents-view/components/ModelSelector.tsx",+ "blob": "35f02624974173677c6bc5c2656fe138db756816",+ "consumer": "AgentComposer.tsx / model-picker"+ },+ {+ "path": "apps/web/src/features/agents-view/components/AgentSessionPane.tsx",+ "blob": "9b181309950e4477a80c5266ebab37cf49f49853",+ "consumer": "AgentSession.tsx"+ },+ {+ "path": "apps/web/src/features/block-agent/component/AgentMessage.tsx",+ "blob": "10dc6b5a07231ca0fe116431f583c6794f811230",+ "consumer": "AgentTranscript.tsx"+ },+ {+ "path": "apps/web/src/features/block-agent/component/Transcript.tsx",+ "blob": "462c8e16d3e87acef3826b9335698564ece3cc6f",+ "consumer": "agent-transcript.css"+ },+ {+ "path": "apps/web/src/features/block-agent/views/LiveToolGroup.tsx",+ "blob": "6894e8d176e84d901c6f2d42f162fe0beea6b183",+ "consumer": "AgentTranscript.tsx"+ },+ {+ "path": "apps/web/src/lib/core/component/AI/component/tool/email/DraftComposer.tsx",+ "blob": "3f2d5a310ea71692a10148106d598c984f8bd8a1",+ "consumer": "NorthwindSession.tsx / HomepageEmailCompose.tsx"+ },+ {+ "path": "apps/web/src/lib/core/component/AI/component/mcpConstants.ts",+ "blob": "98338de71a33e65fcf6c41652e89ad807a8f92fe",+ "consumer": "AgentStories.tsx"+ },+ {+ "path": "apps/web/src/features/routines/components/routines-list.tsx",+ "blob": "2a66fc7db375bac8c8f3a2b17c7eae4fa38afd2b",+ "consumer": "WorkspaceAgents.tsx"+ },+ {+ "path": "crates/agent_inmem/src/domain/models.rs",+ "blob": "decc815c424f62bdf0936b49b67100192fa0ad1e",+ "consumer": "agentDemoData.ts"+ },+ {+ "path": "crates/memory/src/domain/service.rs",+ "blob": "5be103c192128b793c6d0fb9ef3cf64e7478c032",+ "consumer": "ProductAgentsPage.tsx memory copy"+ },+ {+ "path": "crates/ai_tools/src/lib.rs",+ "blob": "30d01f6aad7aea8a7e1fc356b921ede9d2a05ccf",+ "consumer": "ProductAgentsPage.tsx MCP copy"+ },+ {+ "path": "crates/email/src/inbound/toolset/send_email.rs",+ "blob": "e0de1039c4f89b4dbc7642c9e21edc5ad248fe0f",+ "consumer": "NorthwindSession.tsx review behavior"+ },+ {+ "path": "apps/web/src/features/agents-view/views/NewChatPage.tsx",+ "blob": "3ec7f821a976f3f825e1318ffad98b8126521cbf",+ "consumer": "AgentComposer.tsx"+ },+ {+ "path": "apps/web/src/features/agents-view/agents-view.css",+ "blob": "cb8f3425de85c715d50422ff82ae2b97adc97ad0",+ "consumer": "agent-stories.css / dummy-workspace.css"+ },+ {+ "path": "apps/web/src/lib/core/component/AI/component/input/ModelCatalogPicker.tsx",+ "blob": "a6cfd3c3f6ac885509b03c3963937325ddad0d60",+ "consumer": "workspace/frozen/model-picker"+ },+ {+ "path": "apps/web/src/features/agents-view/core/mode.ts",+ "blob": "213815b18f93dc3dd23b9b0b16769058d1975a55",+ "consumer": "WorkspaceSidebar.tsx"+ },+ {+ "path": "apps/web/src/features/agents-view/components/AgentSessionRow.tsx",+ "consumer": "WorkspaceSidebar.tsx / dummy-workspace.css",+ "blob": "0fb7a79d857ed2197a6372c125d4281dd5ebb1cc"+ },+ {+ "path": "apps/web/src/features/agents-view/views/AgentSessionListItem.tsx",+ "consumer": "WorkspaceSidebar.tsx",+ "blob": "b07f73d6959413e1fd51f00b1b6f8c67b8726500"+ },+ {+ "path": "apps/web/src/features/agents-view/components/AgentSessionCodeDetails.tsx",+ "consumer": "WorkspaceSidebar.tsx",+ "blob": "38430aaa662dd1d28b401935884159ec2a7ced98"+ },+ {+ "path": "apps/web/src/components/view-shell/view-shell-layout.ts",+ "consumer": "dummy-workspace.css container breakpoint",+ "blob": "b54b7b0044cedf14c679eadd698bbd0daed6a040"+ },+ {+ "path": "apps/web/src/components/ui/components/UserMessageBubble.tsx",+ "consumer": "ui/components/UserMessageBubble.tsx",+ "blob": "78c0d7760622e492594fea9461505da47e7838ed"+ },+ {+ "path": "apps/web/src/features/settings/components/bring-your-own-agent.tsx",+ "consumer": "ProductAgentsPage.tsx BYOA",+ "blob": "6b1d6c918f4e19c790ae017f9d9e0aaec15d8ae0"+ },+ {+ "path": "apps/web/src/lib/core/component/LexicalMarkdown/component/decorator/DocumentMention.tsx",+ "blob": "45b27f4e840bb190143ea6dee23b291d6289bc15",+ "consumer": "AgentTranscript.tsx / AgentWorkflowStories.tsx inline mentions"+ },+ {+ "path": "apps/web/src/features/channel/Message/Layout.tsx",+ "blob": "143d73e13178296472524d99697825f3d2a2bed9",+ "consumer": "AgentWorkflowStories.tsx / frozen MessageRow"+ },+ {+ "path": "crates/agent_harness/src/outbound/channel_prompt_context.rs",+ "blob": "2bf528fbe6dce8c25e0af79b7217781c471619ae",+ "consumer": "AgentWorkflowStories.tsx conversation context"+ },+ {+ "path": "apps/web/src/features/drive-view/components/folder-composer.tsx",+ "blob": "e6f854947763cda3fbab328e2f81726e2a742a92",+ "consumer": "FolderComposerMockup.tsx"+ },+ {+ "path": "apps/web/src/components/ui/components/EntityComposer.tsx",+ "blob": "937cecbf4e15232df81d82368bf7e6a47a4a11a6",+ "consumer": "FolderComposerMockup.tsx"+ },+ {+ "path": "apps/web/src/lib/core/component/AI/component/input/SpeedToggle.tsx",+ "blob": "91d7ad89eb8b2fd1637a60e4162eae9a1e754dd9",+ "consumer": "AgentComposer.tsx new-chat speed control"+ },+ {+ "path": "apps/web/src/lib/core/component/AI/constant/speed.ts",+ "blob": "1ed8624e6ff062310f932b9a5c5728b25a8955f1",+ "consumer": "AgentComposer.tsx new-chat speed control"+ },+ {+ "path": "apps/web/src/features/channel/Thread/ThreadTerminalRail.tsx",+ "blob": "5036d3c0fe0231c5b2dbdd9db89b53b2d0e0b55b",+ "consumer": "dummy-workspace.css terminal reply connector"+ },+ {+ "path": "apps/web/src/lib/core/component/LexicalMarkdown/collaboration/remote-cursor.tsx",+ "blob": "6b4ed1dce6d2e2fe6bd0fa1b5192b22d7432d62a",+ "consumer": "agent-workflows.css / AgentDeliverableStory remote caret"+ }+ ]+}diff --git a/apps/marketing/scripts/check-agent-ui.ts b/apps/marketing/scripts/check-agent-ui.tsnew file mode 100644index 0000000000..d7e7858d18--- /dev/null+++ b/apps/marketing/scripts/check-agent-ui.ts@@ -0,0 +1,38 @@+import { execFileSync } from 'node:child_process';+import { fileURLToPath } from 'node:url';+import manifest from './agent-ui-sources.json';++// Git objects work with sparse checkouts. This compares source, not deployment+// availability or rendered pixels, and never fetches or updates the baseline.+const root = fileURLToPath(new URL('../../../', import.meta.url));+const ref = process.argv[2] ?? 'origin/main';+let drift = false;+for (const source of manifest.sources) {+ try {+ const blob = execFileSync(+ 'git',+ ['rev-parse', '--verify', `${ref}:${source.path}`],+ { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }+ ).trim();+ if (blob === source.blob) continue;+ drift = true;+ console.error(+ `Changed app source: ${source.path}\n Review: ${source.consumer}`+ );+ } catch {+ drift = true;+ console.error(+ `Cannot inspect ${ref}:${source.path}. Fetch the reference and rerun the check.`+ );+ }+}+if (drift) {+ console.error(+ `Agent demo review needed; baseline ${manifest.commit}. Do not refresh hashes without reviewing the UI.`+ );+ process.exitCode = 1;+} else {+ console.log(+ `Agent UI source check passed against ${ref} (${manifest.sources.length} files). Rendered and deployed parity still need browser review.`+ );+}diff --git a/apps/marketing/scripts/generate-github-diff.ts b/apps/marketing/scripts/generate-github-diff.tsnew file mode 100644index 0000000000..85e4af0777--- /dev/null+++ b/apps/marketing/scripts/generate-github-diff.ts@@ -0,0 +1,27 @@+import { writeFile } from 'node:fs/promises';+import { preloadDiffHTML } from '@pierre/diffs/ssr';+import { signInFiles } from '../src/features/marketing/components/reviews/githubProject';++for (const [index, file] of signInFiles.entries()) {+ const html = await preloadDiffHTML({+ oldFile: { name: file.path, contents: file.oldText },+ newFile: { name: file.path, contents: file.newText },+ options: {+ diffStyle: 'unified',+ diffIndicators: 'bars',+ disableFileHeader: true,+ overflow: 'wrap',+ hunkSeparators: 'line-info-basic',+ lineDiffType: 'none',+ expansionLineCount: 20,+ themeType: 'dark',+ },+ });+ await writeFile(+ new URL(+ `../src/features/marketing/assets/github-signin-${index}.html`,+ import.meta.url+ ),+ html.replace(/[\t ]+$/gm, '')+ );+}diff --git a/apps/marketing/scripts/verify-seo.ts b/apps/marketing/scripts/verify-seo.tsindex 58c2d022cf..e07d16581a 100644--- a/apps/marketing/scripts/verify-seo.ts+++ b/apps/marketing/scripts/verify-seo.ts@@ -22,6 +22,17 @@ const htmlFor = (route: string) =>const typesIn = (html: string) =>[...html.matchAll(/"@type"\s*:\s*"([^"]+)"/g)].map((match) => match[1]);+// Intentional copy updates; retain the captured migration baseline unchanged.+const updatedTitles: Record<string, string> = {+ '/github': 'GitHub in Macro | Pull Requests, Code Changes, and Tasks',+ '/agents': 'Macro Agents | Agents That Know What Your Team Is Doing',+ '/calls': 'Macro Calls — Turn Conversations into Tasks and Updates',+ '/channels': 'Macro Chat: Bring the Work into the Conversation',+ '/documents': 'Macro Docs | Write With Your Team and Your Agents',+ '/migrate': 'Switch your company to Macro | Migration guide',+ '/tasks': 'Macro Tasks — Task management that keeps up with your team',+};+const linksByRoute = new Map<string, string[]>();const documentsByRoute = new Map<string, ReturnType<typeof parse>>();const indexedRoutes = baseline.routes.filter(@@ -80,13 +91,8 @@ for (const previous of indexedRoutes) {(doc.getElementById('root')?.textContent?.length ?? 0) > 200,`${previous.path}: empty HTML shell`);- // The copy audit replaces the absolute ‘perfect memory’ claim. Keep the- // captured baseline intact and require the intentional replacement exactly.if (previous.path !== '/') {- const expectedTitle =- previous.path === '/calls'- ? 'Macro Calls — Recordings, Transcripts, and Agent Tools'- : previous.title;+ const expectedTitle = updatedTitles[previous.path] ?? previous.title;assert.equal(doc.title, expectedTitle, `${previous.path}: title changed`);}for (const type of previous.schemaTypes)diff --git a/apps/marketing/src/app/components/graphics/SetupGraphic.tsx b/apps/marketing/src/app/components/graphics/SetupGraphic.tsxindex f107ce0d50..71fb4a22a7 100644--- a/apps/marketing/src/app/components/graphics/SetupGraphic.tsx+++ b/apps/marketing/src/app/components/graphics/SetupGraphic.tsx@@ -366,6 +366,8 @@ export function SetupGraphic(props: {* Brand modules (including GitHub) stay in their top slots. */importButton?: {href: string;+ leadingLabel?: string;+ trailingLabel?: string;onClick?: (event: MouseEvent) => void;/** Physical horizontal correction for the CTA, applied independently of* the artwork's own SVG offset. */@@ -1096,23 +1098,24 @@ export function SetupGraphic(props: {<Supermoduleplace={importSupermoduleTransform(importVerticalOffset())}href={button().href}- ariaLabel="Import via MCP with 1 click"+ ariaLabel={`${button().leadingLabel ?? '1 click'}: ${button().trailingLabel ?? 'import via MCP'}`}onActivate={button().onClick}/><g class="supermodule-cta" aria-hidden="true"><textclass="supermodule-cta-headline"- x={IMPORT_CTA_COPY.oneClick.x}+ x={button().leadingLabel ? 350 : IMPORT_CTA_COPY.oneClick.x}+ text-anchor={button().leadingLabel ? 'end' : 'start'}y={IMPORT_CTA_COPY.oneClick.y + importVerticalOffset()}>- 1 click+ {button().leadingLabel ?? '1 click'}</text><textclass="supermodule-cta-headline"x={IMPORT_CTA_COPY.importLabel.x}y={IMPORT_CTA_COPY.importLabel.y + importVerticalOffset()}>- import via MCP+ {button().trailingLabel ?? 'import via MCP'}</text></g><pathdiff --git a/apps/marketing/src/app/components/sections/ComparisonTable.tsx b/apps/marketing/src/app/components/sections/ComparisonTable.tsxindex b720bcd531..1b8b1b0856 100644--- a/apps/marketing/src/app/components/sections/ComparisonTable.tsx+++ b/apps/marketing/src/app/components/sections/ComparisonTable.tsx@@ -31,6 +31,7 @@ export type ComparisonTableProps = {mobileMinWidth?: number;sortRows?: boolean;valueWrap?: 'normal' | 'nowrap';+ scrollLabel?: string;};function isPriceRow(row: ComparisonRow) {@@ -293,6 +294,9 @@ export function ComparisonTable(props: ComparisonTableProps) {return (<divclass="comparison-table-scroll"+ tabIndex={props.scrollLabel ? 0 : undefined}+ role={props.scrollLabel ? 'region' : undefined}+ aria-label={props.scrollLabel}style={{'-webkit-overflow-scrolling': 'touch','max-width': '100%',diff --git a/apps/marketing/src/app/components/sections/MigrationPathSelector.test.tsx b/apps/marketing/src/app/components/sections/MigrationPathSelector.test.tsxnew file mode 100644index 0000000000..df500a85c8--- /dev/null+++ b/apps/marketing/src/app/components/sections/MigrationPathSelector.test.tsx@@ -0,0 +1,78 @@+import { cleanup, fireEvent, render } from '@solidjs/testing-library';+import { afterEach, expect, it } from 'vitest';+import { setViewportWidth } from '../../utils/utilBreakpoint';+import { MigrationPathSelector } from './MigrationPathSelector';++afterEach(cleanup);++function setup(width: number) {+ setViewportWidth(width);+ return render(() => (+ <MigrationPathSelector+ tabs={['Email', 'Files & data', 'Other tools'].map((label) => ({+ id: label.toLowerCase().replace(/[^a-z]+/g, '-'),+ label,+ content: <p>Steps for {label}</p>,+ }))}+ />+ ));+}++it('moves selection and focus together through desktop tabs', () => {+ const view = setup(1440);+ const first = view.getByRole('tab', { name: 'Email' });+ first.focus();+ fireEvent.keyDown(first, { key: 'ArrowRight' });+ const notion = view.getByRole('tab', { name: 'Files & data' });+ expect(document.activeElement).toBe(notion);+ expect(notion.getAttribute('aria-selected')).toBe('true');+ expect(view.getByRole('tabpanel').textContent).toBe('Steps for Files & data');+ fireEvent.keyDown(notion, { key: 'End' });+ expect(document.activeElement).toBe(+ view.getByRole('tab', { name: 'Other tools' })+ );+ fireEvent.keyDown(document.activeElement!, { key: 'ArrowRight' });+ expect(document.activeElement).toBe(first);+ fireEvent.keyDown(first, { key: 'ArrowLeft' });+ fireEvent.keyDown(document.activeElement!, { key: 'Home' });+ expect(document.activeElement).toBe(first);+});++it.each([320, 390, 520, 700, 999])(+ 'supports the compact menu at %ipx and restores focus',+ async (width) => {+ const view = setup(width);+ const trigger = view.getByRole('button', { name: 'Email' });+ fireEvent.keyDown(trigger, { key: 'ArrowDown' });+ await Promise.resolve();+ expect(document.activeElement).toBe(+ view.getByRole('menuitem', { name: 'Email' })+ );+ fireEvent.keyDown(document.activeElement!, { key: 'ArrowDown' });+ const notion = view.getByRole('menuitem', { name: 'Files & data' });+ expect(document.activeElement).toBe(notion);+ fireEvent.click(notion);+ expect(view.queryByRole('menu')).toBeNull();+ expect(document.activeElement).toBe(trigger);+ expect(+ view.getByRole('region', { name: 'Bring over Files & data' }).textContent+ ).toBe('Steps for Files & data');+ fireEvent.click(trigger);+ await Promise.resolve();+ fireEvent.keyDown(document.activeElement!, { key: 'Escape' });+ expect(view.queryByRole('menu')).toBeNull();+ expect(document.activeElement).toBe(trigger);+ }+);++it('opens the last menu item with ArrowUp and closes when focus leaves', async () => {+ const view = setup(390);+ const trigger = view.getByRole('button', { name: 'Email' });+ fireEvent.keyDown(trigger, { key: 'ArrowUp' });+ await Promise.resolve();+ const last = view.getByRole('menuitem', { name: 'Other tools' });+ expect(document.activeElement).toBe(last);+ expect(last.tabIndex).toBe(-1);+ fireEvent.focusOut(last, { relatedTarget: document.body });+ expect(view.queryByRole('menu')).toBeNull();+});diff --git a/apps/marketing/src/app/components/sections/MigrationPathSelector.tsx b/apps/marketing/src/app/components/sections/MigrationPathSelector.tsxnew file mode 100644index 0000000000..9924610153--- /dev/null+++ b/apps/marketing/src/app/components/sections/MigrationPathSelector.tsx@@ -0,0 +1,372 @@+import {+ createSignal,+ For,+ type JSX,+ onCleanup,+ onMount,+ Show,+} from 'solid-js';+import { viewportWidth } from '../../utils/utilBreakpoint';++export type MigrationPathTab = {+ id: string;+ icon?: () => JSX.Element;+ label: string;+ content: JSX.Element;+};++/** Matches the top navigation's Features control: a button-triggered popover+ * menu that closes on outside click or Escape. */+function ComparisonDropdown(props: {+ tabs: readonly MigrationPathTab[];+ activeTab: () => string | undefined;+ onSelect: (id: string) => void;+}) {+ const [open, setOpen] = createSignal(false);+ let menuRef: HTMLDivElement | undefined;+ let triggerRef: HTMLButtonElement | undefined;+ const openMenu = (last = false) => {+ setOpen(true);+ queueMicrotask(() => {+ const items =+ menuRef?.querySelectorAll<HTMLButtonElement>('[role="menuitem"]');+ items?.[last ? items.length - 1 : 0]?.focus();+ });+ };++ onMount(() => {+ const closeOnOutsideClick = (event: MouseEvent) => {+ if (!menuRef?.contains(event.target as Node)) setOpen(false);+ };+ const closeOnEscape = (event: KeyboardEvent) => {+ if (event.key === 'Escape' && open()) {+ setOpen(false);+ triggerRef?.focus();+ }+ };+ document.addEventListener('mousedown', closeOnOutsideClick);+ window.addEventListener('keydown', closeOnEscape);+ onCleanup(() => {+ document.removeEventListener('mousedown', closeOnOutsideClick);+ window.removeEventListener('keydown', closeOnEscape);+ });+ });++ const activeLabel = () =>+ props.tabs.find((tab) => tab.id === props.activeTab())?.label ??+ props.tabs[0]?.label;++ return (+ <div+ ref={menuRef}+ class="migrate-comparisons-dropdown"+ onFocusOut={(event) => {+ if (!event.currentTarget.contains(event.relatedTarget as Node | null))+ setOpen(false);+ }}+ >+ <button+ ref={triggerRef}+ type="button"+ class="migrate-comparisons-dropdown-trigger"+ aria-expanded={open()}+ aria-haspopup="menu"+ onClick={() => (open() ? setOpen(false) : openMenu())}+ onKeyDown={(event) => {+ if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {+ event.preventDefault();+ openMenu(event.key === 'ArrowUp');+ }+ }}+ >+ <span class="migration-selector-label">+ {props.tabs.find((tab) => tab.id === props.activeTab())?.icon?.()}+ {activeLabel()}+ </span>+ <svg+ aria-hidden="true"+ width="12"+ height="12"+ viewBox="0 0 256 256"+ fill="currentColor"+ style={{+ transform: open() ? 'rotate(180deg)' : 'none',+ transition: 'transform 160ms ease',+ }}+ >+ <path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z" />+ </svg>+ </button>+ <Show when={open()}>+ <div+ class="migrate-comparisons-dropdown-menu"+ role="menu"+ onKeyDown={(event) => {+ const buttons = Array.from(+ event.currentTarget.querySelectorAll<HTMLButtonElement>('button')+ );+ const index = buttons.indexOf(+ document.activeElement as HTMLButtonElement+ );+ let next = index;+ if (event.key === 'ArrowDown') next = (index + 1) % buttons.length;+ else if (event.key === 'ArrowUp')+ next = (index - 1 + buttons.length) % buttons.length;+ else if (event.key === 'Home') next = 0;+ else if (event.key === 'End') next = buttons.length - 1;+ else return;+ event.preventDefault();+ buttons[next]?.focus();+ }}+ aria-label="Choose what to bring over"+ >+ <For each={props.tabs}>+ {(tab) => (+ <button+ type="button"+ class="migrate-comparisons-dropdown-option"+ role="menuitem"+ tabIndex={-1}+ onClick={() => {+ props.onSelect(tab.id);+ setOpen(false);+ triggerRef?.focus();+ }}+ >+ <span class="migration-selector-label">+ {tab.icon?.()}+ {tab.label}+ </span>+ </button>+ )}+ </For>+ </div>+ </Show>+ </div>+ );+}++/** Content-path tabs on desktop and a keyboard-accessible menu on smaller screens. */+export function MigrationPathSelector(props: {+ tabs: readonly MigrationPathTab[];+}) {+ // The panel content switches out of its desktop rail layout at this width,+ // so keep the surrounding tabs and spacing in the same compact mode.+ const mobile = () => viewportWidth() < 1200;+ const useSelectTabs = () => viewportWidth() < 1000;+ const [activeTab, setActiveTab] = createSignal(props.tabs[0]?.id);+ const active = () =>+ props.tabs.find((tab) => tab.id === activeTab()) ?? props.tabs[0];++ return (+ <section+ id="switch-from"+ aria-label="What do you want to bring over?"+ class="migrate-comparisons-section"+ style={{+ 'box-sizing': 'border-box',+ display: 'grid',+ gap: mobile() ? '28px' : '36px',+ 'justify-items': 'stretch',+ 'padding-block': mobile() ? '48px 36px' : '72px 48px',+ 'padding-inline': mobile() ? '18px' : '24px',+ width: '100%',+ }}+ >+ <style>{`+ .migration-selector-label { display: inline-flex; align-items: center; gap: 10px; }+ .migration-selector-label svg, .migrate-comparisons-tab svg { flex: none; }+ .migrate-comparisons-section { scroll-margin-top: 100px; }+ .migrate-comparisons-title { color: var(--c0); justify-self: start; margin: 0; }+ .migration-selector-body { min-width: 0; border: 1px solid color-mix(in srgb, var(--c4) 14%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--b1) 72%, transparent); }+ .migrate-comparisons-tabs {+ box-sizing: border-box;+ padding: 10px 24px 0;+ border-bottom: 1px solid color-mix(in srgb, var(--c4) 16%, transparent);+ display: flex;+ gap: 4px;+ max-width: 100%;+ overflow-x: auto;+ scrollbar-width: none;+ width: 100%;+ }+ .migrate-comparisons-tabs::-webkit-scrollbar { display: none; }+ .migrate-comparisons-tab {+ background: transparent;+ border: 0;+ border-bottom: 2px solid transparent;+ color: var(--c4);+ cursor: default;+ display: inline-flex;+ align-items: center;+ gap: 8px;+ font-family: body, sans-serif;+ font-size: 14px;+ font-weight: 600;+ line-height: 1;+ margin-bottom: -1px;+ padding: 12px 14px;+ white-space: nowrap;+ }+ .migrate-comparisons-tab[aria-selected='true'] { border-bottom-color: var(--a0); color: var(--c1); }+ .migrate-comparisons-tab:focus-visible { outline: 2px solid var(--a0); outline-offset: -3px; }+ .migrate-comparisons-dropdown { position: relative; width: 100%; }+ .migrate-comparisons-dropdown-trigger {+ align-items: center;+ background: transparent;+ border: 0;+ border-bottom: 1px solid color-mix(in srgb, var(--c4) 14%, transparent);+ border-radius: 16px 16px 0 0;+ color: var(--c1);+ cursor: default;+ display: flex;+ font-family: body, sans-serif;+ font-size: 14px;+ font-weight: 600;+ justify-content: space-between;+ line-height: 1;+ padding: 18px 20px;+ min-height: 56px;+ text-align: left;+ width: 100%;+ }+ .migrate-comparisons-dropdown-trigger:focus-visible { outline: 2px solid var(--a0); outline-offset: 2px; }+ .migrate-comparisons-dropdown-menu {+ background-color: var(--b2);+ border: 1px solid color-mix(in srgb, var(--b4) 24%, transparent);+ border-radius: 10px;+ box-shadow: 0 18px 40px color-mix(in srgb, #000 34%, transparent);+ box-sizing: border-box;+ display: grid;+ gap: 2px;+ left: 0;+ padding: 6px;+ position: absolute;+ top: calc(100% + 6px);+ width: 100%;+ z-index: 4;+ }+ .migrate-comparisons-dropdown-option {+ background: transparent;+ border: 0;+ border-radius: 6px;+ color: var(--c1);+ cursor: default;+ font-family: body, sans-serif;+ font-size: 14px;+ font-weight: 600;+ padding: 10px;+ text-align: left;+ width: 100%;+ }+ .migrate-comparison-panel {+ box-sizing: border-box;+ border-radius: 0 0 16px 16px;+ overflow: hidden;+ width: 100%;+ }+ @media (hover) {+ .migrate-comparisons-tab:hover { color: var(--c1); }+ .migrate-comparisons-dropdown-option:hover { background-color: color-mix(in srgb, var(--c4) 8%, transparent); }+ }+ @media (max-width: 1199px) {+ .migrate-comparisons-tab { font-size: 13px; padding: 11px 12px; }++ }+ `}</style>+ <h2+ class="migrate-comparisons-title"+ style={{+ 'font-family': 'display',+ 'font-size': mobile() ? '28px' : '36px',+ 'font-weight': '315',+ 'letter-spacing': '-0.015em',+ 'line-height': 1.1,+ }}+ >+ What do you want to bring over?+ </h2>+ <div class="migration-selector-body">+ <Show+ when={useSelectTabs()}+ fallback={+ <div+ class="migrate-comparisons-tabs"+ role="tablist"+ aria-label="Choose what to bring over"+ >+ <For each={props.tabs}>+ {(tab) => {+ const tabId = `migrate-comparison-tab-${tab.id}`;+ const panelId = `migrate-comparison-panel-${tab.id}`;+ return (+ <button+ id={tabId}+ class="migrate-comparisons-tab"+ type="button"+ role="tab"+ aria-controls={panelId}+ aria-selected={activeTab() === tab.id}+ tabIndex={activeTab() === tab.id ? 0 : -1}+ onClick={() => setActiveTab(tab.id)}+ onKeyDown={(event) => {+ const index = props.tabs.findIndex(+ (item) => item.id === tab.id+ );+ let next = index;+ if (event.key === 'ArrowRight')+ next = (index + 1) % props.tabs.length;+ else if (event.key === 'ArrowLeft')+ next =+ (index - 1 + props.tabs.length) % props.tabs.length;+ else if (event.key === 'Home') next = 0;+ else if (event.key === 'End')+ next = props.tabs.length - 1;+ else return;+ event.preventDefault();+ setActiveTab(props.tabs[next].id);+ document+ .getElementById(+ `migrate-comparison-tab-${props.tabs[next].id}`+ )+ ?.focus();+ }}+ >+ {tab.icon?.()}+ {tab.label}+ </button>+ );+ }}+ </For>+ </div>+ }+ >+ <ComparisonDropdown+ tabs={props.tabs}+ activeTab={activeTab}+ onSelect={setActiveTab}+ />+ </Show>+ <Show when={active()}>+ {(tab) => (+ <div+ id={`migrate-comparison-panel-${tab().id}`}+ class="migrate-comparison-panel"+ role={useSelectTabs() ? 'region' : 'tabpanel'}+ aria-label={+ useSelectTabs() ? `Bring over ${tab().label}` : undefined+ }+ aria-labelledby={+ useSelectTabs()+ ? undefined+ : `migrate-comparison-tab-${tab().id}`+ }+ >+ {tab().content}+ </div>+ )}+ </Show>+ </div>+ </section>+ );+}diff --git a/apps/marketing/src/app/components/sections/MigrationPaths.test.tsx b/apps/marketing/src/app/components/sections/MigrationPaths.test.tsxnew file mode 100644index 0000000000..b744093ade--- /dev/null+++ b/apps/marketing/src/app/components/sections/MigrationPaths.test.tsx@@ -0,0 +1,64 @@+import { cleanup, fireEvent, render } from '@solidjs/testing-library';+import { afterEach, expect, it } from 'vitest';+import { setViewportWidth } from '../../utils/utilBreakpoint';+import { MigrationPaths } from './MigrationPaths';++afterEach(cleanup);++function setup() {+ setViewportWidth(1440);+ const view = render(() => (+ <MigrationPaths helpHref="https://cal.com/team/macro/macro-demo-call" />+ ));+ return view;+}++it('lets a visitor find CSV imports and contextual help', () => {+ const view = setup();+ const email = view.getByRole('tab', { name: 'Email' });+ email.focus();+ fireEvent.keyDown(email, { key: 'ArrowRight' });+ expect(+ view.getByRole('heading', { name: 'Bring your files and records' })+ ).toBeTruthy();+ expect(+ view.getByRole('heading', { name: 'Tables and exported data' })+ ).toBeTruthy();+ expect(+ view.getByRole('link', { name: 'Talk to our team →' }).getAttribute('href')+ ).toBe('https://cal.com/team/macro/macro-demo-call');+});++it('explains agent-assisted imports without embedding product comparisons', () => {+ const view = setup();+ fireEvent.click(view.getByRole('tab', { name: 'Docs & tasks' }));+ expect(+ view.getByRole('heading', { name: 'Notion pages' }).parentElement+ ?.textContent+ ).toContain('ask an agent');+ expect(+ view.getByRole('heading', { name: 'Linear tasks' }).parentElement+ ?.textContent+ ).toContain('supported task properties');+ expect(view.queryByText('Compare Macro with Notion')).toBeNull();+ expect(view.queryByText('Compare Macro with Linear')).toBeNull();+ expect(view.getByRole('link', { name: 'See import details' })).toBeTruthy();+});++it('preserves the other-tools route when the viewport becomes compact', async () => {+ const view = setup();+ fireEvent.click(view.getByRole('tab', { name: 'Other tools' }));+ setViewportWidth(390);+ const trigger = view.getByRole('button', { name: 'Other tools' });+ expect(+ view.getByRole('region', { name: 'Bring over Other tools' })+ ).toBeTruthy();+ expect(+ view.getByRole('link', { name: 'Talk to our team →' }).getAttribute('href')+ ).toBe('https://cal.com/team/macro/macro-demo-call');+ fireEvent.keyDown(trigger, { key: 'ArrowUp' });+ await Promise.resolve();+ fireEvent.keyDown(document.activeElement!, { key: 'Escape' });+ expect(document.activeElement).toBe(trigger);+ expect(view.queryByRole('menu')).toBeNull();+});diff --git a/apps/marketing/src/app/components/sections/MigrationPaths.tsx b/apps/marketing/src/app/components/sections/MigrationPaths.tsxnew file mode 100644index 0000000000..328d3ad321--- /dev/null+++ b/apps/marketing/src/app/components/sections/MigrationPaths.tsx@@ -0,0 +1,257 @@+import At from '@phosphor/at.svg';+import Buildings from '@phosphor/buildings.svg';+import Chat from '@phosphor/chat-teardrop.svg';+import Database from '@phosphor/database.svg';+import Envelope from '@phosphor/envelope.svg';+import FileText from '@phosphor/file-text.svg';+import Folder from '@phosphor/folder-simple.svg';+import Plugs from '@phosphor/plugs-connected.svg';+import type { JSX } from 'solid-js';+import { SwitchBrandIcon } from '../graphics/SwitchGraphic';+import { MigrationPathSelector } from './MigrationPathSelector';++function PathSection(props: {+ title: string;+ icon: JSX.Element;+ children: JSX.Element;+}) {+ return (+ <div class="migration-path-section">+ <h4>+ <span class="migration-row-icon" aria-hidden="true">+ {props.icon}+ </span>+ {props.title}+ </h4>+ <p>{props.children}</p>+ </div>+ );+}++function PathContent(props: {+ icon: JSX.Element;+ title: string;+ description: string;+ children: JSX.Element;+}) {+ return (+ <div class="migration-path">+ <header>+ <span class="migration-path-icon" aria-hidden="true">+ {props.icon}+ </span>+ <div>+ <h3>{props.title}</h3>+ <p>{props.description}</p>+ </div>+ </header>+ <div class="migration-path-instructions">{props.children}</div>+ </div>+ );+}++export function MigrationPaths(props: { helpHref: string }) {+ const help = () => (+ <a href={props.helpHref} target="_blank" rel="noreferrer">+ Talk to our team →+ </a>+ );+ const tabs = [+ {+ id: 'email',+ label: 'Email',+ icon: () => <Envelope aria-hidden="true" width="18" height="18" />,+ content: (+ <PathContent+ icon={<Envelope />}+ title="Bring your inbox into Macro"+ description="Connect Gmail or Google Workspace and use Macro for your daily email. Your mail stays in Gmail and syncs with Macro."+ >+ <PathSection icon={<Plugs />} title="Connect your account">+ Connect Gmail during signup or add it in Settings. Add your other+ Gmail accounts to bring them into the same inbox.+ </PathSection>+ <PathSection icon={<At />} title="Your email address">+ Send and receive from your existing address, with your mail and+ labels available in Macro. This works whether you currently read+ Gmail in a browser, Superhuman, or another email client.+ </PathSection>+ <PathSection icon={<Chat />} title="Other email providers">+ Talk to our team about your email setup and the best way to use+ Macro with it. {help()}+ </PathSection>+ </PathContent>+ ),+ },+ {+ id: 'files',+ label: 'Files & data',+ icon: () => <Folder aria-hidden="true" width="18" height="18" />,+ content: (+ <PathContent+ icon={<Folder />}+ title="Bring your files and records"+ description="Upload files and import CSV data from the tools your company uses. Organize the work in Macro and share it with your team."+ >+ <PathSection icon={<FileText />} title="Documents and files">+ Upload your documents, PDFs, images, and other files into Macro.+ Organize them in folders so your team can find and share them.+ </PathSection>+ <PathSection icon={<Database />} title="Tables and exported data">+ Import a CSV into a Macro database. Review the rows and columns in+ the import preview, then bring the records into your workspace.+ </PathSection>+ <PathSection icon={<Buildings />} title="Company records">+ In CRM, import a CSV with name and domain columns to create company+ records. Review the companies before importing them.+ </PathSection>+ <PathSection icon={<Plugs />} title="Moving data from another system">+ Tell our team what you use and what you want to bring over. We’ll+ help you choose the right import path. {help()}+ </PathSection>+ </PathContent>+ ),+ },+ {+ id: 'docs-tasks',+ label: 'Docs & tasks',+ icon: () => <FileText aria-hidden="true" width="18" height="18" />,+ content: (+ <PathContent+ icon={<FileText />}+ title="Bring your docs and tasks into Macro"+ description="Import documents and tasks into Macro so your team can write, assign work, and follow progress in the same workspace."+ >+ <PathSection+ icon={<SwitchBrandIcon brand="notion" size={19} />}+ title="Notion pages"+ >+ Connect Notion in Settings, then ask an agent to find the pages you+ want to bring over. Choose the suggested pages or provide a page+ link. Page text, headings, lists, checklists, and tables become+ editable Macro docs. For database records, export a CSV and use+ Macro’s database import.+ </PathSection>+ <PathSection+ icon={<SwitchBrandIcon brand="linear" size={19} />}+ title="Linear tasks"+ >+ Connect Linear and ask an agent to find the issues you need.+ Selected issues become Macro tasks with their descriptions, source+ links, and supported task properties. You can also upload a Linear+ CSV export, review the preview, and match assignees before+ importing.+ </PathSection>+ <PathSection icon={<Plugs />} title="Jira, ClickUp, and other tools">+ Connect your app in Settings and ask an agent what it can bring+ over. Files and CSV exports are another route for tools without a+ dedicated importer.{' '}+ <a href="https://docs.macro.com/switch-to-macro">+ See import details+ </a>+ .+ </PathSection>+ </PathContent>+ ),+ },+ {+ id: 'conversations',+ label: 'Conversations',+ icon: () => <Chat aria-hidden="true" width="18" height="18" />,+ content: (+ <PathContent+ icon={<Chat />}+ title="Bring your team’s conversations"+ description="Move discussions into Macro channels, where conversations connect directly to your docs, tasks, and email."+ >+ <PathSection+ icon={<SwitchBrandIcon brand="slack" size={19} />}+ title="Bring over Slack channels"+ >+ Connect Slack, find your channels, and select the ones to bring into+ Macro. The channel import creates the corresponding channels for+ your team.+ </PathSection>+ <PathSection icon={<Folder />} title="Import conversation history">+ Upload a Slack export ZIP and select the conversations you want to+ bring over. This copies the selected history into Macro. New Slack+ messages remain in Slack.+ </PathSection>+ <PathSection icon={<Plugs />} title="Keep Slack connected">+ Agents can search connected Slack content while your team works in+ Macro. You can keep using Slack for conversations with customers and+ partners.+ </PathSection>+ <PathSection icon={<Chat />} title="Other chat tools">+ Talk to our team about your conversation history and exports. We’ll+ help plan the move. {help()}+ </PathSection>+ </PathContent>+ ),+ },+ {+ id: 'other-tools',+ label: 'Other tools',+ icon: () => <Plugs aria-hidden="true" width="18" height="18" />,+ content: (+ <PathContent+ icon={<Plugs />}+ title="Find a path for your tools"+ description="Connect your app and ask an agent to find the work you want to bring over, or start with a file or CSV export."+ >+ <PathSection icon={<Plugs />} title="Find and connect your app">+ Search the connector catalog in Settings and sign in to your tool.+ You can also add a custom MCP connection for a tool that provides+ one.+ </PathSection>+ <PathSection icon={<Plugs />} title="Use connected information">+ Tell an agent which project, pages, or issues you need. It can use+ the tools available through your connection to find relevant work.+ Choose what to import and manage the resulting docs or tasks in+ Macro.+ </PathSection>+ <PathSection icon={<Plugs />} title="Bring an export">+ Files and CSV exports provide another route into Macro. Tell our+ team what you want to move, and we’ll help you choose between an+ import, a connection, or a file upload. {help()}+ </PathSection>+ </PathContent>+ ),+ },+ ];++ return (+ <>+ <style>{`+ .migration-path { box-sizing: border-box; padding: 44px 52px; font-family: Inter, body, sans-serif; }+ .migration-path > header, .migration-path-instructions { max-width: 760px; margin-inline: auto; }+ .migration-path > header { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; align-items: start; }+ .migration-path > header > div { display: contents; }+ .migration-path > header h3 { margin: 0; }+ .migration-path > header p { grid-column: 1 / -1; }+ .migration-path-icon { display: flex; align-items: center; justify-content: center; height: 36.8px; color: var(--c2); }+ .migration-path-icon > svg { width: 30px; height: 30px; }+ .migration-row-icon { display: inline-flex; flex: none; color: var(--c4); padding-top: 2px; }+ .migration-row-icon > svg { width: 19px; height: 19px; }+ .migration-path-section { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 28px; border-top: 1px solid color-mix(in srgb, var(--c4) 14%, transparent); padding-top: 24px; }+ .migration-path h3 { color: var(--c1); font-family: display; font-size: 32px; font-weight: 315; line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 20px; }+ .migration-path p { color: var(--c4); font-size: 15px; line-height: 1.7; margin: 0; text-wrap: pretty; }+ .migration-path-instructions { display: grid; gap: 24px; margin-top: 32px; }+ .migration-path h4 { display: flex; gap: 12px; align-items: flex-start; color: var(--c1); font-size: 16px; font-weight: 600; line-height: 1.5; margin: 0 0 8px; }+ .migration-path a { color: var(--c1); text-underline-offset: 4px; }+ @media (max-width: 999px) {+ .migration-path-section { grid-template-columns: minmax(0, 1fr); gap: 6px; }+ }+ @media (max-width: 699px) {+ .migration-path > header { grid-template-columns: 26px minmax(0, 1fr); gap: 16px 12px; }+ .migration-path-icon { height: 29.9px; }+ .migration-path-icon > svg { width: 24px; height: 24px; }+ .migration-path { padding: 28px 20px; }+ .migration-path h3 { font-size: 26px; }+ .migration-path p, .migration-path h4 { font-size: 15px; }+ }+ `}</style>+ <MigrationPathSelector tabs={tabs} />+ </>+ );+}diff --git a/apps/marketing/src/app/components/sections/SectionMigrateComparisons.tsx b/apps/marketing/src/app/components/sections/SectionMigrateComparisons.tsxdeleted file mode 100644index d3217301b9..0000000000--- a/apps/marketing/src/app/components/sections/SectionMigrateComparisons.tsx+++ /dev/null@@ -1,287 +0,0 @@-import {- createSignal,- For,- type JSX,- onCleanup,- onMount,- Show,-} from 'solid-js';-import { viewportWidth } from '../../utils/utilBreakpoint';--export type MigrateComparisonTab = {- id: string;- icon?: JSX.Element;- label: string;- content: JSX.Element;-};--/** Matches the top navigation's Features control: a button-triggered popover- * menu that closes on outside click or Escape. */-function ComparisonDropdown(props: {- tabs: readonly MigrateComparisonTab[];- activeTab: () => string | undefined;- onSelect: (id: string) => void;-}) {- const [open, setOpen] = createSignal(false);- let menuRef: HTMLDivElement | undefined;-- onMount(() => {- const closeOnOutsideClick = (event: MouseEvent) => {- if (!menuRef?.contains(event.target as Node)) setOpen(false);- };- const closeOnEscape = (event: KeyboardEvent) => {- if (event.key === 'Escape') setOpen(false);- };- document.addEventListener('mousedown', closeOnOutsideClick);- window.addEventListener('keydown', closeOnEscape);- onCleanup(() => {- document.removeEventListener('mousedown', closeOnOutsideClick);- window.removeEventListener('keydown', closeOnEscape);- });- });-- const activeLabel = () =>- props.tabs.find((tab) => tab.id === props.activeTab())?.label ??- props.tabs[0]?.label;-- return (- <div ref={menuRef} class="migrate-comparisons-dropdown">- <button- type="button"- class="migrate-comparisons-dropdown-trigger"- aria-expanded={open()}- aria-haspopup="menu"- onClick={() => setOpen((value) => !value)}- >- <span>to {activeLabel()}</span>- <svg- aria-hidden="true"- width="12"- height="12"- viewBox="0 0 256 256"- fill="currentColor"- style={{- transform: open() ? 'rotate(180deg)' : 'none',- transition: 'transform 160ms ease',- }}- >- <path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z" />- </svg>- </button>- <Show when={open()}>- <div- class="migrate-comparisons-dropdown-menu"- role="menu"- aria-label="Compare Macro with another tool"- >- <For each={props.tabs}>- {(tab) => (- <button- type="button"- class="migrate-comparisons-dropdown-option"- role="menuitem"- onClick={() => {- props.onSelect(tab.id);- setOpen(false);- }}- >- to {tab.label}- </button>- )}- </For>- </div>- </Show>- </div>- );-}--/**- * The migration guide's comparison switcher. Each tab owns the full migration- * section for one tool — its visual, capability table, steps, and relevant- * comparison-post link — rather than sending readers through a separate grid.- */-export function SectionMigrateComparisons(props: {- tabs: readonly MigrateComparisonTab[];-}) {- // The panel content switches out of its desktop rail layout at this width,- // so keep the surrounding tabs and spacing in the same compact mode.- const mobile = () => viewportWidth() < 1200;- const useSelectTabs = () => viewportWidth() < 520;- const [activeTab, setActiveTab] = createSignal(props.tabs[0]?.id);- const active = () =>- props.tabs.find((tab) => tab.id === activeTab()) ?? props.tabs[0];-- return (- <section- aria-label="How Macro compares"- class="migrate-comparisons-section"- style={{- 'box-sizing': 'border-box',- display: 'grid',- gap: mobile() ? '28px' : '36px',- 'justify-items': 'stretch',- 'padding-block': mobile() ? '48px 36px' : '72px 48px',- 'padding-inline': mobile() ? '18px' : '24px',- width: '100%',- }}- >- <style>{`- .migrate-comparisons-title { color: var(--c0); justify-self: start; }- .migrate-comparisons-tabs {- border-bottom: 1px solid color-mix(in srgb, var(--c4) 16%, transparent);- display: flex;- gap: 4px;- max-width: 100%;- overflow-x: auto;- scrollbar-width: none;- width: 100%;- }- .migrate-comparisons-tabs::-webkit-scrollbar { display: none; }- .migrate-comparisons-tab {- background: transparent;- border: 0;- border-bottom: 2px solid transparent;- color: var(--c4);- cursor: pointer;- display: inline-flex;- align-items: center;- gap: 8px;- font-family: body, sans-serif;- font-size: 14px;- font-weight: 600;- line-height: 1;- margin-bottom: -1px;- padding: 12px 14px;- white-space: nowrap;- }- .migrate-comparisons-tab[aria-selected='true'] { border-bottom-color: var(--a0); color: var(--c1); }- .migrate-comparisons-tab:focus-visible { outline: 2px solid var(--a0); outline-offset: -3px; }- .migrate-comparisons-dropdown { position: relative; width: 100%; }- .migrate-comparisons-dropdown-trigger {- align-items: center;- background: var(--b1);- border: 1px solid color-mix(in srgb, var(--c4) 24%, transparent);- border-radius: 8px;- color: var(--c1);- cursor: pointer;- display: flex;- font-family: body, sans-serif;- font-size: 14px;- font-weight: 600;- justify-content: space-between;- line-height: 1;- padding: 12px 18px 12px 14px;- text-align: left;- width: 100%;- }- .migrate-comparisons-dropdown-trigger:focus-visible { outline: 2px solid var(--a0); outline-offset: 2px; }- .migrate-comparisons-dropdown-menu {- background-color: var(--b2);- border: 1px solid color-mix(in srgb, var(--b4) 24%, transparent);- border-radius: 10px;- box-shadow: 0 18px 40px color-mix(in srgb, #000 34%, transparent);- box-sizing: border-box;- display: grid;- gap: 2px;- left: 0;- padding: 6px;- position: absolute;- top: calc(100% + 6px);- width: 100%;- z-index: 4;- }- .migrate-comparisons-dropdown-option {- background: transparent;- border: 0;- border-radius: 6px;- color: var(--c1);- cursor: pointer;- font-family: body, sans-serif;- font-size: 14px;- font-weight: 600;- padding: 10px;- text-align: left;- width: 100%;- }- .migrate-comparison-panel {- background: color-mix(in srgb, var(--b1) 72%, transparent);- border: 1px solid color-mix(in srgb, var(--c4) 14%, transparent);- border-radius: 16px;- margin-top: 12px;- overflow: hidden;- width: 100%;- }- @media (hover) {- .migrate-comparisons-tab:hover { color: var(--c1); }- .migrate-comparisons-dropdown-option:hover { background-color: color-mix(in srgb, var(--c4) 8%, transparent); }- }- @media (max-width: 1199px) {- .migrate-comparisons-tab { font-size: 13px; padding: 11px 12px; }- .migrate-comparison-panel { margin-top: 4px; }- }- `}</style>- <h2- class="migrate-comparisons-title"- style={{- 'font-family': 'display',- 'font-size': mobile() ? '28px' : '36px',- 'font-weight': '315',- 'letter-spacing': '-0.015em',- 'line-height': 1.1,- }}- >- How Macro compares...- </h2>- <Show- when={useSelectTabs()}- fallback={- <div- class="migrate-comparisons-tabs"- role="tablist"- aria-label="Compare Macro with another tool"- >- <For each={props.tabs}>- {(tab) => {- const tabId = `migrate-comparison-tab-${tab.id}`;- const panelId = `migrate-comparison-panel-${tab.id}`;- return (- <button- id={tabId}- class="migrate-comparisons-tab"- type="button"- role="tab"- aria-controls={panelId}- aria-selected={activeTab() === tab.id}- tabIndex={activeTab() === tab.id ? 0 : -1}- onClick={() => setActiveTab(tab.id)}- >- {tab.icon}- {tab.label}- </button>- );- }}- </For>- </div>- }- >- <ComparisonDropdown- tabs={props.tabs}- activeTab={activeTab}- onSelect={setActiveTab}- />- </Show>- <Show when={active()}>- {(tab) => (- <div- id={`migrate-comparison-panel-${tab().id}`}- class="migrate-comparison-panel"- role="tabpanel"- aria-labelledby={`migrate-comparison-tab-${tab().id}`}- >- {tab().content}- </div>- )}- </Show>- </section>- );-}diff --git a/apps/marketing/src/app/routes/RouteCrm.tsx b/apps/marketing/src/app/routes/RouteCrm.tsxindex 0147b6a314..c09bc00314 100644--- a/apps/marketing/src/app/routes/RouteCrm.tsx+++ b/apps/marketing/src/app/routes/RouteCrm.tsx@@ -82,6 +82,7 @@ export function RouteCrm() {cta="crm_hero_get_started"/><WorkspaceDesktopDemo+ heroFrameview="crm"label="Explore Macro CRM"caption="A sample pipeline. Drag a company to a new stage or open its record."diff --git a/apps/marketing/src/app/routes/RouteEmail.tsx b/apps/marketing/src/app/routes/RouteEmail.tsxindex 46c8543c75..9d3989c06e 100644--- a/apps/marketing/src/app/routes/RouteEmail.tsx+++ b/apps/marketing/src/app/routes/RouteEmail.tsx@@ -94,7 +94,7 @@ export function RouteEmail() {});return (- <FeaturePage>+ <FeaturePage productSpacing><header class="feature-page-hero email-page-hero"><p class="email-page-hero-label"><MacroLogo aria-hidden="true" />@@ -213,6 +213,7 @@ export function RouteEmail() {</p></div></FeaturePageSection>+ <EmailComparison /><FeaturePageFaqid="email-faq-title"title="Gmail accounts and agent permissions"@@ -227,7 +228,6 @@ export function RouteEmail() {}items={faqItems}/>- <EmailComparison /><HomepageClosing /></FeaturePage>);diff --git a/apps/marketing/src/app/routes/RouteMigrate.tsx b/apps/marketing/src/app/routes/RouteMigrate.tsxindex b750b51bfe..6b4f38c7ab 100644--- a/apps/marketing/src/app/routes/RouteMigrate.tsx+++ b/apps/marketing/src/app/routes/RouteMigrate.tsx@@ -1,12 +1,9 @@/*- * /migrate is the switching guide. The focus is how to move: what maps to what,- * the steps for each tool people come from, and what to connect rather than- * migrate. Where a section touches on why Macro is different, it stays short- * and links out to the versus posts, the feature pages, and the docs.- *- * Copy tracks docs.macro.com/switch-to-macro; the switch graphics there are- * rebuilt against this site's theme variables in SwitchGraphic.tsx.+ * /migrate leads with the content a company wants to bring over. MigrationPaths+ * explains the import routes; detailed comparisons live on product pages. Keep import+ * guidance aligned with the authenticated app and import pipeline.*/+import CaretDown from '@phosphor/caret-down.svg';import { A } from '@solidjs/router';import { type Component, createSignal, For, type JSX, Show } from 'solid-js';import { isServer } from 'solid-js/web';@@ -16,26 +13,17 @@ import { MacroMarkIcon } from '../components/graphics/MacroMarkIcon';import { ModuleGraphic } from '../components/graphics/ModuleGraphic';import { MODULE_LOGOS } from '../components/graphics/moduleLogos';import { SetupGraphic } from '../components/graphics/SetupGraphic';-import {- type SwitchBrand,- SwitchBrandIcon,-} from '../components/graphics/SwitchGraphic';-import { ComparisonTable } from '../components/sections/ComparisonTable';import { HomeHeroBackdrop } from '../components/sections/HomeAppPreview';import { HomeSectionRule } from '../components/sections/HomeSectionRule';-import { SectionHomeQuote } from '../components/sections/SectionHomeQuote';-import { SectionMigrateComparisons } from '../components/sections/SectionMigrateComparisons';+import { MigrationPaths } from '../components/sections/MigrationPaths';import { SectionMoreFeatures } from '../components/sections/SectionMoreFeatures';import { buildCalLinkWithAttribution } from '../utils/utilAnalytic';import { APP_BASE_URL } from '../utils/utilBaseUrl';import { viewportWidth } from '../utils/utilBreakpoint';-import { ctaHref, ctaLabel, handleCtaClick } from '../utils/utilCta';+import { ctaHref, handleCtaClick } from '../utils/utilCta';import { setPageSeo } from '../utils/utilSeo';const mobile = () => viewportWidth() < 700;-// The comparison panels need ample room for their 170px fiducial rail. Below-// this point, use the compact flow rather than progressively squeezing it.-const comparisonMobile = () => viewportWidth() < 1200;const isLocalhost =!isServer && ['localhost', '127.0.0.1'].includes(window.location.hostname);@@ -59,14 +47,6 @@ const MODULE_ROW = [MODULE_LOGOS.Slack,];-const SWITCH_LABELS: Record<SwitchBrand, string> = {- superhuman: 'Superhuman',- notion: 'Notion',- slack: 'Slack',- linear: 'Linear',- clickup: 'ClickUp',-};-// ---------------------------------------------------------------------------// Shared styles and small pieces// ---------------------------------------------------------------------------@@ -98,67 +78,7 @@ const bodyStyle = (): JSX.CSSProperties => ({'text-wrap': 'pretty',});-const comparisonBodyStyle = (): JSX.CSSProperties => ({- ...bodyStyle(),- 'font-size': mobile() ? '15px' : '16px',- 'line-height': 1.7,-});--const pillStyle = (): JSX.CSSProperties => ({- 'align-items': 'center',- 'background-color': 'var(--b1)',- border: '1px solid color-mix(in srgb, var(--c4) 16%, transparent)',- 'border-radius': '999px',- color: 'var(--c2)',- cursor: 'default',- display: 'inline-flex',- 'font-family': 'Inter, body',- 'font-size': mobile() ? '13px' : '14px',- 'font-weight': '700',- gap: '7px',- 'letter-spacing': '0.05em',- padding: '8px 15px',- 'text-decoration': 'none',- 'text-transform': 'uppercase',-});--function ConnectGoogleButton(props: { buttonName: string; large?: boolean }) {- return (- <a- href={ctaHref()}- class="migrate-cta-button"- onClick={(event) => handleCtaClick(event, props.buttonName)}- style={{- 'align-items': 'center',- 'background-color': 'var(--a0)',- 'border-radius': '999px',- 'box-sizing': 'border-box',- color: 'var(--b0)',- cursor: 'default',- display: 'inline-flex',- 'font-family': 'body',- 'font-size': mobile() ? '15px' : props.large ? '15px' : '16px',- 'font-weight': '750',- gap: '8px',- height: mobile() ? '40px' : props.large ? '46px' : '40px',- 'justify-content': 'center',- 'letter-spacing': '0.045em',- 'line-height': 1,- overflow: 'hidden',- padding: mobile() ? '0 20px' : props.large ? '0 28px' : '0 22px',- 'text-decoration': 'none',- 'text-transform': 'uppercase',- transition: 'transform 160ms ease',- 'white-space': 'nowrap',- width: mobile() ? '100%' : 'max-content',- }}- >- {ctaLabel('Quick import via MCP')}- </a>- );-}--function BookCallButton(props: { large?: boolean }) {+function BookCallButton(props: { large?: boolean; label?: string }) {return (<ahref={DEMO_CALL_HREF}@@ -189,7 +109,7 @@ function BookCallButton(props: { large?: boolean }) {width: mobile() ? '100%' : 'max-content',}}>- Talk to us+ {props.label ?? 'Talk to us'}</a>);}@@ -226,80 +146,6 @@ function InlineLink(props: {);}-/** A keyboard key, mirroring the <kbd> shortcuts in the docs. */-function Key(props: { children: JSX.Element }) {- return (- <kbd- style={{- 'background-color': 'var(--b1)',- border: '1px solid color-mix(in srgb, var(--c4) 22%, transparent)',- 'border-radius': '5px',- color: 'var(--c2)',- 'font-family': 'Inter, body',- 'font-size': '0.85em',- 'font-weight': '700',- padding: '1px 6px',- }}- >- {props.children}- </kbd>- );-}--/** The agent prompt people paste to run an import. */-function PromptBlock(props: { children: string }) {- return (- <pre- style={{- 'background-color': 'var(--b1)',- border: '1px solid color-mix(in srgb, var(--c4) 12%, transparent)',- 'border-radius': '8px',- 'box-sizing': 'border-box',- color: 'var(--c2)',- 'font-family': 'ui-monospace, SFMono-Regular, Menlo, monospace',- 'font-size': mobile() ? '13px' : '14px',- 'line-height': 1.6,- margin: 0,- 'overflow-x': 'auto',- padding: mobile() ? '14px 16px' : '18px 20px',- 'white-space': 'pre-wrap',- width: '100%',- }}- >- {props.children}- </pre>- );-}--function Steps(props: { items: (() => JSX.Element)[] }) {- return (- <ol- style={{- display: 'grid',- gap: mobile() ? '10px' : '12px',- margin: 0,- 'padding-left': '22px',- }}- >- <For each={props.items}>- {(item) => (- <li style={{ ...comparisonBodyStyle(), 'padding-left': '4px' }}>- {item()}- </li>- )}- </For>- </ol>- );-}--function SettingsPath(props: { children: JSX.Element }) {- return (- <strong style={{ color: 'var(--c2)', 'font-weight': '600' }}>- {props.children}- </strong>- );-}-function SectionHeading(props: {eyebrow?: string;title: string;@@ -361,7 +207,7 @@ function SectionHeading(props: {// Comparison-table marks and cells// ----------------------------------------------------------------------------type Cell = boolean | 'partial' | string;+type Cell = boolean;function CheckMark() {return (@@ -406,42 +252,36 @@ function CrossMark() {);}-function ComparisonCell(props: { value: Cell; macro: boolean }) {+function ComparisonCell(props: { value: Cell }) {return (<divstyle={{- 'align-items': 'center',display: 'flex',+ 'align-items': 'center','justify-content': 'center','min-height': '22px',- 'text-align': 'center',}}>- <Show- when={typeof props.value === 'string'}- fallback={- <Show when={props.value === true} fallback={<CrossMark />}>- <CheckMark />- </Show>- }- >- <span- style={{- color: props.macro ? 'var(--a0)' : 'var(--c2)',- 'font-family': "'Inter', body",- 'font-size': mobile() ? '10px' : '11px',- 'font-weight': '400',- 'letter-spacing': '0.02em',- 'line-height': 1.25,- }}- >- {props.value as string}- </span>+ <Show when={props.value} fallback={<CrossMark />}>+ <CheckMark /></Show></div>);}+function ComparisonKey() {+ return (+ <div class="migrate-comparison-legend">+ <span>+ <CheckMark /> Available+ </span>+ <span>+ <CrossMark /> Not offered as a built-in tool+ </span>+ </div>+ );+}+const compareHeaderStyle = (macro: boolean): JSX.CSSProperties => ({'align-items': 'center','background-color': 'transparent',@@ -463,7 +303,11 @@ const compareRowBg = (rowIndex: number) =>? 'color-mix(in srgb, var(--c4) 4%, var(--b0))': 'var(--b0)';-function CompareHeaderLabel(props: { label: string; macro: boolean }) {+function CompareHeaderLabel(props: {+ label: string;+ macro: boolean;+ href?: string;+}) {return (<spanstyle={{@@ -486,718 +330,35 @@ function CompareHeaderLabel(props: { label: string; macro: boolean }) {}}/></Show>- <span>{props.label}</span>- </span>- );-}--type ComparisonRow = { feature: string; macro: Cell; them: Cell };--/** The per-tool table, Macro first. Rows mirror the docs switching guide. */-function SwitchTable(props: {- brand: SwitchBrand;- competitor: string;- rows: ComparisonRow[];-}) {- return (- <ComparisonTable- columns={[- { label: 'Macro', macro: true },- {- label: props.competitor,- icon: (- <SwitchBrandIcon brand={props.brand} size={mobile() ? 13 : 15} />- ),- },- ]}- rows={props.rows.map((row) => ({- feature: row.feature,- cells: [row.macro, row.them],- }))}- mobileCellWidth={72}- mobileMinWidth={400}- sortRows={false}- valueWrap="normal"- />- );-}--// ----------------------------------------------------------------------------// Per-tool migration sections-// -----------------------------------------------------------------------------/*- * Copy is held as thunks rather than JSX values. These sections live at module- * scope, and module-scope JSX is evaluated at import time before any Route- * context exists. That makes <A> throw during prerendering.- */-type ToolSection = {- brand: SwitchBrand;- title: string;- /** What changes, and why it's an upgrade. Kept to two paragraphs. */- body: (() => JSX.Element)[];- rows: ComparisonRow[];- steps: (() => JSX.Element)[];- /** Trailing note after the steps, usually "you can keep it connected". */- note?: () => JSX.Element;- links: { label: string; href: string }[];- docsAnchor: string;-};--const TOOL_SECTIONS: ToolSection[] = [- {- brand: 'superhuman',- title: 'Macro vs. Superhuman',- body: [- () => (- <>- Macro Mail keeps Superhuman's keyboard-first speed, but adds- Outlook-style multitasking and Gmail's simplicity.- </>- ),- () => (- <>- Macro Mail brings your email into its own database, so search and AI- context are not bottlenecked by Gmail's API or MCP. Signal vs. Noise- helps you triage, and you can easily link an email thread to your team- without resorting to screenshots or copy/paste. AI agents can perform- actions like drafting, triaging, and sending, so you spend less time- in your inbox.- </>- ),- ],- rows: [- { feature: 'Built on Gmail (no migration)', macro: true, them: true },- { feature: 'j / k / e triage shortcuts', macro: true, them: true },- {- feature: 'Multiple accounts in one unified inbox',- macro: true,- them: false,- },- { feature: 'AI triage / split inbox', macro: true, them: true },- {- feature: 'Shared email comments and @mentions',- macro: true,- them: true,- },- {- feature: 'Email, tasks, and chat in one inbox',- macro: true,- them: false,- },- {- feature: 'Agents that draft, triage, and send',- macro: true,- them: 'partial',- },- ],- steps: [- () => (- <>- Connect your Gmail or Google Workspace account during signup or later- in <SettingsPath>Settings</SettingsPath>.- </>- ),- () => (- <>- Your mail, labels, and history appear automatically because Macro- syncs with Gmail.- </>- ),- ],- note: () => (- <>- Both apps use Gmail, so there is nothing to migrate or undo. Use them- side by side for as long as you need.- </>- ),- links: [- { label: 'Macro vs Superhuman', href: '/posts/superhuman-alternative' },- { label: 'Macro Mail', href: '/email' },- ],- docsAnchor: '#from-superhuman',- },- {- brand: 'notion',- title: 'Macro vs. Notion',- body: [- () => (- <>- Macro pairs Notion-style @mentions with markdown-first docs, but it- treats tasks, CRM, email, and channels as dedicated modules rather- than pages and databases you have to configure.- </>- ),- () => (- <>- Macro Docs use a CRDT representation, so people and agents can edit- live or offline without conflicts or data loss. When you reconnect,- changes sync to the database and to your peers automatically. Macro- Docs are fast, stable, and designed for live collaboration with- teammates and agents.- </>- ),- ],- rows: [- { feature: 'Markdown-first documents', macro: true, them: 'partial' },- { feature: 'Offline-capable editing', macro: true, them: 'partial' },- { feature: 'Tasks', macro: true, them: 'partial' },- { feature: 'CRM', macro: true, them: 'partial' },- { feature: 'Email client', macro: true, them: true },- { feature: 'Team chat / channels', macro: true, them: false },- {- feature: 'Agent actions across docs, tasks, email, chat, and calls',- macro: true,- them: 'partial',- },- ],- steps: [- () => (- <>- Go to <SettingsPath>Settings → Connectors</SettingsPath> and connect- Notion.- </>- ),- () => (- <>- Open an agent chat (<Key>c</Key> then <Key>a</Key>) and ask it to- import:- <div style={{ 'margin-top': '12px' }}>- <PromptBlock>- {- 'Import my Notion docs from the "Engineering" workspace as Macro docs.\nKeep the folder structure and skip anything archived.'- }- </PromptBlock>- </div>- </>- ),- () => (- <>- For each Notion database, choose the closest fit: tasks, CRM records,- or a doc with properties. Then ask the agent to import it and populate- the corresponding Macro entities.- </>- ),- ],- note: () => (- <>- Keep Notion connected so agents can search old content. Move only what- your team still uses.- </>- ),- links: [- { label: 'Macro vs Notion', href: '/posts/notion-alternative' },- { label: 'Macro Docs', href: '/documents' },- ],- docsAnchor: '#from-notion',- },- {- brand: 'slack',- title: 'Macro vs. Slack',- body: [- () => (- <>- Macro gives channels an inbox, sorted into Signal and Noise. You can- respond to messages based on urgency, or leave them for later, instead- of relying on read and unread.- </>- ),- () => (- <>- Macro Chat is integrated with the rest of your workspace. @mention a- doc, task, or email and it is shared with the channel automatically.- Create a task from a message with one click. Smart filtering, inline- threads, and a shared inbox make communication with your team more- focused, and less noisy.- </>- ),- ],- rows: [- { feature: 'Channels, threads, emoji', macro: true, them: true },- {- feature: 'Inline thread replies (forum-style reading)',- macro: true,- them: false,- },- { feature: 'One inbox shared with your email', macro: true, them: false },- {- feature: '@mention a doc or task to share it automatically',- macro: true,- them: false,- },- { feature: 'Video calls / huddles', macro: true, them: true },- ],- steps: [- () => (- <>- Create a channel per team or project (<Key>c</Key> then <Key>m</Key>).- </>- ),- () => (- <>- Add people by email. They don't need a Macro account yet to be- included.- </>- ),- () => <>Use @mentions to share docs and tasks as you discuss them.</>,- ],- note: () => (- <>- Connect Slack under <SettingsPath>Settings → Connectors</SettingsPath>{' '}- so agents can search it. You can keep Slack for external channels while- your team moves internal work to Macro.- </>- ),- links: [- { label: 'Macro vs Slack', href: '/posts/slack-alternative' },- { label: 'Macro Chat', href: '/channels' },- ],- docsAnchor: '#from-slack',- },- {- brand: 'linear',- title: 'Macro vs. Linear',- body: [- () => (- <>- Macro Tasks are inspired by Linear. They keep the status, priority,- assignee, keyboard shortcuts, and GitHub workflow you know, while- staying simple to create, assign, prioritize, and close out.- </>- ),- () => (- <>- Create a task from an email or channel message and it links to its- source bi-directionally. For programming work, tasks also stay linked- to GitHub pull requests and update automatically. Agents create tasks,- de-duplicate them, update them, and close them out as work progresses.- </>- ),- ],- rows: [- {- feature: 'Status, priority, assignee, keyboard-first',- macro: true,- them: true,- },- {- feature: 'GitHub: branch, PR, and merge move the task',- macro: true,- them: true,- },- {- feature: 'Tasks in the same app as email, channels, and docs',- macro: true,- them: false,- },- {- feature: 'Turn an email or channel message into a task in one click',- macro: true,- them: 'partial',- },- {- feature: 'Non-engineers see engineering work',- macro: true,- them: true,- },- ],- steps: [- () => (- <>- Connect Linear under{' '}- <SettingsPath>Settings → Connectors</SettingsPath>. The MCP connector- lets Macro agents read your Linear workspace while you move work over.- </>- ),- () => (- <>- Open an agent chat (<Key>c</Key> then <Key>a</Key>) and ask it to- populate Macro Tasks from your open Linear issues:- <div style={{ 'margin-top': '12px' }}>- <PromptBlock>- {- 'Import my open Linear issues as Macro tasks.\nPreserve the title, status, priority, assignee, due date, and linked GitHub work.\nSkip completed and canceled issues.'- }- </PromptBlock>- </div>- </>- ),- ],- note: () => (- <>- Keep Linear connected over MCP during the rollout so agents can still- search the issue history your team has not moved.- </>- ),- links: [- { label: 'Macro vs Linear', href: '/posts/linear-alternative' },- { label: 'Macro Tasks', href: '/tasks' },- ],- docsAnchor: '#from-linear',- },- {- brand: 'clickup',- title: 'Macro vs. ClickUp',- body: [- () => (- <>- Macro is open source under the AGPLv3, so your team can inspect,- extend, fork, and self-host the workspace. Macro gives you a dedicated- CRM alongside agents, tasks, docs, channels, and email.- </>- ),- () => (- <>- Macro treats email as a core workspace experience, with every account- in one inbox alongside tasks and channels. Macro Docs also support- collaborative offline editing, so the work keeps moving when your- connection drops.- </>- ),- ],- rows: [- { feature: 'Open source and self-hostable', macro: true, them: false },- { feature: 'Tasks, docs, chat', macro: true, them: true },- {- feature: 'Email client with all accounts in one unified inbox',- macro: true,- them: false,- },- {- feature: 'Offline document editing with automatic sync',- macro: true,- them: false,- },- { feature: 'Dedicated CRM module', macro: true, them: 'partial' },- {- feature: 'GitHub branch, PR, and merge move the task',- macro: true,- them: 'partial',- },- {- feature:- 'Agents with context from email, chat, docs, tasks, calls, and CRM',- macro: true,- them: 'partial',- },- ],- steps: [- () => (- <>- Recreate your active lists as Macro tasks. Most teams skip closed- work.- </>- ),- () => (- <>- For history or a gradual cutover, connect ClickUp under{' '}- <SettingsPath>Settings → Connectors</SettingsPath> and ask an agent to- bring the open tasks across.- </>- ),- () => (- <>- An agent can also recreate your ClickUp Docs as Macro documents:- <div style={{ 'margin-top': '12px' }}>- <PromptBlock>- {- 'Import my ClickUp Docs from the "Engineering" space as Macro docs.\nKeep the folder structure and skip anything archived.'- }- </PromptBlock>- </div>- </>- ),- ],- links: [- { label: 'Macro vs ClickUp', href: '/posts/clickup-alternative' },- { label: 'Macro Tasks', href: '/tasks' },- ],- docsAnchor: '#from-clickup',- },-];--function ToolLinks(props: { section: ToolSection }) {- return (- <div style={{ display: 'flex', 'flex-wrap': 'wrap', gap: '10px' }}>- <For each={props.section.links}>- {(link) => (- <A href={link.href} class="migrate-pill" style={pillStyle()}>- {link.label} <span aria-hidden="true">→</span>- </A>- )}- </For>- <a- href={`${DOCS_SWITCH}${props.section.docsAnchor}`}- target="_blank"- rel="noreferrer"- class="migrate-pill"- style={pillStyle()}- >- Migration steps <span aria-hidden="true">→</span>- </a>- </div>- );-}--function ComparisonBrandLockup(props: { brand: SwitchBrand }) {- return (- <div- aria-label={`Macro versus ${SWITCH_LABELS[props.brand]}`}- role="img"- style={{- 'align-items': 'center',- color: 'var(--c2)',- display: 'flex',- 'flex-shrink': '0',- gap: comparisonMobile() ? '7px' : '10px',- }}- >- <MacroMarkIcon- aria-hidden="true"- style={{- color: 'var(--a0)',- display: 'block',- fill: 'currentColor',- height: comparisonMobile() ? '20px' : '26px',- overflow: 'visible',- stroke: 'none',- }}- />- <span- aria-hidden="true"- style={{- color: 'color-mix(in srgb, var(--c4) 42%, transparent)',- 'font-family': 'display',- 'font-size': comparisonMobile() ? '32px' : '42px',- 'font-weight': '315',- 'line-height': 0.65,- transform: 'translateY(-5px) scaleY(1.5)',- }}- >- /- </span>- <SwitchBrandIcon- brand={props.brand}- size={comparisonMobile() ? 21 : 28}- />- </div>- );-}--function ComparisonGutterFiducials() {- const stroke = '1px solid color-mix(in srgb, var(--c4) 42%, transparent)';-- return (- <div- aria-hidden="true"- style={{- display: comparisonMobile() ? 'none' : 'block',- height: '76px',- left: '-170px',- 'pointer-events': 'none',- position: 'absolute',- top: '-16px',- width: '142px',- }}- >- <span- style={{- 'border-left': stroke,- 'border-top': stroke,- height: '11px',- left: 0,- position: 'absolute',- top: 0,- width: '11px',- }}- />- <span- style={{- 'border-right': stroke,- 'border-top': stroke,- height: '11px',- position: 'absolute',- right: 0,- top: 0,- width: '11px',- }}- />- <span- style={{- 'border-bottom': stroke,- 'border-left': stroke,- bottom: 0,- height: '11px',- left: 0,- position: 'absolute',- width: '11px',- }}- />- <span- style={{- 'border-bottom': stroke,- 'border-right': stroke,- bottom: 0,- height: '11px',- position: 'absolute',- right: 0,- width: '11px',- }}- />- </div>- );-}--function ComparisonGutterLabel(props: { index: string; label: string }) {- return (- <span- aria-hidden="true"- style={{- 'align-items': 'center',- color: 'color-mix(in srgb, var(--c4) 68%, transparent)',- display: comparisonMobile() ? 'none' : 'flex',- 'font-family': 'Inter, body',- 'font-size': '10px',- 'font-weight': '700',- gap: '6px',- 'justify-content': 'flex-start',- left: '-170px',- 'letter-spacing': '0.1em',- 'line-height': 1,- 'pointer-events': 'none',- position: 'absolute',- 'text-align': 'left',- top: '3px',- 'white-space': 'nowrap',- width: '142px',- }}- >- <span- style={{ background: 'currentColor', height: '1px', width: '12px' }}- />- <span>{props.index}</span>- <span>{props.label}</span>- </span>- );-}--function ToolSectionBlock(props: { section: ToolSection }) {- return (- <div- aria-label={props.section.title}- style={{- ...columnStyle(),- margin: '0 auto',- padding: comparisonMobile() ? '28px 20px 32px' : '44px 52px 52px',- }}- >- <div style={{ position: 'relative', 'text-align': 'left' }}>- <ComparisonGutterFiducials />- <div- style={{- 'align-items': 'center',- display: comparisonMobile() ? 'block' : 'flex',- height: comparisonMobile() ? 'auto' : '76px',- 'justify-content': 'center',- 'margin-bottom': comparisonMobile() ? '16px' : 0,- position: comparisonMobile() ? 'static' : 'absolute',- left: '-170px',- top: '-16px',- width: comparisonMobile() ? 'auto' : '142px',- }}- >- <ComparisonBrandLockup brand={props.section.brand} />- </div>- <div- style={{- display: 'grid',- gap: comparisonMobile() ? '20px' : '24px',- 'text-align': 'left',- }}- >- <h3+ <Show when={props.href} fallback={<span>{props.label}</span>}>+ {(href) => (+ <A+ href={href()}style={{- color: 'var(--c1)',- 'font-family': 'display',- 'font-size': comparisonMobile() ? '26px' : '32px',- 'font-weight': '315',- 'letter-spacing': '-0.015em',- 'line-height': 1.12,- margin: 0,+ color: 'inherit',+ 'text-underline-offset': '3px',+ 'text-decoration': 'underline',}}>- {props.section.title}- </h3>- <div- style={{- display: 'grid',- gap: comparisonMobile() ? '10px' : '12px',- }}- >- <For each={props.section.body}>- {(paragraph) => (- <p style={comparisonBodyStyle()}>{paragraph()}</p>- )}- </For>- </div>- </div>- </div>-- <div style={{ position: 'relative' }}>- <ComparisonGutterLabel index="01" label="COMPARE" />- <SwitchTable- brand={props.section.brand}- competitor={SWITCH_LABELS[props.section.brand]}- rows={props.section.rows}- />- </div>-- <div- style={{- display: 'grid',- gap: comparisonMobile() ? '18px' : '22px',- position: 'relative',- }}- >- <ComparisonGutterLabel index="02" label="SWITCH" />- <h4- style={{- color: 'var(--a0)',- 'font-family': 'Inter, body',- 'font-size': comparisonMobile() ? '13px' : '15px',- 'font-weight': '700',- 'letter-spacing': '0.1em',- margin: 0,- 'text-transform': 'uppercase',- }}- >- To switch- </h4>- <div- style={{ display: 'grid', gap: comparisonMobile() ? '10px' : '12px' }}- >- <Steps items={props.section.steps} />- <Show when={props.section.note}>- {(note) => <p style={comparisonBodyStyle()}>{note()()}</p>}- </Show>- </div>- </div>-- <div style={{ position: 'relative' }}>- <ComparisonGutterLabel index="03" label="MORE INFO" />- <ToolLinks section={props.section} />- </div>- </div>+ {props.label}+ </A>+ )}+ </Show>+ </span>);}-// ----------------------------------------------------------------------------// Macro vs. the world-// ---------------------------------------------------------------------------+const WORLD_DETAILS: Record<string, string> = {+ 'Superhuman Mail': '/email#compare-superhuman',+ Notion: '/documents#compare-notion',+ Slack: '/channels#compare-slack',+ Linear: '/tasks#compare-linear',+ ClickUp: '/posts/clickup-alternative',+};const WORLD_COLUMNS = ['Macro',- 'Superhuman',+ 'Superhuman Mail','Notion','Slack','Linear',@@ -1213,75 +374,60 @@ type WorldRow = {const WORLD_ROWS: WorldRow[] = [{- feature: 'Email',+ feature: 'Full email client',href: '/email',cells: [true, true, false, false, false, false],},{- feature: 'Channels',+ feature: 'Team chat / channels',href: '/channels',cells: [true, false, false, true, false, true],},{- feature: 'Tasks',+ feature: 'Task management',href: '/tasks',- cells: [true, false, 'Via databases', false, true, true],+ cells: [true, false, true, true, true, true],},{- feature: 'Docs',+ feature: 'Collaborative docs',href: '/documents',- cells: [true, false, true, false, false, true],+ cells: [true, false, true, true, true, true],},{- feature: 'CRM',+ feature: 'Dedicated CRM',href: '/crm',- cells: [true, false, 'Via databases', false, false, 'Via setup'],- },- {- feature: 'File storage',- href: `${DOCS}/product/folders`,- external: true,- cells: [true, false, 'Attachments', 'Attachments', false, 'Attachments'],+ cells: [true, false, false, false, false, false],},{- feature: 'Calls',+ feature: 'Video calls',href: '/calls',- cells: [true, false, false, 'Huddles', false, false],+ cells: [true, false, false, true, false, true],},{feature: 'Agents',href: '/agents',- cells: [true, false, true, false, true, true],+ cells: [true, true, true, true, true, true],},{- feature: 'Unified inbox',+ feature: 'Email, tasks, and chat in one inbox',href: `${DOCS}/product/inbox`,external: true,cells: [true, false, false, false, false, false],},- {- feature: 'Unified search',- href: `${DOCS}/product/search`,- external: true,- cells: [true, false, false, false, false, false],- },- {- feature: 'Unified memory',- href: `${DOCS}/product/unified-memory`,- external: true,- cells: [true, false, false, false, false, false],- },];function WorldTable() {const gridTemplate = () =>mobile()- ? 'minmax(120px, 1.2fr) repeat(6, minmax(58px, 1fr))'+ ? 'minmax(140px, 1.2fr) repeat(6, minmax(100px, 1fr))': 'minmax(0, 1.8fr) repeat(6, minmax(0, 1fr))';return (<divclass="migrate-world-table-scroll"+ tabIndex={0}+ role="region"+ aria-label="Compare all tools; scroll sideways for more"style={{'-webkit-overflow-scrolling': 'touch','max-width': '100%',@@ -1296,7 +442,7 @@ function WorldTable() {display: 'grid','font-family': "'Inter', body",'grid-template-columns': gridTemplate(),- 'min-width': mobile() ? '640px' : '760px',+ 'min-width': mobile() ? '820px' : '760px',overflow: 'hidden',}}>@@ -1322,7 +468,11 @@ function WorldTable() {padding: mobile() ? '10px 4px' : '12px 8px',}}>- <CompareHeaderLabel label={col} macro={index() === 0} />+ <CompareHeaderLabel+ label={col}+ macro={index() === 0}+ href={WORLD_DETAILS[col]}+ /></div>)}</For>@@ -1367,7 +517,7 @@ function WorldTable() {padding: mobile() ? '9px 4px' : '10px 8px',}}>- <ComparisonCell value={cell} macro={cellIndex() === 0} />+ <ComparisonCell value={cell} /></div>)}</For>@@ -1385,13 +535,23 @@ function WorldTable() {function DesyncCaseStudy() {let videoRef!: HTMLVideoElement;+ let playButtonRef: HTMLButtonElement | undefined;const [playing, setPlaying] = createSignal(false);- function handlePlay() {- videoRef- .play()- .then(() => setPlaying(true))- .catch(() => setPlaying(false));+ async function handlePlay(fromKeyboard: boolean) {+ try {+ await videoRef.play();+ setPlaying(true);+ if (fromKeyboard) videoRef.focus();+ } catch {+ setPlaying(false);+ }+ }++ function resetPlayback() {+ const restoreFocus = document.activeElement === videoRef;+ setPlaying(false);+ if (restoreFocus) queueMicrotask(() => playButtonRef?.focus());}return (@@ -1436,18 +596,14 @@ function DesyncCaseStudy() {'z-index': 1,}}>- <div- class="migrate-case-video"- style={{ cursor: playing() ? 'default' : 'pointer' }}- onClick={() => {- if (!playing()) handlePlay();- }}- >+ <div class="migrate-case-video"><videoref={videoRef}controls={playing()}- onEnded={() => setPlaying(false)}- onError={() => setPlaying(false)}+ tabIndex={playing() ? 0 : -1}+ aria-label="Desync case study video"+ onEnded={resetPlayback}+ onError={resetPlayback}playsinlineposter={markDesyncPlaceholder}preload="metadata"@@ -1455,6 +611,13 @@ function DesyncCaseStudy() {style={{ 'object-fit': playing() ? 'contain' : 'cover' }}/><Show when={!playing()}>+ <button+ ref={playButtonRef}+ type="button"+ class="migrate-case-play-trigger"+ aria-label="Play Desync case study"+ onClick={(event) => void handlePlay(event.detail === 0)}+ /><imgsrc={markDesyncPlaceholder}loading="lazy"@@ -1465,7 +628,7 @@ function DesyncCaseStudy() {<div class="migrate-case-scrim" aria-hidden="true" /><div class="migrate-case-heading"><h2 class="migrate-case-title">Case study</h2>- <p class="migrate-case-subtitle">A startup switches to Macro</p>+ <p class="migrate-case-subtitle">A company switches to Macro</p></div><asideclass="migrate-case-quote"@@ -1515,21 +678,16 @@ function DesyncCaseStudy() {export const RouteMigrate: Component = () => {setPageSeo({- title: 'Switch your startup to Macro | Migration guide',+ title: 'Switch your company to Macro | Migration guide',description:- 'Move your team to Macro from Superhuman, Notion, Slack, Linear, or ClickUp. Learn what to import, what to connect, and how to switch.',+ 'Bring your company’s email, files, docs, tasks, and conversations into Macro. Explore imports, connected tools, and help from our team.',path: '/migrate',});- const comparisonTabs = TOOL_SECTIONS.map((section) => ({- id: section.brand,- icon: <SwitchBrandIcon brand={section.brand} size={15} />,- label: SWITCH_LABELS[section.brand],- content: <ToolSectionBlock section={section} />,- }));return (<divlang="en"+ class="migrate-page"style={{'background-color': 'var(--b0)','box-sizing': 'border-box',@@ -1541,10 +699,29 @@ export const RouteMigrate: Component = () => {}}><style>{`+ .migrate-page { --a0: var(--c1); }+ .migrate-hero-graphic, .migrate-module-graphic { filter: grayscale(1); }+ .migrate-hero-graphic .supermodule-cta-headline { font-size: 26px; letter-spacing: 0.03em; }+ .migrate-page :focus-visible { outline: 2px solid var(--c1); outline-offset: 4px; }+ .migrate-full-comparison { width: 100%; max-width: 980px; min-width: 0; }+ .migrate-full-comparison h2 { font-family: display; font-size: clamp(28px, 4vw, 40px); font-weight: 315; letter-spacing: -0.015em; margin: 0 0 16px; }+ .migrate-full-comparison-content { display: grid; gap: 24px; padding-top: 20px; min-width: 0; }+ .migrate-connected-tools { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; width: 100%; max-width: 760px; justify-items: center; }+ .migrate-agent-prompt { max-width: 660px; margin: 0; padding: 4px 0 4px 24px; border-left: 2px solid var(--c4); color: var(--c2); font: 400 20px/1.55 Inter, body; text-wrap: pretty; }+ .migrate-practical-faq details { border-bottom: 1px solid var(--b2); padding: 20px 0; }+ .migrate-practical-faq summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; list-style: none; color: var(--c2); font: 500 16px/1.5 Inter, body; }+ .migrate-practical-faq summary::-webkit-details-marker { display: none; }+ .migrate-practical-faq summary > svg { width: 16px; height: 16px; flex: none; margin-top: 4px; color: var(--c4); transition: transform 160ms; }+ .migrate-practical-faq details[open] > summary > svg { transform: rotate(180deg); }+ .migrate-practical-faq p { color: var(--c4); font: 400 15px/1.75 Inter, body; margin: 16px 0 0; }+ .migrate-practical-faq a { color: var(--c2); text-decoration: underline; text-underline-offset: 3px; }+ @media (max-width: 699px) { .migrate-connected-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } .migrate-agent-prompt { font-size: 17px; padding-left: 16px; } }+ .migrate-comparison-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 24px; color: var(--c4); font-family: Inter, body; font-size: 12px; }+ .migrate-comparison-legend > span { display: inline-flex; align-items: center; gap: 8px; }+ .migrate-scroll-hint { color: var(--c4); font-family: Inter, body; font-size: 12px; margin: 12px 0 0; }@media (hover) {.migrate-cta-button:hover { transform: scale(1.02); }.migrate-link:hover { text-decoration: underline; }- .migrate-pill:hover { background-color: color-mix(in srgb, var(--a0) 12%, var(--b1)); color: var(--a0); }}.migrate-hero-graphic, .migrate-module-graphic { display: block; height: auto; width: 100%; }.migrate-world-table-scroll,@@ -1617,7 +794,7 @@ export const RouteMigrate: Component = () => {z-index: 0;}/* The wash is a positioned sibling, so it would otherwise paint over the- in-flow card and quotes. Lift them above it rather than pushing it to+ in-flow illustration. Lift them above it rather than pushing it toa negative z-index, which would drop it behind the section backdrop. */.migrate-washband > * {position: relative;@@ -1690,6 +867,22 @@ export const RouteMigrate: Component = () => {border-radius: 14px;}}+ .migrate-case-play-trigger {+ position: absolute;+ inset: 0;+ z-index: 3;+ width: 100%;+ height: 100%;+ padding: 0;+ border: 0;+ border-radius: inherit;+ background: transparent;+ color: inherit;+ }+ .migrate-case-play-trigger:focus-visible {+ outline: 2px solid var(--c1);+ outline-offset: -4px;+ }.migrate-case-video video {background: var(--b1);border: 0;@@ -1900,7 +1093,7 @@ export const RouteMigrate: Component = () => {margin: '0',}}>- Switch your startup to Macro+ Switch your company to Macro</h1><pstyle={{@@ -1914,25 +1107,9 @@ export const RouteMigrate: Component = () => {'text-wrap': 'pretty',}}>- Move your team from Slack, Notion, Superhuman, Linear, or- {'\u00A0'}ClickUp.- <br />- Keep the tools that still work and bring the rest into Macro.+ Connect your email, bring over your files, and import work from+ your existing tools.</p>- <div- style={{- 'align-items': 'center',- display: 'flex',- 'flex-direction': mobile() ? 'column' : 'row',- gap: mobile() ? '12px' : '14px',- 'justify-content': mobile() ? 'flex-start' : 'center',- 'margin-top': mobile() ? '4px' : '8px',- width: mobile() ? '100%' : 'auto',- }}- >- <ConnectGoogleButton buttonName="migrate_hero_connect_google" />- <BookCallButton />- </div></div></section>@@ -1950,9 +1127,7 @@ export const RouteMigrate: Component = () => {'z-index': 1,}}>- {/* The wash sits behind the card and the testimonials, and stops with- them — the case study below gets none, which is what draws the line- between the two. */}+ {/* Keep the illustration wash separate from the case-study video. */}<div class="migrate-washband"><div class="migrate-graphic-card"><div class="migrate-figure">@@ -1960,6 +1135,8 @@ export const RouteMigrate: Component = () => {class="migrate-hero-graphic"importButton={{href: ctaHref(),+ leadingLabel: 'Connect your tools',+ trailingLabel: 'Bring work over',onClick: (event) =>handleCtaClick(event, 'migrate_hero_import'),horizontalOffsetPx: mobile() ? 0 : -46,@@ -1968,35 +1145,19 @@ export const RouteMigrate: Component = () => {/></div></div>- <SectionHomeQuote variant="migrate" /></div>- <DesyncCaseStudy /></div></div>- <SectionMigrateComparisons tabs={comparisonTabs} />-- <HomeSectionRule />+ <MigrationPaths helpHref={DEMO_CALL_HREF} />- {/* Keep other tools connected instead of migrating them. */}<section- aria-label="Migrate incrementally or all at once"+ aria-label="Bring work over with an agent"style={sectionShell()}><div style={{ ...columnStyle(), 'justify-items': 'center' }}>- <SectionHeading title="Migrate incrementally or all at once" />- <div- style={{- display: 'grid',- gap: mobile() ? '12px' : '24px',- 'grid-template-columns': mobile()- ? 'repeat(3, minmax(0, 1fr))'- : 'repeat(5, minmax(0, 1fr))',- 'justify-items': 'center',- 'max-width': '760px',- width: '100%',- }}- >+ <SectionHeading title="Tell your agent what to bring over." />+ <div class="migrate-connected-tools"><For each={MODULE_ROW}>{(logo) => (<ModuleGraphic@@ -2012,84 +1173,94 @@ export const RouteMigrate: Component = () => {...bodyStyle(),'max-width': '720px','text-align': 'center',- 'text-wrap': 'balance',}}>- Connect the tools you want to keep through MCP, then move the rest- into Macro on your own timeline. Agents can search across both while- your team makes the switch.+ Connect an app such as Notion or Linear in Settings. Your agent can+ then find the pages and issues available to your connected account.+ Tell it which work matters to your company.</p></div></section><HomeSectionRule />- {/* The full side-by-side picture */}+ <section aria-label="Moving your company" style={sectionShell()}>+ <div style={columnStyle()}>+ <SectionHeading title="Moving your company" />+ <div class="migrate-practical-faq">+ <details class="migrate-faq__item">+ <summary>+ <span>What comes over with the import?</span>+ <CaretDown aria-hidden="true" />+ </summary>+ <p class="migrate-faq__answer">+ Notion pages become editable docs. Linear issues become tasks+ with descriptions, source links, and supported status, priority,+ assignee, and due-date fields. Files and CSVs use their own+ upload and import flows.{' '}+ <a href={DOCS_SWITCH}>See the source-specific import guide</a>.+ </p>+ </details>+ <details class="migrate-faq__item">+ <summary>+ <span>Does imported work stay in sync with the old tool?</span>+ <CaretDown aria-hidden="true" />+ </summary>+ <p class="migrate-faq__answer">+ Imports create copies in Macro. Later edits in Notion or Linear+ do not automatically replace those copies. Connected tools+ remain available to agents. Gmail works differently: your+ connected mailbox continues to sync.+ </p>+ </details>+ <details class="migrate-faq__item">+ <summary>+ <span>How do we bring the team over?</span>+ <CaretDown aria-hidden="true" />+ </summary>+ <p class="migrate-faq__answer">+ Review the imported work, confirm task assignees, and set+ sharing in Macro. Invite teammates by email and give them access+ to the projects and channels they need. Your company can move+ together or in stages.+ </p>+ </details>+ <details class="migrate-faq__item">+ <summary>+ <span>Can your team help plan a larger move?</span>+ <CaretDown aria-hidden="true" />+ </summary>+ <p class="migrate-faq__answer">+ Yes. Tell us which tools you use, how much work you want to+ bring over, and which history matters. We’ll help choose the+ import routes and plan the move.{' '}+ <a href={DEMO_CALL_HREF}>Talk to our team</a>.+ </p>+ </details>+ </div>+ </div>+ </section>++ <HomeSectionRule />++ <DesyncCaseStudy />+ <HomeSectionRule />++ {/* The overview is visible; provider-specific detail stays in the linked pages. */}<sectionaria-label="Macro compared to the rest of the toolset"- style={sectionShell()}+ style={{+ ...sectionShell(),+ 'padding-block': mobile() ? '48px' : '64px',+ }}>- <div- style={{- display: 'grid',- gap: mobile() ? '40px' : '56px',- 'justify-items': 'center',- 'max-width': '980px',- 'min-width': '0',- width: '100%',- }}- >- <SectionHeading- eyebrow="The comparison"- title="See what Macro replaces"- >- Compare Macro with the tools your team uses today.- </SectionHeading>- <WorldTable />- <div- style={{- 'align-items': 'center',- color: 'var(--c4)',- display: 'flex',- 'flex-wrap': 'wrap',- gap: mobile() ? '16px' : '24px',- 'justify-content': 'center',- }}- >- <span- style={{- 'align-items': 'center',- display: 'inline-flex',- 'font-size': '13px',- gap: '8px',- }}- >- <CheckMark /> Built in- </span>- <span- style={{- 'align-items': 'center',- display: 'inline-flex',- 'font-size': '13px',- gap: '8px',- }}- >- <CrossMark /> Not available- </span>+ <div class="migrate-full-comparison">+ <h2>Compare all tools</h2>+ <div class="migrate-full-comparison-content">+ <WorldTable />+ <ComparisonKey /><Show when={mobile()}>- <span- style={{- 'font-family': 'Inter, body',- 'font-size': '11px',- 'letter-spacing': '0.06em',- opacity: 0.6,- 'text-align': 'center',- 'text-transform': 'uppercase',- width: '100%',- }}- >- Scroll table sideways →- </span>+ <p class="migrate-scroll-hint">Scroll sideways to compare →</p></Show></div></div>@@ -2105,7 +1276,7 @@ export const RouteMigrate: Component = () => {}}><section- aria-label="Get started"+ aria-label="Get help from our team"style={{'align-items': mobile() ? 'start' : 'center',display: 'grid',@@ -2132,7 +1303,7 @@ export const RouteMigrate: Component = () => {margin: '0',}}>- Want help switching?+ Get help from our team</h2><pstyle={{@@ -2143,8 +1314,8 @@ export const RouteMigrate: Component = () => {margin: '0',}}>- Connect Google in 30 seconds, or book a call and we will help your- team move.+ Book a call with us. We’ll answer your questions and help you get+ your company set up in Macro.</p></div><div@@ -2156,11 +1327,7 @@ export const RouteMigrate: Component = () => {width: mobile() ? '100%' : 'auto',}}>- <ConnectGoogleButton- buttonName="migrate_final_connect_google"- large- />- <BookCallButton large />+ <BookCallButton large label="Talk to our team" /></div></section></div>diff --git a/apps/marketing/src/app/routes/RouteTasks.tsx b/apps/marketing/src/app/routes/RouteTasks.tsxindex 8054210fe1..db00c7a36a 100644--- a/apps/marketing/src/app/routes/RouteTasks.tsx+++ b/apps/marketing/src/app/routes/RouteTasks.tsx@@ -1,3 +1,4 @@+import jacobPhoto from '../../assets/people/jacob.webp';import {FeaturePageFaq,FeaturePageSection,@@ -6,74 +7,69 @@ import { HomepageClosing } from '../../features/marketing/components/HomepageCloimport {ProductHero,ProductPage,- ProductProse,} from '../../features/marketing/components/product/ProductPage';+import { TaskContextDemo } from '../../features/marketing/components/tasks/TaskContextDemo';+import { TaskHeroDemo } from '../../features/marketing/components/tasks/TaskProjectView';import {TaskAgentChannelDemo,- TaskFromChecklistDemo,TaskFromMessageDemo,TaskGithubDemo,} from '../../features/marketing/components/tasks/TaskStories';-import { WorkspaceDesktopDemo } from '../../features/marketing/components/WorkspaceDesktopDemo';+import { TasksComparison } from '../../features/marketing/components/tasks/TasksComparison';+import '../../features/marketing/components/tasks/tasks-page.css';import { setPageSeo } from '../utils/utilSeo';const tasksFaq = [{- q: 'How is Macro Tasks different from Linear?',+ 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: 'What updates automatically?',a: (<>- We used Linear before we built this, so the basics will feel familiar:- keyboard shortcuts, statuses, priorities, and fast lists. The difference- is that tasks live next to your email, chat, and docs. You make them- from the conversation they came from, and they stay linked to it. Read- our <a href="/posts/linear-alternative">Macro vs. Linear comparison</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>.</>),},{- q: 'Can I turn a message or email into a task?',- a: 'Yes. Hover a message and click Task, or open an email and click Create task in the top right. The task links back to the original so whoever picks it up can read the whole thing.',- },- {- q: 'How do I keep track of my tasks?',- a: 'My Tasks shows what’s assigned to you, All Tasks shows everything your team can see, and Created by me shows what you’ve asked other people for. New assignments also land in Home next to your email and messages, so you don’t have to go looking.',- },- {- q: 'Can agents work on tasks?',+ q: 'Can an agent take on a task?',a: (<>- Yes. Ask @Macro in a channel to create or update tasks, or hand a task- to a coding agent like Claude Code or Cursor. When a pull request- references the task, the status updates on its own. See{' '}- <a href="/agents">agents in Macro</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>.</>),},{- q: 'How does the GitHub integration work?',+ q: 'Can we bring our existing tasks?',a: (<>- Install the GitHub app and put the task ID in a branch name, PR title,- or PR description. Opening the PR moves the task to In Review, merging- it marks it Completed, and closing it without merging moves it back to- Not Started. More on <a href="/github">GitHub in Macro</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="https://cal.com/team/macro/macro-demo-call">+ talk to our team+ </a>{' '}+ about moving your company.</>),},{- q: 'Is it only for engineering teams?',- a: 'No. We run launches, customer follow-ups, and plenty of non-engineering work out of it. Anything with an owner and a due date works.',- },- {- q: 'Is our workspace public because Macro is open source?',- a: 'No. Our code is public. Your tasks, messages, and docs are not, and they follow your sharing settings.',+ 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: 'Can I join as a Guest for free?',+ q: 'Can I get started for free?',a: (<>- Yes. Guest access includes tasks with email, chat, docs, and agents.- See <a href="/pricing">pricing</a> for the current limits.+ Yes. Start with a free personal account. See{' '}+ <a href="/pricing">pricing</a> for company plans and current limits.</>),},@@ -83,145 +79,99 @@ export function RouteTasks() {setPageSeo({title: 'Macro Tasks — Task management that keeps up with your team',description:- 'Make tasks from messages, emails, and doc checklists in one click. Assign people or agents, and let GitHub pull requests update the status for you.',+ 'Turn requests in chat, email, and docs into assigned tasks. Keep the source attached, follow progress, and get work done with your team and agents.',path: '/tasks',});return (<ProductPage>- <ProductHero- product="Tasks"- title={['Task tracking without', 'the busywork.']}- description={[- 'Turn any message, email, or to-do into a task in one click.',- 'It stays linked to the conversation it came from.',- ]}- cta="tasks_hero_get_started"- />- <WorkspaceDesktopDemo- view="tasks"- label="Explore Macro Tasks"- caption="A sample workspace. Open a task, change the owner, leave a comment."- />- <section- class="tasks-founder-letter"- aria-labelledby="tasks-founder-title"- >- <h2 id="tasks-founder-title">Why did we build Macro Tasks?</h2>- <p>- Macro Tasks was designed based off our frustration with tools like- Linear, Notion and Jira... we've tried every task manager and every- way of using them. None of them helped our team move faster. Each kept- us organized for a while until they inevitably got stale. The core- problem is “tracking tasks” felt like busywork to our team. We- migrated from GitHub Issues to Notion to Linear and nothing seemed to- make us more organized.- </p>- <p>- Macro Tasks fixes this by tightly co-locating tasks with your team- chat. Tickets are so easy to create from messages, and their status- gets updated automatically so they'll actually get closed. After two- years of dogfooding it's finally working for us. We hope you like it- too!- </p>- <footer>— Jacob Beckerman, CEO and founder of Macro</footer>- </section>- <FeaturePageSection- id="from-a-message"- title="Any message can become a task."- description={- 'Hover a message in any channel and click Task.\nThe task links back to the thread, so nobody has to ask what happened.'- }- >- <div class="feature-page-visual">- <TaskFromMessageDemo />- </div>- <ProductProse>- <p>- This is the one we use the most. Someone flags a bug in a channel,- you hover the message and click Task. Macro fills in the title from- the message, assigns whoever was @mentioned, and links the task to- the thread. Whoever picks it up can read the replies instead of- pinging you for the backstory. To start one from scratch, press C- then T from anywhere in Macro.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageSection- id="ask-macro"- title="Or just ask @Macro."- description={- 'Mention the Macro agent and say who’s doing what.\nOne message turns into as many assigned tasks as you need.'- }- >- <div class="feature-page-visual">- <TaskAgentChannelDemo />- </div>- <ProductProse>- <p>- When a conversation ends with three action items, nobody wants to- file three tickets. Tag @Macro, tell it who owns what, and it- creates the tasks and replies with links. Each link shows the task’s- status, priority, and owner right in the channel, so you can see- where things stand without opening a task tracker.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageSection- id="from-docs-and-email"- title="Turn to-dos into tasks."- description={- 'Select a checklist in any doc and click Tasks. Every line becomes a real task.\nEmails get a Create task button too.'- }- >- <div class="feature-page-visual">- <TaskFromChecklistDemo />- </div>- <ProductProse>- <p>- Meeting notes are where action items go to die. In Macro, select the- checkboxes in a doc and click Tasks. Each line becomes a task you- can assign, and the doc keeps a live link to it, so you can see- what’s done without leaving the notes. Email works the same way:- open a thread, click Create task, and the task links back to the- email.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageSection- id="github"- title="Closes itself when the PR merges."- description={- 'Put the task ID in a branch or pull request.\nOpening the PR moves the task to In Review. Merging it marks it done.'- }- >- <div class="feature-page-visual">- <TaskGithubDemo />- </div>- <ProductProse>- <p>- Nobody on our team updates ticket status by hand anymore. When a- pull request references a task, Macro links the two and shows the PR- on the task. Opening it moves the task to In Review, merging it- marks the task Completed, and closing it without merging puts it- back in Not Started. It works the same when Claude Code or Cursor- opens the PR, so the board stays accurate even when an agent did the- work.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageFaq- id="tasks-faq-title"- title="Questions about Macro Tasks"- introduction={- <p>- If you’re coming from Linear, Jira, or Notion, most of what you know- carries over. The difference is where tasks come from and how they- stay up to date.- </p>- }- items={tasksFaq}- />- <HomepageClosing />+ <div class="tasks-page">+ <ProductHero+ cta="tasks_hero_get_started"+ product="Tasks"+ title={['Task tracking without', 'the busywork.']}+ description="What task tracking was meant to be."+ />+ <TaskHeroDemo />+ <section+ class="tasks-founder-letter"+ aria-labelledby="tasks-founder-title"+ >+ <a+ class="tasks-founder-card"+ href="/posts/linear-alternative"+ aria-label="Read Jacob’s story: Macro vs. Linear"+ >+ <div class="tasks-founder-card-body">+ <h2 id="tasks-founder-title">Why we built Macro Tasks.</h2>+ <blockquote>+ “Tracking tasks felt like busywork to our team.”+ </blockquote>+ <div class="tasks-founder-person">+ <img+ src={jacobPhoto}+ alt="Jacob"+ width="52"+ height="52"+ loading="lazy"+ />+ <div>+ <strong>Jacob</strong>+ <span>CEO and founder of Macro</span>+ </div>+ </div>+ </div>+ <div class="tasks-founder-card-article">+ <span>Macro vs. Linear</span>+ <span>+ Read the story <span aria-hidden="true">→</span>+ </span>+ </div>+ </a>+ </section>+ <FeaturePageSection+ id="from-a-message"+ title="Turn a message into a task."+ description="Make a task from the request and give it an owner."+ >+ <div class="feature-page-visual">+ <TaskFromMessageDemo />+ </div>+ </FeaturePageSection>+ <FeaturePageSection+ id="ask-macro"+ title="Ask your agent to handle updates."+ description="Macro can create the tasks, change an assignment, or check what’s still open."+ >+ <div class="feature-page-visual">+ <TaskAgentChannelDemo />+ </div>+ </FeaturePageSection>+ <FeaturePageSection+ id="from-docs-and-email"+ title="Link the work inside the task."+ description={'Use @mentions to link docs, emails, and conversations.'}+ >+ <div class="feature-page-visual">+ <TaskContextDemo />+ </div>+ </FeaturePageSection>+ <FeaturePageSection+ id="github"+ title="Tasks close themselves upon completion."+ description="Merge a linked pull request and Macro marks the task done."+ >+ <div class="feature-page-visual">+ <TaskGithubDemo />+ </div>+ </FeaturePageSection>+ <TasksComparison />+ <FeaturePageFaq+ id="tasks-faq-title"+ title="Questions about Macro Tasks"+ items={tasksFaq}+ />+ <HomepageClosing />+ </div></ProductPage>);}diff --git a/apps/marketing/src/assets/desktop/monterey-dark.jpg b/apps/marketing/src/assets/desktop/monterey-dark.jpgnew file mode 100644index 0000000000..683df743c8Binary files /dev/null and b/apps/marketing/src/assets/desktop/monterey-dark.jpg differdiff --git a/apps/marketing/src/features/marketing/assets/github-signin-0.html b/apps/marketing/src/features/marketing/assets/github-signin-0.htmlnew file mode 100644index 0000000000..0b3ec3b46d--- /dev/null+++ b/apps/marketing/src/features/marketing/assets/github-signin-0.html@@ -0,0 +1,1343 @@+<svg data-icon-sprite aria-hidden="true" width="0" height="0">+ <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">+ <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>+ </symbol>+ <symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">+ <path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>+ </symbol>+ <symbol id="diffs-icon-chevron" viewBox="0 0 16 16">+ <path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>+ </symbol>+ <symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">+ <path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>+ </symbol>+ <symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">+ <path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>+ </symbol>+ <symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">+ <path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>+ </symbol>+ <symbol id="diffs-icon-expand" viewBox="0 0 16 16">+ <path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>+ </symbol>+ <symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">+ <path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>+ </symbol>+ <symbol id="diffs-icon-file-code" viewBox="0 0 16 16">+ <path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>+ </symbol>+ <symbol id="diffs-icon-plus" viewBox="0 0 16 16">+ <path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>+ </symbol>+ <symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">+ <path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>+ </symbol>+ <symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">+ <path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>+ </symbol>+ <symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>+ </symbol>+ <symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>+ </symbol>+ <symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>+ </symbol>+ <symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>+ </symbol>+ <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>+ </symbol>+</svg><style data-core-css="">@layer base, theme, rendered, unsafe;+@layer base {+ :host {+ --diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",+ "Courier New", monospace;+ --diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",+ "Noto Sans", "Liberation Sans", Arial, sans-serif;+ --diffs-mixer: light-dark(#000, #fff);+ --diffs-gap-fallback: 8px;+ --diffs-scrollbar-gutter-fallback: 6px;+ --diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));+ --diffs-added-light: #0dbe4e;+ --diffs-added-dark: #5ecc71;+ --diffs-modified-light: #009fff;+ --diffs-modified-dark: #69b1ff;+ --diffs-deleted-light: #ff2e3f;+ --diffs-deleted-dark: #ff6762;+ --diffs-warning-light: #d5a910;+ --diffs-warning-dark: #ffd452;+ color-scheme: light dark;+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));+ font-size: var(--diffs-font-size, 13px);+ line-height: var(--diffs-line-height, 20px);+ font-feature-settings: var(--diffs-font-features);+ --diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));+ --diffs-bg-buffer: var(--diffs-bg-buffer-override, light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));+ --diffs-bg-context: var(--diffs-bg-context-override, light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));+ --diffs-bg-context-gutter: var(--diffs-bg-context-gutter-override, light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));+ --diffs-bg-separator: var(--diffs-bg-separator-override, light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));+ --diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));+ --diffs-fg-number: var(--diffs-fg-number-override, light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)), color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));+ --diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));+ --diffs-deletion-base: var(--diffs-deletion-color-override, light-dark(var(--diffs-light-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-light))), var(--diffs-dark-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-dark)))));+ --diffs-addition-base: var(--diffs-addition-color-override, light-dark(var(--diffs-light-addition-color, var(--diffs-addition-color, var(--diffs-added-light))), var(--diffs-dark-addition-color, var(--diffs-addition-color, var(--diffs-added-dark)))));+ --diffs-modified-base: var(--diffs-modified-color-override, light-dark(var(--diffs-light-modified-color, var(--diffs-modified-color, var(--diffs-modified-light))), var(--diffs-dark-modified-color, var(--diffs-modified-color, var(--diffs-modified-dark)))));+ --diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));+ --diffs-bg-deletion-emphasis: var(--diffs-bg-deletion-emphasis-override, light-dark(rgb(from var(--diffs-deletion-base) r g b / .15), rgb(from var(--diffs-deletion-base) r g b / .2)));+ --diffs-bg-addition: var(--diffs-bg-addition-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));+ --diffs-bg-addition-emphasis: var(--diffs-bg-addition-emphasis-override, light-dark(rgb(from var(--diffs-addition-base) r g b / .15), rgb(from var(--diffs-addition-base) r g b / .2)));+ --diffs-selection-base: var(--diffs-modified-base);+ --diffs-selection-number-fg: light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));+ background-color: var(--diffs-bg);+ color: var(--diffs-fg);+ display: block;+ }++ pre, code, [data-error-wrapper] {+ isolation: isolate;+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));+ outline: none;+ margin: 0;+ padding: 0;+ display: block;+ }++ pre, code {+ background-color: var(--diffs-bg);+ }++ code {+ contain: content;+ }++ input, button {+ font-family: inherit;+ font-size: inherit;+ line-height: inherit;+ }++ *, :before, :after {+ box-sizing: border-box;+ }++ [data-icon-sprite] {+ display: none;+ }++ [data-diffs-header], [data-separator] {+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));+ }++ [data-diffs-header][data-sticky] {+ z-index: 1;+ background-color: var(--diffs-bg);+ position: sticky;+ top: 0;+ }++ [data-file-info] {+ color: var(--fg);+ background-color: color-mix(in lab, var(--bg) 98%, var(--fg));+ border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));+ padding: 10px;+ font-weight: 700;+ }++ [data-diff], [data-file] {+ --diffs-grid-number-column-width: minmax(min-content, max-content);+ --diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;++ &[data-dehydrated] {+ --diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);+ }++ &:hover [data-code]::-webkit-scrollbar-thumb {+ background-color: var(--diffs-bg-context);+ }+ }++ @supports (-webkit-touch-callout: none) {+ :host {+ --diffs-scrollbar-gutter-fallback: 0px;+ }+ }++ [data-line] span {+ color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));+ background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));+ font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));+ font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));+ text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));+ }++ [data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions], [data-editor-overlay] {+ --diffs-computed-decoration-bg: var(--diffs-bg);+ --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);+ --diffs-computed-editor-active-line-bg: var(--diffs-computed-selected-line-bg);+ --diffs-computed-hovered-line-bg: var(--diffs-computed-editor-active-line-bg);+ --diffs-hover-mix-target: var(--diffs-bg-hover-override, var(--diffs-mixer));+ --diffs-line-bg: var(--diffs-computed-hovered-line-bg);+ color: var(--diffs-fg);+ background-color: var(--diffs-line-bg, var(--diffs-bg));+ }++ [data-line], [data-no-newline] {+ &[data-decoration-bg] {+ --mix-deco-light: 92%;+ --mix-deco-dark: 85%;++ &[data-decoration-bg-depth="2"] {+ --mix-deco-light: 88%;+ --mix-deco-dark: 80%;+ }++ &[data-decoration-bg-depth="3"] {+ --mix-deco-light: 85%;+ --mix-deco-dark: 78%;+ }++ --diffs-hover-mix-target: var(--diffs-decoration-bg);+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,+ var(--diffs-bg) var(--mix-deco-light),+ var(--diffs-decoration-bg)), color-mix(in lab,+ var(--diffs-bg) var(--mix-deco-dark),+ var(--diffs-decoration-bg)));+ }+ }++ [data-line-annotation], [data-gutter-buffer="annotation"] {+ --diffs-annotation-bg: var(--diffs-bg-context);+ --diffs-computed-decoration-bg: var(--diffs-annotation-bg);+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);+ }++ [data-merge-conflict-actions], [data-gutter-buffer="merge-conflict-action"], [data-gutter-buffer="merge-conflict-marker-base"], [data-gutter-buffer="merge-conflict-marker-separator"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"] {+ --diffs-computed-decoration-bg: var(--diffs-bg-context);+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);+ }++ [data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,+ var(--diffs-bg) 78%,+ var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,+ var(--diffs-bg) 68%,+ var(--conflict-bg-current-header-override, var(--diffs-addition-base))));+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);+ }++ [data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,+ var(--diffs-bg) 78%,+ var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,+ var(--diffs-bg) 68%,+ var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);+ }++ [data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {+ --diffs-computed-decoration-bg: var(--diffs-bg);+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);+ }++ :where([data-background]) {+ & [data-gutter-buffer], & [data-column-number] {+ --mix-light: 91%;+ --mix-dark: 85%;+ }++ & [data-line], & [data-no-newline] {+ --mix-light: 88%;+ --mix-dark: 80%;+ }++ & [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {+ --diffs-diff-line-mix-target: var(--diffs-bg);++ &[data-line-type="change-deletion"] {+ --diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);++ &:where([data-gutter-buffer], [data-column-number]) {+ color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));+ --diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));+ }++ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-light),+ var(--diffs-diff-line-mix-target)), color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-dark),+ var(--diffs-diff-line-mix-target)));+ }++ &[data-line-type="change-addition"] {+ --diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);++ &:where([data-gutter-buffer], [data-column-number]) {+ color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));+ --diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));+ }++ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-light),+ var(--diffs-diff-line-mix-target)), color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-dark),+ var(--diffs-diff-line-mix-target)));+ }++ &[data-merge-conflict="current"] {+ --diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);++ &:where([data-gutter-buffer], [data-column-number]) {+ color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));+ --diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));+ }++ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-light),+ var(--diffs-diff-line-mix-target)), color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-dark),+ var(--diffs-diff-line-mix-target)));+ }++ &[data-merge-conflict="incoming"] {+ --diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);++ &:where([data-gutter-buffer], [data-column-number]) {+ color: var(--diffs-modified-base);+ --diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));+ }++ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-light),+ var(--diffs-diff-line-mix-target)), color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-dark),+ var(--diffs-diff-line-mix-target)));+ }+ }+ }++ [data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline], [data-editor-overlay] {+ --diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));+ --diffs-selection-emphasis-mix-target: var(--diffs-selection-mix-target);++ &:where([data-editor-overlay]), &:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {+ --mix-selection-light: 82%;+ --mix-selection-dark: 75%;+ --diffs-hover-mix-target: var(--diffs-selection-mix-target);+ }++ &:where([data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line])) {+ --mix-selection-light: 75%;+ --mix-selection-dark: 60%;+ --diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));+ --diffs-hover-mix-target: var(--diffs-selection-mix-target);+ }++ &:where([data-line][data-selected-line]):is([data-line-type="change-addition"], [data-line-type="change-deletion"]) {+ --diffs-selection-emphasis-mix-target: light-dark(color-mix(in lab,+ var(--diffs-diff-line-mix-target, var(--diffs-selection-mix-target))+ var(--mix-selection-light),+ var(--diffs-selection-mix-target)), var(--diffs-selection-mix-target));+ }++ &:where([data-editor-overlay]), &[data-selected-line] {+ --diffs-computed-selected-line-bg: light-dark(color-mix(in lab,+ var(--diffs-computed-diff-line-bg) var(--mix-selection-light),+ var(--diffs-selection-mix-target)), color-mix(in lab,+ var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),+ var(--diffs-selection-mix-target)));+ }+ }++ [data-line][data-editor-active-line], [data-column-number][data-editor-active-line] {+ --diffs-computed-editor-active-line-bg: color-mix(in lab,+ var(--diffs-computed-selected-line-bg)+ var(--diffs-editor-active-line-source-mix, 100%),+ var(--diffs-selection-emphasis-mix-target));+ }++ @media (pointer: fine) {+ [data-line][data-hovered], [data-gutter-buffer][data-hovered], [data-column-number][data-hovered], [data-line-annotation][data-hovered], [data-no-newline][data-hovered], [data-merge-conflict][data-hovered], [data-merge-conflict-actions][data-hovered], [data-editor-overlay][data-hovered] {+ --diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,+ var(--diffs-computed-editor-active-line-bg) 97%,+ var(--diffs-hover-mix-target)), color-mix(in lab,+ var(--diffs-computed-editor-active-line-bg) 91%,+ var(--diffs-hover-mix-target)));+ }+ }++ [data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line]) {+ color: var(--diffs-selection-number-fg);+ }++ [data-no-newline] {+ user-select: none;++ & span {+ opacity: .6;+ }+ }++ [data-diff-type="split"][data-overflow="scroll"] {+ grid-template-columns: 1fr 1fr;+ display: grid;++ & [data-additions] {+ border-left: 1px solid var(--diffs-bg);+ }++ & [data-deletions] {+ border-right: 1px solid var(--diffs-bg);+ }+ }++ [data-code] {+ grid-auto-flow: dense;+ grid-template-columns: var(--diffs-code-grid);+ overflow: var(--diffs-overflow-override, scroll) clip;+ overscroll-behavior-x: none;+ tab-size: var(--diffs-tab-size, 2);+ padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));+ padding-bottom: max(0px,+ calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -+ var(--diffs-scrollbar-gutter)));+ scrollbar-gutter: stable;+ align-self: flex-start;+ display: grid;+ }++ [data-diffs-scrollbar-measure] {+ opacity: 0;+ pointer-events: none;+ scrollbar-gutter: auto;+ grid-template-columns: none;+ width: 100px;+ height: 100px;+ padding: 0;+ position: absolute;+ top: -200px;+ left: -200px;+ }++ [data-container-size] {+ container-type: inline-size;+ }++ [data-code]::-webkit-scrollbar {+ width: 0;+ height: var(--diffs-scrollbar-gutter);+ }++ [data-code]::-webkit-scrollbar-track {+ background: none;+ }++ [data-code]::-webkit-scrollbar-thumb {+ background-color: #0000;+ background-clip: content-box;+ border: 1px solid #0000;+ border-radius: 3px;+ }++ [data-code]::-webkit-scrollbar-corner {+ background-color: #0000;+ }++ @supports ((-moz-appearance: none)) {+ [data-code] {+ scrollbar-width: thin;+ scrollbar-color: var(--diffs-bg-context) transparent;+ padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));+ }+ }++ [data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {+ & [data-code], &[data-overflow="wrap"], &[data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {+ padding-top: 0;+ }+ }++ [data-gutter] {+ grid-template-rows: subgrid;+ grid-template-columns: subgrid;+ z-index: 3;+ background-color: var(--diffs-bg);+ grid-column: 1;+ display: grid;+ position: relative;++ & [data-gutter-buffer], & [data-column-number] {+ border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));+ }+ }++ [data-content] {+ grid-template-rows: subgrid;+ grid-template-columns: subgrid;+ background-color: var(--diffs-bg);+ grid-column: 2;+ min-width: 0;+ display: grid;+ }++ [data-diff-type="split"][data-overflow="wrap"], [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {+ grid-auto-flow: dense;+ grid-template-columns: repeat(2, var(--diffs-code-grid));+ padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));+ display: grid;++ & [data-code] {+ display: contents;+ }++ & [data-deletions] {+ & [data-gutter] {+ grid-column: 1;+ }++ & [data-content] {+ border-right: 1px solid var(--diffs-bg);+ grid-column: 2;+ }+ }++ & [data-additions] {+ & [data-gutter] {+ border-left: 1px solid var(--diffs-bg);+ grid-column: 3;+ }++ & [data-content] {+ grid-column: 4;+ }+ }+ }++ [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] [data-content] {+ overflow: clip;+ }++ [data-overflow="scroll"] [data-gutter] {+ position: sticky;+ left: 0;+ }++ [data-interactive-lines] [data-line] {+ cursor: pointer;+ }++ [data-interactive-line-numbers] [data-column-number] {+ cursor: pointer;+ touch-action: none;+ }++ [data-content-buffer], [data-gutter-buffer] {+ user-select: none;+ min-height: 1lh;+ position: relative;+ }++ [data-gutter-buffer] {+ padding-left: 2ch;+ padding-right: 1ch;++ &:before {+ content: "";+ min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));+ display: block;+ }+ }++ [data-gutter-buffer="annotation"] {+ --diffs-annotation-bg: var(--diffs-bg-context-gutter);+ min-height: 0;+ }++ [data-gutter-buffer="buffer"] {+ --diffs-line-bg: var(--diffs-bg-context-gutter);+ }++ [data-content-buffer] {+ background-position: 5px 0;+ background-size: 8px 8px;+ background-origin: border-box;+ background-image: repeating-linear-gradient(-45deg,+ transparent,+ transparent calc(3px * 1.414),+ var(--diffs-bg-buffer) calc(3px * 1.414),+ var(--diffs-bg-buffer) calc(4px * 1.414));+ grid-column: 1;+ }++ [data-separator] {+ box-sizing: content-box;+ background-color: var(--diffs-bg);+ }++ [data-separator="simple"] {+ min-height: 4px;+ }++ [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {+ background-color: var(--diffs-bg-separator);+ }++ [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {+ height: 32px;+ position: relative;+ }++ [data-separator-wrapper] {+ user-select: none;+ fill: currentColor;+ background-color: var(--diffs-bg);+ align-items: center;+ height: 100%;+ display: flex;+ position: absolute;+ inset-inline: 0;+ }++ [data-content] [data-separator-wrapper] {+ display: none;+ }++ [data-separator="metadata"] [data-separator-wrapper] {+ background-color: var(--diffs-bg-separator);+ height: 100%;+ color: var(--diffs-fg-number);+ white-space: nowrap;+ text-overflow: ellipsis;+ min-width: min-content;+ padding-inline: 1ch;+ inset-inline: 100% auto;+ overflow: hidden;+ }++ [data-separator="line-info"] {+ margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));++ & [data-separator-wrapper] {+ min-width: 16px;+ }+ }++ [data-separator="line-info-basic"], [data-separator="metadata"] {+ margin-block: 0;+ }++ [data-separator="line-info"][data-separator-first] {+ margin-top: 0;+ }++ [data-separator="line-info"][data-separator-last] {+ margin-bottom: 0;+ }++ [data-expand-index] [data-separator-wrapper] {+ grid-template-columns: 32px auto;+ display: grid;+ }++ [data-expand-index] [data-separator-wrapper][data-separator-multi-button] {+ grid-template-columns: 32px 32px auto;+ }++ [data-expand-button], [data-separator-content] {+ background-color: var(--diffs-bg-separator);+ flex: none;+ align-items: center;+ display: flex;+ }++ [data-expand-index] [data-separator-content]:hover {+ cursor: pointer;+ text-decoration: underline;+ }++ [data-expand-button] {+ cursor: pointer;+ min-width: 32px;+ color: var(--diffs-fg-number);+ border-right: 2px solid var(--diffs-bg);+ flex-shrink: 0;+ justify-content: center;+ align-self: stretch;++ &:hover {+ color: var(--diffs-fg);+ }++ &[data-expand-all-button] {+ display: none;+ }+ }++ [data-expand-down] [data-icon] {+ transform: scaleY(-1);+ }++ [data-separator-content] {+ height: 100%;+ color: var(--diffs-fg-number);+ flex: auto;+ justify-content: flex-start;+ padding: 0 1ch;+ overflow: hidden;+ }++ [data-separator="line-info"], [data-separator="line-info-basic"] {+ & [data-separator-content] {+ user-select: none;+ height: 100%;+ overflow: clip;+ }+ }++ [data-unmodified-lines] {+ text-overflow: ellipsis;+ white-space: nowrap;+ flex: 0 auto;+ min-width: 0;+ display: block;+ overflow: hidden;+ }++ @supports (width: 1cqi) {+ [data-unified] {+ & [data-separator="line-info"] [data-separator-wrapper] {+ padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));+ width: 100cqi;++ & [data-separator-content] {+ border-radius: 6px;+ }+ }++ & [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {+ border-top-left-radius: unset;+ border-bottom-left-radius: unset;+ }+ }++ [data-gutter] {+ & [data-separator="line-info"] [data-separator-wrapper] {+ padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));+ }++ & [data-separator="line-info"] [data-separator-content] {+ border-top-left-radius: 6px;+ border-bottom-left-radius: 6px;+ }++ & [data-separator="line-info"][data-expand-index] [data-separator-content] {+ border-top-left-radius: unset;+ border-bottom-left-radius: unset;+ }+ }++ [data-additions] {+ & [data-content] [data-separator="line-info"] {+ background-color: var(--diffs-bg);++ & [data-separator-wrapper] {+ display: none;+ }+ }++ & [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {+ background-color: var(--diffs-bg-separator);+ border-top-right-radius: 6px;+ border-bottom-right-radius: 6px;+ height: 100%;+ display: block;++ & [data-separator-content], & [data-expand-button] {+ display: none;+ }+ }+ }++ [data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {+ width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));+ }++ [data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {+ background-color: var(--diffs-bg-separator);+ height: 100%;+ margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));+ border-top-right-radius: 6px;+ border-bottom-right-radius: 6px;+ display: block;++ & [data-separator-content], & [data-expand-button] {+ display: none;+ }+ }++ [data-separator="line-info"] [data-separator-wrapper] {+ & [data-expand-both], & [data-expand-down], & [data-expand-up] {+ border-top-left-radius: 6px;+ border-bottom-left-radius: 6px;+ }+ }++ @media (pointer: fine) {+ [data-separator="line-info"] [data-separator-wrapper] {+ &[data-separator-multi-button] {+ & [data-expand-up] {+ border-top-left-radius: 6px;+ border-bottom-left-radius: unset;+ }++ & [data-expand-down] {+ border-bottom-left-radius: 6px;+ border-top-left-radius: unset;+ }+ }+ }+ }+ }++ @media (pointer: coarse) {+ [data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {+ grid-template-columns: 34px 34px auto;++ & [data-separator-content] {+ grid-column: unset;+ grid-row: unset;+ }+ }++ @supports (width: 1cqi) {+ [data-separator="line-info"] [data-separator-wrapper] {+ & [data-expand-both], & [data-expand-down], & [data-expand-up] {+ border-top-left-radius: 6px;+ border-bottom-left-radius: 6px;+ }++ &[data-separator-multi-button] {+ & [data-expand-up] {+ border-top-left-radius: 6px;+ border-bottom-left-radius: 6px;+ }++ & [data-expand-down] {+ border-bottom-left-radius: unset;+ border-top-left-radius: unset;+ }+ }+ }+ }+ }++ @media (pointer: fine) {+ [data-separator-wrapper][data-separator-multi-button] {+ grid-template-rows: 50% 50%;+ display: grid;++ & [data-separator-content] {+ grid-area: 1 / 2 / -1;+ min-width: min-content;+ }++ & [data-expand-button] {+ grid-column: 1;+ }+ }++ [data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {+ grid-template-columns: 34px auto;+ }++ [data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {+ grid-template-columns: 100% auto;+ }++ [data-separator="line-info"], [data-separator="line-info-basic"] {+ & [data-separator-multi-button] {+ & [data-expand-up] {+ border-bottom: 1px solid var(--diffs-bg);+ border-right: 2px solid var(--diffs-bg);+ }++ & [data-expand-down] {+ border-top: 1px solid var(--diffs-bg);+ border-right: 2px solid var(--diffs-bg);+ }+ }+ }+ }++ [data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {+ display: none;+ }++ [data-line-annotation] {+ min-height: var(--diffs-annotation-min-height, 0);+ z-index: 2;+ }++ [data-merge-conflict-actions] {+ z-index: 2;+ }++ [data-separator="custom"] {+ grid-template-columns: subgrid;+ display: grid;+ }++ [data-line], [data-column-number], [data-no-newline] {+ padding-inline: 1ch;+ position: relative;+ }++ [data-indicators="classic"] [data-line] {+ padding-inline-start: 2ch;+ }++ [data-indicators="classic"] {+ & [data-line-type="change-addition"], & [data-line-type="change-deletion"] {+ &[data-no-newline], &[data-line] {+ &:before {+ user-select: none;+ width: 1ch;+ height: 1lh;+ display: inline-block;+ position: absolute;+ top: 0;+ left: 0;+ }+ }+ }++ & [data-line-type="change-addition"] {+ &[data-line], &[data-no-newline] {+ &:before {+ content: "+";+ color: var(--diffs-addition-base);+ }+ }+ }++ & [data-line-type="change-deletion"] {+ &[data-line], &[data-no-newline] {+ &:before {+ content: "-";+ color: var(--diffs-deletion-base);+ }+ }+ }+ }++ [data-indicators="bars"] {+ & [data-line-type="change-deletion"], & [data-line-type="change-addition"] {+ &[data-column-number] {+ &:before {+ content: "";+ user-select: none;+ contain: strict;+ width: 4px;+ height: 100%;+ display: block;+ position: absolute;+ top: 0;+ left: 0;+ }+ }+ }++ & [data-line-type="change-deletion"] {+ &[data-column-number] {+ &:before {+ background-image: linear-gradient(0deg,+ var(--diffs-bg-deletion) 50%,+ var(--diffs-deletion-base) 50%);+ background-repeat: repeat;+ background-size: 2px 2px;+ background-size: calc(1lh / round(1lh / 2px))+ calc(1lh / round(1lh / 2px));+ }+ }+ }++ & [data-line-type="change-addition"] {+ &[data-column-number] {+ &:before {+ background-color: var(--diffs-addition-base);+ }+ }+ }+ }++ [data-overflow="wrap"] {+ & [data-line] {+ white-space: pre-wrap;+ word-break: break-word;+ }++ & [data-annotation-content] {+ word-break: break-word;+ }+ }++ [data-overflow="scroll"] [data-line] {+ white-space: pre;+ min-height: 1lh;+ }++ [data-column-number] {+ box-sizing: content-box;+ text-align: right;+ user-select: none;+ color: var(--diffs-fg-number);+ padding-left: 2ch;+ }++ [data-line-number-content] {+ min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));+ z-index: 1;+ display: inline-block;+ position: relative;+ }++ [data-disable-line-numbers] {+ & [data-gutter-buffer], & [data-column-number] {+ min-width: 4px;+ padding: 0;++ &:before {+ min-width: 0;+ }+ }++ & [data-line-number-content] {+ display: none;+ }++ & [data-gutter-utility-slot] {+ right: unset;+ justify-content: flex-start;+ left: 0;+ }++ &[data-indicators="bars"] [data-gutter-utility-slot] {+ left: 6px;+ }+ }++ [data-file][data-disable-line-numbers] {+ & [data-gutter-buffer], & [data-column-number] {+ border-right: 0;+ min-width: 0;+ }+ }++ [data-diff-span] {+ box-decoration-break: clone;+ border-radius: 3px;+ }++ [data-line-type="change-addition"] [data-diff-span] {+ background-color: var(--diffs-bg-addition-emphasis);+ }++ [data-line-type="change-deletion"] [data-diff-span] {+ background-color: var(--diffs-bg-deletion-emphasis);+ }++ [data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {+ color: var(--diffs-fg);+ padding-left: 1ch;+ }++ [data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {+ align-items: center;+ display: flex;++ &:after {+ color: var(--diffs-fg-conflict-marker);+ font-size: .75rem;+ font-style: normal;+ line-height: 1.25rem;+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));+ padding-left: 1ch;+ }+ }++ [data-merge-conflict="marker-start"]:after {+ content: "(Current Change)";+ }++ [data-merge-conflict="marker-end"]:after {+ content: "(Incoming Change)";+ }++ [data-merge-conflict-actions-content] {+ min-height: 1.75rem;+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));+ color: var(--diffs-fg);+ align-items: center;+ gap: .25rem;+ padding-inline: .5rem;+ font-size: .75rem;+ line-height: 1.2;+ display: flex;+ }++ [data-merge-conflict-action] {+ appearance: none;+ color: var(--diffs-fg-number);+ font: inherit;+ cursor: pointer;+ background: none;+ border: 0;+ padding: 0;+ font-style: normal;+ }++ [data-merge-conflict-action]:hover {+ color: var(--diffs-fg);+ }++ [data-merge-conflict-action="current"]:hover {+ color: var(--diffs-addition-base);+ }++ [data-merge-conflict-action="incoming"]:hover {+ color: var(--diffs-modified-base);+ }++ [data-merge-conflict-action-separator] {+ color: var(--diffs-fg-number);+ opacity: .6;+ user-select: none;+ }++ [data-diffs-header="default"] {+ background-color: var(--diffs-bg);+ justify-content: space-between;+ align-items: center;+ gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));+ min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));+ z-index: 2;+ flex-direction: row;+ padding-inline: 16px;+ display: flex;+ position: relative;+ top: 0;+ }++ [data-header-content] {+ align-items: center;+ gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));+ white-space: nowrap;+ flex-direction: row;+ min-width: 0;+ display: flex;+ }++ [data-header-content] [data-prev-name], [data-header-content] [data-title] {+ text-overflow: ellipsis;+ white-space: nowrap;+ direction: rtl;+ min-width: 0;+ overflow: hidden;+ }++ [data-prev-name] {+ opacity: .7;+ }++ [data-rename-icon] {+ fill: currentColor;+ flex-grow: 0;+ flex-shrink: 0;+ }++ [data-diffs-header="default"] [data-metadata] {+ white-space: nowrap;+ align-items: center;+ gap: 1ch;+ display: flex;+ }++ [data-diffs-header="default"] [data-additions-count] {+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));+ color: var(--diffs-addition-base);+ }++ [data-diffs-header="default"] [data-deletions-count] {+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));+ color: var(--diffs-deletion-base);+ }++ [data-change-icon] {+ fill: currentColor;+ flex-shrink: 0;+ }++ [data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {+ color: var(--diffs-modified-base);+ }++ [data-change-icon="new"] {+ color: var(--diffs-addition-base);+ }++ [data-change-icon="deleted"] {+ color: var(--diffs-deletion-base);+ }++ [data-change-icon="file"] {+ opacity: .6;+ }++ [data-annotation-content] {+ z-index: 2;+ isolation: isolate;+ white-space: normal;+ align-self: flex-start;+ min-width: 0;+ display: flow-root;+ position: relative;+ }++ [data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {+ width: var(--diffs-column-content-width, auto);+ left: var(--diffs-column-number-width, 0);+ position: sticky;+ }++ [data-annotation-slot] {+ text-wrap-mode: wrap;+ word-break: normal;+ white-space-collapse: collapse;+ }++ [data-gutter-utility-slot] {+ touch-action: none;+ justify-content: flex-end;+ display: flex;+ position: absolute;+ top: 0;+ bottom: 0;+ right: 0;+ }++ [data-utility-button] {+ appearance: none;+ cursor: pointer;+ width: 1lh;+ height: 1lh;+ font-size: var(--diffs-font-size, 13px);+ line-height: var(--diffs-line-height, 20px);+ background-color: var(--diffs-modified-base);+ color: var(--diffs-bg);+ fill: currentColor;+ z-index: 4;+ touch-action: none;+ border: none;+ border-radius: 4px;+ justify-content: center;+ align-items: center;+ margin-right: calc(-1lh + 1ch);+ padding: 0;+ display: flex;+ position: relative;++ &:before {+ content: "";+ display: block;+ position: absolute;+ inset: 0 0 0 -4px;+ }+ }++ [data-decoration-bar-stack] {+ pointer-events: none;+ isolation: isolate;+ z-index: 1;+ background-color: var(--diffs-decoration-bar-color, transparent);+ box-sizing: content-box;+ border-left: 2px solid var(--diffs-bg);+ border-right: 2px solid var(--diffs-bg);+ width: 6px;+ position: absolute;+ top: 0;+ bottom: 0;+ right: -2px;++ [data-decoration-bar-depth="1"] & {+ background-color: color-mix(in lab,+ var(--diffs-bg) 20%,+ var(--diffs-decoration-bar-color, transparent));+ }++ [data-decoration-bar-depth="2"] & {+ background-color: color-mix(in lab,+ var(--diffs-bg) 45%,+ var(--diffs-decoration-bar-color, transparent));+ }++ [data-decoration-bar-depth="3"] & {+ background-color: color-mix(in lab,+ var(--diffs-bg) 65%,+ var(--diffs-decoration-bar-color, transparent));+ }++ [data-decoration-bar-start] & {+ border-top-left-radius: 5px;+ border-top-right-radius: 5px;+ }++ [data-decoration-bar-end] & {+ z-index: 3;+ border-bottom-right-radius: 5px;+ border-bottom-left-radius: 5px;+ }+ }++ [data-placeholder] {+ contain: strict;+ }++ [data-error-wrapper] {+ padding: var(--diffs-gap-block, var(--diffs-gap-fallback))+ var(--diffs-gap-inline, var(--diffs-gap-fallback));+ scrollbar-width: none;+ max-height: 400px;+ overflow: auto;++ & [data-error-message] {+ color: var(--diffs-deletion-base);+ font-size: 18px;+ font-weight: bold;+ }++ & [data-error-stack] {+ color: var(--diffs-fg-number);+ }+ }+}++@layer theme, rendered, unsafe;++@layer theme {++}</style><style data-theme-css="">@layer base, theme, rendered, unsafe;+@layer rendered {+ :host {+ color-scheme: dark;+ --diffs-scrollbar-gutter-measured: var(--diffs-scrollbar-gutter-fallback);+ --diffs-dark:#fafafa;--diffs-dark-bg:#0a0a0a;--diffs-dark-addition-color:#07c480;--diffs-dark-deletion-color:#ff2e3f;--diffs-dark-modified-color:#009fff;--diffs-light:#0a0a0a;--diffs-light-bg:#ffffff;--diffs-light-addition-color:#18a46c;--diffs-light-deletion-color:#d52c36;--diffs-light-modified-color:#009fff;+ }+}</style><pre data-diff="" data-diff-type="single" data-overflow="wrap" data-background="" data-indicators="bars" style="--diffs-min-number-column-width-default:2ch;" data-dehydrated=""><code data-code="" data-unified=""><div data-gutter="" style="grid-row: span 19"><div data-line-type="context" data-column-number="1" data-line-index="0,0"><span data-line-number-content="">1</span></div><div data-line-type="context" data-column-number="2" data-line-index="1,1"><span data-line-number-content="">2</span></div><div data-line-type="context" data-column-number="3" data-line-index="2,2"><span data-line-number-content="">3</span></div><div data-line-type="context" data-column-number="4" data-line-index="3,3"><span data-line-number-content="">4</span></div><div data-line-type="change-deletion" data-column-number="5" data-line-index="4,4"><span data-line-number-content="">5</span></div><div data-line-type="change-addition" data-column-number="5" data-line-index="5,4"><span data-line-number-content="">5</span></div><div data-line-type="context" data-column-number="6" data-line-index="6,5"><span data-line-number-content="">6</span></div><div data-line-type="context" data-column-number="7" data-line-index="7,6"><span data-line-number-content="">7</span></div><div data-line-type="change-deletion" data-column-number="8" data-line-index="8,7"><span data-line-number-content="">8</span></div><div data-line-type="change-addition" data-column-number="8" data-line-index="9,7"><span data-line-number-content="">8</span></div><div data-line-type="context" data-column-number="9" data-line-index="10,8"><span data-line-number-content="">9</span></div><div data-line-type="context" data-column-number="10" data-line-index="11,9"><span data-line-number-content="">10</span></div><div data-line-type="change-deletion" data-column-number="11" data-line-index="12,10"><span data-line-number-content="">11</span></div><div data-line-type="change-addition" data-column-number="11" data-line-index="13,10"><span data-line-number-content="">11</span></div><div data-line-type="context" data-column-number="12" data-line-index="14,11"><span data-line-number-content="">12</span></div><div data-line-type="context" data-column-number="13" data-line-index="15,12"><span data-line-number-content="">13</span></div><div data-line-type="context" data-column-number="14" data-line-index="16,13"><span data-line-number-content="">14</span></div><div data-line-type="context" data-column-number="15" data-line-index="17,14"><span data-line-number-content="">15</span></div><div data-line-type="context-expanded" data-column-number="16" data-line-index="18,15"><span data-line-number-content="">16</span></div></div><div data-content="" style="grid-row: span 19"><div data-line="1" data-alt-line="1" data-line-type="context" data-line-index="0,0"><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61">export</span><span style="--diffs-token-dark:#D568EA;--diffs-token-light:#A631BE"> function</span><span style="--diffs-token-dark:#9D6AFB;--diffs-token-light:#693ACF"> SignIn</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">()</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> {</span></div><div data-line="2" data-alt-line="2" data-line-type="context" data-line-index="1,1"><span style="--diffs-token-dark:#D568EA;--diffs-token-light:#A631BE"> const</span><span style="--diffs-token-dark:#FFAB16;--diffs-token-light:#D5901C"> submit</span><span style="--diffs-token-dark:#08C0EF;--diffs-token-light:#08C0EF"> =</span><span style="--diffs-token-dark:#9D6AFB;--diffs-token-light:#693ACF"> useSignIn</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">();</span></div><div data-line="3" data-alt-line="3" data-line-type="context" data-line-index="2,2">+</div><div data-line="4" data-alt-line="4" data-line-type="context" data-line-index="3,3"><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61"> return</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> (</span></div><div data-line="5" data-line-type="change-deletion" data-line-index="4,4"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> <</span><span style="--diffs-token-dark:#FF855E;--diffs-token-light:#D5512F">form</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">></span></div><div data-line="5" data-line-type="change-addition" data-line-index="5,4"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> <</span><span style="--diffs-token-dark:#FF855E;--diffs-token-light:#D5512F">form</span><span style="--diffs-token-dark:#60D199;--diffs-token-light:#18A46C"> onSubmit</span><span style="--diffs-token-dark:#08C0EF;--diffs-token-light:#08C0EF">=</span><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61">{</span><span style="--diffs-token-dark:#FFA359;--diffs-token-light:#D47628">submit</span><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61">}</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">></span></div><div data-line="6" data-alt-line="6" data-line-type="context" data-line-index="6,5"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> <</span><span style="--diffs-token-dark:#D568EA;--diffs-token-light:#A631BE">EmailField</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> /></span></div><div data-line="7" data-alt-line="7" data-line-type="context" data-line-index="7,6"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> <</span><span style="--diffs-token-dark:#D568EA;--diffs-token-light:#A631BE">PasswordField</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> /></span></div><div data-line="8" data-line-type="change-deletion" data-line-index="8,7"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> <</span><span style="--diffs-token-dark:#FF855E;--diffs-token-light:#D5512F">button</span><span style="--diffs-token-dark:#60D199;--diffs-token-light:#18A46C"> class</span><span style="--diffs-token-dark:#08C0EF;--diffs-token-light:#08C0EF">=</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">"desktop"</span><span style="--diffs-token-dark:#60D199;--diffs-token-light:#18A46C"> onClick</span><span style="--diffs-token-dark:#08C0EF;--diffs-token-light:#08C0EF">=</span><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61">{</span><span style="--diffs-token-dark:#FFA359;--diffs-token-light:#D47628">submit</span><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61">}</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">></span></div><div data-line="8" data-line-type="change-addition" data-line-index="9,7"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> <</span><span style="--diffs-token-dark:#FF855E;--diffs-token-light:#D5512F">button</span><span style="--diffs-token-dark:#60D199;--diffs-token-light:#18A46C"> class</span><span style="--diffs-token-dark:#08C0EF;--diffs-token-light:#08C0EF">=</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">"desktop"</span><span style="--diffs-token-dark:#60D199;--diffs-token-light:#18A46C"> type</span><span style="--diffs-token-dark:#08C0EF;--diffs-token-light:#08C0EF">=</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">"submit"</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">></span></div><div data-line="9" data-alt-line="9" data-line-type="context" data-line-index="10,8"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> Sign in</span></div><div data-line="10" data-alt-line="10" data-line-type="context" data-line-index="11,9"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> </</span><span style="--diffs-token-dark:#FF855E;--diffs-token-light:#D5512F">button</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">></span></div><div data-line="11" data-line-type="change-deletion" data-line-index="12,10"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> <</span><span style="--diffs-token-dark:#FF855E;--diffs-token-light:#D5512F">button</span><span style="--diffs-token-dark:#60D199;--diffs-token-light:#18A46C"> class</span><span style="--diffs-token-dark:#08C0EF;--diffs-token-light:#08C0EF">=</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">"mobile"</span><span style="--diffs-token-dark:#60D199;--diffs-token-light:#18A46C"> type</span><span style="--diffs-token-dark:#08C0EF;--diffs-token-light:#08C0EF">=</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">"button"</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">></span></div><div data-line="11" data-line-type="change-addition" data-line-index="13,10"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> <</span><span style="--diffs-token-dark:#FF855E;--diffs-token-light:#D5512F">button</span><span style="--diffs-token-dark:#60D199;--diffs-token-light:#18A46C"> class</span><span style="--diffs-token-dark:#08C0EF;--diffs-token-light:#08C0EF">=</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">"mobile"</span><span style="--diffs-token-dark:#60D199;--diffs-token-light:#18A46C"> type</span><span style="--diffs-token-dark:#08C0EF;--diffs-token-light:#08C0EF">=</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">"submit"</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">></span></div><div data-line="12" data-alt-line="12" data-line-type="context" data-line-index="14,11"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> Sign in</span></div><div data-line="13" data-alt-line="13" data-line-type="context" data-line-index="15,12"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> </</span><span style="--diffs-token-dark:#FF855E;--diffs-token-light:#D5512F">button</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">></span></div><div data-line="14" data-alt-line="14" data-line-type="context" data-line-index="16,13"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> </</span><span style="--diffs-token-dark:#FF855E;--diffs-token-light:#D5512F">form</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">></span></div><div data-line="15" data-alt-line="15" data-line-type="context" data-line-index="17,14"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> );</span></div><div data-line="16" data-alt-line="16" data-line-type="context-expanded" data-line-index="18,15"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">}</span></div></div></code></pre>\ No newline at end of filediff --git a/apps/marketing/src/features/marketing/assets/github-signin-1.html b/apps/marketing/src/features/marketing/assets/github-signin-1.htmlnew file mode 100644index 0000000000..99535fe52f--- /dev/null+++ b/apps/marketing/src/features/marketing/assets/github-signin-1.html@@ -0,0 +1,1343 @@+<svg data-icon-sprite aria-hidden="true" width="0" height="0">+ <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">+ <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>+ </symbol>+ <symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">+ <path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>+ </symbol>+ <symbol id="diffs-icon-chevron" viewBox="0 0 16 16">+ <path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>+ </symbol>+ <symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">+ <path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>+ </symbol>+ <symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">+ <path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>+ </symbol>+ <symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">+ <path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>+ </symbol>+ <symbol id="diffs-icon-expand" viewBox="0 0 16 16">+ <path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>+ </symbol>+ <symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">+ <path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>+ </symbol>+ <symbol id="diffs-icon-file-code" viewBox="0 0 16 16">+ <path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>+ </symbol>+ <symbol id="diffs-icon-plus" viewBox="0 0 16 16">+ <path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>+ </symbol>+ <symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">+ <path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>+ </symbol>+ <symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">+ <path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>+ </symbol>+ <symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>+ </symbol>+ <symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>+ </symbol>+ <symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>+ </symbol>+ <symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">+ <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>+ </symbol>+ <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">+ <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>+ </symbol>+</svg><style data-core-css="">@layer base, theme, rendered, unsafe;+@layer base {+ :host {+ --diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",+ "Courier New", monospace;+ --diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",+ "Noto Sans", "Liberation Sans", Arial, sans-serif;+ --diffs-mixer: light-dark(#000, #fff);+ --diffs-gap-fallback: 8px;+ --diffs-scrollbar-gutter-fallback: 6px;+ --diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));+ --diffs-added-light: #0dbe4e;+ --diffs-added-dark: #5ecc71;+ --diffs-modified-light: #009fff;+ --diffs-modified-dark: #69b1ff;+ --diffs-deleted-light: #ff2e3f;+ --diffs-deleted-dark: #ff6762;+ --diffs-warning-light: #d5a910;+ --diffs-warning-dark: #ffd452;+ color-scheme: light dark;+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));+ font-size: var(--diffs-font-size, 13px);+ line-height: var(--diffs-line-height, 20px);+ font-feature-settings: var(--diffs-font-features);+ --diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));+ --diffs-bg-buffer: var(--diffs-bg-buffer-override, light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));+ --diffs-bg-context: var(--diffs-bg-context-override, light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));+ --diffs-bg-context-gutter: var(--diffs-bg-context-gutter-override, light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));+ --diffs-bg-separator: var(--diffs-bg-separator-override, light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));+ --diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));+ --diffs-fg-number: var(--diffs-fg-number-override, light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)), color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));+ --diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));+ --diffs-deletion-base: var(--diffs-deletion-color-override, light-dark(var(--diffs-light-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-light))), var(--diffs-dark-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-dark)))));+ --diffs-addition-base: var(--diffs-addition-color-override, light-dark(var(--diffs-light-addition-color, var(--diffs-addition-color, var(--diffs-added-light))), var(--diffs-dark-addition-color, var(--diffs-addition-color, var(--diffs-added-dark)))));+ --diffs-modified-base: var(--diffs-modified-color-override, light-dark(var(--diffs-light-modified-color, var(--diffs-modified-color, var(--diffs-modified-light))), var(--diffs-dark-modified-color, var(--diffs-modified-color, var(--diffs-modified-dark)))));+ --diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));+ --diffs-bg-deletion-emphasis: var(--diffs-bg-deletion-emphasis-override, light-dark(rgb(from var(--diffs-deletion-base) r g b / .15), rgb(from var(--diffs-deletion-base) r g b / .2)));+ --diffs-bg-addition: var(--diffs-bg-addition-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));+ --diffs-bg-addition-emphasis: var(--diffs-bg-addition-emphasis-override, light-dark(rgb(from var(--diffs-addition-base) r g b / .15), rgb(from var(--diffs-addition-base) r g b / .2)));+ --diffs-selection-base: var(--diffs-modified-base);+ --diffs-selection-number-fg: light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));+ background-color: var(--diffs-bg);+ color: var(--diffs-fg);+ display: block;+ }++ pre, code, [data-error-wrapper] {+ isolation: isolate;+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));+ outline: none;+ margin: 0;+ padding: 0;+ display: block;+ }++ pre, code {+ background-color: var(--diffs-bg);+ }++ code {+ contain: content;+ }++ input, button {+ font-family: inherit;+ font-size: inherit;+ line-height: inherit;+ }++ *, :before, :after {+ box-sizing: border-box;+ }++ [data-icon-sprite] {+ display: none;+ }++ [data-diffs-header], [data-separator] {+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));+ }++ [data-diffs-header][data-sticky] {+ z-index: 1;+ background-color: var(--diffs-bg);+ position: sticky;+ top: 0;+ }++ [data-file-info] {+ color: var(--fg);+ background-color: color-mix(in lab, var(--bg) 98%, var(--fg));+ border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));+ padding: 10px;+ font-weight: 700;+ }++ [data-diff], [data-file] {+ --diffs-grid-number-column-width: minmax(min-content, max-content);+ --diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;++ &[data-dehydrated] {+ --diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);+ }++ &:hover [data-code]::-webkit-scrollbar-thumb {+ background-color: var(--diffs-bg-context);+ }+ }++ @supports (-webkit-touch-callout: none) {+ :host {+ --diffs-scrollbar-gutter-fallback: 0px;+ }+ }++ [data-line] span {+ color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));+ background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));+ font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));+ font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));+ text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));+ }++ [data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions], [data-editor-overlay] {+ --diffs-computed-decoration-bg: var(--diffs-bg);+ --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);+ --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);+ --diffs-computed-editor-active-line-bg: var(--diffs-computed-selected-line-bg);+ --diffs-computed-hovered-line-bg: var(--diffs-computed-editor-active-line-bg);+ --diffs-hover-mix-target: var(--diffs-bg-hover-override, var(--diffs-mixer));+ --diffs-line-bg: var(--diffs-computed-hovered-line-bg);+ color: var(--diffs-fg);+ background-color: var(--diffs-line-bg, var(--diffs-bg));+ }++ [data-line], [data-no-newline] {+ &[data-decoration-bg] {+ --mix-deco-light: 92%;+ --mix-deco-dark: 85%;++ &[data-decoration-bg-depth="2"] {+ --mix-deco-light: 88%;+ --mix-deco-dark: 80%;+ }++ &[data-decoration-bg-depth="3"] {+ --mix-deco-light: 85%;+ --mix-deco-dark: 78%;+ }++ --diffs-hover-mix-target: var(--diffs-decoration-bg);+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,+ var(--diffs-bg) var(--mix-deco-light),+ var(--diffs-decoration-bg)), color-mix(in lab,+ var(--diffs-bg) var(--mix-deco-dark),+ var(--diffs-decoration-bg)));+ }+ }++ [data-line-annotation], [data-gutter-buffer="annotation"] {+ --diffs-annotation-bg: var(--diffs-bg-context);+ --diffs-computed-decoration-bg: var(--diffs-annotation-bg);+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);+ }++ [data-merge-conflict-actions], [data-gutter-buffer="merge-conflict-action"], [data-gutter-buffer="merge-conflict-marker-base"], [data-gutter-buffer="merge-conflict-marker-separator"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"] {+ --diffs-computed-decoration-bg: var(--diffs-bg-context);+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);+ }++ [data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,+ var(--diffs-bg) 78%,+ var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,+ var(--diffs-bg) 68%,+ var(--conflict-bg-current-header-override, var(--diffs-addition-base))));+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);+ }++ [data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {+ --diffs-computed-decoration-bg: light-dark(color-mix(in lab,+ var(--diffs-bg) 78%,+ var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,+ var(--diffs-bg) 68%,+ var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);+ }++ [data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {+ --diffs-computed-decoration-bg: var(--diffs-bg);+ --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);+ }++ :where([data-background]) {+ & [data-gutter-buffer], & [data-column-number] {+ --mix-light: 91%;+ --mix-dark: 85%;+ }++ & [data-line], & [data-no-newline] {+ --mix-light: 88%;+ --mix-dark: 80%;+ }++ & [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {+ --diffs-diff-line-mix-target: var(--diffs-bg);++ &[data-line-type="change-deletion"] {+ --diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);++ &:where([data-gutter-buffer], [data-column-number]) {+ color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));+ --diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));+ }++ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-light),+ var(--diffs-diff-line-mix-target)), color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-dark),+ var(--diffs-diff-line-mix-target)));+ }++ &[data-line-type="change-addition"] {+ --diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);++ &:where([data-gutter-buffer], [data-column-number]) {+ color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));+ --diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));+ }++ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-light),+ var(--diffs-diff-line-mix-target)), color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-dark),+ var(--diffs-diff-line-mix-target)));+ }++ &[data-merge-conflict="current"] {+ --diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);++ &:where([data-gutter-buffer], [data-column-number]) {+ color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));+ --diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));+ }++ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-light),+ var(--diffs-diff-line-mix-target)), color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-dark),+ var(--diffs-diff-line-mix-target)));+ }++ &[data-merge-conflict="incoming"] {+ --diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));+ --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);++ &:where([data-gutter-buffer], [data-column-number]) {+ color: var(--diffs-modified-base);+ --diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));+ }++ --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-light),+ var(--diffs-diff-line-mix-target)), color-mix(in lab,+ var(--diffs-computed-decoration-bg) var(--mix-dark),+ var(--diffs-diff-line-mix-target)));+ }+ }+ }++ [data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline], [data-editor-overlay] {+ --diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));+ --diffs-selection-emphasis-mix-target: var(--diffs-selection-mix-target);++ &:where([data-editor-overlay]), &:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {+ --mix-selection-light: 82%;+ --mix-selection-dark: 75%;+ --diffs-hover-mix-target: var(--diffs-selection-mix-target);+ }++ &:where([data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line])) {+ --mix-selection-light: 75%;+ --mix-selection-dark: 60%;+ --diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));+ --diffs-hover-mix-target: var(--diffs-selection-mix-target);+ }++ &:where([data-line][data-selected-line]):is([data-line-type="change-addition"], [data-line-type="change-deletion"]) {+ --diffs-selection-emphasis-mix-target: light-dark(color-mix(in lab,+ var(--diffs-diff-line-mix-target, var(--diffs-selection-mix-target))+ var(--mix-selection-light),+ var(--diffs-selection-mix-target)), var(--diffs-selection-mix-target));+ }++ &:where([data-editor-overlay]), &[data-selected-line] {+ --diffs-computed-selected-line-bg: light-dark(color-mix(in lab,+ var(--diffs-computed-diff-line-bg) var(--mix-selection-light),+ var(--diffs-selection-mix-target)), color-mix(in lab,+ var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),+ var(--diffs-selection-mix-target)));+ }+ }++ [data-line][data-editor-active-line], [data-column-number][data-editor-active-line] {+ --diffs-computed-editor-active-line-bg: color-mix(in lab,+ var(--diffs-computed-selected-line-bg)+ var(--diffs-editor-active-line-source-mix, 100%),+ var(--diffs-selection-emphasis-mix-target));+ }++ @media (pointer: fine) {+ [data-line][data-hovered], [data-gutter-buffer][data-hovered], [data-column-number][data-hovered], [data-line-annotation][data-hovered], [data-no-newline][data-hovered], [data-merge-conflict][data-hovered], [data-merge-conflict-actions][data-hovered], [data-editor-overlay][data-hovered] {+ --diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,+ var(--diffs-computed-editor-active-line-bg) 97%,+ var(--diffs-hover-mix-target)), color-mix(in lab,+ var(--diffs-computed-editor-active-line-bg) 91%,+ var(--diffs-hover-mix-target)));+ }+ }++ [data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line]) {+ color: var(--diffs-selection-number-fg);+ }++ [data-no-newline] {+ user-select: none;++ & span {+ opacity: .6;+ }+ }++ [data-diff-type="split"][data-overflow="scroll"] {+ grid-template-columns: 1fr 1fr;+ display: grid;++ & [data-additions] {+ border-left: 1px solid var(--diffs-bg);+ }++ & [data-deletions] {+ border-right: 1px solid var(--diffs-bg);+ }+ }++ [data-code] {+ grid-auto-flow: dense;+ grid-template-columns: var(--diffs-code-grid);+ overflow: var(--diffs-overflow-override, scroll) clip;+ overscroll-behavior-x: none;+ tab-size: var(--diffs-tab-size, 2);+ padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));+ padding-bottom: max(0px,+ calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -+ var(--diffs-scrollbar-gutter)));+ scrollbar-gutter: stable;+ align-self: flex-start;+ display: grid;+ }++ [data-diffs-scrollbar-measure] {+ opacity: 0;+ pointer-events: none;+ scrollbar-gutter: auto;+ grid-template-columns: none;+ width: 100px;+ height: 100px;+ padding: 0;+ position: absolute;+ top: -200px;+ left: -200px;+ }++ [data-container-size] {+ container-type: inline-size;+ }++ [data-code]::-webkit-scrollbar {+ width: 0;+ height: var(--diffs-scrollbar-gutter);+ }++ [data-code]::-webkit-scrollbar-track {+ background: none;+ }++ [data-code]::-webkit-scrollbar-thumb {+ background-color: #0000;+ background-clip: content-box;+ border: 1px solid #0000;+ border-radius: 3px;+ }++ [data-code]::-webkit-scrollbar-corner {+ background-color: #0000;+ }++ @supports ((-moz-appearance: none)) {+ [data-code] {+ scrollbar-width: thin;+ scrollbar-color: var(--diffs-bg-context) transparent;+ padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));+ }+ }++ [data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {+ & [data-code], &[data-overflow="wrap"], &[data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {+ padding-top: 0;+ }+ }++ [data-gutter] {+ grid-template-rows: subgrid;+ grid-template-columns: subgrid;+ z-index: 3;+ background-color: var(--diffs-bg);+ grid-column: 1;+ display: grid;+ position: relative;++ & [data-gutter-buffer], & [data-column-number] {+ border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));+ }+ }++ [data-content] {+ grid-template-rows: subgrid;+ grid-template-columns: subgrid;+ background-color: var(--diffs-bg);+ grid-column: 2;+ min-width: 0;+ display: grid;+ }++ [data-diff-type="split"][data-overflow="wrap"], [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {+ grid-auto-flow: dense;+ grid-template-columns: repeat(2, var(--diffs-code-grid));+ padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));+ display: grid;++ & [data-code] {+ display: contents;+ }++ & [data-deletions] {+ & [data-gutter] {+ grid-column: 1;+ }++ & [data-content] {+ border-right: 1px solid var(--diffs-bg);+ grid-column: 2;+ }+ }++ & [data-additions] {+ & [data-gutter] {+ border-left: 1px solid var(--diffs-bg);+ grid-column: 3;+ }++ & [data-content] {+ grid-column: 4;+ }+ }+ }++ [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] [data-content] {+ overflow: clip;+ }++ [data-overflow="scroll"] [data-gutter] {+ position: sticky;+ left: 0;+ }++ [data-interactive-lines] [data-line] {+ cursor: pointer;+ }++ [data-interactive-line-numbers] [data-column-number] {+ cursor: pointer;+ touch-action: none;+ }++ [data-content-buffer], [data-gutter-buffer] {+ user-select: none;+ min-height: 1lh;+ position: relative;+ }++ [data-gutter-buffer] {+ padding-left: 2ch;+ padding-right: 1ch;++ &:before {+ content: "";+ min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));+ display: block;+ }+ }++ [data-gutter-buffer="annotation"] {+ --diffs-annotation-bg: var(--diffs-bg-context-gutter);+ min-height: 0;+ }++ [data-gutter-buffer="buffer"] {+ --diffs-line-bg: var(--diffs-bg-context-gutter);+ }++ [data-content-buffer] {+ background-position: 5px 0;+ background-size: 8px 8px;+ background-origin: border-box;+ background-image: repeating-linear-gradient(-45deg,+ transparent,+ transparent calc(3px * 1.414),+ var(--diffs-bg-buffer) calc(3px * 1.414),+ var(--diffs-bg-buffer) calc(4px * 1.414));+ grid-column: 1;+ }++ [data-separator] {+ box-sizing: content-box;+ background-color: var(--diffs-bg);+ }++ [data-separator="simple"] {+ min-height: 4px;+ }++ [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {+ background-color: var(--diffs-bg-separator);+ }++ [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {+ height: 32px;+ position: relative;+ }++ [data-separator-wrapper] {+ user-select: none;+ fill: currentColor;+ background-color: var(--diffs-bg);+ align-items: center;+ height: 100%;+ display: flex;+ position: absolute;+ inset-inline: 0;+ }++ [data-content] [data-separator-wrapper] {+ display: none;+ }++ [data-separator="metadata"] [data-separator-wrapper] {+ background-color: var(--diffs-bg-separator);+ height: 100%;+ color: var(--diffs-fg-number);+ white-space: nowrap;+ text-overflow: ellipsis;+ min-width: min-content;+ padding-inline: 1ch;+ inset-inline: 100% auto;+ overflow: hidden;+ }++ [data-separator="line-info"] {+ margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));++ & [data-separator-wrapper] {+ min-width: 16px;+ }+ }++ [data-separator="line-info-basic"], [data-separator="metadata"] {+ margin-block: 0;+ }++ [data-separator="line-info"][data-separator-first] {+ margin-top: 0;+ }++ [data-separator="line-info"][data-separator-last] {+ margin-bottom: 0;+ }++ [data-expand-index] [data-separator-wrapper] {+ grid-template-columns: 32px auto;+ display: grid;+ }++ [data-expand-index] [data-separator-wrapper][data-separator-multi-button] {+ grid-template-columns: 32px 32px auto;+ }++ [data-expand-button], [data-separator-content] {+ background-color: var(--diffs-bg-separator);+ flex: none;+ align-items: center;+ display: flex;+ }++ [data-expand-index] [data-separator-content]:hover {+ cursor: pointer;+ text-decoration: underline;+ }++ [data-expand-button] {+ cursor: pointer;+ min-width: 32px;+ color: var(--diffs-fg-number);+ border-right: 2px solid var(--diffs-bg);+ flex-shrink: 0;+ justify-content: center;+ align-self: stretch;++ &:hover {+ color: var(--diffs-fg);+ }++ &[data-expand-all-button] {+ display: none;+ }+ }++ [data-expand-down] [data-icon] {+ transform: scaleY(-1);+ }++ [data-separator-content] {+ height: 100%;+ color: var(--diffs-fg-number);+ flex: auto;+ justify-content: flex-start;+ padding: 0 1ch;+ overflow: hidden;+ }++ [data-separator="line-info"], [data-separator="line-info-basic"] {+ & [data-separator-content] {+ user-select: none;+ height: 100%;+ overflow: clip;+ }+ }++ [data-unmodified-lines] {+ text-overflow: ellipsis;+ white-space: nowrap;+ flex: 0 auto;+ min-width: 0;+ display: block;+ overflow: hidden;+ }++ @supports (width: 1cqi) {+ [data-unified] {+ & [data-separator="line-info"] [data-separator-wrapper] {+ padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));+ width: 100cqi;++ & [data-separator-content] {+ border-radius: 6px;+ }+ }++ & [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {+ border-top-left-radius: unset;+ border-bottom-left-radius: unset;+ }+ }++ [data-gutter] {+ & [data-separator="line-info"] [data-separator-wrapper] {+ padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));+ }++ & [data-separator="line-info"] [data-separator-content] {+ border-top-left-radius: 6px;+ border-bottom-left-radius: 6px;+ }++ & [data-separator="line-info"][data-expand-index] [data-separator-content] {+ border-top-left-radius: unset;+ border-bottom-left-radius: unset;+ }+ }++ [data-additions] {+ & [data-content] [data-separator="line-info"] {+ background-color: var(--diffs-bg);++ & [data-separator-wrapper] {+ display: none;+ }+ }++ & [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {+ background-color: var(--diffs-bg-separator);+ border-top-right-radius: 6px;+ border-bottom-right-radius: 6px;+ height: 100%;+ display: block;++ & [data-separator-content], & [data-expand-button] {+ display: none;+ }+ }+ }++ [data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {+ width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));+ }++ [data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {+ background-color: var(--diffs-bg-separator);+ height: 100%;+ margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));+ border-top-right-radius: 6px;+ border-bottom-right-radius: 6px;+ display: block;++ & [data-separator-content], & [data-expand-button] {+ display: none;+ }+ }++ [data-separator="line-info"] [data-separator-wrapper] {+ & [data-expand-both], & [data-expand-down], & [data-expand-up] {+ border-top-left-radius: 6px;+ border-bottom-left-radius: 6px;+ }+ }++ @media (pointer: fine) {+ [data-separator="line-info"] [data-separator-wrapper] {+ &[data-separator-multi-button] {+ & [data-expand-up] {+ border-top-left-radius: 6px;+ border-bottom-left-radius: unset;+ }++ & [data-expand-down] {+ border-bottom-left-radius: 6px;+ border-top-left-radius: unset;+ }+ }+ }+ }+ }++ @media (pointer: coarse) {+ [data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {+ grid-template-columns: 34px 34px auto;++ & [data-separator-content] {+ grid-column: unset;+ grid-row: unset;+ }+ }++ @supports (width: 1cqi) {+ [data-separator="line-info"] [data-separator-wrapper] {+ & [data-expand-both], & [data-expand-down], & [data-expand-up] {+ border-top-left-radius: 6px;+ border-bottom-left-radius: 6px;+ }++ &[data-separator-multi-button] {+ & [data-expand-up] {+ border-top-left-radius: 6px;+ border-bottom-left-radius: 6px;+ }++ & [data-expand-down] {+ border-bottom-left-radius: unset;+ border-top-left-radius: unset;+ }+ }+ }+ }+ }++ @media (pointer: fine) {+ [data-separator-wrapper][data-separator-multi-button] {+ grid-template-rows: 50% 50%;+ display: grid;++ & [data-separator-content] {+ grid-area: 1 / 2 / -1;+ min-width: min-content;+ }++ & [data-expand-button] {+ grid-column: 1;+ }+ }++ [data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {+ grid-template-columns: 34px auto;+ }++ [data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {+ grid-template-columns: 100% auto;+ }++ [data-separator="line-info"], [data-separator="line-info-basic"] {+ & [data-separator-multi-button] {+ & [data-expand-up] {+ border-bottom: 1px solid var(--diffs-bg);+ border-right: 2px solid var(--diffs-bg);+ }++ & [data-expand-down] {+ border-top: 1px solid var(--diffs-bg);+ border-right: 2px solid var(--diffs-bg);+ }+ }+ }+ }++ [data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {+ display: none;+ }++ [data-line-annotation] {+ min-height: var(--diffs-annotation-min-height, 0);+ z-index: 2;+ }++ [data-merge-conflict-actions] {+ z-index: 2;+ }++ [data-separator="custom"] {+ grid-template-columns: subgrid;+ display: grid;+ }++ [data-line], [data-column-number], [data-no-newline] {+ padding-inline: 1ch;+ position: relative;+ }++ [data-indicators="classic"] [data-line] {+ padding-inline-start: 2ch;+ }++ [data-indicators="classic"] {+ & [data-line-type="change-addition"], & [data-line-type="change-deletion"] {+ &[data-no-newline], &[data-line] {+ &:before {+ user-select: none;+ width: 1ch;+ height: 1lh;+ display: inline-block;+ position: absolute;+ top: 0;+ left: 0;+ }+ }+ }++ & [data-line-type="change-addition"] {+ &[data-line], &[data-no-newline] {+ &:before {+ content: "+";+ color: var(--diffs-addition-base);+ }+ }+ }++ & [data-line-type="change-deletion"] {+ &[data-line], &[data-no-newline] {+ &:before {+ content: "-";+ color: var(--diffs-deletion-base);+ }+ }+ }+ }++ [data-indicators="bars"] {+ & [data-line-type="change-deletion"], & [data-line-type="change-addition"] {+ &[data-column-number] {+ &:before {+ content: "";+ user-select: none;+ contain: strict;+ width: 4px;+ height: 100%;+ display: block;+ position: absolute;+ top: 0;+ left: 0;+ }+ }+ }++ & [data-line-type="change-deletion"] {+ &[data-column-number] {+ &:before {+ background-image: linear-gradient(0deg,+ var(--diffs-bg-deletion) 50%,+ var(--diffs-deletion-base) 50%);+ background-repeat: repeat;+ background-size: 2px 2px;+ background-size: calc(1lh / round(1lh / 2px))+ calc(1lh / round(1lh / 2px));+ }+ }+ }++ & [data-line-type="change-addition"] {+ &[data-column-number] {+ &:before {+ background-color: var(--diffs-addition-base);+ }+ }+ }+ }++ [data-overflow="wrap"] {+ & [data-line] {+ white-space: pre-wrap;+ word-break: break-word;+ }++ & [data-annotation-content] {+ word-break: break-word;+ }+ }++ [data-overflow="scroll"] [data-line] {+ white-space: pre;+ min-height: 1lh;+ }++ [data-column-number] {+ box-sizing: content-box;+ text-align: right;+ user-select: none;+ color: var(--diffs-fg-number);+ padding-left: 2ch;+ }++ [data-line-number-content] {+ min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));+ z-index: 1;+ display: inline-block;+ position: relative;+ }++ [data-disable-line-numbers] {+ & [data-gutter-buffer], & [data-column-number] {+ min-width: 4px;+ padding: 0;++ &:before {+ min-width: 0;+ }+ }++ & [data-line-number-content] {+ display: none;+ }++ & [data-gutter-utility-slot] {+ right: unset;+ justify-content: flex-start;+ left: 0;+ }++ &[data-indicators="bars"] [data-gutter-utility-slot] {+ left: 6px;+ }+ }++ [data-file][data-disable-line-numbers] {+ & [data-gutter-buffer], & [data-column-number] {+ border-right: 0;+ min-width: 0;+ }+ }++ [data-diff-span] {+ box-decoration-break: clone;+ border-radius: 3px;+ }++ [data-line-type="change-addition"] [data-diff-span] {+ background-color: var(--diffs-bg-addition-emphasis);+ }++ [data-line-type="change-deletion"] [data-diff-span] {+ background-color: var(--diffs-bg-deletion-emphasis);+ }++ [data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {+ color: var(--diffs-fg);+ padding-left: 1ch;+ }++ [data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {+ align-items: center;+ display: flex;++ &:after {+ color: var(--diffs-fg-conflict-marker);+ font-size: .75rem;+ font-style: normal;+ line-height: 1.25rem;+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));+ padding-left: 1ch;+ }+ }++ [data-merge-conflict="marker-start"]:after {+ content: "(Current Change)";+ }++ [data-merge-conflict="marker-end"]:after {+ content: "(Incoming Change)";+ }++ [data-merge-conflict-actions-content] {+ min-height: 1.75rem;+ font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));+ color: var(--diffs-fg);+ align-items: center;+ gap: .25rem;+ padding-inline: .5rem;+ font-size: .75rem;+ line-height: 1.2;+ display: flex;+ }++ [data-merge-conflict-action] {+ appearance: none;+ color: var(--diffs-fg-number);+ font: inherit;+ cursor: pointer;+ background: none;+ border: 0;+ padding: 0;+ font-style: normal;+ }++ [data-merge-conflict-action]:hover {+ color: var(--diffs-fg);+ }++ [data-merge-conflict-action="current"]:hover {+ color: var(--diffs-addition-base);+ }++ [data-merge-conflict-action="incoming"]:hover {+ color: var(--diffs-modified-base);+ }++ [data-merge-conflict-action-separator] {+ color: var(--diffs-fg-number);+ opacity: .6;+ user-select: none;+ }++ [data-diffs-header="default"] {+ background-color: var(--diffs-bg);+ justify-content: space-between;+ align-items: center;+ gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));+ min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));+ z-index: 2;+ flex-direction: row;+ padding-inline: 16px;+ display: flex;+ position: relative;+ top: 0;+ }++ [data-header-content] {+ align-items: center;+ gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));+ white-space: nowrap;+ flex-direction: row;+ min-width: 0;+ display: flex;+ }++ [data-header-content] [data-prev-name], [data-header-content] [data-title] {+ text-overflow: ellipsis;+ white-space: nowrap;+ direction: rtl;+ min-width: 0;+ overflow: hidden;+ }++ [data-prev-name] {+ opacity: .7;+ }++ [data-rename-icon] {+ fill: currentColor;+ flex-grow: 0;+ flex-shrink: 0;+ }++ [data-diffs-header="default"] [data-metadata] {+ white-space: nowrap;+ align-items: center;+ gap: 1ch;+ display: flex;+ }++ [data-diffs-header="default"] [data-additions-count] {+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));+ color: var(--diffs-addition-base);+ }++ [data-diffs-header="default"] [data-deletions-count] {+ font-family: var(--diffs-font-family, var(--diffs-font-fallback));+ color: var(--diffs-deletion-base);+ }++ [data-change-icon] {+ fill: currentColor;+ flex-shrink: 0;+ }++ [data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {+ color: var(--diffs-modified-base);+ }++ [data-change-icon="new"] {+ color: var(--diffs-addition-base);+ }++ [data-change-icon="deleted"] {+ color: var(--diffs-deletion-base);+ }++ [data-change-icon="file"] {+ opacity: .6;+ }++ [data-annotation-content] {+ z-index: 2;+ isolation: isolate;+ white-space: normal;+ align-self: flex-start;+ min-width: 0;+ display: flow-root;+ position: relative;+ }++ [data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {+ width: var(--diffs-column-content-width, auto);+ left: var(--diffs-column-number-width, 0);+ position: sticky;+ }++ [data-annotation-slot] {+ text-wrap-mode: wrap;+ word-break: normal;+ white-space-collapse: collapse;+ }++ [data-gutter-utility-slot] {+ touch-action: none;+ justify-content: flex-end;+ display: flex;+ position: absolute;+ top: 0;+ bottom: 0;+ right: 0;+ }++ [data-utility-button] {+ appearance: none;+ cursor: pointer;+ width: 1lh;+ height: 1lh;+ font-size: var(--diffs-font-size, 13px);+ line-height: var(--diffs-line-height, 20px);+ background-color: var(--diffs-modified-base);+ color: var(--diffs-bg);+ fill: currentColor;+ z-index: 4;+ touch-action: none;+ border: none;+ border-radius: 4px;+ justify-content: center;+ align-items: center;+ margin-right: calc(-1lh + 1ch);+ padding: 0;+ display: flex;+ position: relative;++ &:before {+ content: "";+ display: block;+ position: absolute;+ inset: 0 0 0 -4px;+ }+ }++ [data-decoration-bar-stack] {+ pointer-events: none;+ isolation: isolate;+ z-index: 1;+ background-color: var(--diffs-decoration-bar-color, transparent);+ box-sizing: content-box;+ border-left: 2px solid var(--diffs-bg);+ border-right: 2px solid var(--diffs-bg);+ width: 6px;+ position: absolute;+ top: 0;+ bottom: 0;+ right: -2px;++ [data-decoration-bar-depth="1"] & {+ background-color: color-mix(in lab,+ var(--diffs-bg) 20%,+ var(--diffs-decoration-bar-color, transparent));+ }++ [data-decoration-bar-depth="2"] & {+ background-color: color-mix(in lab,+ var(--diffs-bg) 45%,+ var(--diffs-decoration-bar-color, transparent));+ }++ [data-decoration-bar-depth="3"] & {+ background-color: color-mix(in lab,+ var(--diffs-bg) 65%,+ var(--diffs-decoration-bar-color, transparent));+ }++ [data-decoration-bar-start] & {+ border-top-left-radius: 5px;+ border-top-right-radius: 5px;+ }++ [data-decoration-bar-end] & {+ z-index: 3;+ border-bottom-right-radius: 5px;+ border-bottom-left-radius: 5px;+ }+ }++ [data-placeholder] {+ contain: strict;+ }++ [data-error-wrapper] {+ padding: var(--diffs-gap-block, var(--diffs-gap-fallback))+ var(--diffs-gap-inline, var(--diffs-gap-fallback));+ scrollbar-width: none;+ max-height: 400px;+ overflow: auto;++ & [data-error-message] {+ color: var(--diffs-deletion-base);+ font-size: 18px;+ font-weight: bold;+ }++ & [data-error-stack] {+ color: var(--diffs-fg-number);+ }+ }+}++@layer theme, rendered, unsafe;++@layer theme {++}</style><style data-theme-css="">@layer base, theme, rendered, unsafe;+@layer rendered {+ :host {+ color-scheme: dark;+ --diffs-scrollbar-gutter-measured: var(--diffs-scrollbar-gutter-fallback);+ --diffs-dark:#fafafa;--diffs-dark-bg:#0a0a0a;--diffs-dark-addition-color:#07c480;--diffs-dark-deletion-color:#ff2e3f;--diffs-dark-modified-color:#009fff;--diffs-light:#0a0a0a;--diffs-light-bg:#ffffff;--diffs-light-addition-color:#18a46c;--diffs-light-deletion-color:#d52c36;--diffs-light-modified-color:#009fff;+ }+}</style><pre data-diff="" data-diff-type="single" data-overflow="wrap" data-background="" data-indicators="bars" style="--diffs-min-number-column-width-default:2ch;" data-dehydrated=""><code data-code="" data-unified=""><div data-gutter="" style="grid-row: span 12"><div data-line-type="context" data-column-number="1" data-line-index="0,0"><span data-line-number-content="">1</span></div><div data-line-type="change-addition" data-column-number="2" data-line-index="1,1"><span data-line-number-content="">2</span></div><div data-line-type="change-addition" data-column-number="3" data-line-index="2,2"><span data-line-number-content="">3</span></div><div data-line-type="change-addition" data-column-number="4" data-line-index="3,3"><span data-line-number-content="">4</span></div><div data-line-type="change-addition" data-column-number="5" data-line-index="4,4"><span data-line-number-content="">5</span></div><div data-line-type="change-addition" data-column-number="6" data-line-index="5,5"><span data-line-number-content="">6</span></div><div data-line-type="change-addition" data-column-number="7" data-line-index="6,6"><span data-line-number-content="">7</span></div><div data-line-type="change-addition" data-column-number="8" data-line-index="7,7"><span data-line-number-content="">8</span></div><div data-line-type="change-addition" data-column-number="9" data-line-index="8,8"><span data-line-number-content="">9</span></div><div data-line-type="change-addition" data-column-number="10" data-line-index="9,9"><span data-line-number-content="">10</span></div><div data-line-type="change-addition" data-column-number="11" data-line-index="10,10"><span data-line-number-content="">11</span></div><div data-line-type="change-addition" data-column-number="12" data-line-index="11,11"><span data-line-number-content="">12</span></div></div><div data-content="" style="grid-row: span 12"><div data-line="1" data-alt-line="1" data-line-type="context" data-line-index="0,0"><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61">import</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> {</span><span style="--diffs-token-dark:#FFA359;--diffs-token-light:#D47628"> expect</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">,</span><span style="--diffs-token-dark:#FFA359;--diffs-token-light:#D47628"> test</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> }</span><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61"> from</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43"> '@playwright/test'</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">;</span></div><div data-line="2" data-line-type="change-addition" data-line-index="1,1">+</div><div data-line="3" data-line-type="change-addition" data-line-index="2,2"><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61">for</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> (</span><span style="--diffs-token-dark:#D568EA;--diffs-token-light:#A631BE">const</span><span style="--diffs-token-dark:#FFAB16;--diffs-token-light:#D5901C"> width</span><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61"> of</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> [</span><span style="--diffs-token-dark:#68CDF2;--diffs-token-light:#1CA1C7">390</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">,</span><span style="--diffs-token-dark:#68CDF2;--diffs-token-light:#1CA1C7"> 1280</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">])</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> {</span></div><div data-line="4" data-line-type="change-addition" data-line-index="3,3"><span style="--diffs-token-dark:#9D6AFB;--diffs-token-light:#693ACF"> test</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">(</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">`</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">signs in at </span><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61">${</span><span style="--diffs-token-dark:#FFA359;--diffs-token-light:#D47628">width</span><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61">}</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">px</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">`</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">,</span><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61"> async</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> ({</span><span style="--diffs-token-dark:#A3A3A3;--diffs-token-light:#636363"> page</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> })</span><span style="--diffs-token-dark:#D568EA;--diffs-token-light:#A631BE"> =></span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> {</span></div><div data-line="5" data-line-type="change-addition" data-line-index="4,4"><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61"> await</span><span style="--diffs-token-dark:#FFA359;--diffs-token-light:#D47628"> page</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">.</span><span style="--diffs-token-dark:#9D6AFB;--diffs-token-light:#693ACF">setViewportSize</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">({</span><span style="--diffs-token-dark:#FFA359;--diffs-token-light:#D47628"> width</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">,</span><span style="--diffs-token-dark:#FFA359;--diffs-token-light:#D47628"> height</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">:</span><span style="--diffs-token-dark:#68CDF2;--diffs-token-light:#1CA1C7"> 844</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> });</span></div><div data-line="6" data-line-type="change-addition" data-line-index="5,5"><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61"> await</span><span style="--diffs-token-dark:#FFA359;--diffs-token-light:#D47628"> page</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">.</span><span style="--diffs-token-dark:#9D6AFB;--diffs-token-light:#693ACF">goto</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">(</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">'/sign-in'</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">);</span></div><div data-line="7" data-line-type="change-addition" data-line-index="6,6"><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61"> await</span><span style="--diffs-token-dark:#FFA359;--diffs-token-light:#D47628"> page</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">.</span><span style="--diffs-token-dark:#9D6AFB;--diffs-token-light:#693ACF">getByLabel</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">(</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">'Email'</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">).</span><span style="--diffs-token-dark:#9D6AFB;--diffs-token-light:#693ACF">fill</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">(</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">'[email protected]'</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">);</span></div><div data-line="8" data-line-type="change-addition" data-line-index="7,7"><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61"> await</span><span style="--diffs-token-dark:#FFA359;--diffs-token-light:#D47628"> page</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">.</span><span style="--diffs-token-dark:#9D6AFB;--diffs-token-light:#693ACF">getByLabel</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">(</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">'Password'</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">).</span><span style="--diffs-token-dark:#9D6AFB;--diffs-token-light:#693ACF">fill</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">(</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">'test-password'</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">);</span></div><div data-line="9" data-line-type="change-addition" data-line-index="8,8"><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61"> await</span><span style="--diffs-token-dark:#FFA359;--diffs-token-light:#D47628"> page</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">.</span><span style="--diffs-token-dark:#9D6AFB;--diffs-token-light:#693ACF">getByRole</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">(</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">'button'</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">,</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> {</span><span style="--diffs-token-dark:#FFA359;--diffs-token-light:#D47628"> name</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">:</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43"> 'Sign in'</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">,</span><span style="--diffs-token-dark:#FFA359;--diffs-token-light:#D47628"> exact</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">:</span><span style="--diffs-token-dark:#68CDF2;--diffs-token-light:#1CA1C7"> true</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> }).</span><span style="--diffs-token-dark:#9D6AFB;--diffs-token-light:#693ACF">click</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">();</span></div><div data-line="10" data-line-type="change-addition" data-line-index="9,9"><span style="--diffs-token-dark:#FF678D;--diffs-token-light:#D32A61"> await</span><span style="--diffs-token-dark:#9D6AFB;--diffs-token-light:#693ACF"> expect</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">(</span><span style="--diffs-token-dark:#FFA359;--diffs-token-light:#D47628">page</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">).</span><span style="--diffs-token-dark:#9D6AFB;--diffs-token-light:#693ACF">toHaveURL</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">(</span><span style="--diffs-token-dark:#5ECC71;--diffs-token-light:#199F43">'/home'</span><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">);</span></div><div data-line="11" data-line-type="change-addition" data-line-index="10,10"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363"> });</span></div><div data-line="12" data-line-type="change-addition" data-line-index="11,11"><span style="--diffs-token-dark:#636363;--diffs-token-light:#636363">}</span></div></div></code></pre>\ No newline at end of filediff --git a/apps/marketing/src/features/marketing/components/DemoAgentChip.tsx b/apps/marketing/src/features/marketing/components/DemoAgentChip.tsxindex da92a59986..926002bde0 100644--- a/apps/marketing/src/features/marketing/components/DemoAgentChip.tsx+++ b/apps/marketing/src/features/marketing/components/DemoAgentChip.tsx@@ -1,29 +1,38 @@import ArrowUpRight from '@phosphor/arrow-up-right.svg';import Check from '@phosphor/check.svg';-import { Layer } from '@ui';-import type { JSX } from 'solid-js';+import { Button, Layer } from '@ui';+import { type JSX, Show } from 'solid-js';+import './demo-agent-chip.css';-/** Standalone copy of the settled agent preview at the website's design freeze. */+/** Settled MagicChipView from the app, with local session navigation. */export function DemoAgentChip(props: {agentSessionId: string;+ requester: string;+ request: string;markdown: string;pullRequest: JSX.Element;headerActions: JSX.Element;onOpen: () => void;}) {return (- <Layer depth={2}>+ <div class="demo-cursor-response">+ <div class="demo-cursor-origin">+ from <span>{props.requester}</span>+ </div>+ <div class="demo-cursor-quote">+ <strong>{props.requester}</strong>+ <span>{props.request}</span>+ </div><divrole="button"tabIndex={0}aria-label="Open agent session"- class="my-2 flex w-full min-w-0 max-w-full flex-col overflow-hidden rounded-md border border-edge-muted bg-surface text-left hover:border-edge"+ class="my-2 w-full min-w-0 max-w-full text-left"data-magic-chip={props.agentSessionId}data-magic-chip-previewonClick={(event) => {event.stopPropagation();- const control = event.target.closest('button, a, [role="button"]');- if (control && control !== event.currentTarget) return;+ if (event.target.closest('button, a')) return;props.onOpen();}}onKeyDown={(event) => {@@ -37,54 +46,62 @@ export function DemoAgentChip(props: {props.onOpen();}}>- <Layer offset={1}>+ <Layer depth={2}><div- class="flex h-7 items-center gap-2 border-b border-edge-muted bg-surface pr-1 pl-2.5 text-xs leading-5 text-ink-muted"- data-magic-chip-header+ data-magic-chip-card+ aria-label="Cursor session"+ class="demo-cursor-card">- <span- class="grid size-3.5 shrink-0 place-items-center rounded-full bg-green text-surface"- data-magic-chip-dot="done"- aria-hidden="true"+ <div+ class="flex h-6 min-w-0 items-center gap-2"+ data-magic-chip-header>- <Check class="size-2.5" />- </span>- <span class="flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden">+ <span class="demo-cursor-check" aria-hidden="true">+ <Check class="size-3" />+ </span><span- class="shrink-0 font-semibold text-ink"- title="Auto"+ class="min-w-0 truncate text-xs font-semibold"data-magic-chip-agent>Cursor Agent</span>- <span aria-hidden="true" class="shrink-0 text-ink-placeholder">- ·- </span>- <span class="shrink-0 text-ink-muted">Done</span>- </span>- <button- type="button"- class="inline-flex h-5 shrink-0 items-center gap-1 whitespace-nowrap rounded-full border border-edge bg-surface px-2 font-medium text-ink-muted text-xs hover:bg-active hover:text-ink"- onClick={props.onOpen}- >- View session- <ArrowUpRight class="size-3" />- </button>- <div class="flex min-w-0 max-w-[40%] justify-end overflow-hidden">- {props.pullRequest}+ <span class="demo-cursor-model">Auto</span>+ <span class="demo-cursor-status">Done</span>+ <div class="min-w-0 flex-1" />+ {props.headerActions}+ <Button+ variant="outline"+ size="sm"+ noTouchResize+ class="demo-cursor-open"+ label="Open session"+ onClick={(event) => {+ event.stopPropagation();+ props.onOpen();+ }}+ >+ <span class="demo-cursor-open-label">Open session</span>+ <ArrowUpRight class="size-3" />+ </Button>+ </div>+ <div class="demo-cursor-output" data-magic-chip-output-row>+ <Show+ when={props.pullRequest}+ fallback={+ <p class="demo-cursor-result" data-magic-chip-body>+ {props.markdown+ .replace(/[*`]/g, '')+ .replace(/\s+/g, ' ')+ .trim()}+ </p>+ }+ >+ {props.pullRequest}+ </Show></div>- {props.headerActions}</div></Layer>- <div- class="flex h-8 min-w-0 items-center gap-2 pr-2.5 pl-2.5 text-ink text-sm leading-5"- data-magic-chip-answer- >- <span class="min-w-0 flex-1 truncate" data-magic-chip-line>- {props.markdown.replace(/[*`]/g, '').replace(/\s+/g, ' ').trim()}- </span>- </div></div>- </Layer>+ </div>);}diff --git a/apps/marketing/src/features/marketing/components/DemoMention.tsx b/apps/marketing/src/features/marketing/components/DemoMention.tsxindex e9646030bd..a516a1567b 100644--- a/apps/marketing/src/features/marketing/components/DemoMention.tsx+++ b/apps/marketing/src/features/marketing/components/DemoMention.tsx@@ -1,9 +1,10 @@+import Envelope from '@phosphor/envelope.svg?raw';import File from '@phosphor/file.svg?raw';import Hash from '@phosphor/hash.svg?raw';import ListChecks from '@phosphor/list-checks.svg?raw';import Sparkle from '@phosphor/sparkle.svg?raw';import Table from '@phosphor/table.svg?raw';-import { For, Show } from 'solid-js';+import { For, type JSX, Show } from 'solid-js';import {demoMentions,type DemoMention as MentionData,@@ -12,6 +13,7 @@ import './demo-mentions.css';const icons = {document: File,+ email: Envelope,task: ListChecks,agent: Sparkle,channel: Hash,@@ -101,17 +103,27 @@ export function serializeDemoEditor(editor: HTMLElement): string {return visit(editor).replaceAll('\u00a0', ' ');}-export function DemoMentionText(props: { text: string }) {+export function DemoMentionText(props: {+ text: string;+ renderMention?: (id: string) => JSX.Element;+}) {const parts = () =>props.text.split(/(@\[[^\]]*\]\(demo-mention:[\w-]+\))/g).map((text) => {const id = /^@\[[^\]]*\]\(demo-mention:([\w-]+)\)$/.exec(text)?.[1];- return { text, item: demoMentions.find((item) => item.id === id) };+ return { text, id, item: demoMentions.find((item) => item.id === id) };});return (<For each={parts()}>{(part) => (- <Show when={part.item} fallback={part.text}>- {(item) => <DemoMention item={item()} />}+ <Show+ when={part.id && props.renderMention?.(part.id)}+ fallback={+ <Show when={part.item} fallback={part.text}>+ {(item) => <DemoMention item={item()} />}+ </Show>+ }+ >+ {(mention) => mention()}</Show>)}</For>diff --git a/apps/marketing/src/features/marketing/components/DemoMentionMenu.test.tsx b/apps/marketing/src/features/marketing/components/DemoMentionMenu.test.tsxindex ef4effa800..7ab06ed718 100644--- a/apps/marketing/src/features/marketing/components/DemoMentionMenu.test.tsx+++ b/apps/marketing/src/features/marketing/components/DemoMentionMenu.test.tsx@@ -68,7 +68,7 @@ it('shows standard groups, filters, and inserts through controlled input withoutfireEvent.input(editor, { target: { value: 'Please ask @julia' } });expect(screen.getAllByRole('option')).toHaveLength(1);fireEvent.keyDown(editor, { key: 'Enter' });- expect(draft()).toBe('Please ask @Julia Westphal ');+ expect(draft()).toBe('Please ask @Julia ');expect(send).not.toHaveBeenCalled();expect(screen.queryByRole('listbox')).toBeNull();fireEvent.input(editor, { target: { value: `${draft()}to review this` } });@@ -180,13 +180,13 @@ 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 (10)' }));+ fireEvent.click(screen.getByRole('button', { name: 'View all (9)' }));expect(screen.queryByText('People')).toBeNull();- expect(screen.getAllByRole('option')).toHaveLength(10);+ expect(screen.getAllByRole('option')).toHaveLength(9);fireEvent.click(screen.getByRole('button', { name: '← Back to everything' }));expect(screen.getByText('People')).toBeTruthy();fireEvent.keyDown(editor, { key: 'ArrowRight' });- expect(screen.getAllByRole('option')).toHaveLength(6);+ expect(screen.getAllByRole('option')).toHaveLength(7);fireEvent.keyDown(editor, { key: 'ArrowLeft' });expect(screen.getByText('Channels')).toBeTruthy();});diff --git a/apps/marketing/src/features/marketing/components/DemoPrDocument.tsx b/apps/marketing/src/features/marketing/components/DemoPrDocument.tsxindex 4afb6d4947..0b028456b0 100644--- a/apps/marketing/src/features/marketing/components/DemoPrDocument.tsx+++ b/apps/marketing/src/features/marketing/components/DemoPrDocument.tsx@@ -34,10 +34,19 @@ function PrPill(props: { class?: string; children: JSX.Element }) {}/** Frozen PR presentation using fictional content; no GitHub/service dependencies. */-export function DemoPrDocument(props: { merged?: boolean }) {+export function DemoPrDocument(props: {+ merged?: boolean;+ record?: {+ name: string;+ description: string;+ repository: string;+ number: number;+ };+}) {+ const record = () => props.record ?? DEPLOY_PR;return (<>- <h1 class="text-2xl font-semibold">{DEPLOY_PR.name}</h1>+ <h1 class="text-2xl font-semibold">{record().name}</h1><div class="spacer h-3" /><div class="mb-6 flex flex-row flex-wrap items-center gap-2 text-sm"><PrPill@@ -49,14 +58,20 @@ export function DemoPrDocument(props: { merged?: boolean }) {/>{props.merged ? 'Merged' : 'Open'}</PrPill>- <PrPill class="text-ink-muted">macro-inc/macro#482</PrPill>- <PrPill>- <span class="text-success">+{DEPLOY_PR.additions}</span>- <span class="text-failure">−{DEPLOY_PR.deletions}</span>+ <PrPill class="text-ink-muted">+ {props.record+ ? `${props.record.repository}#${props.record.number}`+ : 'macro-inc/macro#482'}</PrPill>+ <Show when={!props.record}>+ <PrPill>+ <span class="text-success">+{DEPLOY_PR.additions}</span>+ <span class="text-failure">−{DEPLOY_PR.deletions}</span>+ </PrPill>+ </Show></div><div class="text-sm wrap-break-word max-w-full overflow-x-auto">- <DemoMarkdown markdown={DEPLOY_PR.description} />+ <DemoMarkdown markdown={record().description} /></div></>);diff --git a/apps/marketing/src/features/marketing/components/FeaturePage.tsx b/apps/marketing/src/features/marketing/components/FeaturePage.tsxindex d5e81170b8..82a630d08b 100644--- a/apps/marketing/src/features/marketing/components/FeaturePage.tsx+++ b/apps/marketing/src/features/marketing/components/FeaturePage.tsx@@ -16,10 +16,15 @@ const scopedUi = uiStyles.replace(/@(font-face|property)[^{]*\{[^}]*\}/g, '').replaceAll(':root', ':scope');-export function FeaturePage(props: { children: JSX.Element; light?: boolean }) {+export function FeaturePage(props: {+ children: JSX.Element;+ light?: boolean;+ productSpacing?: boolean;+}) {return (<mainclass="feature-page"+ data-product-spacing={props.productSpacing ? 'true' : undefined}data-theme-light={props.light ? 'true' : 'false'}><style>{uiProperties}</style>@@ -69,7 +74,7 @@ export function FeaturePageFaq(props: {id: string;eyebrow?: string;title: string;- introduction: JSX.Element;+ introduction?: JSX.Element;items: readonly { q: string; a: JSX.Element }[];}) {return (@@ -79,8 +84,10 @@ export function FeaturePageFaq(props: {<p class="feature-page-eyebrow">{props.eyebrow}</p></Show><h2 id={props.id}>{props.title}</h2>- <div class="feature-page-prose">{props.introduction}</div>- <h3>Frequently asked questions</h3>+ <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/HomepageEmailCompose.tsx b/apps/marketing/src/features/marketing/components/HomepageEmailCompose.tsxindex 622b531095..aa0db64c4b 100644--- a/apps/marketing/src/features/marketing/components/HomepageEmailCompose.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageEmailCompose.tsx@@ -16,10 +16,31 @@ import './homepage-email-compose.css';export default function HomepageEmailCompose(props: {appChrome?: boolean;- draft?: { subject: string; to: string; body: string };- onSend?: (draft: { subject: string; to: string; body: string }) => void;+ readOnly?: boolean;+ draft?: {+ subject: string;+ to: string;+ body: string;+ cc?: string;+ bcc?: string;+ };+ onSend?: (draft: {+ subject: string;+ to: string;+ body: string;+ cc?: string;+ bcc?: string;+ }) => void;+ onDraftChange?: (draft: {+ subject: string;+ to: string;+ body: string;+ cc?: string;+ bcc?: string;+ }) => void;} = {}) {+ const initialBody = props.draft?.body;const [subject, setSubject] = createSignal(props.draft?.subject ?? 'Great meeting you — demo follow-up');@@ -32,8 +53,20 @@ export default function HomepageEmailCompose(let body: HTMLDivElement | undefined;let fileInput: HTMLInputElement | undefined;const [to, setTo] = createSignal(- props.draft?.to ?? 'Dana Whitfield <[email protected]>'+ props.draft?.to ?? 'Dana <[email protected]>');+ const [cc, setCc] = createSignal(+ props.draft?.cc ?? 'Julia <[email protected]>'+ );+ const [bcc, setBcc] = createSignal(props.draft?.bcc ?? '');+ const draftValue = () => ({+ subject: subject(),+ to: to(),+ cc: cc(),+ bcc: bcc(),+ body: body?.innerText ?? body?.textContent ?? '',+ });+ const changed = () => props.onDraftChange?.(draftValue());const disposeMentions: Array<() => void> = [];onCleanup(() => disposeMentions.forEach((dispose) => dispose()));@@ -81,9 +114,11 @@ export default function HomepageEmailCompose();const generating = () => !props.draft && generation.phase() !== 'complete';const send = () => {+ if (props.readOnly) return;if (props.onSend) {- if (!subject().trim() || !to().trim() || !body?.innerText.trim()) return;- props.onSend({ subject: subject(), to: to(), body: body.innerText });+ if (!subject().trim() || !to().trim() || !draftValue().body.trim())+ return;+ props.onSend(draftValue());} else setSent(true);};@@ -143,18 +178,18 @@ export default function HomepageEmailCompose(height="24"alt=""/>- Jacob Beckerman+ Jacob</span><Show when={generating()}><span class="homepage-email-generating" role="status">Generating<span aria-hidden="true">…</span></span></Show>- <Show when={!showBcc()}>+ <Show when={!showBcc() && !props.readOnly}><buttontype="button"class="homepage-email-bcc"- disabled={generating()}+ disabled={generating() || props.readOnly}onClick={() => setShowBcc(true)}>Bcc@@ -167,17 +202,14 @@ export default function HomepageEmailCompose(<span class="homepage-email-label">{label}</span><inputaria-label={label}- value={- label === 'To'- ? to()- : label === 'Cc'- ? 'Julia Westphal <[email protected]>'- : ''- }+ value={label === 'To' ? to() : label === 'Cc' ? cc() : bcc()}onInput={(event) => {if (label === 'To') setTo(event.currentTarget.value);+ if (label === 'Cc') setCc(event.currentTarget.value);+ if (label === 'Bcc') setBcc(event.currentTarget.value);+ changed();}}- disabled={generating()}+ disabled={generating() || props.readOnly}placeholder="Email address"/></label>@@ -188,8 +220,11 @@ export default function HomepageEmailCompose(<inputaria-label="Subject"value={subject()}- onInput={(event) => setSubject(event.currentTarget.value)}- disabled={generating()}+ onInput={(event) => {+ setSubject(event.currentTarget.value);+ changed();+ }}+ disabled={generating() || props.readOnly}placeholder="Subject"/></label>@@ -198,13 +233,14 @@ export default function HomepageEmailCompose(<divref={body}class="homepage-email-body"- contentEditable={!generating()}+ contentEditable={!generating() && !props.readOnly}role="textbox"aria-label="Email body"+ onInput={changed}aria-multiline="true"- aria-disabled={generating()}+ aria-disabled={generating() || props.readOnly}>- {props.draft?.body}+ {initialBody}</div><For each={attachments()}>{(file) => (@@ -262,90 +298,92 @@ export default function HomepageEmailCompose(</For></div></Show>- <div- class={- props.appChrome- ? 'homepage-email-app-toolbar'- : 'homepage-email-toolbar'- }- >- <input- ref={fileInput}- type="file"- multiple- hidden- aria-label="Choose attachments"- onChange={(event) => {- addAttachments(Array.from(event.currentTarget.files ?? []));- event.currentTarget.value = '';- }}- />- <Show- when={props.appChrome}- fallback={- <>- <button- type="button"- aria-label="Attach"- title="Attach"- disabled={generating()}- onClick={() => fileInput?.click()}- >- <Paperclip />- </button>- <button- type="button"- aria-label="Format"- title="Format"- aria-pressed={showFormat()}- disabled={generating()}- onClick={() => setShowFormat(!showFormat())}- >- <TextAa />- </button>- <button- type="button"- class="homepage-email-send"- aria-label="Send email"- title="Send email"- disabled={generating()}- onClick={send}- >- <ArrowUp />- </button>- </>+ <Show when={!props.readOnly}>+ <div+ class={+ props.appChrome+ ? 'homepage-email-app-toolbar'+ : 'homepage-email-toolbar'}>- <Button- variant="ghost"- size="icon-composer"- class="rounded-full"- aria-label="Attach"- disabled={generating()}- onClick={() => fileInput?.click()}- >- <Paperclip />- </Button>- <Button- variant="ghost"- size="icon-composer"- class="rounded-full"- aria-label="Format"- aria-pressed={showFormat()}- disabled={generating()}- onClick={() => setShowFormat(!showFormat())}- >- <TextAa />- </Button>- <SendButton- data-input-action="send"- appearance="composer"- aria-label="Send email"- disabled={generating()}- onClick={send}+ <input+ ref={fileInput}+ type="file"+ multiple+ hidden+ aria-label="Choose attachments"+ onChange={(event) => {+ addAttachments(Array.from(event.currentTarget.files ?? []));+ event.currentTarget.value = '';+ }}/>- </Show>- </div>+ <Show+ when={props.appChrome}+ fallback={+ <>+ <button+ type="button"+ aria-label="Attach"+ title="Attach"+ disabled={generating() || props.readOnly}+ onClick={() => fileInput?.click()}+ >+ <Paperclip />+ </button>+ <button+ type="button"+ aria-label="Format"+ title="Format"+ aria-pressed={showFormat()}+ disabled={generating() || props.readOnly}+ onClick={() => setShowFormat(!showFormat())}+ >+ <TextAa />+ </button>+ <button+ type="button"+ class="homepage-email-send"+ aria-label="Send email"+ title="Send email"+ disabled={generating() || props.readOnly}+ onClick={send}+ >+ <ArrowUp />+ </button>+ </>+ }+ >+ <Button+ variant="ghost"+ size="icon-composer"+ class="rounded-full"+ aria-label="Attach"+ disabled={generating() || props.readOnly}+ onClick={() => fileInput?.click()}+ >+ <Paperclip />+ </Button>+ <Button+ variant="ghost"+ size="icon-composer"+ class="rounded-full"+ aria-label="Format"+ aria-pressed={showFormat()}+ disabled={generating() || props.readOnly}+ onClick={() => setShowFormat(!showFormat())}+ >+ <TextAa />+ </Button>+ <SendButton+ data-input-action="send"+ appearance="composer"+ aria-label="Send email"+ disabled={generating() || props.readOnly}+ onClick={send}+ />+ </Show>+ </div>+ </Show></Dynamic></div>);diff --git a/apps/marketing/src/features/marketing/components/HomepageFounderLetter.tsx b/apps/marketing/src/features/marketing/components/HomepageFounderLetter.tsxindex a7a7447ea9..35436039d9 100644--- a/apps/marketing/src/features/marketing/components/HomepageFounderLetter.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageFounderLetter.tsx@@ -101,7 +101,7 @@ export function HomepageFounderLetter() {<p class="m-0">{LETTER}</p></blockquote><figcaption class="mt-5 flex flex-col gap-0.5 md:mt-[25px]">- <span>Jacob Beckerman</span>+ <span>Jacob</span><span>Co-Founder & CEO at Macro</span></figcaption></figure>diff --git a/apps/marketing/src/features/marketing/components/HomepagePullRequest.test.tsx b/apps/marketing/src/features/marketing/components/HomepagePullRequest.test.tsxindex c98bfbcfc6..e9ac11b7a2 100644--- a/apps/marketing/src/features/marketing/components/HomepagePullRequest.test.tsx+++ b/apps/marketing/src/features/marketing/components/HomepagePullRequest.test.tsx@@ -61,7 +61,7 @@ describe('website pull-request demo', () => {it('opens the trace, expands tools and outputs, switches to the PR, and restores focus', async () => {render(() => <HomepagePullRequest />);- const opener = screen.getByRole('button', { name: 'View session' });+ const opener = screen.getByRole('button', { name: 'Open session' });opener.focus();fireEvent.click(opener);const dialog = await screen.findByRole('dialog');diff --git a/apps/marketing/src/features/marketing/components/HomepagePullRequest.tsx b/apps/marketing/src/features/marketing/components/HomepagePullRequest.tsxindex 952f5a796e..923e14e5db 100644--- a/apps/marketing/src/features/marketing/components/HomepagePullRequest.tsx+++ b/apps/marketing/src/features/marketing/components/HomepagePullRequest.tsx@@ -23,7 +23,7 @@ export default function HomepagePullRequest() {: (host.querySelector<HTMLElement>('[data-magic-chip]') ?? undefined));setView(next);};- const prLink = () => (+ const prLink = (detailed = false) => (<buttontype="button"class="homepage-agent-pr-link"@@ -35,7 +35,15 @@ export default function HomepagePullRequest() {status={merged() ? 'merged' : 'open'}class="size-4 shrink-0"/>- <span>PR #482</span>+ <span class={detailed ? 'demo-cursor-pr-title' : undefined}>+ {detailed ? '#482 · Fix flaky deploy pipeline' : 'PR #482'}+ </span>+ <Show when={detailed}>+ <span class="demo-cursor-pr-stats">+ <span>+38</span>+ <span>−12</span>+ </span>+ </Show></button>);return (@@ -54,15 +62,16 @@ export default function HomepagePullRequest() {},{person: 'cursor',- text: 'On it. I’ll work on your branch, fix the failures, and run the tests.',+ text: '',reply: (<>- <span class="homepage-agent-reply-label">Reply to Cursor</span>- <div class="homepage-agent-chip glass">+ <div class="homepage-agent-chip"><DemoAgentChipagentSessionId={DEPLOY_SESSION_ID}+ requester="Teo"+ request="@Cursor, investigate the failures and build the fix on this branch."markdown={DEPLOY_RESULT}- pullRequest={prLink()}+ pullRequest={prLink(true)}headerActions={<Buttonvariant="success"diff --git a/apps/marketing/src/features/marketing/components/HomepageStandaloneDemos.test.tsx b/apps/marketing/src/features/marketing/components/HomepageStandaloneDemos.test.tsxindex 717475ae3b..b43799e860 100644--- a/apps/marketing/src/features/marketing/components/HomepageStandaloneDemos.test.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageStandaloneDemos.test.tsx@@ -76,7 +76,7 @@ describe('standalone website demos', () => {it('edits cells, commits keyboard navigation, and restores edits with undo and redo', () => {const view = render(() => <HomepageSpreadsheet />);const cell = view.getByRole('gridcell', {- name: 'A2: Dana Whitfield',+ name: 'A2: Dana',});fireEvent.click(cell);fireEvent.dblClick(cell);@@ -89,18 +89,16 @@ describe('standalone website demos', () => {expect(view.getByRole('gridcell', { name: 'A2: Dana Test' })).toBeTruthy();expect(view- .getByRole('gridcell', { name: 'A3: Maya Chen' })+ .getByRole('gridcell', { name: 'A3: Maya' }).getAttribute('aria-selected')).toBe('true');fireEvent.click(view.getByRole('button', { name: 'Undo' }));- expect(- view.getByRole('gridcell', { name: 'A2: Dana Whitfield' })- ).toBeTruthy();+ expect(view.getByRole('gridcell', { name: 'A2: Dana' })).toBeTruthy();fireEvent.click(view.getByRole('button', { name: 'Redo' }));expect(view.getByRole('gridcell', { name: 'A2: Dana Test' })).toBeTruthy();fireEvent.click(view.getByRole('button', { name: 'Bold' }));expect(- view.getByRole('gridcell', { name: 'A3: Maya Chen' }).style.fontWeight+ view.getByRole('gridcell', { name: 'A3: Maya' }).style.fontWeight).toBe('700');expect(fetch).not.toHaveBeenCalled();});diff --git a/apps/marketing/src/features/marketing/components/WorkspaceDesktopDemo.tsx b/apps/marketing/src/features/marketing/components/WorkspaceDesktopDemo.tsxindex aa67b933f3..6ebad2987f 100644--- a/apps/marketing/src/features/marketing/components/WorkspaceDesktopDemo.tsx+++ b/apps/marketing/src/features/marketing/components/WorkspaceDesktopDemo.tsx@@ -1,5 +1,12 @@-import { type JSX, lazy, Show } from 'solid-js';-import type { WorkspaceView } from '../core/dummy-workspace';+import {+ createSignal,+ type JSX,+ lazy,+ onCleanup,+ onMount,+ Show,+} from 'solid-js';+import type { DummyData, WorkspaceView } from '../core/dummy-workspace';import { DeferredDemo } from './DeferredDemo';import './email/email-desktop-demo.css';@@ -10,14 +17,51 @@ const Workspace = lazy(loadWorkspace);export function WorkspaceDesktopDemo(props: {view: WorkspaceView;label: string;- caption: string;+ caption?: string;+ heroFrame?: boolean;+ /** Keep a desktop canvas intact inside a smaller marketing frame. */+ desktopWidth?: number;initialDocument?: string;+ /** Optional page-owned sample content; other demos keep their fixtures. */+ initialData?: Partial<DummyData>;+ initialChannelThread?: string;/** Open this sample agent conversation instead of a new one. */initialAgent?: string;+ agentShowcase?: boolean;+ tasksShowcase?: boolean;+ chatSplits?: boolean;children?: JSX.Element;}) {+ let content!: HTMLDivElement;+ const [scale, setScale] = createSignal(1);+ onMount(() => {+ if (!props.desktopWidth) return;+ const desktop = window.matchMedia('(min-width: 700px)');+ const measure = () =>+ setScale(+ desktop.matches ? content.clientWidth / (props.desktopWidth ?? 1000) : 1+ );+ const observer = new ResizeObserver(measure);+ observer.observe(content);+ desktop.addEventListener('change', measure);+ measure();+ onCleanup(() => {+ observer.disconnect();+ desktop.removeEventListener('change', measure);+ });+ });return (- <section class="email-desktop-demo" aria-label={props.label}>+ <section+ class="email-desktop-demo"+ aria-label={props.label}+ data-hero-frame={props.heroFrame ? 'true' : undefined}+ data-desktop-canvas={!!props.desktopWidth}+ data-agent-showcase={props.agentShowcase ? 'true' : undefined}+ style={{+ '--workspace-scale': scale(),+ '--workspace-width': `${props.desktopWidth ?? 1000}px`,+ }}+ ><div class="email-desktop-wallpaper"><div class="email-desktop-window"><div class="email-desktop-titlebar">@@ -28,7 +72,13 @@ export function WorkspaceDesktopDemo(props: {</div><span>Macro</span><a- href="/demo"+ 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"@@ -36,33 +86,42 @@ export function WorkspaceDesktopDemo(props: {↗</a></div>- <div class="email-desktop-content">- <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}- initialDocument={props.initialDocument}- initialAgent={props.initialAgent}- embedded- />- </DeferredDemo>- }- >- {props.children}- </Show>+ <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>+ }+ >+ {props.children}+ </Show>+ </div></div></div></div>- <p class="email-desktop-caption">{props.caption}</p>+ <Show when={props.caption}>+ <p class="email-desktop-caption">{props.caption}</p>+ </Show></section>);}diff --git a/apps/marketing/src/features/marketing/components/agents/AgentComposer.tsx b/apps/marketing/src/features/marketing/components/agents/AgentComposer.tsxnew file mode 100644index 0000000000..e8e10d21b2--- /dev/null+++ b/apps/marketing/src/features/marketing/components/agents/AgentComposer.tsx@@ -0,0 +1,150 @@+import Code from '@phosphor/code.svg';+import Plus from '@phosphor/plus.svg';+import Lightning from '@phosphor-fill/lightning-fill.svg';+import { Button, Dropdown } from '@ui';+import { createSignal, Show } from 'solid-js';+import { ChannelComposer } from '../email/frozen/ChannelComposer';+import { ModelCatalogPicker } from '../workspace/frozen/model-picker/ModelCatalogPicker';+import { AGENT_MODELS, AGENT_PLACEHOLDER } from './agentDemoData';++/** Presentation adapted from agents-view/{ChatComposer,AgentPicker,ModelSelector}+ * at 40ceda68. A running session selects a model; a new session also selects an+ * agent. All choices and draft text belong to this local sample. */+export function AgentComposer(props: {+ onSend: (text: string) => void;+ newConversation?: boolean;+ model?: string;+ onModelChange?: (model: string) => void;+ mode?: 'work' | 'code';+ onModeChange?: (mode: 'work' | 'code') => void;+ onCreateAgent?: () => void;+}) {+ const [localModel, setModel] = createSignal(AGENT_MODELS[0].id);+ const model = () => props.model ?? localModel();+ const [agent, setAgent] = createSignal('Cursor');+ const [saved, setSaved] = createSignal(false);+ const [fast, setFast] = createSignal(false);+ const [repository, setRepository] = createSignal('Choose repository');+ const coding = () => props.newConversation && props.mode === 'code';+ return (+ <div class="agent-composer">+ <ChannelComposer+ agent+ richMentions+ attachmentIcon={<Plus />}+ label="Message the agent"+ placeholder={+ coding() ? 'Describe what you want to build' : AGENT_PLACEHOLDER+ }+ accessory={+ <div class="flex min-w-0 items-center gap-1">+ <ModelCatalogPicker+ childrenAfter+ value={model()}+ options={AGENT_MODELS}+ onSelect={(id) => {+ setModel(id);+ props.onModelChange?.(id);+ setSaved(false);+ props.onModeChange?.('work');+ }}+ triggerLabel={+ coding() || saved()+ ? `${agent()} · ${AGENT_MODELS.find((m) => m.id === model())?.label}`+ : undefined+ }+ ariaLabel={props.newConversation ? 'Agent' : 'Model'}+ placement="top-end"+ triggerClass="h-[33.75px] min-w-0 max-w-full gap-[5.625px] rounded-full border-0 bg-transparent hover:bg-hover px-[7.5px] text-base font-normal text-ink-muted [&_svg]:size-[15px]"+ >+ <Show when={props.newConversation}>+ <Dropdown.Group>+ <Dropdown.GroupLabel>Agents</Dropdown.GroupLabel>+ <Dropdown.Item+ onSelect={() => {+ setAgent('Customer follow-ups');+ setSaved(true);+ props.onModeChange?.('work');+ }}+ >+ Customer follow-ups+ </Dropdown.Item>+ </Dropdown.Group>+ <Dropdown.Group>+ <Dropdown.GroupLabel>Coding agents</Dropdown.GroupLabel>+ <Dropdown.Item+ onSelect={() => {+ setAgent('Cursor');+ setSaved(false);+ props.onModeChange?.('code');+ }}+ >+ <Code class="size-4" /> Cursor+ </Dropdown.Item>+ <Dropdown.Item+ onSelect={() => {+ setAgent('Claude Code');+ setSaved(false);+ props.onModeChange?.('code');+ }}+ >+ <Code class="size-4" /> Claude Code+ </Dropdown.Item>+ </Dropdown.Group>+ <Show when={props.onCreateAgent}>+ <Dropdown.Item onSelect={() => props.onCreateAgent?.()}>+ <Plus class="size-4" /> Create agent+ </Dropdown.Item>+ </Show>+ </Show>+ </ModelCatalogPicker>+ <Show+ when={+ props.newConversation &&+ !coding() &&+ model() === 'claude-opus-5-5'+ }+ >+ <Button+ variant="ghost"+ size="icon-composer"+ label={`Fast mode ${fast() ? 'on' : 'off'} · 2× AI usage`}+ aria-pressed={fast()}+ onMouseDown={(event) => event.preventDefault()}+ onClick={() => setFast(!fast())}+ class={fast() ? 'text-accent bg-accent/10' : 'text-ink-muted'}+ >+ <Lightning class="size-4" />+ </Button>+ </Show>+ </div>+ }+ onSend={props.onSend}+ />+ <Show when={coding()}>+ <div class="agent-repository-bar">+ <Dropdown placement="top-start">+ <Dropdown.Trigger variant="ghost" size="sm">+ {repository()}+ </Dropdown.Trigger>+ <Dropdown.Content portalScope="local">+ <Dropdown.Item+ onSelect={() => setRepository('Choose repository')}+ >+ Choose automatically+ </Dropdown.Item>+ <Dropdown.Item+ onSelect={() => setRepository('launch-team/workspace')}+ >+ launch-team/workspace+ </Dropdown.Item>+ </Dropdown.Content>+ </Dropdown>+ <Show when={repository() !== 'Choose repository'}>+ <span>main</span>+ </Show>+ </div>+ </Show>+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/agents/AgentSession.tsx b/apps/marketing/src/features/marketing/components/agents/AgentSession.tsxnew file mode 100644index 0000000000..4c8f3a6ee0--- /dev/null+++ b/apps/marketing/src/features/marketing/components/agents/AgentSession.tsx@@ -0,0 +1,90 @@+import Share from '@phosphor/share.svg';+import Sidebar from '@phosphor/sidebar-simple.svg';+import { Button } from '@ui';+import { createSignal, type JSX, Show } from 'solid-js';+import { ViewShell } from '../DemoWorkspaceChrome';+import { DocumentShareSheet } from '../documents/DocumentShareSheet';+import '../documents/document-stories.css';+import { ModelIcon } from '../workspace/frozen/model-picker/ProviderIcon';+import { AgentComposer } from './AgentComposer';+import './agent-stories.css';++/** AgentSessionPane presentation at 40ceda68. Sharing is a local preview. */+export function AgentSession(props: {+ title: string;+ children: JSX.Element;+ onSend: (prompt: string) => void;+}) {+ let shareButton: HTMLButtonElement | undefined;+ const [model, setModel] = createSignal('claude-sonnet-5-5');+ const [share, setShare] = createSignal(false);+ const [details, setDetails] = createSignal(false);+ return (+ <>+ <ViewShell.TopBar class="agent-session-header">+ <ModelIcon model={model()} />+ <h3 class="min-w-0 flex-1 truncate text-sm font-semibold">+ {props.title}+ </h3>+ <Button+ ref={shareButton}+ variant="plain"+ size="sm"+ onClick={() => setShare(true)}+ >+ <Share class="size-4" />+ Share+ </Button>+ <Button+ variant="plain"+ size="icon-sm"+ label="Toggle agent details"+ aria-expanded={details()}+ onClick={() => setDetails(!details())}+ >+ <Sidebar class="size-4" />+ </Button>+ </ViewShell.TopBar>+ <div class="agent-session-body">+ <div+ class="dummy-scroll agent-transcript"+ role="log"+ aria-label={props.title}+ >+ {props.children}+ </div>+ <Show when={details()}>+ <aside class="agent-session-details" aria-label="Agent details">+ <Button variant="plain" size="sm" onClick={() => setDetails(false)}>+ Close details+ </Button>+ <h4>Properties</h4>+ <dl>+ <dt>Created by</dt>+ <dd>Jacob</dd>+ <dt>Agent</dt>+ <dd>Macro</dd>+ </dl>+ </aside>+ </Show>+ </div>+ <div class="dummy-composer sample-chat-composer agent-session-composer">+ <AgentComposer+ onSend={props.onSend}+ model={model()}+ onModelChange={setModel}+ />+ </div>+ <DocumentShareSheet+ open={share()}+ title={props.title}+ entityLabel="conversation"+ autoFocus+ onClose={() => {+ setShare(false);+ shareButton?.focus();+ }}+ />+ </>+ );+}diff --git a/apps/marketing/src/features/marketing/components/agents/AgentStories.test.tsx b/apps/marketing/src/features/marketing/components/agents/AgentStories.test.tsxindex 8c94bf7c12..4c9515dcb6 100644--- a/apps/marketing/src/features/marketing/components/agents/AgentStories.test.tsx+++ b/apps/marketing/src/features/marketing/components/agents/AgentStories.test.tsx@@ -1,12 +1,14 @@import { cleanup, fireEvent, render, within } from '@solidjs/testing-library';import { afterEach, beforeEach, expect, it, vi } from 'vitest';-import DummyWorkspace from '../workspace/DummyWorkspace';import {- AgentMcpDemo,- AgentMemoryDemo,- AgentModelsDemo,- AgentSearchDemo,-} from './AgentStories';+ createDummyWorkspace,+ type DummyWorkspace,+} from '../../primitives/createDummyWorkspace';+import DummyWorkspaceView from '../workspace/DummyWorkspace';+import { AgentMcpDemo } from './AgentStories';+import { NorthwindCollaboration } from './NorthwindCollaboration';+import { NorthwindSession, NorthwindStory } from './NorthwindSession';+import { createNorthwindAccessTask, NORTHWIND_PLAN } from './northwindScenario';let intersections: IntersectionObserverCallback[];let reduced = false;@@ -59,136 +61,306 @@ function visible() {);}-it('opens the hero on a cited conversation whose tasks open in place', () => {+it.each(['complete', 'sources', 'actions'] as const)(+ 'keeps the %s scene in one pane until a visitor opens a record',+ (scene) => {+ vi.spyOn(HTMLElement.prototype, 'clientWidth', 'get').mockReturnValue(1000);+ const view = render(() => (+ <NorthwindSession+ workspace={createDummyWorkspace('agents')}+ scene={scene}+ />+ ));+ expect(view.queryByRole('region', { name: 'Opened item' })).toBeNull();+ visible();+ vi.advanceTimersByTime(6000);+ expect(view.queryByRole('region', { name: 'Opened item' })).toBeNull();+ fireEvent.click(view.getAllByRole('button', { name: 'rollout plan' })[0]);+ expect(view.getByRole('region', { name: 'Opened item' })).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Close opened item' }));+ expect(view.queryByRole('region', { name: 'Opened item' })).toBeNull();+ }+);++it('keeps the completed reduced-motion scene in one pane', () => {+ reduced = true;+ vi.spyOn(HTMLElement.prototype, 'clientWidth', 'get').mockReturnValue(1000);+ const view = render(() => <NorthwindStory scene="actions" />);+ expect(view.getByRole('button', { name: 'SSO verification' })).toBeTruthy();+ expect(view.queryByRole('region', { name: 'Opened item' })).toBeNull();+});++it('opens the hero on the completed job and keeps task edits when reopened', () => {vi.spyOn(window, 'scrollTo').mockImplementation(() => {});const view = render(() => (- <DummyWorkspace+ <DummyWorkspaceViewinitialView="agents"- initialAgent="launch-status"+ initialAgent="northwind"embedded/>));- const log = within(view.getByRole('log', { name: 'Launch workspace' }));- expect(log.getByText('What’s left before Thursday’s launch?')).toBeTruthy();- expect(log.getByRole('button', { name: 'Called 3 tools' })).toBeTruthy();- expect(log.getByText('20 messages')).toBeTruthy();- fireEvent.click(- log.getByRole('button', { name: 'Fix the team invite handoff' })+ const log = within(view.getByRole('log', { name: 'Northwind rollout' }));+ fireEvent.click(log.getByRole('button', { name: 'SSO verification' }));+ const opened = within(view.getByRole('region', { name: 'Opened item' }));+ expect(opened.getByRole('textbox', { name: 'Task title' }).textContent).toBe(+ 'Verify Northwind SSO before the pilot');+ const title = opened.getByRole('textbox', { name: 'Task title' });+ title.textContent = 'Send the revised pricing';+ Object.defineProperty(title, 'innerText', {+ configurable: true,+ value: 'Send the revised pricing',+ });+ fireEvent.blur(title);+ fireEvent.click(view.getByRole('button', { name: 'Close opened item' }));+ fireEvent.click(log.getByRole('button', { name: 'SSO verification' }));expect(view.getByRole('textbox', { name: 'Task title' }).textContent).toBe(- 'Fix the team invite handoff'+ 'Send the revised pricing');});-it('calls tools one by one, then streams an answer that cites its sources', () => {- const view = render(() => <AgentMemoryDemo />);- const transcript = view.getByRole('log', { name: 'Northwind follow-up' });- const log = within(transcript);- expect(log.getByText('Thinking')).toBeTruthy();- expect(log.queryByText('Read call transcript')).toBeNull();+it('opens the email and call evidence from the same conversation', () => {+ const view = render(() => <NorthwindStory scene="sources" />);visible();- vi.advanceTimersByTime(1000);- expect(log.getByRole('button', { name: 'Calling 1 tool' })).toBeTruthy();- expect(log.getByText('Northwind', { selector: 'span' })).toBeTruthy();- vi.advanceTimersByTime(1500);- expect(log.getByRole('button', { name: 'Calling 3 tools' })).toBeTruthy();- expect(log.getByText('call transcript')).toBeTruthy();- vi.advanceTimersByTime(800);- expect(log.getByRole('button', { name: 'Called 3 tools' })).toBeTruthy();- expect(log.queryByText(/assign it to her/)).toBeNull();- vi.advanceTimersByTime(280 * 5);- expect(log.getByText(/assign it to her/)).toBeTruthy();- const citations = Array.from(- transcript.querySelectorAll('[data-agent-mention]'),- (element) => element.textContent+ vi.advanceTimersByTime(3900);+ fireEvent.click(+ view.getByRole('button', { name: /Northwind rollout requirements/ }));- expect(citations).toContain('@Valentina');- expect(citations).toContain('Re: Northwind pilot pricing');- expect(citations).toContain('Northwind demo Tuesday at 2:00 PM');-});--it('opens the Search call’s hits across email, docs, channels, and calls', () => {- reduced = true;- const view = render(() => <AgentSearchDemo />);- const toggle = view.getByRole('button', { name: '4 hits' });- expect(toggle.getAttribute('aria-expanded')).toBe('true');- const kinds = Array.from(- view.container.querySelectorAll('[data-search-hit]'),- (hit) => hit.getAttribute('data-search-hit')+ const opened = within(view.getByRole('region', { name: 'Opened item' }));+ expect(+ opened.getByText(/operations group has grown to 40 people/)+ ).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Close opened item' }));+ fireEvent.click(+ view.getByRole('button', { name: /Northwind rollout decision/ }));- expect(kinds).toEqual(['email', 'document', 'channel', 'call']);- fireEvent.click(toggle);- expect(view.container.querySelector('[data-search-hit]')).toBeNull();+ expect(+ view.getByRole('heading', { name: 'Northwind rollout decision' })+ ).toBeTruthy();+ expect(view.getByRole('heading', { name: 'Transcript' })).toBeTruthy();});-it('opens a cited email beside the session and closes it again', () => {- const view = render(() => <AgentSearchDemo />);- fireEvent.click(- view.getByRole('button', { name: 'Next steps for our team' })+it('reveals the conflicting sources before its judgment without changing the records', () => {+ let w!: DummyWorkspace;+ const view = render(() => {+ w = createDummyWorkspace('agents');+ return <NorthwindSession workspace={w} scene="sources" />;+ });+ expect(+ view.getByRole('button', { name: '1 hit' }).getAttribute('aria-expanded')+ ).toBe('true');+ expect(view.queryByText(/Friday isn’t ready yet\./)).toBeNull();+ visible();+ vi.advanceTimersByTime(1300);+ expect(view.getByRole('button', { name: '2 hits' })).toBeTruthy();+ vi.advanceTimersByTime(1300);+ expect(view.getByRole('button', { name: '4 hits' })).toBeTruthy();+ vi.advanceTimersByTime(1300);+ expect(view.getByText(/Friday isn’t ready yet\./)).toBeTruthy();+ expect(+ w.data.documents.find((d) => d.id === 'northwind-plan')?.body+ ).not.toBe(NORTHWIND_PLAN);+ expect(w.data.tasks.find((t) => t.id === 'northwind-training')?.owner).toBe(+ 'jacob');- const opened = within(view.getByRole('region', { name: 'Opened item' }));+ expect(w.data.tasks.some((t) => t.id === 'northwind-sso')).toBe(false);+ fireEvent.click(view.getByRole('button', { name: '4 hits' }));+ expect(+ view.queryByRole('button', { name: /Northwind rollout requirements/ })+ ).toBeNull();+ fireEvent.click(view.getByRole('button', { name: '4 hits' }));expect(- opened.getByRole('heading', { name: 'Next steps for our team' })+ view.getByRole('button', { name: /Northwind rollout requirements/ })).toBeTruthy();- expect(opened.getByText(/Could you share the rollout plan/)).toBeTruthy();- fireEvent.click(view.getByRole('button', { name: 'Close' }));- expect(view.queryByRole('region', { name: 'Opened item' })).toBeNull();+});++it('shows the complete discovery with reduced motion', () => {+ reduced = true;+ const view = render(() => <NorthwindStory scene="sources" />);+ expect(view.getByRole('button', { name: '4 hits' })).toBeTruthy();+ expect(view.getByText(/Friday isn’t ready yet\./)).toBeTruthy();+});++it('updates the plan once visible and starts completed for reduced motion', () => {+ reduced = true;+ const view = render(() => <NorthwindStory scene="actions" />);+ fireEvent.click(view.getByRole('button', { name: 'rollout plan' }));expect(- view.getByRole('log', { name: 'Meadow before Thursday' })+ view.getByText(/Start with 10 operations staff on Friday/)).toBeTruthy();});-it('switches to GPT-5.6 in the composer and answers from the same memory', () => {- const view = render(() => <AgentModelsDemo />);- expect(view.getByRole('button', { name: 'Model' }).textContent).toContain(- 'Sonnet 5.5'+it('does not overwrite an edit after a visitor takes control', () => {+ let workspace!: DummyWorkspace;+ const view = render(() => {+ workspace = createDummyWorkspace('agents');+ return <NorthwindSession workspace={workspace} scene="actions" />;+ });+ visible();+ fireEvent.pointerDown(view.getByRole('log', { name: 'Northwind rollout' }));+ workspace.setData(+ 'documents',+ (d) => d.id === 'northwind-plan',+ 'body',+ 'Keep my revised plan.');+ vi.advanceTimersByTime(6000);+ expect(+ workspace.data.documents.find((d) => d.id === 'northwind-plan')?.body+ ).toBe('Keep my revised plan.');+});++it('updates the plan and task ownership without falsely completing the access check', () => {+ let w!: DummyWorkspace;+ const view = render(() => {+ w = createDummyWorkspace('agents');+ return <NorthwindSession workspace={w} scene="actions" />;+ });+ expect(w.data.tasks.find((t) => t.id === 'northwind-training')?.owner).toBe(+ 'jacob'+ );+ expect(w.data.tasks.some((t) => t.id === 'northwind-sso')).toBe(false);+ expect(view.queryByRole('button', { name: 'rollout plan' })).toBeNull();visible();- vi.advanceTimersByTime(1600);- const menu = view.container.querySelector('.agent-model-menu');+ vi.advanceTimersByTime(1300);+ expect(view.getByRole('button', { name: 'rollout plan' })).toBeTruthy();expect(- Array.from(menu?.querySelectorAll('[data-model-option]') ?? [], (row) =>- row.getAttribute('data-model-option')- )- ).toEqual([- 'claude-sonnet-5-5',- 'claude-opus-5-5',- 'gpt-5.6',- 'gemini-3.8-flash',- ]);- vi.advanceTimersByTime(1500);- expect(view.container.querySelector('.agent-model-menu')).toBeNull();- expect(view.getByRole('button', { name: 'Model' }).textContent).toContain(- 'GPT-5.6'+ view.queryByRole('button', { name: 'Training for 40 people' })+ ).toBeNull();+ expect(w.data.documents.find((d) => d.id === 'northwind-plan')?.body).toBe(+ NORTHWIND_PLAN);- expect(view.getByText('Model set to GPT-5.6')).toBeTruthy();- vi.advanceTimersByTime(2300);- const log = view.getByRole('log', { name: 'Northwind follow-up' });+ expect(w.data.tasks.find((t) => t.id === 'northwind-training')?.owner).toBe(+ 'jacob'+ );+ vi.advanceTimersByTime(1300);expect(- within(log).getAllByText('Who should own the Northwind follow-up?')- ).toHaveLength(2);- expect(within(log).getByText(/40-seat pricing herself/)).toBeTruthy();+ view.getByRole('button', { name: 'Training for 40 people' })+ ).toBeTruthy();+ expect(view.queryByRole('button', { name: 'SSO verification' })).toBeNull();+ expect(w.data.tasks.find((t) => t.id === 'northwind-training')?.owner).toBe(+ 'julia'+ );+ vi.advanceTimersByTime(1300);+ expect(view.getByRole('button', { name: 'SSO verification' })).toBeTruthy();+ expect(w.data.tasks.find((t) => t.id === 'northwind-sso')).toMatchObject({+ owner: 'teo',+ status: 'Not Started',+ priority: 'Urgent',+ });+ createNorthwindAccessTask(w);+ expect(w.data.tasks.filter((t) => t.id === 'northwind-sso')).toHaveLength(1);});-it('shows the finished model switch for reduced motion', () => {- reduced = true;- const view = render(() => <AgentModelsDemo />);- expect(view.getByText('Model set to GPT-5.6')).toBeTruthy();- expect(view.getByText(/40-seat pricing herself/)).toBeTruthy();- expect(view.container.querySelector('.agent-model-menu')).toBeNull();+it('shows both collaborators’ edits and preserves a visitor’s later writing', () => {+ const view = render(() => <NorthwindCollaboration />);+ visible();+ vi.advanceTimersByTime(3900);+ const body = view.getByRole('textbox', { name: 'Document body' });+ expect(body.textContent).toContain('Teo verifies SSO before the pilot.');+ expect(body.textContent).toContain(+ 'Marcus will send the names of the 10 pilot participants today.'+ );+ fireEvent.pointerDown(body);+ body.textContent = 'Keep my own rollout note.';+ fireEvent.blur(body);+ vi.advanceTimersByTime(5000);+ expect(body.textContent).toBe('Keep my own rollout note.');+});++it('switches Work and Code while keeping the unsent prompt', () => {+ const view = render(() => (+ <DummyWorkspaceView initialView="agents" embedded />+ ));+ const input = view.getByRole('textbox', { name: 'Message the agent' });+ input.textContent = 'Investigate the customer follow-up';+ fireEvent.input(input);+ fireEvent.click(view.getByRole('radio', { name: 'Code' }));+ expect(+ view.getByRole('heading', { name: 'What should we build?' })+ ).toBeTruthy();+ expect(+ view.getByRole('textbox', { name: 'Message the agent' }).textContent+ ).toBe('Investigate the customer follow-up');+ expect(view.getByRole('button', { name: 'Choose repository' })).toBeTruthy();});-it('lists the MCP server’s real setup commands', () => {+it('lists the real MCP command and does not report copy success on failure', async () => {const view = render(() => <AgentMcpDemo />);expect(view.getByText('claude mcp add --transport http macro https://mcp-server.macro.com/mcp')).toBeTruthy();- fireEvent.click(view.getByRole('button', { name: 'ChatGPT' }));+ Object.defineProperty(navigator, 'clipboard', {+ configurable: true,+ value: { writeText: vi.fn().mockRejectedValue(new Error('Not allowed')) },+ });+ fireEvent.click(view.getByRole('button', { name: 'Copy' }));+ await Promise.resolve();+ expect(view.queryByText('Copied')).toBeNull();+});++it('returns focus to Share when the local sharing sheet closes', async () => {+ const view = render(() => <NorthwindStory scene="sources" />);+ const share = view.getByRole('button', { name: 'Share' });+ fireEvent.click(share);+ await Promise.resolve();+ const input = view.getByRole('textbox', { name: 'Email or group' });+ expect(document.activeElement).toBe(input);+ fireEvent.keyDown(input, { key: 'Escape' });+ expect(view.queryByRole('dialog')).toBeNull();+ expect(document.activeElement).toBe(share);+});++it('applies the scripted document edit once the action scene becomes visible', () => {+ let workspace!: DummyWorkspace;+ render(() => {+ workspace = createDummyWorkspace('agents');+ return <NorthwindSession workspace={workspace} scene="actions" />;+ });expect(- view.getByText(- 'Settings → Apps → Advanced settings → enable Developer mode, then Create App'- )+ workspace.data.documents.find((doc) => doc.id === 'northwind-plan')?.body+ ).not.toBe(NORTHWIND_PLAN);+ visible();+ vi.advanceTimersByTime(4000);+ expect(+ workspace.data.documents.find((doc) => doc.id === 'northwind-plan')?.body+ ).toBe(NORTHWIND_PLAN);+});++it('filters the conversation list and restores it on Escape', async () => {+ const view = render(() => (+ <DummyWorkspaceView initialView="agents" embedded />+ ));+ fireEvent.click(view.getByRole('button', { name: 'Search conversations' }));+ await Promise.resolve();+ const search = view.getByRole('searchbox', { name: 'Search conversations' });+ fireEvent.input(search, { target: { value: 'Northwind' } });+ expect(view.getByRole('button', { name: 'Northwind rollout' })).toBeTruthy();+ expect(+ view.queryByRole('button', { name: 'Fix the deploy pipeline' })+ ).toBeNull();+ fireEvent.keyDown(search, { key: 'Escape' });+ expect(+ view.getByRole('button', { name: 'Fix the deploy pipeline' })+ ).toBeTruthy();+});++it('keeps the created task linked to the same rollout plan and source discussion', () => {+ const view = render(() => (+ <DummyWorkspaceView+ initialView="agents"+ initialAgent="northwind"+ embedded+ />+ ));+ fireEvent.click(view.getByRole('button', { name: 'SSO verification' }));+ const pane = within(view.getByRole('region', { name: 'Opened item' }));+ expect(+ pane.getByRole('button', { name: 'Northwind rollout plan' })).toBeTruthy();+ expect(pane.queryByRole('button', { name: 'Q3 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/AgentStories.tsx b/apps/marketing/src/features/marketing/components/agents/AgentStories.tsxindex 0d189d8859..edcbed23c1 100644--- a/apps/marketing/src/features/marketing/components/agents/AgentStories.tsx+++ b/apps/marketing/src/features/marketing/components/agents/AgentStories.tsx@@ -1,667 +1,11 @@import CaretRight from '@phosphor/caret-right.svg';import Check from '@phosphor/check.svg';import Clipboard from '@phosphor/clipboard.svg';-import MagnifyingGlass from '@phosphor/magnifying-glass.svg';-import Plus from '@phosphor/plus.svg';-import X from '@phosphor/x.svg';-import { Button, cn, Surface } from '@ui';-import {- createEffect,- createSignal,- For,- type JSX,- on,- onCleanup,- Show,-} from 'solid-js';-import type { WorkspaceView } from '../../core/dummy-workspace';-import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';-import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';-import { DemoCursor } from '../DemoCursor';-import { ViewShell } from '../DemoWorkspaceChrome';-import { InputActionButton } from '../email/frozen/ActionButton';-import { ChannelComposer } from '../email/frozen/ChannelComposer';+import { Button } from '@ui';+import { createSignal, For, onCleanup, Show } from 'solid-js';import { ProductDemo } from '../product/ProductPage';-import { ProductWorkspace } from '../product/ProductWorkspace';-import { ModelCatalogPicker } from '../workspace/frozen/model-picker/ModelCatalogPicker';-import { modelFamilyHint } from '../workspace/frozen/model-picker/modelCatalog';-import { ModelIcon } from '../workspace/frozen/model-picker/ProviderIcon';-import {- AgentActionLine,- AgentAnswer,- type AgentMention,- AgentPrompt,- AgentThought,- AgentToolGroup,- AgentTurn,-} from './AgentTranscript';-import {- AGENT_MODELS,- AGENT_PLACEHOLDER,- meadow,- northwind,-} from './agentDemoData';-import { createDemoPointer } from './createDemoPointer';-import '../workspace/dummy-workspace.css';import './agent-stories.css';-/** The production model trigger from agents-view's ModelSelector. */-const MODEL_TRIGGER =- 'h-[33.75px] min-w-0 max-w-full gap-[5.625px] rounded-full border-0 bg-transparent hover:bg-hover px-[7.5px] text-base font-normal text-ink-muted [&_svg]:size-[15px]';--const modelLabel = (id: string) =>- AGENT_MODELS.find((model) => model.id === id)?.label ?? id;--/** Keep the newest turn in view, as the session transcript does. */-function followLatest(- log: () => HTMLElement | undefined,- track: () => unknown-) {- createEffect(- on(track, () => {- const frame = requestAnimationFrame(() => {- const element = log();- if (!element) return;- const instant = matchMedia('(prefers-reduced-motion: reduce)').matches;- element.scrollTo?.({- top: element.scrollHeight,- behavior: instant ? 'auto' : 'smooth',- });- });- onCleanup(() => cancelAnimationFrame(frame));- })- );-}--/** Topbar, transcript, and ChatComposer of a running agent session. */-function AgentSession(props: {- title: string;- model: string;- onModel: (id: string) => void;- onSend: (prompt: string) => void;- log?: (element: HTMLDivElement) => void;- children: JSX.Element;-}) {- return (- <>- <ViewShell.TopBar>- <span class="min-w-0 truncate text-sm font-semibold tracking-[-0.03em] text-ink">- {props.title}- </span>- </ViewShell.TopBar>- <div- ref={props.log}- class="dummy-scroll agent-transcript"- role="log"- aria-label={props.title}- >- {props.children}- </div>- <div class="dummy-composer sample-chat-composer agent-session-composer agent-composer">- <ChannelComposer- agent- label="Message the agent"- placeholder={AGENT_PLACEHOLDER}- leadingAction={- <InputActionButton label="Attach files">- <Plus />- </InputActionButton>- }- accessory={- <ModelCatalogPicker- value={props.model}- options={AGENT_MODELS}- onSelect={props.onModel}- ariaLabel="Model"- placement="top-end"- triggerClass={MODEL_TRIGGER}- />- }- onSend={props.onSend}- />- </div>- </>- );-}--/** Prompts a visitor sends get the scripted reply for that conversation. */-function VisitorTurns(props: {- turns: string[];- reply: string;- mentions: Record<string, AgentMention>;-}) {- return (- <For each={props.turns}>- {(prompt) => (- <>- <AgentTurn>- <AgentPrompt text={prompt} />- </AgentTurn>- <AgentTurn>- <AgentAnswer text={props.reply} mentions={props.mentions} />- </AgentTurn>- </>- )}- </For>- );-}--const northwindMentions: Record<string, AgentMention> = {- valentina: { kind: 'person', person: 'valentina' },- pricing: { kind: 'email' },- demo: { kind: 'call', time: 'Tuesday at 2:00 PM' },-};--/** The earlier exchange that opens the Northwind session. */-function NorthwindEarlier() {- return (- <>- <AgentTurn>- <AgentPrompt text={northwind.earlier.prompt} />- </AgentTurn>- <AgentTurn>- <AgentToolGroup calls={northwind.earlier.calls} />- <AgentAnswer- text={northwind.earlier.answer}- mentions={northwindMentions}- />- </AgentTurn>- </>- );-}--const MEMORY_STEPS = 9;--/**- * Who should own a follow-up: the agent thinks, its calls arrive one by one,- * and the answer streams in with the person, thread, and call it used.- * Phases: 0 thinking, 1–3 calls, 4 settled, 5–9 the reply streaming.- */-export function AgentMemoryDemo() {- let root!: HTMLDivElement;- let log: HTMLDivElement | undefined;- const [phase, setPhase] = createSignal(0);- const [model, setModel] = createSignal(AGENT_MODELS[0].id);- const [toolsOpen, setToolsOpen] = createSignal(true);- const [turns, setTurns] = createSignal<string[]>([]);- const finish = () => setPhase(MEMORY_STEPS);- const playback = createProductWalkthrough({- root: () => root,- steps: MEMORY_STEPS,- reset: () => {},- reduced: finish,- delay: (step) =>- step === 1 ? 1000 : step <= 3 ? 750 : step === 4 ? 800 : 280,- advance: setPhase,- });- const calls = () =>- phase() >= 4 ? northwind.calls : northwind.calls.slice(0, phase() + 1);- const answer = () =>- northwind.answer.slice(0, Math.max(0, phase() - 3)).join('');- followLatest(- () => log,- () => [phase(), turns().length]- );- return (- <ProductDemo- ref={(element) => (root = element)}- label="Ask an agent who should own a customer follow-up"- onInteract={playback.pause}- height={520}- mobileHeight={620}- >- <AgentSession- title={northwind.title}- model={model()}- onModel={setModel}- log={(element) => (log = element)}- onSend={(prompt) => {- playback.pause();- finish();- setTurns((items) => [...items, prompt]);- }}- >- <NorthwindEarlier />- <AgentTurn>- <AgentPrompt text={northwind.prompt} />- </AgentTurn>- <AgentTurn>- <Show- when={phase() > 0}- fallback={<AgentThought text={northwind.thought} active />}- >- <AgentToolGroup- calls={calls()}- active={phase() < 4}- open={toolsOpen()}- onOpenChange={setToolsOpen}- />- </Show>- <Show when={answer()}>- <AgentAnswer text={answer()} mentions={northwindMentions} />- </Show>- </AgentTurn>- <VisitorTurns- turns={turns()}- reply={northwind.switchedAnswer}- mentions={northwindMentions}- />- </AgentSession>- </ProductDemo>- );-}--const SEARCH_STEPS = 5;--/**- * One search across the workspace: Jacob opens the Search call's hits (an- * email, a document, a channel message, and a call), then clicks the cited- * email, which opens beside the session as a mention does in the app.- * Phases: 1 point at "4 hits", 2 open them, 3 point at the email, 4 click,- * 5 the email opens in a split.- */-export function AgentSearchDemo() {- let root!: HTMLDivElement;- let frame!: HTMLDivElement;- let log: HTMLDivElement | undefined;- const w = createDummyWorkspace('agents');- w.setData(- 'documents',- (doc) => doc.id === 'notes',- 'body',- '## The Meadow\n\nDana’s team wants email, tasks, and documents in one workspace.\n\n## Open questions\n\n- Seats for the whole team\n- Shared email access\n- Importing their existing docs\n\n## Follow-up\n\nShare the rollout plan. Julia will help with setup. Thursday at 9 works for the follow-up.'- );- const [phase, setPhase] = createSignal(0);- const [automatic, setAutomatic] = createSignal(true);- const [hitsOpen, setHitsOpen] = createSignal(false);- const [item, setItem] = createSignal<WorkspaceView>();- const [model, setModel] = createSignal(AGENT_MODELS[0].id);- const [turns, setTurns] = createSignal<string[]>([]);- const show = (view: WorkspaceView, id: string) => {- if (view === 'messages') w.setChannel(id);- w.open(view, id);- setItem(view);- };- const open = (view: WorkspaceView, id: string) => {- pause();- show(view, id);- };- const mentions: Record<string, AgentMention> = {- email: { kind: 'email', onOpen: () => open('email', 'dana') },- rollout: { kind: 'document', onOpen: () => open('documents', 'rollout') },- notes: { kind: 'document', onOpen: () => open('documents', 'notes') },- customers: {- kind: 'channel',- onOpen: () => open('messages', 'customers'),- },- };- // The cited email opens beside the session where there's room for a split.- const openSource = () => {- if (frame.clientWidth >= 640) show('email', 'dana');- };- const finish = () => {- setHitsOpen(true);- setPhase(SEARCH_STEPS);- setAutomatic(false);- openSource();- };- const playback = createProductWalkthrough({- root: () => root,- steps: SEARCH_STEPS,- reset: () => {},- reduced: finish,- delay: (step) => [0, 900, 750, 1300, 800, 350][step] ?? 1000,- advance: (step) => {- if (step === 2) setHitsOpen(true);- if (step === SEARCH_STEPS) finish();- else setPhase(step);- },- });- function pause() {- setAutomatic(false);- playback.pause();- }- followLatest(- () => log,- () => turns().length- );- const pointer = createDemoPointer({- frame: () => frame,- target: () =>- automatic()- ? [- undefined,- '[data-search-toggle]',- '[data-search-toggle]',- '[data-agent-mention="email"]',- '[data-agent-mention="email"]',- ][phase()]- : undefined,- });- return (- <div ref={root} class="agent-demo-flow">- <div ref={frame} class="agent-demo-frame" onFocusIn={pause}>- <ProductDemo- label="One search across email, documents, channels, and calls"- onInteract={pause}- height={680}- mobileHeight={760}- >- <div class="agent-split" data-item-open={item() ? 'true' : undefined}>- <div class="agent-split-pane">- <AgentSession- title={meadow.title}- model={model()}- onModel={setModel}- log={(element) => (log = element)}- onSend={(prompt) => {- pause();- setTurns((items) => [...items, prompt]);- }}- >- <AgentTurn>- <AgentPrompt text={meadow.prompt} />- </AgentTurn>- <AgentTurn>- <AgentToolGroup- calls={meadow.calls}- defaultOpen- searchOpen={hitsOpen()}- onSearchOpenChange={(value) => {- pause();- setHitsOpen(value);- }}- />- <AgentAnswer text={meadow.answer} mentions={mentions} />- </AgentTurn>- <VisitorTurns- turns={turns()}- reply={meadow.followUp}- mentions={mentions}- />- </AgentSession>- </div>- <Show when={item()}>- <section- class="agent-split-pane agent-split-item"- aria-label="Opened item"- >- <ProductWorkspace workspace={w} />- <Button- variant="plain"- size="icon-sm"- class="agent-split-close"- label="Close"- onClick={() => setItem(undefined)}- >- <X class="size-4" />- </Button>- </section>- </Show>- </div>- </ProductDemo>- <Show when={pointer()}>- {(p) => (- <DemoCursor- label="Jacob"- class="agent-demo-pointer"- clicking={phase() === 2 || phase() === 4}- style={{ transform: `translate(${p().x}px, ${p().y}px)` }}- />- )}- </Show>- </div>- </div>- );-}--const ROW =- 'group rounded-lg w-full flex items-center gap-1.5 p-1.5 px-2 text-left font-normal cursor-default outline-none data-highlighted:bg-ink/5';--/**- * The open ModelCatalogPicker as the walkthrough shows it. A still frame of- * the menu, so the scripted click never moves focus or locks page scroll;- * the real picker in the composer stays fully interactive.- */-function ModelMenuFrame(props: {- value: string;- highlighted?: string;- style: JSX.CSSProperties;-}) {- return (- <div class="agent-model-menu" style={props.style} aria-hidden="true">- <Surface- depth={2}- hideBorder- class="menu-surface rounded-xl size-auto text-sm w-full menu-open-animation"- >- <div class="flex flex-col divide-y divide-edge-divider size-full">- <div class="bg-menu p-1.5">- <div class="flex items-center gap-2 px-2">- <MagnifyingGlass class="size-4 shrink-0 text-ink-extra-muted" />- <span class="min-w-0 w-full py-2 text-sm text-ink-extra-muted">- Search models- </span>- </div>- </div>- <div class="flex flex-col p-1.5 bg-menu">- <div class="px-2 h-7 flex items-center text-xs text-ink-extra-muted">- Recommended- </div>- <For each={AGENT_MODELS}>- {(option) => (- <div- data-model-option={option.id}- data-highlighted={- props.highlighted === option.id ? '' : undefined- }- class={cn(- ROW,- 'h-8 gap-2',- option.id === props.value && 'bg-ink/5 text-ink font-medium'- )}- >- <ModelIcon model={option.id} />- <span class="min-w-0 flex-1 truncate text-sm">- {option.label}- </span>- <Show when={modelFamilyHint(option)}>- {(hint) => (- <span class="shrink-0 text-xs text-ink-extra-muted">- {hint()}- </span>- )}- </Show>- <Show when={option.id === props.value}>- <Check class="size-3.5 shrink-0 text-accent" />- </Show>- </div>- )}- </For>- </div>- </div>- </Surface>- </div>- );-}--const MODEL_STEPS = 7;-const SWITCH_TO = 'gpt-5.6';--/**- * The same session after a model switch: Jacob picks GPT-5.6 in the- * composer and asks again; the answer comes from the same memory and tools.- * Phases: 1 point at the picker, 2 open it, 3 point at GPT-5.6, 4 select,- * 5 the prompt, 6 the calls, 7 the answer.- */-export function AgentModelsDemo() {- let root!: HTMLDivElement;- let frame!: HTMLDivElement;- let log: HTMLDivElement | undefined;- const [phase, setPhase] = createSignal(0);- const [automatic, setAutomatic] = createSignal(true);- const [model, setModel] = createSignal(AGENT_MODELS[0].id);- const [switched, setSwitched] = createSignal<string>();- const [menu, setMenu] = createSignal<JSX.CSSProperties>();- const [turns, setTurns] = createSignal<string[]>([]);- const select = (id: string) => {- if (id === model()) return;- setModel(id);- setSwitched(id);- };- const finish = () => {- select(SWITCH_TO);- setPhase(MODEL_STEPS);- setAutomatic(false);- };- const playback = createProductWalkthrough({- root: () => root,- steps: MODEL_STEPS,- reset: () => {},- reduced: finish,- delay: (step) => [0, 900, 700, 800, 700, 700, 700, 900][step] ?? 800,- advance: (step) => {- if (step === 4) {- select(SWITCH_TO);- setAutomatic(false);- }- setPhase(step);- },- });- const pause = () => {- setAutomatic(false);- playback.pause();- };- const pointer = createDemoPointer({- frame: () => frame,- target: () =>- automatic()- ? [- undefined,- '[aria-label="Model"]',- '[aria-label="Model"]',- `[data-model-option="${SWITCH_TO}"]`,- ][phase()]- : undefined,- });- // Anchor the menu frame where Kobalte places the picker: top-end, 4px gutter.- createEffect(() => {- if (!automatic() || phase() < 2 || phase() > 3) {- setMenu(undefined);- return;- }- const trigger = frame.querySelector<HTMLElement>('[aria-label="Model"]');- const stage = trigger?.closest<HTMLElement>('.dummy-main');- if (!trigger || !stage) return;- const anchor = trigger.getBoundingClientRect();- const bounds = stage.getBoundingClientRect();- // Kobalte shifts the menu to stay inside the viewport on narrow screens.- const width = Math.min(288, bounds.width - 16);- const left = Math.max(- 8,- Math.min(anchor.right - bounds.left - width, bounds.width - width - 8)- );- setMenu({- left: `${left}px`,- width: `${width}px`,- bottom: `${bounds.bottom - anchor.top + 4}px`,- });- });- followLatest(- () => log,- () => [phase(), turns().length]- );- return (- <div ref={root} class="agent-demo-flow">- <div ref={frame} class="agent-demo-frame" onFocusIn={pause}>- <ProductDemo- label="Switch models in the same agent session"- onInteract={pause}- height={540}- mobileHeight={640}- >- <AgentSession- title={northwind.title}- model={model()}- onModel={(id) => {- pause();- select(id);- }}- log={(element) => (log = element)}- onSend={(prompt) => {- pause();- setTurns((items) => [...items, prompt]);- }}- >- <NorthwindEarlier />- <AgentTurn>- <AgentPrompt text={northwind.prompt} />- </AgentTurn>- <AgentTurn>- <AgentToolGroup calls={northwind.calls} />- <AgentAnswer- text={northwind.answer.join('')}- mentions={northwindMentions}- />- </AgentTurn>- <Show when={switched()}>- {(id) => (- <AgentTurn>- <AgentActionLine label={`Model set to ${modelLabel(id())}`} />- </AgentTurn>- )}- </Show>- <Show when={phase() >= 5}>- <AgentTurn>- <AgentPrompt text={northwind.prompt} />- </AgentTurn>- <AgentTurn>- <Show when={phase() >= 6}>- <AgentToolGroup- calls={northwind.switchedCalls}- active={phase() < 7}- open={phase() < 7 ? true : undefined}- />- </Show>- <Show when={phase() >= 7}>- <AgentAnswer- text={northwind.switchedAnswer}- mentions={northwindMentions}- />- </Show>- </AgentTurn>- </Show>- <VisitorTurns- turns={turns()}- reply={northwind.switchedAnswer}- mentions={northwindMentions}- />- </AgentSession>- <Show when={menu()}>- {(style) => (- <ModelMenuFrame- value={model()}- highlighted={phase() === 3 ? SWITCH_TO : undefined}- style={style()}- />- )}- </Show>- </ProductDemo>- <Show when={pointer()}>- {(p) => (- <DemoCursor- label="Jacob"- class="agent-demo-pointer"- clicking={phase() === 2}- style={{ transform: `translate(${p().x}px, ${p().y}px)` }}- />- )}- </Show>- </div>- </div>- );-}-const MCP_URL = 'https://mcp-server.macro.com/mcp';const MCP_CONFIG = JSON.stringify({ mcpServers: { macro: { type: 'http', url: MCP_URL } } },@@ -695,18 +39,94 @@ const MCP_CARDS = [{ key: 'json', label: 'IDE', value: MCP_CONFIG },];-/** Settings → "Macro MCP server" with McpSetupCards; Claude Code open. */-export function AgentMcpDemo() {+/** Reuse the app’s connection controls without requiring a demo window. */+export function AgentMcpSetup() {const [open, setOpen] = createSignal(new Set(['claude-cli']));const [copied, setCopied] = createSignal<string>();let timer: ReturnType<typeof setTimeout> | undefined;onCleanup(() => clearTimeout(timer));- const copy = (key: string, value: string) => {- navigator.clipboard?.writeText(value).catch(() => {});+ const copy = async (key: string, value: string) => {+ try {+ if (!navigator.clipboard) return;+ await navigator.clipboard.writeText(value);+ } catch {+ return;+ }setCopied(key);clearTimeout(timer);timer = setTimeout(() => setCopied(undefined), 2000);};+ return (+ <div class="agent-mcp-cards">+ <For each={MCP_CARDS}>+ {(card) => {+ const expanded = () => open().has(card.key);+ return (+ <div class="overflow-hidden rounded-md border border-edge-muted bg-surface/70">+ <button+ type="button"+ class="flex items-center gap-2 w-full px-4 py-2 text-left"+ aria-expanded={expanded()}+ onClick={() =>+ setOpen((keys) => {+ const next = new Set(keys);+ if (next.has(card.key)) next.delete(card.key);+ else next.add(card.key);+ return next;+ })+ }+ >+ <CaretRight+ aria-hidden="true"+ class={`size-3 shrink-0 text-ink-muted transition-transform ${expanded() ? 'rotate-90' : ''}`}+ />+ <span class="text-sm text-ink-muted truncate">+ {card.label}+ </span>+ </button>+ <Show when={expanded()}>+ <div class="border-t border-edge-muted flex flex-col">+ <Show when={card.hint}>+ <div class="px-4 pt-3 text-xs text-ink-extra-muted">+ {card.hint}+ </div>+ </Show>+ <div class="flex items-start justify-between gap-3 px-4 py-3">+ <pre class="flex-1 min-w-0 overflow-x-auto text-[12px]/5 text-ink select-text cursor-text whitespace-pre-wrap break-all">+ <code>{card.value}</code>+ </pre>+ <Button+ variant={copied() === card.key ? 'outline' : 'plain'}+ size="sm"+ class="shrink-0"+ onClick={() => copy(card.key, card.value)}+ >+ <Show+ when={copied() === card.key}+ fallback={+ <>+ <Clipboard class="size-3.5" />+ Copy+ </>+ }+ >+ <Check class="size-3.5" />+ Copied+ </Show>+ </Button>+ </div>+ </div>+ </Show>+ </div>+ );+ }}+ </For>+ </div>+ );+}++/** Settings → "Macro MCP server" with McpSetupCards; Claude Code open. */+export function AgentMcpDemo() {return (<ProductDemolabel="Connect an MCP client to Macro"@@ -723,73 +143,7 @@ export function AgentMcpDemo() {Connect other agents and tools to your Macro workspace.</p></header>- <div class="agent-mcp-cards">- <For each={MCP_CARDS}>- {(card) => {- const expanded = () => open().has(card.key);- return (- <div class="overflow-hidden rounded-md border border-edge-muted bg-surface/70">- <button- type="button"- class="flex items-center gap-2 w-full px-4 py-2 text-left"- aria-expanded={expanded()}- onClick={() =>- setOpen((keys) => {- const next = new Set(keys);- if (next.has(card.key)) next.delete(card.key);- else next.add(card.key);- return next;- })- }- >- <CaretRight- aria-hidden="true"- class={`size-3 shrink-0 text-ink-muted transition-transform ${expanded() ? 'rotate-90' : ''}`}- />- <span class="text-sm text-ink-muted truncate">- {card.label}- </span>- </button>- <Show when={expanded()}>- <div class="border-t border-edge-muted flex flex-col">- <Show when={card.hint}>- <div class="px-4 pt-3 text-xs text-ink-extra-muted">- {card.hint}- </div>- </Show>- <div class="flex items-start justify-between gap-3 px-4 py-3">- <pre class="flex-1 min-w-0 overflow-x-auto text-[12px]/5 text-ink select-text cursor-text whitespace-pre-wrap break-all">- <code>{card.value}</code>- </pre>- <Button- variant={- copied() === card.key ? 'outline' : 'plain'- }- size="sm"- class="shrink-0"- onClick={() => copy(card.key, card.value)}- >- <Show- when={copied() === card.key}- fallback={- <>- <Clipboard class="size-3.5" />- Copy- </>- }- >- <Check class="size-3.5" />- Copied- </Show>- </Button>- </div>- </div>- </Show>- </div>- );- }}- </For>- </div>+ <AgentMcpSetup /></div></div></ProductDemo>diff --git a/apps/marketing/src/features/marketing/components/agents/AgentTranscript.tsx b/apps/marketing/src/features/marketing/components/agents/AgentTranscript.tsxindex 9647522983..7ade238368 100644--- a/apps/marketing/src/features/marketing/components/agents/AgentTranscript.tsx+++ b/apps/marketing/src/features/marketing/components/agents/AgentTranscript.tsx@@ -1,3 +1,4 @@+import Calendar from '@phosphor/calendar-blank.svg';import CaretRight from '@phosphor/caret-right.svg';import Envelope from '@phosphor/envelope.svg';import EnvelopeOpen from '@phosphor/envelope-open.svg';@@ -48,6 +49,7 @@ export type SearchHit = {sender?: string;snippet: string;time: string;+ onOpen?: () => void;};export type AgentToolCall =@@ -56,10 +58,18 @@ export type AgentToolCall =| { kind: 'read-channel'; channel: string; count: number }| { kind: 'read-call' }| { kind: 'read-document'; title: string }- | { kind: 'read-thread' };+ | { kind: 'read-thread' }+ | { kind: 'action'; label: string };export type AgentMention = {- kind: 'person' | 'task' | 'email' | 'document' | 'channel' | 'call';+ kind:+ | 'person'+ | 'task'+ | 'email'+ | 'document'+ | 'channel'+ | 'call'+ | 'calendar';person?: HomepagePersonId;/** A call mention shows its start time beside the name. */time?: string;@@ -68,7 +78,7 @@ export type AgentMention = {priority: TaskPriority;owner: HomepagePersonId;};- onOpen?: () => void;+ onOpen?: (trigger?: HTMLButtonElement) => void;};const HIT_ICONS: Record<SearchHit['kind'], Icon> = {@@ -83,6 +93,7 @@ const MENTION_ICONS: Record<Exclude<AgentMention['kind'], 'person' | 'task'>,Icon> = {+ calendar: Calendar,email: Envelope,document: File,channel: HashStraight,@@ -193,6 +204,7 @@ function SearchRow(props: {type="button"class="block w-full text-left hover:bg-hover"data-search-hit={hit.kind}+ onClick={() => hit.onOpen?.()}><div class="flex min-h-8 items-center gap-2 px-3 py-1.5 text-xs leading-4"><div@@ -270,6 +282,9 @@ function ToolCallRow(props: {}) {return (<Switch>+ <Match when={props.call.kind === 'action' && props.call}>+ {(call) => <ToolRow icon={ListChecks}>{call().label}</ToolRow>}+ </Match><Match when={props.call.kind === 'thought' && props.call}>{(call) => <AgentThought text={call().text} />}</Match>@@ -335,6 +350,7 @@ export function AgentToolGroup(props: {active?: boolean;open?: boolean;defaultOpen?: boolean;+ animateCollapse?: boolean;onOpenChange?: (open: boolean) => void;searchOpen?: boolean;onSearchOpenChange?: (open: boolean) => void;@@ -363,20 +379,31 @@ export function AgentToolGroup(props: {class={`size-4 shrink-0 opacity-0 transition-transform group-hover:opacity-100 group-focus-visible:opacity-100 motion-reduce:transition-none ${open() ? 'rotate-90' : ''}`}/></button>- <Show when={open()}>- <div role="region" aria-label="Tool calls">- <div class="flex min-w-0 flex-col pl-6">- <For each={props.calls}>- {(call) => (- <div class="min-h-8 shrink-0 agent-tool-enter">- <ToolCallRow- call={call}- searchOpen={props.searchOpen}- onSearchOpenChange={props.onSearchOpenChange}- />- </div>- )}- </For>+ <Show when={props.animateCollapse || open()}>+ <div+ classList={{ 'agent-tool-collapse': !!props.animateCollapse }}+ data-open={open()}+ aria-hidden={!open()}+ inert={!open()}+ >+ <div+ role="region"+ aria-label="Tool calls"+ classList={{ 'agent-tool-collapse-body': !!props.animateCollapse }}+ >+ <div class="flex min-w-0 flex-col pl-6">+ <For each={props.calls}>+ {(call) => (+ <div class="min-h-8 shrink-0 agent-tool-enter">+ <ToolCallRow+ call={call}+ searchOpen={props.searchOpen}+ onSearchOpenChange={props.onSearchOpenChange}+ />+ </div>+ )}+ </For>+ </div></div></div></Show>@@ -462,7 +489,7 @@ function MentionChip(props: { label: string; mention?: AgentMention }) {type="button"class={`demo-inline-mention agent-mention mention-${mention()?.kind}`}data-agent-mention={mention()?.kind}- onClick={() => open()()}+ onClick={(event) => open()(event.currentTarget)}>{content()}</button>diff --git a/apps/marketing/src/features/marketing/components/agents/AgentWorkflowStories.test.tsx b/apps/marketing/src/features/marketing/components/agents/AgentWorkflowStories.test.tsxnew file mode 100644index 0000000000..1af4fe671f--- /dev/null+++ b/apps/marketing/src/features/marketing/components/agents/AgentWorkflowStories.test.tsx@@ -0,0 +1,346 @@+import { cleanup, fireEvent, render, within } from '@solidjs/testing-library';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';+import DummyWorkspace from '../workspace/DummyWorkspace';+import {+ AgentDeliverableStory,+ AgentFeedbackWorkflow,+ AgentMeetingStory,+ AgentTeamworkStory,+} from './AgentWorkflowStories';++let intersections: IntersectionObserverCallback[];+let reduced = false;+beforeEach(() => {+ intersections = [];+ reduced = false;+ vi.useFakeTimers();+ vi.stubGlobal('fetch', vi.fn());+ Object.defineProperty(HTMLElement.prototype, 'scrollTo', {+ configurable: true,+ value: vi.fn(function (this: HTMLElement, options: ScrollToOptions) {+ this.scrollTop = options.top ?? this.scrollTop;+ }),+ });+ vi.spyOn(document, 'hidden', 'get').mockImplementation(() => false);+ vi.stubGlobal('matchMedia', () => ({+ get matches() {+ return reduced;+ },+ addEventListener: vi.fn(),+ removeEventListener: vi.fn(),+ }));+ vi.stubGlobal(+ 'IntersectionObserver',+ class {+ constructor(callback: IntersectionObserverCallback) {+ intersections.push(callback);+ }+ observe() {}+ disconnect() {}+ }+ );+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ observe() {}+ unobserve() {}+ disconnect() {}+ }+ );+});+afterEach(() => {+ cleanup();+ vi.advanceTimersByTime(100);+ expect(fetch).not.toHaveBeenCalled();+ expect(vi.getTimerCount()).toBe(0);+ vi.useRealTimers();+ vi.restoreAllMocks();+ vi.unstubAllGlobals();+ Reflect.deleteProperty(HTMLElement.prototype, 'scrollTo');+});+function visible() {+ for (const callback of intersections)+ callback(+ [{ isIntersecting: true } as IntersectionObserverEntry],+ {} as IntersectionObserver+ );+}++it('opens real feedback sources and preserves edits to the generated brief', async () => {+ const view = render(() => (+ <AgentFeedbackWorkflow workspace={createDummyWorkspace('messages')} />+ ));+ expect(+ within(+ view.getByRole('log', { name: 'Channel product-feedback' })+ ).getAllByRole('listitem')+ ).toHaveLength(2);+ const card = view.getByRole('button', {+ name: 'Client file upload feedback',+ });+ card.focus();+ fireEvent.click(card);+ const body = view.getByRole('textbox', { name: 'Document body' });+ body.textContent = 'Keep the upload selection, including filenames.';+ fireEvent.blur(body);+ fireEvent.click(view.getByRole('button', { name: 'Back to conversation' }));+ await Promise.resolve();+ expect(document.activeElement).toBe(card);+ fireEvent.click(card);+ expect(+ view.getByRole('textbox', { name: 'Document body' }).textContent+ ).toContain('including filenames');+ fireEvent.click(+ view.getByRole('button', { name: 'Upload size guidance task' })+ );+ expect(view.getByRole('textbox', { name: 'Task title' }).textContent).toBe(+ 'Add upload size guidance'+ );+ fireEvent.keyDown(+ view.getByRole('button', { name: 'Back to conversation' }),+ { key: 'Escape' }+ );+ fireEvent.click(view.getByRole('button', { name: 'customer-support' }));+ expect(view.getByText(/Beacon’s upload failed halfway/)).toBeTruthy();+});++it('connects meeting preparation to email, call notes, and the calendar', () => {+ const view = render(() => <AgentMeetingStory />);+ visible();+ vi.advanceTimersByTime(7000);+ expect(view.queryByRole('textbox', { name: 'Document body' })).toBeNull();+ fireEvent.click(view.getByRole('button', { name: 'latest email' }));+ expect(view.getByText(/We also need 12 clients/)).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Back to conversation' }));+ fireEvent.click(view.getByRole('button', { name: 'discovery call' }));+ expect(+ view.getByRole('textbox', { name: 'Document body' }).textContent+ ).toContain('Guest uploads were not discussed');+ fireEvent.click(view.getByRole('button', { name: 'Back to conversation' }));+ fireEvent.click(+ view.getByRole('button', { name: 'Beacon Studio Fri 9:30 AM' })+ );+ expect(+ view.getByRole('heading', { name: 'Beacon Studio · File uploads' })+ ).toBeTruthy();+});++it('shows human approval before the coding result and opens its review', () => {+ const view = render(() => <AgentTeamworkStory />);+ expect(view.queryByText(/build this\./)).toBeNull();+ expect(view.queryByRole('button', { name: 'Open session' })).toBeNull();+ visible();+ vi.advanceTimersByTime(2000);+ expect(view.getAllByText(/build this\./)).toHaveLength(1);+ expect(view.queryByRole('button', { name: 'Open session' })).toBeNull();+ vi.advanceTimersByTime(2000);+ fireEvent.click(+ view.getByRole('button', { name: /#248 · Improve the client upload flow/ })+ );+ expect(+ view.getByRole('heading', { name: 'Improve the client upload flow' })+ ).toBeTruthy();+ expect(view.queryByText('Merged')).toBeNull();+ fireEvent.keyDown(+ view.getByRole('button', { name: 'Back to conversation' }),+ { key: 'Escape' }+ );+ fireEvent.click(view.getByRole('button', { name: 'Open session' }));+ expect(+ view.getByRole('heading', { name: 'Build the client upload screen' })+ ).toBeTruthy();+});++it('lets a visitor inspect the design without autoplay taking over', async () => {+ const view = render(() => <AgentTeamworkStory />);+ visible();+ const image = view.getByRole('button', { name: 'Open upload screen mockup' });+ image.focus();+ fireEvent.pointerDown(image);+ fireEvent.click(image);+ vi.advanceTimersByTime(6000);+ expect(+ view.getByRole('img', {+ name: 'Client files mockup using Macro’s folder upload composer',+ })+ ).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Back to conversation' }));+ await Promise.resolve();+ expect(document.activeElement).toBe(image);+ expect(view.queryByRole('button', { name: 'Open session' })).toBeNull();+});++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.getByRole('button', { name: 'Open session' })).toBeTruthy();+ expect(+ view.queryByRole('heading', { name: 'Improve the client upload flow' })+ ).toBeNull();+});++it('uses the feedback workflow in the shared workspace and keeps navigation usable', () => {+ const view = render(() => <DummyWorkspace agentShowcase embedded />);+ expect(+ view.getByRole('log', { name: 'Channel product-feedback' })+ ).toBeTruthy();+ const navigation = within(+ view.getByRole('navigation', { name: 'Workspace navigation' })+ );+ fireEvent.click(navigation.getByRole('button', { name: 'Agents' }));+ expect(+ view.getByRole('heading', { name: 'What should we work on?' })+ ).toBeTruthy();+});++it('restores the agent showcase records when the sample is reset', () => {+ const view = render(() => <DummyWorkspace agentShowcase />);+ fireEvent.click(+ view.getByRole('button', { name: 'Client file upload feedback' })+ );+ const body = view.getByRole('textbox', { name: 'Document body' });+ body.textContent = 'Temporary local edit.';+ fireEvent.blur(body);+ fireEvent.click(view.getByRole('button', { name: 'Reset' }));+ fireEvent.click(+ view.getByRole('button', { name: 'Client file upload feedback' })+ );+ expect(+ view.getByRole('textbox', { name: 'Document body' }).textContent+ ).toContain('Upload recovery');+});++it('replies to Julia before visibly writing a substantive checklist', () => {+ const view = render(() => <AgentDeliverableStory />);+ const discussion = within(+ view.getByRole('log', { name: 'Document discussion' })+ );+ expect(discussion.getByText(/add a simple test checklist/)).toBeTruthy();+ expect(discussion.queryByText('Now')).toBeNull();+ const body = () => view.getByRole('textbox', { name: 'Document body' });+ expect(body().textContent).not.toContain('Before sharing with clients');+ visible();+ vi.advanceTimersByTime(1600);+ const reply = discussion.getByText(+ 'Sure, Julia. I’ll add a short checklist to the document.'+ );+ const replyRow = reply.closest('article');+ expect(replyRow?.getAttribute('data-reply')).toBe('true');+ expect(body().textContent).not.toContain('Before sharing with clients');+ vi.advanceTimersByTime(2600);+ 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);+ expect(body().textContent).toContain(+ 'Check that the client can see who is reviewing the file.'+ );+ expect(+ discussion.getByText(/Done, Julia. I added three checks/).closest('article')+ ).toBe(replyRow);+ expect(body().textContent).toContain('Guest uploads still need');+});++it('preserves a visitor’s edit when they take over the shared document', () => {+ const view = render(() => <AgentDeliverableStory />);+ visible();+ const body = view.getByRole('textbox', { name: 'Document body' });+ fireEvent.pointerDown(body);+ body.textContent = 'Keep our agreed scope.';+ fireEvent.blur(body);+ vi.advanceTimersByTime(6000);+ expect(body.textContent).toBe('Keep our agreed scope.');+});++it('shows the complete checklist and reply immediately with reduced motion', () => {+ reduced = true;+ const view = render(() => <AgentDeliverableStory />);+ expect(+ view.getByRole('textbox', { name: 'Document body' }).textContent+ ).toContain('Check that the client can see who is reviewing the file.');+});++it('keeps research rows stable and settles tools before revealing the answer', () => {+ const view = render(() => <AgentMeetingStory />);+ const first = view.container.querySelector('[data-tool-row]');+ expect(view.getByText('Checking tomorrow’s meetings…')).toBeTruthy();+ visible();+ vi.advanceTimersByTime(1300);+ expect(view.container.querySelector('[data-tool-row]')).toBe(first);+ expect(view.getByText('Reading the latest customer messages…')).toBeTruthy();+ vi.advanceTimersByTime(2600);+ expect(view.getByText('Reading the team’s conversation…')).toBeTruthy();+ expect(+ view+ .getByRole('region', { name: 'Tool calls' })+ .querySelectorAll('[data-tool-row]')+ ).toHaveLength(4);+ expect(view.queryByRole('button', { name: 'latest email' })).toBeNull();+ vi.advanceTimersByTime(1300);+ expect(+ view+ .getByRole('button', { name: 'Called 4 tools' })+ .getAttribute('aria-expanded')+ ).toBe('true');+ vi.advanceTimersByTime(700);+ expect(+ view+ .getByRole('button', { name: 'Called 4 tools' })+ .getAttribute('aria-expanded')+ ).toBe('false');+ expect(+ view.queryByRole('button', { name: 'Friday meeting brief' })+ ).toBeNull();+ vi.advanceTimersByTime(450);+ fireEvent.click(view.getByRole('button', { name: 'Friday meeting brief' }));+ expect(+ view.getByRole('textbox', { name: 'Document body' }).textContent+ ).toContain('guest uploads');+});++it('shows the complete meeting brief immediately for reduced motion', () => {+ reduced = true;+ const view = render(() => <AgentMeetingStory />);+ expect(+ view.getByRole('button', { name: 'Friday meeting brief' })+ ).toBeTruthy();+ expect(view.queryByText('Checking tomorrow’s meetings…')).toBeNull();+});++it('gives the visitor control of the meeting demo without continuing autoplay', () => {+ const view = render(() => <AgentMeetingStory />);+ visible();+ fireEvent.pointerDown(+ view.getByRole('textbox', { name: 'Message the agent' })+ );+ vi.advanceTimersByTime(6000);+ expect(+ view.queryByRole('button', { name: 'Friday meeting brief' })+ ).toBeNull();+});++it('follows the edit instead of chasing the discussion until the final reply', () => {+ const view = render(() => <AgentDeliverableStory />);+ const body = view.getByRole('textbox', { name: 'Document body' });+ const scroller = body.closest('.dummy-scroll') as HTMLElement;+ const log = view.getByRole('log', { name: 'Document discussion' });+ let replyBottom = 650;+ vi.spyOn(scroller, 'getBoundingClientRect').mockImplementation(+ () => new DOMRect(0, 0, 600, 500)+ );+ vi.spyOn(log, 'getBoundingClientRect').mockImplementation(+ () => new DOMRect(0, replyBottom - 180, 600, 180)+ );+ visible();+ vi.advanceTimersByTime(1700);+ const before = scroller.scrollTop;+ expect(before).toBeGreaterThan(0);+ replyBottom = 800;+ vi.advanceTimersByTime(2000);+ expect(scroller.scrollTop).toBe(before);+ expect(within(log).queryByText(/Done, Julia/)).toBeNull();+ vi.advanceTimersByTime(20000);+ expect(scroller.scrollTop).toBeGreaterThan(before);+});diff --git a/apps/marketing/src/features/marketing/components/agents/AgentWorkflowStories.tsx b/apps/marketing/src/features/marketing/components/agents/AgentWorkflowStories.tsxnew file mode 100644index 0000000000..da1323c0c1--- /dev/null+++ b/apps/marketing/src/features/marketing/components/agents/AgentWorkflowStories.tsx@@ -0,0 +1,940 @@+import ArrowLeft from '@phosphor/arrow-left.svg';+import GitPullRequest from '@phosphor/git-pull-request.svg';+import { Button } from '@ui';+import {+ createSignal,+ For,+ type JSX,+ Match,+ onCleanup,+ Show,+ Switch,+} from 'solid-js';+import type {+ WorkspaceComment,+ WorkspaceView,+} from '../../core/dummy-workspace';+import {+ createDummyWorkspace,+ type DummyWorkspace,+} from '../../primitives/createDummyWorkspace';+import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';+import { DemoAgentChip } from '../DemoAgentChip';+import { DemoPrDocument } from '../DemoPrDocument';+import { ProductDemo } from '../product/ProductPage';+import { WorkspaceAgents } from '../workspace/WorkspaceAgents';+import { WorkspaceCalendar } from '../workspace/WorkspaceCalendar';+import { WorkspaceChannel } from '../workspace/WorkspaceChannel';+import { WorkspaceDocuments } from '../workspace/WorkspaceDocuments';+import { WorkspaceEmail } from '../workspace/WorkspaceEmail';+import { WorkspaceTasks } from '../workspace/WorkspaceTasks';+import { AgentSession } from './AgentSession';+import {+ AgentAnswer,+ AgentPrompt,+ type AgentToolCall,+ AgentToolGroup,+ AgentTurn,+} from './AgentTranscript';+import { FolderComposerMockup } from './FolderComposerMockup';+import {+ FEEDBACK_BRIEF,+ MEETING_BRIEF,+ seedAgentWorkflows,+} from './workflowData';+import './agent-workflows.css';+import './agent-stories.css';++/** Navigation stays in one pane. Native record viewers share the same editable store. */+function createWorkflowNavigation(w: DummyWorkspace) {+ const [record, setRecord] = createSignal<{+ view: WorkspaceView;+ id?: string;+ }>();+ let trigger: HTMLElement | undefined;+ let frame!: HTMLDivElement;+ const open = (view: WorkspaceView, id?: string) => {+ if (!record() && document.activeElement instanceof HTMLElement)+ trigger = document.activeElement;+ setRecord({ view, id });+ queueMicrotask(() =>+ frame.querySelector<HTMLButtonElement>('[data-workflow-back]')?.focus()+ );+ };+ const back = () => {+ setRecord(undefined);+ queueMicrotask(() => trigger?.isConnected && trigger.focus());+ };+ const linked = {+ ...w,+ selected: () => record()?.id,+ channel: () =>+ record()?.view === 'messages'+ ? (record()?.id ?? w.channel())+ : w.channel(),+ view: () => record()?.view ?? 'messages',+ contentView: () => record()?.view ?? 'messages',+ open,+ openItem: open,+ backToCollection: back,+ } as DummyWorkspace;+ const Frame = (props: { children: JSX.Element }) => (+ <div+ ref={frame}+ class="agent-workflow-frame"+ onKeyDown={(e) => {+ if (e.key === 'Escape' && record()) {+ e.stopPropagation();+ back();+ }+ }}+ >+ <div class="agent-workflow-home" hidden={!!record()} inert={!!record()}>+ {props.children}+ </div>+ <Show when={record()}>+ <div class="agent-workflow-back">+ <Button data-workflow-back variant="plain" size="sm" onClick={back}>+ <ArrowLeft />+ Back to conversation+ </Button>+ </div>+ <Switch>+ <Match when={record()?.view === 'documents'}>+ <WorkspaceDocuments+ workspace={linked}+ relatedContent={+ <Show+ when={+ record()?.id === FEEDBACK_BRIEF ||+ record()?.id === MEETING_BRIEF+ }+ >+ <WorkflowSources+ open={open}+ meeting={record()?.id === MEETING_BRIEF}+ />+ </Show>+ }+ />+ </Match>+ <Match when={record()?.view === 'tasks'}>+ <WorkspaceTasks workspace={linked} filter="all" />+ </Match>+ <Match when={record()?.view === 'agents'}>+ <WorkspaceAgents workspace={linked} />+ </Match>+ <Match when={record()?.view === 'messages'}>+ <WorkspaceChannel workspace={linked} />+ </Match>+ <Match when={record()?.view === 'email'}>+ <WorkspaceEmail workspace={linked} tab="all" account="all" />+ </Match>+ <Match when={record()?.view === 'calendar'}>+ <WorkspaceCalendar workspace={linked} />+ </Match>+ </Switch>+ </Show>+ </div>+ );+ return { open, Frame, workspace: { ...w, open, openItem: open } };+}++function WorkflowSources(props: {+ open: (view: WorkspaceView, id?: string) => void;+ meeting?: boolean;+}) {+ return (+ <AgentAnswer+ 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)'+ : '')+ }+ mentions={{+ support: {+ kind: 'channel',+ onOpen: () => props.open('messages', 'customer-support'),+ },+ notes: {+ kind: 'document',+ onOpen: () => props.open('documents', 'portal-testing'),+ },+ task: {+ kind: 'task',+ onOpen: () => props.open('tasks', 'upload-help'),+ },+ email: {+ kind: 'email',+ onOpen: () => props.open('email', 'beacon-email'),+ },+ call: {+ kind: 'document',+ onOpen: () => props.open('documents', 'beacon-call'),+ },+ }}+ />+ );+}++export function AgentFeedbackWorkflow(props: { workspace: DummyWorkspace }) {+ const w = props.workspace;+ seedAgentWorkflows(w);+ w.setChannel('product-feedback');+ const nav = createWorkflowNavigation(w);+ if (+ !w.data.channels.find((c) => c.id === 'product-feedback')?.messages.length+ )+ w.setData('channels', (c) => c.id === 'product-feedback', 'messages', [+ {+ id: 'feedback-before-1',+ person: 'julia',+ time: '9:34 AM',+ body: 'Beacon hit the upload issue again. added their notes in customer-support',+ },+ {+ id: 'feedback-before-2',+ person: 'teo',+ time: '9:36 AM',+ body: 'thanks. the size warning is already in progress, so we can skip that one',+ },+ {+ id: 'feedback-before-3',+ person: 'valentina',+ time: '9:38 AM',+ body: 'Westlake also asked who’s reviewing their files. same thing as last week',+ },+ {+ id: 'feedback-request',+ person: 'jacob',+ time: '9:41 AM',+ body: '@[Macro](demo-mention:macro), what’s left to fix with client file uploads?',+ },+ {+ id: 'feedback-result',+ replyTo: 'feedback-request',+ person: 'macro',+ time: '9:42 AM',+ body: 'Created Client file upload feedback. Combined the reports and kept the existing upload-help task. Guest access still needs a decision.',+ },+ {+ id: 'feedback-after-1',+ replyTo: 'feedback-request',+ person: 'teo',+ time: '9:44 AM',+ body: 'i’ll take upload recovery. can reproduce it on my phone too',+ },+ {+ id: 'feedback-after-2',+ replyTo: 'feedback-request',+ person: 'julia',+ time: '9:45 AM',+ body: 'i’ll check the reviewer labels with Beacon tomorrow',+ },+ {+ id: 'feedback-after-3',+ person: 'jacob',+ time: '9:47 AM',+ body: 'let’s leave guest access for now. fix those two first',+ },+ ]);+ return (+ <nav.Frame>+ <WorkspaceChannel+ workspace={nav.workspace}+ renderMessageBody={(message) => {+ if (message.id === 'feedback-result')+ return (+ <AgentAnswer+ text={+ '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.'+ }+ mentions={{+ support: {+ kind: 'channel',+ onOpen: () => nav.open('messages', 'customer-support'),+ },+ notes: {+ kind: 'document',+ onOpen: () => nav.open('documents', 'portal-testing'),+ },+ brief: {+ kind: 'document',+ onOpen: () => nav.open('documents', FEEDBACK_BRIEF),+ },+ }}+ />+ );+ }}+ />+ </nav.Frame>+ );+}++/** Keep new output above both the window edge and the site's viewport fade. */+function followAgentOutput(+ scroller: HTMLElement,+ target: HTMLElement,+ host: HTMLElement,+ smooth = false+) {+ const vignette = document.querySelector('.site-page-vignette');+ const fade = vignette+ ? Number.parseFloat(getComputedStyle(vignette, '::after').height) || 0+ : 0;+ const viewport = scroller.getBoundingClientRect();+ const bottom = Math.min(viewport.bottom, window.innerHeight - fade) - 24;+ // Reserve space when the demo extends below the visible part of the page.+ // Otherwise scrollTop clamps before the reply can clear the page fade.+ host.style.setProperty(+ '--agent-scroll-reserve',+ `${Math.max(0, viewport.bottom - bottom)}px`+ );+ const delta = target.getBoundingClientRect().bottom - bottom;+ if (delta > 0) {+ if (smooth)+ scroller.scrollTo({+ top: scroller.scrollTop + delta,+ behavior: 'smooth',+ });+ else scroller.scrollTop += delta;+ }+}++/** A visible request, direct reply, and typed edit in the same shared document. */+export function AgentDeliverableStory() {+ const w = createDummyWorkspace('documents');+ seedAgentWorkflows(w);+ w.open('documents', FEEDBACK_BRIEF);+ const original = w.data.documents.find(+ (doc) => doc.id === FEEDBACK_BRIEF+ )!.body;+ const heading = '\n\n## Before sharing with clients\n\n';+ const checks = [+ 'Send a file and confirm the reviewer can open it.',+ 'Disconnect halfway through, then retry without choosing the file again.',+ 'Check that the client can see who is reviewing the file.',+ ];+ const frames = [heading.trimEnd()];+ let complete = heading;+ for (const check of checks) {+ for (let end = 3; end < check.length + 3; end += 3)+ frames.push(complete + '- [ ] ' + check.slice(0, end));+ complete += '- [ ] ' + check + '\n';+ frames.push(complete.trimEnd());+ }+ let root!: HTMLDivElement;+ let editorFrame!: HTMLDivElement;+ let pendingFrame: number | undefined;+ const [typing, setTyping] = createSignal(false);+ const [responseState, setResponseState] = createSignal('ready');+ const [caret, setCaret] = createSignal<{+ left: number;+ top: number;+ height: number;+ }>();+ w.setData('documents', (doc) => doc.id === FEEDBACK_BRIEF, 'comments', [+ {+ id: 'brief-update-request',+ person: 'julia',+ time: '',+ body: '@[Macro](demo-mention:macro), add a simple test checklist before we share this with clients.',+ },+ ]);+ const reply = (body: string) => {+ const doc = w.data.documents.find((doc) => doc.id === FEEDBACK_BRIEF)!;+ if (doc.comments.some((comment) => comment.id === 'brief-update-result')) {+ w.setData(+ 'documents',+ (doc) => doc.id === FEEDBACK_BRIEF,+ 'comments',+ (comment) => comment.id === 'brief-update-result',+ 'body',+ body+ );+ } else {+ w.setData(+ 'documents',+ (doc) => doc.id === FEEDBACK_BRIEF,+ 'comments',+ (comments) => [+ ...comments,+ {+ id: 'brief-update-result',+ replyTo: 'brief-update-request',+ person: 'macro' as const,+ time: '',+ body,+ },+ ]+ );+ }+ };+ const reveal = (writing: boolean) => {+ if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame);+ pendingFrame = requestAnimationFrame(() => {+ pendingFrame = undefined;+ if (writing && !typing()) return;+ const body = root.querySelector<HTMLElement>(+ '[aria-label="Document body"]'+ );+ const log = root.querySelector<HTMLElement>(+ '[aria-label="Document discussion"]'+ );+ const scroller = body?.closest<HTMLElement>('.dummy-scroll');+ if (!body || !scroller) return;+ const last = body.querySelector(+ '.website-demo-markdown'+ )?.lastElementChild;+ const leaf = last?.tagName === 'UL' ? last.lastElementChild : last;+ // Follow the edited line while writing. The final reply only scrolls+ // inside the document pane, independent of the page’s decorative fade.+ const target = writing ? leaf : log;+ if (!target) return;+ const delta =+ target.getBoundingClientRect().bottom -+ scroller.getBoundingClientRect().bottom ++ 24;+ if (delta > 0) {+ if (writing) scroller.scrollTop += delta;+ else+ scroller.scrollTo({+ top: scroller.scrollTop + delta,+ behavior: 'smooth',+ });+ }+ if (writing && leaf) {+ const walker = document.createTreeWalker(body, NodeFilter.SHOW_TEXT);+ let lastText: Node | undefined;+ while (walker.nextNode()) {+ if (walker.currentNode.textContent?.trim())+ lastText = walker.currentNode;+ }+ const range = document.createRange();+ if (lastText) {+ const length = lastText.textContent?.trimEnd().length ?? 0;+ range.setStart(lastText, Math.max(0, length - 1));+ range.setEnd(lastText, length);+ } else range.selectNodeContents(leaf);+ const end = range.getBoundingClientRect?.();+ if (!end) return;+ const frame = editorFrame.getBoundingClientRect();+ setCaret({+ left: end.right - frame.left,+ top: end.top - frame.top,+ height: end.height || 20,+ });+ }+ });+ };+ const finish = () => {+ w.setData(+ 'documents',+ (doc) => doc.id === FEEDBACK_BRIEF,+ 'body',+ original + complete.trimEnd()+ );+ setTyping(false);+ setCaret(undefined);+ setResponseState('done');+ reply(+ 'Done, Julia. I added three checks to the document: sending a file, retrying after a lost connection, and seeing who reviews it.'+ );+ };+ const playback = createProductWalkthrough({+ root: () => root,+ steps: frames.length + 3,+ visibilityThreshold: 0.5,+ reset: () => {},+ delay: (step) => {+ if (step <= 2) return 1600;+ if (step === frames.length + 3) return 260;+ return frames[step - 2] === frames[step - 3] ? 150 : 35;+ },+ reduced: finish,+ advance: (step) => {+ if (step === 1) {+ reply('Sure, Julia. I’ll add a short checklist to the document.');+ reveal(false);+ } else if (step <= frames.length + 1) {+ setTyping(true);+ w.setData(+ 'documents',+ (doc) => doc.id === FEEDBACK_BRIEF,+ 'body',+ original + frames[step - 2]+ );+ reveal(true);+ } else if (step === frames.length + 2) {+ setTyping(false);+ setCaret(undefined);+ setResponseState('settling');+ } else {+ finish();+ reveal(false);+ }+ },+ });+ const pause = () => {+ playback.pause();+ setTyping(false);+ setCaret(undefined);+ if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame);+ pendingFrame = undefined;+ };+ onCleanup(() => {+ if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame);+ });+ return (+ <ProductDemo+ ref={(el) => (root = el)}+ label="Macro adds Julia’s test checklist to the document"+ height={600}+ mobileHeight={700}+ onInteract={pause}+ >+ <div+ ref={editorFrame}+ class="agent-workflow-frame agent-editing-frame"+ data-response-state={responseState()}+ onWheel={pause}+ >+ <WorkspaceDocuments workspace={w} />+ <Show when={typing() && caret()}>+ {(position) => (+ <div+ class="agent-writing-caret"+ aria-label="Macro is typing in the document"+ style={{+ left: `${position().left}px`,+ top: `${position().top}px`,+ height: `${position().height}px`,+ }}+ >+ <span>Macro</span>+ </div>+ )}+ </Show>+ </div>+ </ProductDemo>+ );+}++export function AgentMeetingStory() {+ const w = createDummyWorkspace('agents');+ seedAgentWorkflows(w);+ w.setCalendarDate('2026-10-09');+ const nav = createWorkflowNavigation(w);+ const [turns, setTurns] = createSignal<string[]>([]);+ const [phase, setPhase] = createSignal(0);+ const [toolsOpen, setToolsOpen] = createSignal(true);+ const research: AgentToolCall[] = [+ { kind: 'action', label: 'Check Friday’s calendar' },+ { kind: 'read-thread' },+ { kind: 'read-document', title: 'Beacon discovery call' },+ { kind: 'read-channel', channel: 'customer-support', count: 6 },+ ];+ let root!: HTMLDivElement;+ let frame!: HTMLDivElement;+ let pendingFrame: number | undefined;+ const brief = w.data.documents.find((doc) => doc.id === MEETING_BRIEF)!;+ w.setData('documents', (docs) =>+ docs.filter((doc) => doc.id !== MEETING_BRIEF)+ );+ const follow = () => {+ if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame);+ pendingFrame = requestAnimationFrame(() => {+ pendingFrame = undefined;+ const log = frame.querySelector<HTMLElement>('.agent-transcript');+ const latest = log?.lastElementChild;+ if (log && latest)+ followAgentOutput(log, latest as HTMLElement, frame, true);+ });+ };+ const finish = () => {+ if (!w.data.documents.some((doc) => doc.id === MEETING_BRIEF))+ w.setData('documents', (docs) => [...docs, brief]);+ setPhase(6);+ setToolsOpen(false);+ };+ const playback = createProductWalkthrough({+ root: () => root,+ steps: 6,+ visibilityThreshold: 0.5,+ reset: () => {},+ delay: (step) => (step === 5 ? 700 : step === 6 ? 450 : 1300),+ reduced: finish,+ advance: (step) => {+ if (step === 6) finish();+ else {+ setPhase(step);+ if (step === 5) setToolsOpen(false);+ }+ if (step !== 5) follow();+ },+ });+ const pause = () => {+ playback.pause();+ if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame);+ pendingFrame = undefined;+ };+ onCleanup(() => {+ if (pendingFrame !== undefined) cancelAnimationFrame(pendingFrame);+ });+ const mentions = {+ meeting: {+ kind: 'calendar' as const,+ time: 'Fri 9:30 AM',+ onOpen: () => nav.open('calendar', 'beacon-meeting'),+ },+ brief: {+ kind: 'document' as const,+ onOpen: () => nav.open('documents', MEETING_BRIEF),+ },+ email: {+ kind: 'email' as const,+ onOpen: () => nav.open('email', 'beacon-email'),+ },+ call: {+ kind: 'document' as const,+ onOpen: () => nav.open('documents', 'beacon-call'),+ },+ };+ return (+ <ProductDemo+ ref={(el) => (root = el)}+ onInteract={pause}+ label="Prepare for tomorrow’s meetings"+ height={660}+ mobileHeight={720}+ >+ <div+ ref={frame}+ class="agent-workflow-frame agent-meeting-frame"+ onWheel={pause}+ >+ <nav.Frame>+ <AgentSession+ title="Tomorrow’s meetings"+ onSend={(text) => setTurns((all) => [...all, text])}+ >+ <AgentTurn>+ <AgentPrompt text="What should I know before tomorrow’s customer calls? Make me a brief." />+ </AgentTurn>+ <AgentTurn>+ <AgentToolGroup+ active={phase() < 4}+ animateCollapse+ open={toolsOpen()}+ onOpenChange={setToolsOpen}+ calls={research.slice(0, Math.min(4, phase() + 1))}+ />+ <Show when={phase() < 5}>+ <span class="magic-chip-shimmer text-sm">+ {+ [+ 'Checking tomorrow’s meetings…',+ 'Reading the latest customer messages…',+ 'Reading the earlier call…',+ 'Reading the team’s conversation…',+ 'Preparing your meeting brief…',+ ][phase()]+ }+ </span>+ </Show>+ <Show when={phase() === 6}>+ <div class="agent-meeting-answer">+ <AgentAnswer+ text="Beacon’s scope changed. The @[latest email](agent:email) adds 12 external clients; the @[discovery call](agent:call) only covered 8 internal reviewers."+ mentions={mentions}+ />+ <AgentAnswer+ text={+ 'I put the background and open questions in @[Friday meeting brief](agent:brief).\n\n- 9:30 AM · Beacon: resolve guest access before agreeing to a trial date.\n- 11:00 AM · Westlake: choose a feedback owner; their request is already in the file upload brief.'+ }+ mentions={mentions}+ />+ <AgentAnswer+ text="Calendar: @[Beacon Studio](agent:meeting)."+ mentions={mentions}+ />+ </div>+ </Show>+ </AgentTurn>+ <For each={turns()}>+ {(text) => (+ <AgentTurn>+ <AgentPrompt text={text} />+ </AgentTurn>+ )}+ </For>+ </AgentSession>+ </nav.Frame>+ </div>+ </ProductDemo>+ );+}++export function AgentTeamworkStory() {+ const w = createDummyWorkspace('messages');+ seedAgentWorkflows(w);+ w.setChannel('client-files');+ w.setChannelThread('design-request');+ const sceneMessages: WorkspaceComment[] = [+ {+ id: 'design-request',+ person: 'jacob',+ time: '10:04 AM',+ body: '@Macro, mock this up from the client brief.',+ },+ {+ id: 'design-result',+ replyTo: 'design-request',+ person: 'macro',+ time: '10:05 AM',+ body: 'Here’s the mockup.',+ },+ {+ id: 'design-approval',+ replyTo: 'design-request',+ person: 'jacob',+ time: '10:06 AM',+ body: '@Cursor, build this.',+ },+ {+ id: 'code-result',+ replyTo: 'design-request',+ person: 'cursor',+ time: '10:09 AM',+ body: '',+ },+ ];+ const teamHistory: WorkspaceComment[] = [+ {+ id: 'design-context',+ person: 'julia',+ time: '9:54 AM',+ body: 'client brief is updated. they want to see who’s reviewing each upload',+ },+ {+ id: 'design-question',+ person: 'teo',+ time: '9:56 AM',+ body: 'same screen or a separate page?',+ },+ {+ id: 'design-answer',+ person: 'julia',+ time: '9:57 AM',+ body: 'same screen. keep it simple',+ },+ ];+ w.setData('channels', (all) => [+ ...all,+ {+ id: 'client-files',+ messages: [...teamHistory, ...sceneMessages.slice(0, 2)],+ },+ ]);+ const nav = createWorkflowNavigation(w);+ let root!: HTMLDivElement;+ const [detail, setDetail] = createSignal<'design' | 'session' | 'pr'>();+ const [sessionTurns, setSessionTurns] = createSignal<string[]>([]);+ const advance = (step: number) => {+ w.setData('channels', (c) => c.id === 'client-files', 'messages', [+ ...teamHistory,+ ...sceneMessages.slice(0, step + 2),+ ...(step === 2+ ? [+ {+ id: 'design-followup',+ person: 'julia' as const,+ time: '10:10 AM',+ body: 'i’ll try the preview before we send it over',+ },+ ]+ : []),+ ]);+ };+ const playback = createProductWalkthrough({+ root: () => root,+ steps: 2,+ reset: () => {},+ delay: () => 2000,+ reduced: () => advance(2),+ advance,+ });+ let trigger: HTMLElement | undefined;+ const show = (next: 'design' | 'session' | 'pr') => {+ playback.pause();+ trigger = document.activeElement as HTMLElement;+ setDetail(next);+ queueMicrotask(() =>+ root.querySelector<HTMLButtonElement>('[data-detail-back]')?.focus()+ );+ };+ const back = () => {+ setDetail(undefined);+ queueMicrotask(() => trigger?.isConnected && trigger.focus());+ };+ return (+ <ProductDemo+ ref={(el) => (root = el)}+ label="People, Macro, and Cursor working together"+ height={820}+ mobileHeight={780}+ onInteract={playback.pause}+ >+ <div+ class="agent-workflow-frame"+ onKeyDown={(e) => {+ if (e.key === 'Escape' && detail()) {+ e.stopPropagation();+ back();+ }+ }}+ >+ <div class="agent-workflow-home" hidden={!!detail()} inert={!!detail()}>+ <nav.Frame>+ <WorkspaceChannel+ workspace={nav.workspace}+ renderMessageBody={(message) =>+ message.id === 'design-request' ? (+ <AgentAnswer+ text="@[Macro](agent:macro), mock this up from the @[client brief](agent:brief)."+ mentions={{+ macro: { kind: 'person', person: 'macro' },+ brief: {+ kind: 'document',+ onOpen: () => nav.open('documents', FEEDBACK_BRIEF),+ },+ }}+ />+ ) : message.id === 'design-approval' ? (+ <AgentAnswer+ text="@[Cursor](agent:cursor), build this."+ mentions={{ cursor: { kind: 'person', person: 'cursor' } }}+ />+ ) : undefined+ }+ renderMessageDetails={(message) => (+ <>+ <Show when={message.id === 'design-result'}>+ <button+ type="button"+ class="agent-design-attachment"+ aria-label="Open upload screen mockup"+ onClick={() => show('design')}+ >+ <FolderComposerMockup />+ </button>+ </Show>+ <Show when={message.id === 'code-result'}>+ <DemoAgentChip+ agentSessionId="portal-implementation"+ requester="Jacob"+ request="@Cursor, build this."+ markdown="Ready for review."+ onOpen={() => show('session')}+ headerActions={null}+ pullRequest={+ <button+ type="button"+ class="agent-workflow-pr"+ onClick={() => show('pr')}+ >+ <GitPullRequest class="size-3 text-success" />+ <span class="demo-cursor-pr-title">+ #248 · Improve the client upload flow+ </span>+ </button>+ }+ />+ </Show>+ </>+ )}+ />+ </nav.Frame>+ </div>+ <Show when={detail()}>+ <div class="agent-workflow-back">+ <Button data-detail-back variant="plain" size="sm" onClick={back}>+ <ArrowLeft />+ Back to conversation+ </Button>+ </div>+ <Switch>+ <Match when={detail() === 'design'}>+ <div class="dummy-scroll p-6">+ <h3 class="mb-4 text-sm">Upload screen mockup</h3>+ <FolderComposerMockup />+ </div>+ </Match>+ <Match when={detail() === 'session'}>+ <AgentSession+ title="Build the client upload screen"+ onSend={(text) => setSessionTurns((all) => [...all, text])}+ >+ <AgentTurn>+ <AgentPrompt text="Build this from the mockup in the thread." />+ </AgentTurn>+ <AgentTurn>+ <AgentToolGroup+ calls={[+ {+ kind: 'read-document',+ title: 'Client file upload feedback',+ },+ {+ kind: 'action',+ label: 'Read approved mockup and thread',+ },+ {+ kind: 'action',+ label: 'Implemented the file upload composer',+ },+ { kind: 'action', label: 'Opened pull request #248' },+ ]}+ />+ <AgentAnswer+ text="Built the upload screen from the mockup. The PR is ready for review."+ mentions={{}}+ />+ <button+ type="button"+ class="dummy-entity-link"+ onClick={() => setDetail('pr')}+ >+ <GitPullRequest class="size-4 text-success" />+ Review pull request #248+ </button>+ </AgentTurn>+ <For each={sessionTurns()}>+ {(text) => (+ <AgentTurn>+ <AgentPrompt text={text} />+ </AgentTurn>+ )}+ </For>+ </AgentSession>+ </Match>+ <Match when={detail() === 'pr'}>+ <div class="dummy-scroll agent-pr-page">+ <DemoPrDocument+ record={{+ name: 'Improve the client upload flow',+ 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.',+ }}+ />+ </div>+ </Match>+ </Switch>+ </Show>+ </div>+ </ProductDemo>+ );+}diff --git a/apps/marketing/src/features/marketing/components/agents/FolderComposerMockup.tsx b/apps/marketing/src/features/marketing/components/agents/FolderComposerMockup.tsxnew file mode 100644index 0000000000..1a8bc97b91--- /dev/null+++ b/apps/marketing/src/features/marketing/components/agents/FolderComposerMockup.tsx@@ -0,0 +1,95 @@+import ArrowsOut from '@phosphor/arrows-out.svg';+import Folder from '@phosphor/folder.svg';+import Upload from '@phosphor/upload-simple.svg';+import X from '@phosphor/x.svg';+import { buttonClasses } from '@ui/components/Button';+import { createSignal, onCleanup, onMount } from 'solid-js';++/** Static presentation copied from FolderComposer / EntityComposer at 5d5bc657.+ * This is the design attachment; its controls are image content, not live inputs. */+export function FolderComposerMockup() {+ let root!: HTMLDivElement;+ const [scale, setScale] = createSignal(1);+ onMount(() => {+ const measure = () => setScale(Math.min(1, root.clientWidth / 600));+ const observer = new ResizeObserver(measure);+ observer.observe(root);+ measure();+ onCleanup(() => observer.disconnect());+ });+ return (+ <div+ ref={root}+ class="agent-folder-preview"+ style={{ height: `${480 * scale()}px` }}+ role="img"+ aria-label="Client files mockup using Macro’s folder upload composer"+ >+ <div+ class="agent-folder-mockup"+ style={{ transform: `scale(${scale()})` }}+ >+ <div class="portal-scope flex flex-col relative h-full min-h-0 p-4 gap-4">+ <div class="flex items-center gap-1">+ <div class="flex-1 flex items-center">+ <ArrowsOut class="size-5 text-ink-muted" />+ </div>+ <span class={buttonClasses({ size: 'sm', variant: 'outline' })}>+ Clear Draft+ </span>+ <X class="size-5 ml-2 text-ink-muted" />+ </div>+ <div class="flex-1 min-h-0 flex flex-col gap-4 overflow-hidden">+ <div class="shrink-0 flex gap-2 items-start px-2 text-xl/7 font-medium">+ Client files+ </div>+ <div class="flex min-h-7 items-center gap-2 px-2 text-sm text-ink-muted">+ <span class="size-2 rounded-full bg-pink" />+ Customers<span class="ml-2">+</span>+ </div>+ <div class="mx-2 flex min-h-60 flex-1 flex-col rounded-lg border border-dashed border-edge-muted p-4">+ <div class="flex min-h-44 flex-1 flex-col items-center justify-center gap-3 text-center">+ <Upload class="size-8 text-ink-extra-muted" />+ <div>+ <p class="text-sm text-ink">+ Drop files or nested folders here+ </p>+ <p class="mt-1 text-xs text-ink-muted">+ Add everything you want inside this folder.+ </p>+ </div>+ <div class="flex justify-center gap-2">+ <span+ class={buttonClasses({ size: 'sm', variant: 'outline' })}+ >+ Add files+ </span>+ <span+ class={buttonClasses({ size: 'sm', variant: 'outline' })}+ >+ Add folder+ </span>+ </div>+ </div>+ </div>+ </div>+ <div class="shrink-0 flex justify-between items-center gap-2">+ <span class="flex items-center gap-1.5 px-2 text-xs text-ink-muted">+ <Folder class="size-4" />+ Inside My Files+ </span>+ <span+ class={buttonClasses({+ variant: 'strong',+ size: 'md',+ class: 'gap-3',+ })}+ >+ Create Folder <span class="text-xs text-ink-muted">⌘ ↵</span>+ </span>+ </div>+ </div>+ </div>+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/agents/LaunchConversation.tsx b/apps/marketing/src/features/marketing/components/agents/LaunchConversation.tsxindex 2f03d3bdc5..6e19ff30e9 100644--- a/apps/marketing/src/features/marketing/components/agents/LaunchConversation.tsx+++ b/apps/marketing/src/features/marketing/components/agents/LaunchConversation.tsx@@ -34,14 +34,14 @@ const LAUNCH_CALLS: AgentToolCall[] = [{kind: 'email',title: 'Ready for Thursday',- sender: 'Teo Nys',+ sender: 'Teo',snippet: 'The invite flow is ready. Let’s run through the checklist.',time: '9:18 AM',},{kind: 'channel',title: 'launch',- sender: 'Julia Westphal',+ sender: 'Julia',snippet: 'Last pass before Thursday.',time: '9:20 AM',},diff --git a/apps/marketing/src/features/marketing/components/agents/NorthwindCollaboration.tsx b/apps/marketing/src/features/marketing/components/agents/NorthwindCollaboration.tsxnew file mode 100644index 0000000000..bc2401d556--- /dev/null+++ b/apps/marketing/src/features/marketing/components/agents/NorthwindCollaboration.tsx@@ -0,0 +1,175 @@+import X from '@phosphor/x.svg';+import { Button } from '@ui';+import { createSignal, onCleanup, Show } from 'solid-js';+import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';+import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';+import { DemoCursor } from '../DemoCursor';+import { ProductDemo } from '../product/ProductPage';+import { WorkspaceChannel } from '../workspace/WorkspaceChannel';+import { WorkspaceDocuments } from '../workspace/WorkspaceDocuments';+import { WorkspaceTasks } from '../workspace/WorkspaceTasks';+import { AgentAnswer, type AgentMention } from './AgentTranscript';+import { createDemoPointer } from './createDemoPointer';+import {+ NORTHWIND_COLLAB_PLAN,+ NORTHWIND_HUMAN_NOTE,+ NORTHWIND_PLAN,+ seedNorthwind,+} from './northwindScenario';+import './agent-stories.css';++/** The same native document presentation used by /demo. Both collaborators'+ * changes land in its local store. A visitor's first input owns the scene. */+export function NorthwindCollaboration() {+ const w = createDummyWorkspace('documents');+ seedNorthwind(w);+ w.open('documents', 'northwind-plan');+ let root!: HTMLDivElement;+ let frame!: HTMLDivElement;+ const [phase, setPhase] = createSignal(0);+ const [cursors, setCursors] = createSignal(true);+ let scrollFrame: number | undefined;+ onCleanup(() => {+ if (scrollFrame !== undefined) cancelAnimationFrame(scrollFrame);+ });+ const revealEdits = () => {+ if (scrollFrame !== undefined) cancelAnimationFrame(scrollFrame);+ scrollFrame = requestAnimationFrame(() => {+ if (!cursors()) return;+ const field = frame.querySelector<HTMLElement>(+ '[aria-label="Document body"]'+ );+ const scroller = field?.closest<HTMLElement>('.dummy-scroll');+ const heading = field?.querySelector('h2:nth-of-type(4)');+ if (!scroller || !heading) return;+ const top =+ scroller.scrollTop ++ heading.getBoundingClientRect().top -+ scroller.getBoundingClientRect().top -+ 100;+ scroller.scrollTo?.({ top: Math.max(0, top), behavior: 'smooth' });+ });+ };+ const write = (body: string) =>+ w.setData('documents', (d) => d.id === 'northwind-plan', 'body', body);+ const finish = () => {+ write(NORTHWIND_COLLAB_PLAN + NORTHWIND_HUMAN_NOTE);+ setPhase(4);+ };+ const playback = createProductWalkthrough({+ root: () => root,+ steps: 4,+ reset: () => {},+ delay: () => 1300,+ reduced: () => {+ finish();+ setCursors(false);+ },+ advance: (step) => {+ setPhase(step);+ if (step === 1)+ write(+ NORTHWIND_PLAN ++ '\n\n## Customer coordination\n\nMarcus will send the pilot names.'+ );+ if (step === 2)+ write(+ NORTHWIND_COLLAB_PLAN ++ '\n\n## Customer coordination\n\nMarcus will send the pilot names.'+ );+ if (step === 3) finish();+ if (step === 4) setCursors(false);+ else revealEdits();+ },+ });+ const pause = () => {+ playback.pause();+ setCursors(false);+ };+ const agent = createDemoPointer({+ frame: () => frame,+ target: () =>+ cursors() && phase() >= 1+ ? '[aria-label="Document body"] h2:nth-of-type(4)'+ : undefined,+ });+ const person = createDemoPointer({+ frame: () => frame,+ target: () =>+ cursors() && phase() >= 1+ ? '[aria-label="Document body"] p:last-of-type'+ : undefined,+ });+ const mentions: Record<string, AgentMention> = {+ sso: { kind: 'task', onOpen: () => w.open('tasks', 'northwind-sso') },+ training: {+ kind: 'task',+ onOpen: () => w.open('tasks', 'northwind-training'),+ },+ };++ return (+ <ProductDemo+ ref={(el) => (root = el)}+ label="People and agents editing the Northwind rollout plan"+ height={540}+ mobileHeight={640}+ onInteract={pause}+ >+ <div ref={frame} class="agent-collaboration-frame">+ <Show+ when={w.view() !== 'tasks'}+ fallback={<WorkspaceTasks workspace={w} filter="all" />}+ >+ <Show+ when={w.view() !== 'messages'}+ fallback={<WorkspaceChannel workspace={w} />}+ >+ <WorkspaceDocuments+ workspace={w}+ relatedContent={+ <div class="mt-6">+ <AgentAnswer+ text="Related work: @[SSO verification](agent:sso) · @[Training for 40 people](agent:training)"+ mentions={mentions}+ />+ </div>+ }+ />+ </Show>+ </Show>+ <Show+ when={w.view() !== 'documents' || w.selected() !== 'northwind-plan'}+ >+ <Button+ variant="plain"+ size="icon-sm"+ class="agent-split-close"+ label="Back to rollout plan"+ onClick={() => w.open('documents', 'northwind-plan')}+ >+ <X class="size-4" />+ </Button>+ </Show>+ <Show when={agent()}>+ {(point) => (+ <DemoCursor+ label="Claude"+ class="agent-demo-pointer"+ style={{ transform: `translate(${point().x}px, ${point().y}px)` }}+ />+ )}+ </Show>+ <Show when={person()}>+ {(point) => (+ <DemoCursor+ label="Jacob"+ class="agent-demo-pointer"+ style={{ transform: `translate(${point().x}px, ${point().y}px)` }}+ />+ )}+ </Show>+ </div>+ </ProductDemo>+ );+}diff --git a/apps/marketing/src/features/marketing/components/agents/NorthwindSession.tsx b/apps/marketing/src/features/marketing/components/agents/NorthwindSession.tsxnew file mode 100644index 0000000000..6a7801bca0--- /dev/null+++ b/apps/marketing/src/features/marketing/components/agents/NorthwindSession.tsx@@ -0,0 +1,412 @@+import X from '@phosphor/x.svg';+import { Button } from '@ui';+import {+ createSignal,+ For,+ Match,+ onCleanup,+ onMount,+ Show,+ Switch,+} from 'solid-js';+import type { WorkspaceView } from '../../core/dummy-workspace';+import {+ createDummyWorkspace,+ type DummyWorkspace,+} from '../../primitives/createDummyWorkspace';+import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';+import { CallRecordBody, createCallPlayback } from '../calls/CallRecord';+import { ViewShell } from '../DemoWorkspaceChrome';+import '../calls/call-stories.css';+import { ProductDemo } from '../product/ProductPage';+import { WorkspaceChannel } from '../workspace/WorkspaceChannel';+import { WorkspaceDocuments } from '../workspace/WorkspaceDocuments';+import { WorkspaceEmail } from '../workspace/WorkspaceEmail';+import { WorkspaceTasks } from '../workspace/WorkspaceTasks';+import { AgentSession } from './AgentSession';+import {+ AgentAnswer,+ type AgentMention,+ AgentPrompt,+ type AgentToolCall,+ AgentToolGroup,+ AgentTurn,+} from './AgentTranscript';+import {+ createNorthwindAccessTask,+ NORTHWIND_CALL,+ NORTHWIND_PROMPT,+ seedNorthwind,+ updateNorthwindPlan,+ updateNorthwindTraining,+} from './northwindScenario';+import '../workspace/dummy-workspace.css';++type Scene = 'complete' | 'sources' | 'actions';++/** The hero and focused scenes use this conversation and the same local, editable records. */+export function NorthwindSession(props: {+ workspace: DummyWorkspace;+ scene?: Scene;+}) {+ const w = props.workspace;+ const scene = props.scene ?? 'complete';+ seedNorthwind(w, scene === 'complete');+ let root!: HTMLDivElement;+ let returnFocus: HTMLElement | undefined;+ const [narrow, setNarrow] = createSignal(false);+ const [item, setItem] = createSignal<string>();+ const [itemView, setItemView] = createSignal<WorkspaceView>('documents');+ const [phase, setPhase] = createSignal(scene === 'complete' ? 3 : 0);+ const [turns, setTurns] = createSignal<string[]>([]);+ const finish = () => {+ if (scene === 'actions') {+ updateNorthwindPlan(w);+ updateNorthwindTraining(w);+ createNorthwindAccessTask(w);+ }+ setPhase(3);+ };+ const playback = createProductWalkthrough({+ root: () => root,+ steps: 3,+ reset: () => {},+ reduced: finish,+ delay: () => 1300,+ advance: (step) => {+ if (scene === 'complete') return;+ if (scene === 'sources') {+ setPhase(step);+ return;+ }+ if (step === 1) updateNorthwindPlan(w);+ if (step === 2) updateNorthwindTraining(w);+ if (step === 3) finish();+ else setPhase(step);+ },+ });+ const open = (view: WorkspaceView, id: string) => {+ playback.pause();+ if (!item() && document.activeElement instanceof HTMLElement)+ returnFocus = document.activeElement;+ setItemView(view);+ setItem(id);+ queueMicrotask(() =>+ root+ .querySelector<HTMLButtonElement>('.agent-split-close')+ ?.focus({ preventScroll: true })+ );+ };+ const close = () => {+ setItem(undefined);+ if (returnFocus?.isConnected) returnFocus.focus({ preventScroll: true });+ };+ onMount(() => {+ const measure = () => setNarrow(root.clientWidth < 640);+ const observer = new ResizeObserver(measure);+ observer.observe(root);+ measure();+ onCleanup(() => observer.disconnect());+ });+ const linkedWorkspace = {+ ...w,+ selected: item,+ contentView: itemView,+ view: itemView,+ open: (view: WorkspaceView, id?: string) => {+ if (id) open(view, id);+ else if (view === 'messages') open(view, w.channel());+ else close();+ },+ openItem: (view: WorkspaceView, id?: string) => {+ if (id) open(view, id);+ else if (view === 'messages') open(view, w.channel());+ else close();+ },+ backToCollection: close,+ };+ const taskMention = (id: string): AgentMention => ({+ kind: 'task',+ get task() {+ const task = w.data.tasks.find((t) => t.id === id);+ return task+ ? { status: task.status, priority: task.priority, owner: task.owner }+ : undefined;+ },+ onOpen: () => open('tasks', id),+ });+ const mentions: Record<string, AgentMention> = {+ email: { kind: 'email', onOpen: () => open('email', 'northwind-email') },+ call: { kind: 'call', onOpen: () => open('documents', 'northwind-call') },+ plan: {+ kind: 'document',+ onOpen: () => open('documents', 'northwind-plan'),+ },+ training: taskMention('northwind-training'),+ sso: taskMention('northwind-sso'),+ };+ const sourceAnswer =+ 'Friday isn’t ready yet. The @[rollout plan](agent:plan) assumes 20 people and passwords; the customer now needs 40 and SSO.\n\nThe call limits Friday to 10 people, pending Teo’s SSO check. The other 30 join Monday, and the @[training task](agent:training) needs to move from Jacob to Julia.';+ const diagnosis =+ 'The @[customer email](agent:email) and @[call decision](agent:call) changed the rollout to 40 people with SSO. The plan still assumed 20.';+ const completedResult =+ '- Updated the @[rollout plan](agent:plan): 10 Friday, 30 Monday.\n- Reassigned @[Training for 40 people](agent:training) to Julia, with two sessions.\n- Created urgent @[SSO verification](agent:sso) for Teo.';+ const resultAnswer = () =>+ [+ ...(phase() >= 1+ ? [+ '- Updated the @[rollout plan](agent:plan): 20 on Friday → 10 Friday, 30 Monday, with SSO required.',+ ]+ : []),+ ...(phase() >= 2+ ? [+ '- Reassigned @[Training for 40 people](agent:training): Jacob → Julia, with two sessions instead of one.',+ ]+ : []),+ ...(phase() >= 3+ ? [+ '- Created @[SSO verification](agent:sso) for Teo, marked urgent before invitations go out.',+ ]+ : []),+ ].join('\n');+ const sourceSearch = (): AgentToolCall => ({+ kind: 'search',+ query: 'Northwind',+ hits: [+ {+ kind: 'email',+ title: 'Northwind rollout requirements',+ sender: 'Marcus',+ snippet: '40 seats. SSO required before anyone joins.',+ time: 'Wed',+ onOpen: () => open('email', 'northwind-email'),+ },+ ...(phase() >= 1+ ? [+ {+ kind: 'call' as const,+ title: NORTHWIND_CALL.title,+ snippet:+ '10 Friday, 30 Monday. Teo checks SSO; Julia takes training.',+ time: 'Thu',+ onOpen: () => open('documents', 'northwind-call'),+ },+ ]+ : []),+ ...(phase() >= 2+ ? [+ {+ kind: 'document' as const,+ title: 'Northwind rollout plan',+ snippet: 'All 20 staff on Friday. Password sign-in.',+ time: 'Mon',+ onOpen: () => open('documents', 'northwind-plan'),+ },+ {+ kind: 'task' as const,+ title: 'Prepare Northwind training for 20 people',+ sender: 'Jacob',+ snippet: 'One session for 20 people on Friday.',+ time: 'Mon',+ onOpen: () => open('tasks', 'northwind-training'),+ },+ ]+ : []),+ ],+ });+ const sourceReads: AgentToolCall[] = [+ { kind: 'read-thread' },+ { kind: 'read-call' },+ { kind: 'read-document', title: 'Northwind rollout plan' },+ { kind: 'read-document', title: 'Northwind training task' },+ ];+ const [searchOpen, setSearchOpen] = createSignal(true);+ const callPlayback = createCallPlayback(NORTHWIND_CALL.duration);+ return (+ <div+ ref={root}+ class="agent-split"+ data-narrow={narrow()}+ data-item-open={item() ? 'true' : undefined}+ onPointerDown={playback.pause}+ onKeyDown={playback.pause}+ >+ <div class="agent-split-pane" inert={!!item() && narrow()}>+ <AgentSession+ title="Northwind rollout"+ onSend={(text) => setTurns((all) => [...all, text])}+ >+ <AgentTurn>+ <AgentPrompt+ text={+ scene === 'sources'+ ? 'Are we ready for Northwind’s Friday rollout?'+ : scene === 'actions'+ ? 'Update the rollout plan and assign the missing work.'+ : NORTHWIND_PROMPT+ }+ />+ </AgentTurn>+ <AgentTurn>+ <Show when={scene === 'sources'}>+ <AgentToolGroup+ calls={[sourceSearch()]}+ active={phase() < 2}+ defaultOpen+ searchOpen={searchOpen()}+ onSearchOpenChange={setSearchOpen}+ />+ <Show when={phase() === 3}>+ <AgentToolGroup calls={sourceReads} />+ <AgentAnswer text={sourceAnswer} mentions={mentions} />+ </Show>+ <Show when={phase() < 3}>+ <span class="magic-chip-shimmer text-sm">+ {phase() < 2+ ? 'Finding the customer requirements and rollout decision…'+ : 'Comparing the decision with the existing plan and task…'}+ </span>+ </Show>+ </Show>+ <Show when={scene === 'complete'}>+ <AgentToolGroup calls={[sourceSearch(), ...sourceReads]} />+ <AgentAnswer text={diagnosis} mentions={mentions} />+ </Show>+ <Show when={scene !== 'sources'}>+ <AgentToolGroup+ active={phase() < 3}+ calls={[+ {+ kind: 'action',+ label:+ phase() < 1+ ? 'Edit Northwind rollout plan'+ : 'Edited Northwind rollout plan',+ },+ ...(phase() >= 1+ ? [+ {+ kind: 'action' as const,+ label:+ phase() < 2+ ? 'Update training task'+ : 'Updated training task · Julia',+ },+ ]+ : []),+ ...(phase() >= 2+ ? [+ {+ kind: 'action' as const,+ label:+ phase() < 3+ ? 'Create SSO verification task'+ : 'Created SSO verification task · Teo',+ },+ ]+ : []),+ ]}+ />+ <Show when={phase() > 0}>+ <AgentAnswer+ text={scene === 'complete' ? completedResult : resultAnswer()}+ mentions={mentions}+ />+ </Show>+ <Show when={phase() < 3}>+ <span class="magic-chip-shimmer text-sm">+ {phase() === 0+ ? 'Updating the plan to match the call’s decision…'+ : phase() === 1+ ? 'Reassigning training and adding the second session…'+ : 'Creating the missing SSO check for Teo…'}+ </span>+ </Show>+ <Show when={phase() === 3}>+ <AgentAnswer+ text="SSO is still open. Friday’s pilot can go ahead only after Teo confirms access."+ mentions={mentions}+ />+ </Show>+ </Show>+ </AgentTurn>+ <For each={turns()}>+ {(text) => (+ <>+ <AgentTurn>+ <AgentPrompt text={text} />+ </AgentTurn>+ <AgentTurn>+ <AgentAnswer+ text="You can open the rollout plan and assigned tasks above to explore and edit the result."+ mentions={{}}+ />+ </AgentTurn>+ </>+ )}+ </For>+ </AgentSession>+ </div>+ <Show when={item()}>+ <section+ class="agent-split-pane agent-split-item"+ aria-label="Opened item"+ onKeyDown={(e) => {+ if (e.key === 'Escape') {+ e.stopPropagation();+ close();+ }+ }}+ >+ <Switch>+ <Match when={item() === 'northwind-call'}>+ <ViewShell.TopBar>+ <span class="text-sm font-semibold">+ Northwind rollout decision+ </span>+ </ViewShell.TopBar>+ <CallRecordBody call={NORTHWIND_CALL} playback={callPlayback} />+ </Match>+ <Match when={itemView() === 'documents'}>+ <WorkspaceDocuments workspace={linkedWorkspace} />+ </Match>+ <Match when={itemView() === 'tasks'}>+ <WorkspaceTasks workspace={linkedWorkspace} filter="all" />+ </Match>+ <Match when={itemView() === 'messages'}>+ <WorkspaceChannel workspace={linkedWorkspace} />+ </Match>+ <Match when={itemView() === 'email'}>+ <WorkspaceEmail+ workspace={linkedWorkspace}+ tab="all"+ account="all"+ />+ </Match>+ </Switch>+ <Button+ variant="plain"+ size="icon-sm"+ class="agent-split-close"+ label="Close opened item"+ onClick={close}+ >+ <X class="size-4" />+ </Button>+ </section>+ </Show>+ </div>+ );+}+export function NorthwindStory(props: { scene: Exclude<Scene, 'complete'> }) {+ const w = createDummyWorkspace('agents');+ return (+ <ProductDemo+ label={`Northwind ${props.scene}`}+ height={600}+ mobileHeight={660}+ >+ <NorthwindSession workspace={w} scene={props.scene} />+ </ProductDemo>+ );+}diff --git a/apps/marketing/src/features/marketing/components/agents/agent-stories.css b/apps/marketing/src/features/marketing/components/agents/agent-stories.cssindex 43bb166dc9..7015a3050b 100644--- a/apps/marketing/src/features/marketing/components/agents/agent-stories.css+++ b/apps/marketing/src/features/marketing/components/agents/agent-stories.css@@ -1,7 +1,7 @@/* 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-session-composer { width: 100%; max-width: 952px; margin-inline: auto; padding: 4px 16px 12px; }+.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. */.agent-split { display: flex; flex: 1; min-height: 0; min-width: 0; position: relative; }@@ -20,8 +20,8 @@.agent-mcp-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }@media (max-width: 699px) {- .agent-session-composer { padding: 4px 8px 8px; }- .agent-split-item { position: absolute; inset: 0; z-index: 5; border-left: 0; }++.agent-mcp-page { padding: 24px 16px; }.agent-mcp-header { padding-inline: 16px; }.agent-mcp-cards { margin-top: 24px; }@@ -31,3 +31,96 @@.agent-split-item { animation: none; }.agent-demo-pointer { display: none; }}++/* AgentSessionPane's floating detail surface and shared composer. */+.agent-session-header {+ display: flex !important;+ position: relative;+ z-index: 2;+}+.agent-session-header h3 {+ margin: 0;+}+.agent-session-header > svg {+ width: 16px;+ height: 16px;+ flex: none;+}+.agent-session-body {+ display: flex;+ position: relative;+ flex: 1;+ min-height: 0;+}+.agent-session-body > .agent-transcript {+ flex: 1;+ min-width: 0;+}+.agent-session-details {+ position: absolute;+ inset: 8px 8px auto auto;+ width: 240px;+ z-index: 4;+ padding: 16px;+ border: 1px solid var(--color-edge-muted);+ border-radius: 12px;+ background: var(--color-panel);+ box-shadow: var(--glass-shadow);+ font-size: 12px;+}+.agent-session-details h4 {+ margin: 16px 0;+}+.agent-session-details dl {+ display: grid;+ grid-template-columns: 80px 1fr;+ gap: 12px;+}+.agent-session-details dt {+ color: var(--color-ink-muted);+}+.agent-session-details dd {+ margin: 0;+}+.agent-repository-bar {+ display: flex;+ gap: 12px;+ align-items: center;+ padding: 4px 12px;+ font-size: 12px;+ color: var(--color-ink-muted);+ border: 1px solid var(--color-edge-muted);+ border-top: 0;+ border-radius: 0 0 20px 20px;+}+++++.agent-split .doc-share-scrim {+ position: absolute;+ z-index: 30;+}+.agent-split-item {+ overflow: hidden;+}+@media (max-width: 699px) {+ .agent-session-header > button {+ padding-inline: 5px;+ }+ .agent-session-composer .agent-composer {+ width: 100%;+ }+++ .agent-split-item:focus-within {+ outline: none;+ }+}++/* A source takes over a narrow pane, as the app's detail overlay does. */+.agent-split[data-narrow=true] > .agent-split-item { position:absolute; inset:0; z-index:5; border-left:0; }+.agent-session-body > .agent-transcript { overflow-y:auto; overflow-x:hidden; }+.agent-split[data-narrow=true][data-item-open=true] > .agent-split-pane:first-child { visibility:hidden; }++.agent-collaboration-frame { position:relative; display:flex; flex-direction:column; flex:1; min-height:0; overflow:hidden; }diff --git a/apps/marketing/src/features/marketing/components/agents/agent-transcript.css b/apps/marketing/src/features/marketing/components/agents/agent-transcript.cssindex c1c87a9c62..d6055acc07 100644--- a/apps/marketing/src/features/marketing/components/agents/agent-transcript.css+++ b/apps/marketing/src/features/marketing/components/agents/agent-transcript.css@@ -1,6 +1,6 @@/* block-agent Transcript: macro-message-width columns with px-4 pb-4. */.agent-transcript { display: flex; flex-direction: column; padding-top: 16px; }-.agent-turn { width: 100%; max-width: 920px; margin-inline: auto; padding: 0 16px 16px; min-width: 0; }+.agent-turn { flex-shrink:0; width: 100%; max-width: 920px; margin-inline: auto; padding: 0 16px 16px; min-width: 0; }.agent-tool-enter { animation: agent-tool-enter 260ms ease-out both; }@keyframes agent-tool-enter { from { opacity: 0; transform: translateY(3px); } }@@ -44,3 +44,9 @@@media (prefers-reduced-motion: reduce) {.agent-tool-enter { animation: none; }}++/* Opt-in for walkthroughs that settle tool results before revealing an answer. */+.agent-tool-collapse { display:grid; grid-template-rows:1fr; opacity:1; transition:grid-template-rows 380ms ease, opacity 220ms ease; }+.agent-tool-collapse[data-open=false] { grid-template-rows:0fr; opacity:0; }+.agent-tool-collapse-body { min-height:0; overflow:hidden; }+@media (prefers-reduced-motion: reduce) { .agent-tool-collapse { transition:none; } }diff --git a/apps/marketing/src/features/marketing/components/agents/agent-workflows.css b/apps/marketing/src/features/marketing/components/agents/agent-workflows.cssnew file mode 100644index 0000000000..0567f9e433--- /dev/null+++ b/apps/marketing/src/features/marketing/components/agents/agent-workflows.css@@ -0,0 +1,57 @@+.agent-workflow-frame { display:flex; flex-direction:column; flex:1; min-height:0; min-width:0; height:100%; }+.agent-workflow-back { padding:8px 12px 0; flex:none; }+.agent-design-attachment { display:block; width:min(100%,380px); margin-top:10px; border-radius:8px; overflow:hidden; }+.agent-portal-design { display:block; width:100%; height:auto; }+.agent-workflow-pr { display:inline-flex; gap:4px; align-items:center; padding:2px 6px; }+.agent-pr-page { padding:32px; }++.agent-workflow-home { display:flex; flex-direction:column; flex:1; min-height:0; min-width:0; }+.agent-workflow-home[hidden] { display:none; }++@media (max-width:699px) {+ .email-desktop-demo[data-agent-showcase=true] .email-desktop-content { height:760px; }+}++.agent-folder-mockup { width:600px; height:480px; transform-origin:top left; border:1px solid var(--color-edge-muted); border-radius:12px; background:var(--color-panel); color:var(--color-ink); text-align:left; font:400 14px/1.5 var(--font-sans); }+.agent-folder-mockup p { margin:0; }+.agent-folder-mockup p + p { margin-top:4px; }+.agent-design-attachment { border:1px solid var(--color-edge-muted); padding:12px; background:var(--color-surface-2); }+@media(max-width:699px) { .agent-design-attachment { padding:6px; } }++.agent-folder-preview { width:100%; max-width:600px; overflow:hidden; border-radius:12px; }++/* Remote-cursor.tsx: thin peer caret with its persistent AI name tag. */+.agent-writing-caret { position:absolute; width:2px; background:var(--color-pink); pointer-events:none; z-index:8; }+.agent-writing-caret > span { position:absolute; bottom:calc(100% + 2px); left:0; display:flex; align-items:center; height:20px; padding:0 8px; border-radius:2px; background:var(--color-pink); color:var(--color-surface); font:400 12px/20px var(--font-sans); }++.agent-editing-frame { position:relative; overflow:hidden; }++/* The walkthrough owns scroll positioning while writing. Browser anchoring+ must not fight it when a new checklist line or reply changes the height. */+.agent-editing-frame .dummy-scroll, .agent-meeting-frame .agent-transcript { overflow-anchor:none; scroll-behavior:auto; }+.agent-editing-frame .dummy-scroll > .mx-auto { padding-bottom:calc(3rem + var(--agent-scroll-reserve, 0px)); }+.agent-meeting-frame .agent-transcript { padding-bottom:calc(16px + var(--agent-scroll-reserve, 0px)); }+@media(max-width:699px) {+ /* Match the native channel message size in the document's shared discussion. */+ .agent-editing-frame [aria-label='Document discussion'] .sample-message-row p { font-size:14px; line-height:1.5; }+}++.agent-meeting-answer { animation: agent-meeting-answer-in 260ms ease-out both; }+@keyframes agent-meeting-answer-in { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }+@media (prefers-reduced-motion: reduce) { .agent-meeting-answer { animation:none; } }++/* The same reply stays mounted while the agent finishes its document edit. */+.agent-editing-frame [aria-label='Document discussion'] [data-reply=true] { animation:agent-reply-in 220ms ease-out both; }+.agent-editing-frame [aria-label='Document discussion'] [data-reply=true] p { opacity:1; transition:opacity 220ms ease; }+.agent-editing-frame[data-response-state=settling] [aria-label='Document discussion'] [data-reply=true] p { opacity:0; }+@media(prefers-reduced-motion:reduce) {+ .agent-editing-frame [aria-label='Document discussion'] [data-reply=true] { animation:none; }+ .agent-editing-frame [aria-label='Document discussion'] [data-reply=true] p { transition:none; }+}++/* Keep the composer steady as the acknowledgment becomes the finished reply. */+.agent-editing-frame [aria-label='Document discussion'] [data-reply=true] p { min-block-size:2lh; }+@keyframes agent-reply-in { from { opacity:0; } to { opacity:1; } }+@media(max-width:699px) {+ .agent-editing-frame [aria-label='Document discussion'] [data-reply=true] p { min-block-size:5lh; }+}diff --git a/apps/marketing/src/features/marketing/components/agents/agentDemoData.ts b/apps/marketing/src/features/marketing/components/agents/agentDemoData.tsindex 934c75edc3..509fa8c967 100644--- a/apps/marketing/src/features/marketing/components/agents/agentDemoData.ts+++ b/apps/marketing/src/features/marketing/components/agents/agentDemoData.ts@@ -1,150 +1,9 @@-import type { AgentToolCall, SearchHit } from './AgentTranscript';--const calls = (items: AgentToolCall[]) => items;--/** Fictional fixtures for the Agents page. Model names match the app's picker. */+/** A representative local catalog, not a promise that every account has every model.+ * Verified against agent_inmem/domain/models.rs and the app picker at 40ceda68. */export const AGENT_MODELS = [{ id: 'claude-sonnet-5-5', label: 'Sonnet 5.5' },{ id: 'claude-opus-5-5', label: 'Opus 5.5' },{ id: 'gpt-5.6', label: 'GPT-5.6' },{ id: 'gemini-3.8-flash', label: 'Gemini 3.8 Flash' },];-export const AGENT_PLACEHOLDER = 'Message the agent, @mention anything';--const northwindHits: SearchHit[] = [- {- kind: 'email',- title: 'Re: Northwind pilot pricing',- sender: 'Valentina',- snippet: 'I’ll send pricing for 40 seats myself by Friday.',- time: 'Tue',- },- {- kind: 'call',- title: 'Northwind demo',- sender: 'Marcus Lee',- snippet: 'Before this goes to the ops team we need SSO.',- time: 'Tue',- },- {- kind: 'channel',- title: 'sales',- sender: 'Valentina',- snippet: 'Demo went well. Marcus wants SSO before the ops rollout.',- time: 'Tue',- },- {- kind: 'document',- title: 'Northwind pilot plan',- snippet: 'Two-week pilot with the ops team, 40 seats.',- time: 'Mon',- },- {- kind: 'email',- title: 'Northwind pilot kickoff',- sender: 'Marcus Lee',- snippet: 'Looking forward to getting the team set up.',- time: 'Sep 22',- },- {- kind: 'channel',- title: 'sales',- sender: 'Jacob Beckerman',- snippet: 'who’s following up with Northwind?',- time: 'Wed',- },-];--const NORTHWIND_THOUGHT =- 'Marcus is waiting on pricing and SSO. I’ll check who promised what, and who was on the demo call.';--/** One Northwind conversation, shared by the memory and model demos. */-export const northwind = {- title: 'Northwind follow-up',- earlier: {- prompt: 'Where are we with Northwind?',- calls: calls([- {- kind: 'search',- query: 'Northwind pilot',- hits: northwindHits.slice(0, 4),- },- { kind: 'read-thread' },- ]),- answer:- 'They’re two weeks into a pilot with their ops team. Marcus is waiting on two things from us: pricing for 40 seats and an answer on SSO.',- },- prompt: 'Who should own the Northwind follow-up?',- thought: NORTHWIND_THOUGHT,- calls: calls([- { kind: 'thought', text: NORTHWIND_THOUGHT },- { kind: 'search', query: 'Northwind', hits: northwindHits },- { kind: 'read-channel', channel: 'sales', count: 14 },- { kind: 'read-call' },- ]),- /** Streamed in order; chunk edges never split a mention or emphasis. */- answer: [- '@[Valentina](agent:valentina). ',- 'She ran the demo and told Marcus she’d send the pricing herself in ',- '@[Re: Northwind pilot pricing](agent:pricing). ',- 'She also took his SSO question during @[Northwind demo](agent:demo), ',- 'so she has the context on both.',- '\n\nWant me to create the task and assign it to her?',- ],- /** The same question, answered again after switching models. */- switchedCalls: calls([- { kind: 'search', query: 'Northwind', hits: northwindHits },- { kind: 'read-call' },- ]),- switchedAnswer:- '@[Valentina](agent:valentina). She told Marcus she’d send the 40-seat pricing herself in @[Re: Northwind pilot pricing](agent:pricing), and she answered his SSO question during @[Northwind demo](agent:demo).',-};--/** The Meadow rollout, cited from items that exist in the sample workspace. */-export const meadow = {- title: 'Meadow before Thursday',- prompt: 'What does Meadow still need from us before Thursday?',- calls: calls([- {- kind: 'search',- query: 'Meadow',- hits: [- {- kind: 'email',- title: 'Next steps for our team',- sender: 'Dana Whitfield',- snippet: 'Thursday at 9 works. Could you share the rollout plan?',- time: '9:41 AM',- },- {- kind: 'document',- title: 'Demo call notes',- snippet: 'Dana’s team wants email, tasks, and documents together.',- time: 'Sep 28',- },- {- kind: 'channel',- title: 'customers',- sender: 'Jacob Beckerman',- snippet: 'Thursday agenda: connect inbox, invite team, share one…',- time: '9:18 AM',- },- {- kind: 'call',- title: 'Meadow onboarding',- sender: 'Dana Whitfield',- snippet: 'Can we bring over the docs we already have?',- time: 'Sep 26',- },- ],- },- { kind: 'read-thread' },- { kind: 'read-channel', channel: 'customers', count: 18 },- { kind: 'read-call' },- ]),- answer:- 'Three things before Thursday:\n\n- **The rollout plan.** Dana asked for it in @[Next steps for our team](agent:email). Julia’s draft reply links @[Team rollout plan](agent:rollout).\n- **Answers to their questions** on seats, shared email access, and importing docs. They’re in @[Demo call notes](agent:notes).\n- **The agenda.** Jacob posted it in @[customers](agent:customers): connect the inbox, invite the team, share one email, make one task.',- followUp:- 'Dana is waiting on the @[Team rollout plan](agent:rollout), and Julia is sending the setup steps before the call. The open questions are in @[Demo call notes](agent:notes).',-};diff --git a/apps/marketing/src/features/marketing/components/agents/createDemoPointer.ts b/apps/marketing/src/features/marketing/components/agents/createDemoPointer.tsindex d8d2a4cfe7..2a79113593 100644--- a/apps/marketing/src/features/marketing/components/agents/createDemoPointer.ts+++ b/apps/marketing/src/features/marketing/components/agents/createDemoPointer.ts@@ -34,7 +34,12 @@ export function createDemoPointer(options: {});const resize = new ResizeObserver(position);resize.observe(options.frame());- onCleanup(() => resize.disconnect());+ const frame = options.frame();+ frame.addEventListener('scroll', position, true);+ onCleanup(() => {+ resize.disconnect();+ frame.removeEventListener('scroll', position, true);+ });});return pointer;}diff --git a/apps/marketing/src/features/marketing/components/agents/northwindScenario.ts b/apps/marketing/src/features/marketing/components/agents/northwindScenario.tsnew file mode 100644index 0000000000..f47fc3d55b--- /dev/null+++ b/apps/marketing/src/features/marketing/components/agents/northwindScenario.ts@@ -0,0 +1,175 @@+import type { DummyWorkspace } from '../../primitives/createDummyWorkspace';+import type { SampleCall } from '../calls/call-fixtures';++export const NORTHWIND_PROMPT =+ 'Are we ready for Northwind’s Friday rollout? Update the plan and assign anything missing.';+export const NORTHWIND_OLD_PLAN =+ '## Friday rollout\n\nLaunch for all 20 operations staff on Friday, October 9. Use password sign-in.\n\n## Training\n\nJacob prepares one training session for 20 people.\n\n## Before launch\n\nConfirm the participant list and send invitations.';+export const NORTHWIND_PLAN =+ '## Friday pilot\n\nStart with 10 operations staff on Friday, October 9. The remaining 30 join on Monday, October 12.\n\n## Access\n\nEveryone uses SSO. Teo verifies sign-in before the Friday pilot can start.\n\n## Training\n\nJulia prepares two sessions for the 40-person group.\n\n## Launch checks\n\nSSO verification is still open. Confirm access before sending invitations.';+export const NORTHWIND_COLLAB_PLAN = NORTHWIND_PLAN.replace(+ 'SSO verification is still open. Confirm access before sending invitations.',+ '- [ ] Teo verifies SSO before the pilot.\n- [ ] Julia confirms both training sessions.\n- [ ] Send invitations after access is confirmed.'+);+export const NORTHWIND_HUMAN_NOTE =+ '\n\n## Customer coordination\n\nMarcus will send the names of the 10 pilot participants today.';+export const NORTHWIND_CALL: SampleCall = {+ title: 'Northwind rollout decision',+ ended: 'Oct 8, 2026 · 9:15 AM',+ duration: 180,+ people: ['jacob', 'teo', 'julia'],+ summary:+ '- Keep Friday for a 10-person pilot; the other 30 join Monday.\n- SSO must be verified before anyone joins. Teo owns that check.\n- Julia prepares two training sessions for the 40-person group.',+ poster: [+ { person: 'jacob', video: false },+ { person: 'teo', video: false },+ { person: 'julia', video: false },+ ],+ segments: [+ {+ id: 'scope',+ person: 'jacob',+ at: 8,+ text: 'Marcus now needs 40 seats and SSO. Let’s keep Friday for 10 people, with the other 30 joining Monday.',+ },+ {+ id: 'access',+ person: 'teo',+ at: 35,+ text: 'I’ll verify SSO before the pilot. We should not send invitations until that check passes.',+ },+ {+ id: 'training',+ person: 'julia',+ at: 62,+ text: 'I’ll take training from Jacob and split it into two sessions for the full group.',+ },+ {+ id: 'plan',+ person: 'jacob',+ at: 94,+ text: 'The plan and tasks still say 20 people on Friday. They need to reflect this decision.',+ },+ ],+};++/** This request changes the plan, not the real-world status of the SSO check. */+export function updateNorthwindPlan(w: DummyWorkspace) {+ w.setData(+ 'documents',+ (d) => d.id === 'northwind-plan',+ 'body',+ NORTHWIND_PLAN+ );+}+export function updateNorthwindTraining(w: DummyWorkspace) {+ w.setData('tasks', (t) => t.id === 'northwind-training', {+ title: 'Prepare Northwind training for 40 people',+ description:+ 'Prepare two training sessions for 40 people: the 10-person Friday pilot, then the other 30 on Monday.',+ owner: 'julia',+ priority: 'High',+ });+}+export function createNorthwindAccessTask(w: DummyWorkspace) {+ if (w.data.tasks.some((t) => t.id === 'northwind-sso')) return;+ w.setData('tasks', (tasks) => [+ ...tasks,+ {+ id: 'northwind-sso',+ title: 'Verify Northwind SSO before the pilot',+ description:+ 'Verify SSO for the 10-person Friday pilot. Confirm access before invitations go out; the remaining 30 join Monday.',+ status: 'Not Started',+ priority: 'Urgent',+ owner: 'teo',+ creator: 'jacob',+ tags: ['Customers'],+ channel: 'customers',+ relatedDocumentIds: ['northwind-plan'],+ steps: [+ {+ id: 'verify-signin',+ text: 'Verify sign-in for the pilot group',+ done: false,+ },+ {+ id: 'confirm-access',+ text: 'Confirm access before invitations go out',+ done: false,+ },+ ],+ comments: [],+ },+ ]);+}++/** Seed on first open only; reopening must preserve the visitor's edits. */+export function seedNorthwind(w: DummyWorkspace, completed = true) {+ if (w.data.documents.some((d) => d.id === 'northwind-plan')) return;+ w.setData('documents', (docs) => [+ ...docs,+ {+ id: 'northwind-plan',+ title: 'Northwind rollout plan',+ body: NORTHWIND_OLD_PLAN,+ tags: ['Customers'],+ comments: [],+ },+ ]);+ w.setData('tasks', (tasks) => [+ ...tasks,+ {+ id: 'northwind-training',+ title: 'Prepare Northwind training for 20 people',+ description:+ 'Prepare one training session for all 20 operations staff joining on Friday.',+ status: 'Not Started',+ priority: 'Medium',+ owner: 'jacob',+ creator: 'jacob',+ tags: ['Customers'],+ channel: 'customers',+ relatedDocumentIds: ['northwind-plan'],+ steps: [],+ comments: [],+ },+ ]);+ w.setData('emails', (emails) => [+ ...emails,+ {+ id: 'northwind-email',+ sender: 'Marcus <[email protected]>',+ subject: 'Northwind rollout requirements',+ snippet:+ 'We need 40 seats, and everyone must use single sign-on (SSO) before joining.',+ body: 'Hi Jacob,\n\nThe operations group has grown to 40 people. Everyone must use SSO before joining. We will need two training sessions for the full group.\n\nCan you confirm how this changes Friday’s rollout?\n\nMarcus',+ time: 'Wednesday',+ account: 'work',+ folder: 'inbox',+ replies: [],+ },+ ]);+ w.setData(+ 'channels',+ (c) => c.id === 'customers',+ 'messages',+ (messages) => [+ ...messages,+ {+ id: 'northwind-decision',+ person: 'jacob' as const,+ time: 'Thursday',+ body: 'Northwind now needs 40 seats and SSO. We agreed on a 10-person Friday pilot, with the other 30 joining Monday. Teo owns the access check; Julia takes training. The plan and tasks need updating.',+ emailId: 'northwind-email',+ documentId: 'northwind-plan',+ taskId: 'northwind-training',+ },+ ]+ );+ if (completed) {+ updateNorthwindPlan(w);+ updateNorthwindTraining(w);+ createNorthwindAccessTask(w);+ }+}diff --git a/apps/marketing/src/features/marketing/components/agents/workflowData.ts b/apps/marketing/src/features/marketing/components/agents/workflowData.tsnew file mode 100644index 0000000000..ea0b909d22--- /dev/null+++ b/apps/marketing/src/features/marketing/components/agents/workflowData.ts@@ -0,0 +1,124 @@+import type { DummyWorkspace } from '../../primitives/createDummyWorkspace';++/** Fictional content based on observed workflows, never private customer records. */+export const FEEDBACK_BRIEF = 'feedback-brief';+export const MEETING_BRIEF = 'meeting-brief';+export const WORKFLOW_DOCUMENTS = [+ {+ id: FEEDBACK_BRIEF,+ title: 'Client file upload feedback',+ body: '## Next release\n\n- Upload recovery: keep selected files after an error.\n- Reviewer visibility: show who owns the next step.\n\nSize guidance is already in progress. Guest uploads still need an access decision.',+ },+ {+ id: 'portal-testing',+ title: 'File upload testing notes',+ body: '## File uploads\n\nSelecting multiple files works. If the connection drops, the selected files disappear. Reproduced twice on mobile.\n\n## Review\n\nClients cannot tell who owns the next step after uploading a file.\n\n## Existing work\n\nThe upload-help task already covers file size guidance.',+ },+ {+ id: 'support-notes',+ title: 'Customer support discussion',+ body: '## Beacon Studio\n\nThe upload failed halfway through and we had to select all the files again. Could we also see who is reviewing them?\n\n## Westlake Design\n\nWho should our clients contact after sending files? It would help to see the reviewer. Can someone send a file without creating an account?',+ },+ {+ id: MEETING_BRIEF,+ title: 'Friday meeting brief',+ body: '## 9:30 AM · Beacon Studio\n\nDecision: agree on the first trial for client file uploads.\n\nWhat changed: Tuesday’s call focused on 8 internal reviewers. Yesterday’s email adds 12 external clients who need to upload files without accounts.\n\nOpen question: guest uploads are not yet part of the agreed scope. Confirm the access rules before promising a launch date.\n\nAsk: should clients only upload, or also see the review discussion?\n\n## 11:00 AM · Westlake Design\n\nDecision: choose who owns client feedback.\n\nThey asked about reviewer visibility in customer-support. Bring the consolidated file upload feedback brief; their request is already included.',+ },+ {+ id: 'beacon-call',+ title: 'Beacon discovery call',+ body: '## Tuesday · Discovery call\n\nBeacon wants 8 people to review files from clients. Julia will demonstrate file uploads on Friday at 9:30 AM.\n\nThe initial scope assumes clients already have accounts. Guest uploads were not discussed.\n\n## Next step\n\nConfirm the pilot participants and access requirements.',+ },+];+export function seedAgentWorkflows(w: DummyWorkspace) {+ for (const doc of WORKFLOW_DOCUMENTS) {+ if (!w.data.documents.some((d) => d.id === doc.id))+ w.setData('documents', (all) => [+ ...all,+ { ...doc, tags: ['Customers'], comments: [] },+ ]);+ }+ if (!w.data.emails.some((e) => e.id === 'beacon-email'))+ w.setData('emails', (all) => [+ ...all,+ {+ id: 'beacon-email',+ sender: 'Dana <[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',+ time: 'Thursday',+ account: 'work',+ folder: 'inbox',+ replies: [],+ },+ ]);+ if (!w.data.channels.some((c) => c.id === 'product-feedback'))+ w.setData('channels', (all) => [+ { id: 'product-feedback', messages: [] },+ ...all,+ ]);+ if (!w.data.channels.some((c) => c.id === 'customer-support'))+ w.setData('channels', (all) => [+ ...all,+ {+ id: 'customer-support',+ messages: [+ {+ id: 'beacon-feedback',+ person: 'julia',+ time: 'Yesterday',+ body: 'Beacon’s upload failed halfway through. They had to select all the files again. They also asked who is reviewing each file.',+ },+ {+ id: 'westlake-feedback',+ person: 'valentina',+ time: 'Yesterday',+ body: 'Westlake asked the same thing about reviewer visibility. They also want clients to send files without creating an account.',+ },+ ],+ },+ ]);+ if (!w.data.tasks.some((t) => t.id === 'upload-help'))+ w.setData('tasks', (all) => [+ ...all,+ {+ id: 'upload-help',+ title: 'Add upload size guidance',+ description:+ 'Show the maximum file size before a client selects files. This already covers the size-guidance request in file upload testing.',+ status: 'In Progress',+ priority: 'Medium',+ owner: 'teo',+ creator: 'jacob',+ tags: ['Customers'],+ channel: 'customer-support',+ relatedDocumentIds: ['portal-testing'],+ steps: [],+ comments: [],+ },+ ]);+ if (!w.data.events.some((e) => e.id === 'beacon-meeting'))+ w.setData('events', (all) => [+ ...all,+ {+ id: 'beacon-meeting',+ title: 'Beacon Studio · File uploads',+ date: '2026-10-09',+ start: 9.5,+ duration: 0.5,+ calendar: 'work',+ description:+ 'Agree on the first trial for client file uploads with Dana. Julia hosts.',+ },+ {+ id: 'westlake-meeting',+ title: 'Westlake Design · Client feedback',+ date: '2026-10-09',+ start: 11,+ duration: 0.5,+ calendar: 'work',+ description: 'Choose who owns client feedback.',+ },+ ]);+}diff --git a/apps/marketing/src/features/marketing/components/calls/CallChannel.tsx b/apps/marketing/src/features/marketing/components/calls/CallChannel.tsxindex 575a25b16a..9ae830d1de 100644--- a/apps/marketing/src/features/marketing/components/calls/CallChannel.tsx+++ b/apps/marketing/src/features/marketing/components/calls/CallChannel.tsx@@ -58,6 +58,7 @@ export function ChannelTopBar(props: {/** Hidden while you are in this channel's call. */callButton?: 'call' | 'join';onCall?: () => void;+ onAsk?: () => void;}) {const tabs = () =>TABS.filter((tab) => tab.value !== 'call' || props.live).map((tab) => ({@@ -91,6 +92,8 @@ export function ChannelTopBar(props: {<Buttonvariant="plain"size="md"+ aria-label="Invite people"+ disabledtooltip="Invite people"class="call-bar-action call-bar-invite">@@ -122,6 +125,9 @@ export function ChannelTopBar(props: {<Buttonvariant="plain"size="md"+ aria-label="Ask Macro"+ onClick={props.onAsk}+ disabled={!props.onAsk}tooltip="Ask Macro"class="call-bar-action">@@ -243,6 +249,8 @@ export type CallListRow = {id: string;title: string;summary: string;+ /** Channel search includes the call transcript in the application. */+ transcript?: string;status: 'attended' | 'missed';duration: string;people: CallPerson[];@@ -272,7 +280,9 @@ export function ChannelCallsList(props: {return query.length < 3? props.rows: props.rows.filter((row) =>- `${row.title} ${row.summary}`.toLowerCase().includes(query)+ `${row.title} ${row.summary} ${row.transcript ?? ''}`+ .toLowerCase()+ .includes(query));};return (diff --git a/apps/marketing/src/features/marketing/components/calls/CallFollowupAnswer.tsx b/apps/marketing/src/features/marketing/components/calls/CallFollowupAnswer.tsxnew file mode 100644index 0000000000..8f2cf16e48--- /dev/null+++ b/apps/marketing/src/features/marketing/components/calls/CallFollowupAnswer.tsx@@ -0,0 +1,38 @@+import type { WorkspaceTask } from '../../core/dummy-workspace';+import { AgentAnswer } from '../agents/AgentTranscript';+import { rolloutCheckIn } from './call-fixtures';++/** Reuse the agent page's frozen StaticMarkdown/DocumentMention presentation. */+export function CallFollowupAnswer(props: {+ task: WorkspaceTask;+ onOpenTask: (trigger: HTMLButtonElement) => void;+ onOpenCall: (trigger: HTMLButtonElement) => void;+}) {+ return (+ <div class="call-agent-text" role="group" aria-label="Agent answer">+ <AgentAnswer+ text={`Updated @[${props.task.title}](agent:training) using @[${rolloutCheckIn.title}](agent:call).\n\n- Reassigned **Teo → Julia**.\n- Added **Get Teo’s notes today**, **Update the slides**, and **Send the invite**.\n- Kept **Thursday at 10** and left the task **In Progress**.`}+ mentions={{+ training: {+ kind: 'task',+ task: {+ status: props.task.status,+ priority: props.task.priority,+ owner: props.task.owner,+ },+ onOpen: (trigger) => {+ if (trigger) props.onOpenTask(trigger);+ },+ },+ call: {+ kind: 'call',+ time: 'Oct 7, 9:48 AM',+ onOpen: (trigger) => {+ if (trigger) props.onOpenCall(trigger);+ },+ },+ }}+ />+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/calls/CallHero.tsx b/apps/marketing/src/features/marketing/components/calls/CallHero.tsxnew file mode 100644index 0000000000..5d123ff4f8--- /dev/null+++ b/apps/marketing/src/features/marketing/components/calls/CallHero.tsx@@ -0,0 +1,179 @@+import { createSignal, Match, Show, Switch } from 'solid-js';+import type { WorkspaceComment } from '../../core/dummy-workspace';+import { ProductDemo } from '../product/ProductPage';+import { WorkspaceDesktopDemo } from '../WorkspaceDesktopDemo';+import {+ ChannelCallsList,+ ChannelMessages,+ ChannelParticipants,+ type ChannelTab,+ ChannelTopBar,+} from './CallChannel';+import {+ CallRecordBody,+ CallRecordTopBar,+ createCallPlayback,+} from './CallRecord';+import { createCallSession } from './CallSession';+import { rolloutCheckIn, rolloutPlanning } from './call-fixtures';++/** One call, live and saved. Scene controls belong to the tour, outside the app. */+export function CallHeroDemo() {+ const [ended, setEnded] = createSignal(false);+ const [channelTab, setChannelTab] = createSignal<ChannelTab>('call');+ const [historyOpen, setHistoryOpen] = createSignal(false);+ const [search, setSearch] = createSignal('');+ const [messages, setMessages] = createSignal<WorkspaceComment[]>([+ {+ id: 'training',+ person: 'teo',+ body: 'Anyone free for a quick call?',+ time: '9:20 AM',+ },+ {+ id: 'owner',+ person: 'julia',+ body: 'Yep, I’m here.',+ time: '9:24 AM',+ },+ ]);+ const session = createCallSession(+ [{ person: 'julia' }, { person: 'teo' }],+ rolloutCheckIn.chat+ );+ const historyPlayer = createCallPlayback(rolloutPlanning.duration);+ const player = createCallPlayback(rolloutCheckIn.duration);+ const showAgent = () =>+ document+ .getElementById('call-followup')+ ?.scrollIntoView({ block: 'start' });+ const choose = (value: boolean) => {+ player.pause();+ historyPlayer.pause();+ setHistoryOpen(false);+ setChannelTab('call');+ setEnded(value);+ };+ return (+ <div class="calls-hero-story">+ <div+ class="calls-scene-picker"+ role="group"+ aria-label="Explore the sample call"+ >+ <button+ type="button"+ aria-pressed={!ended()}+ onClick={() => choose(false)}+ >+ In the call+ </button>+ <button+ type="button"+ aria-pressed={ended()}+ onClick={() => choose(true)}+ >+ After the call+ </button>+ </div>+ <WorkspaceDesktopDemo+ heroFrame+ view="messages"+ label="Explore Macro Calls"+ >+ <ProductDemo label="Training call">+ <Show+ when={ended() || historyOpen()}+ fallback={+ <>+ <ChannelTopBar+ tab={channelTab()}+ onTab={(value) => {+ setChannelTab(value);+ }}+ live+ onAsk={showAgent}+ />+ <Switch>+ <Match when={channelTab() === 'call'}>+ {session.view({+ time: '9:37 AM',+ onLeave: () => choose(true),+ })}+ </Match>+ <Match when={channelTab() === 'messages'}>+ <ChannelMessages+ messages={messages()}+ onSend={(body) =>+ setMessages((items) => [+ ...items,+ {+ id: `sent-${items.length}`,+ person: 'jacob',+ body,+ time: '9:37 AM',+ },+ ])+ }+ />+ </Match>+ <Match when={channelTab() === 'participants'}>+ <ChannelParticipants people={['jacob', 'teo', 'julia']} />+ </Match>+ <Match when={channelTab() === 'attachments'}>+ <p class="call-empty">No attachments yet.</p>+ </Match>+ <Match when={channelTab() === 'calls'}>+ <ChannelCallsList+ rows={[+ {+ id: 'planning',+ title: rolloutPlanning.title,+ transcript: rolloutPlanning.segments+ .map((segment) => segment.text)+ .join(' '),+ summary: 'Training is Thursday at 10.',+ status: 'attended',+ duration: '14m 10s',+ people: ['jacob', 'teo', 'julia'],+ time: 'Yesterday',+ },+ ]}+ search={search()}+ onSearch={setSearch}+ onOpen={() => setHistoryOpen(true)}+ />+ </Match>+ </Switch>+ </>+ }+ >+ <CallRecordTopBar+ onCallAgain={() => choose(false)}+ onAsk={showAgent}+ title={+ historyOpen() ? rolloutPlanning.title : rolloutCheckIn.title+ }+ onBack={() => {+ player.pause();+ historyPlayer.pause();+ if (historyOpen()) setHistoryOpen(false);+ else choose(false);+ }}+ />+ <CallRecordBody+ call={+ historyOpen()+ ? rolloutPlanning+ : { ...rolloutCheckIn, chat: session.chat() }+ }+ playback={historyOpen() ? historyPlayer : player}+ transcriptHeight={300}+ class="call-record-compact"+ />+ </Show>+ </ProductDemo>+ </WorkspaceDesktopDemo>+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/calls/CallOverlay.tsx b/apps/marketing/src/features/marketing/components/calls/CallOverlay.tsxindex d8be93ec94..03e0744270 100644--- a/apps/marketing/src/features/marketing/components/calls/CallOverlay.tsx+++ b/apps/marketing/src/features/marketing/components/calls/CallOverlay.tsx@@ -5,7 +5,6 @@ import Microphone from '@phosphor/microphone.svg';import MicrophoneSlash from '@phosphor/microphone-slash.svg';import PhoneDisconnect from '@phosphor/phone-disconnect.svg';import Screencast from '@phosphor/screencast.svg';-import VideoCamera from '@phosphor/video-camera.svg';import VideoCameraSlash from '@phosphor/video-camera-slash.svg';import { Button } from '@ui';import { For, type JSX, Show } from 'solid-js';@@ -13,14 +12,11 @@ import type { WorkspaceComment } from '../../core/dummy-workspace';import { homepagePeople } from '../../core/homepage-demo-people';import { ChannelComposer } from '../email/frozen/ChannelComposer';import { MessageRow } from '../workspace/frozen/MessageRow';-import { cameraPhoto } from './CallRecord';import type { CallPerson } from './call-fixtures';export type RemoteTile = {person: CallPerson;- video: boolean;muted?: boolean;- speaking?: boolean;};/** VideoTag */@@ -48,9 +44,8 @@ function MutedBadge(props: { label: string }) {);}-/** ParticipantTileWrapper: the inset accent ring marks who is speaking. */+/** Camera-off ParticipantTileWrapper; no simulated speaker activity. */function Tile(props: {- speaking?: boolean;connecting?: boolean;class?: string;children: JSX.Element;@@ -59,7 +54,6 @@ function Tile(props: {<divclass={`call-tile relative flex min-h-30 items-center justify-center overflow-hidden rounded-lg border border-edge-muted bg-panel ${props.class ?? ''}`}classList={{ 'animate-pulse': props.connecting }}- data-speaking={props.speaking ? 'true' : undefined}>{props.children}</div>@@ -67,16 +61,10 @@ function Tile(props: {}/** ParticipantAvatar, shown when a camera is off. */-function Avatar(props: { person: CallPerson; small?: boolean }) {+function Avatar(props: { person: CallPerson }) {return (<div class="flex size-full items-center justify-center p-4">- <div- class="overflow-hidden rounded-full"- classList={{- 'size-12': props.small,- 'size-20 sm:size-24': !props.small,- }}- >+ <div class="size-20 overflow-hidden rounded-full sm:size-24"><imgclass="size-full object-cover"src={homepagePeople[props.person].photo}@@ -87,21 +75,11 @@ function Avatar(props: { person: CallPerson; small?: boolean }) {);}-function Camera(props: { person: CallPerson; mirror?: boolean }) {- return (- <img- class="call-camera"- classList={{ 'call-camera-mirror': props.mirror }}- src={cameraPhoto[props.person]}- alt=""- />- );-}-function ControlButton(props: {label: string;pressed?: boolean;danger?: boolean;+ disabled?: boolean;onClick?: () => void;children: JSX.Element;}) {@@ -112,6 +90,7 @@ function ControlButton(props: {label={props.label}tooltipPlacement="top"aria-pressed={props.pressed}+ disabled={props.disabled}onClick={() => props.onClick?.()}class={`call-control size-10 @sm:size-12 ${props.danger ? 'call-control-danger' : ''}`}>@@ -125,7 +104,8 @@ function MediaGroup(props: {settings: string;toggleLabel: string;active: boolean;- onToggle: () => void;+ onToggle?: () => void;+ disabled?: boolean;children: JSX.Element;}) {return (@@ -138,6 +118,7 @@ function MediaGroup(props: {label={props.toggleLabel}pressed={props.active}onClick={props.onToggle}+ disabled={props.disabled}>{props.children}</ControlButton>@@ -147,6 +128,7 @@ function MediaGroup(props: {tooltipDisabledaria-label={props.settings}aria-expanded={false}+ disabledclass="call-control-caret h-10 w-5 @sm:h-12 @sm:w-8"><CaretUp class="size-4" />@@ -156,42 +138,27 @@ function MediaGroup(props: {}/**- * CallOverlay inside the channel's Call tab: remote tiles in a grid, your- * picture-in-picture, CallControlBar, the chat toggle, and Share with team.+ * Marketing call view: all participants, including you, share the same grid.+ * Keeps the call controls and chat alongside camera-off participant tiles. Camera-off tiles+ * use the app’s participant avatars; profile photos never stand in for video.*/export function CallOverlayView(props: {remote: RemoteTile[];you: CallPerson;connecting: boolean;muted: boolean;- cameraOff: boolean;- background: boolean;- sharing: boolean;- sharedWithTeam: boolean;chatOpen: boolean;chat: WorkspaceComment[];onMute: () => void;- onCamera: () => void;- onBackground: () => void;- onShareScreen: () => void;- onShareWithTeam: () => void;onChat: () => void;onSendChat: (body: string) => void;onLeave: () => void;}) {- const columns = () =>- props.remote.length <= 1 ? 1 : props.remote.length <= 4 ? 2 : 3;- const local = (pip: boolean) => (- <Tile- class={pip ? 'size-full min-h-0' : 'size-full'}- connecting={props.connecting}- >- <Show- when={!props.connecting && !props.cameraOff}- fallback={<Avatar person={props.you} small={pip} />}- >- <Camera person={props.you} mirror />- </Show>+ const count = () => props.remote.length + 1;+ const columns = () => (count() <= 1 ? 1 : count() <= 4 ? 2 : 3);+ const local = () => (+ <Tile connecting={props.connecting}>+ <Avatar person={props.you} /><Show when={props.muted}><MutedBadge label="You are muted" /></Show>@@ -204,55 +171,29 @@ export function CallOverlayView(props: {<div class="call-overlay flex h-full min-h-0 flex-col @container/call"><div class="relative flex min-h-0 flex-1 overflow-hidden"><div class="flex min-w-0 flex-1 flex-col">- <Show when={props.sharing}>- <div class="min-h-0 flex-1 pt-2">- <div class="relative flex h-full items-center justify-center overflow-hidden rounded-lg bg-surface-2">- <div class="call-screen-share" aria-hidden="true">- <span />- <span />- <span />- </div>- <VideoTag>Your screen</VideoTag>- </div>+ <div class="call-participant-area relative min-h-0 flex-1 pt-2">+ <div+ class="call-grid grid size-full auto-rows-fr gap-2 overflow-hidden"+ data-count={count()}+ style={{+ 'grid-template-columns': `repeat(${columns()}, minmax(0, 1fr))`,+ }}+ >+ <For each={props.remote}>+ {(tile) => (+ <Tile>+ <Avatar person={tile.person} />+ <Show when={tile.muted}>+ <MutedBadge+ label={`${homepagePeople[tile.person].name} is muted`}+ />+ </Show>+ <VideoTag>{homepagePeople[tile.person].name}</VideoTag>+ </Tile>+ )}+ </For>+ {local()}</div>- </Show>- <div- class="relative pt-2"- classList={{- 'h-45 shrink-0': props.sharing,- 'min-h-0 flex-1': !props.sharing,- }}- >- <Show when={props.remote.length > 0} fallback={local(false)}>- <div- class="call-grid grid size-full auto-rows-fr gap-2 overflow-hidden"- style={{- 'grid-template-columns': `repeat(${columns()}, minmax(0, 1fr))`,- }}- >- <For each={props.remote}>- {(tile) => (- <Tile speaking={tile.speaking}>- <Show- when={tile.video}- fallback={<Avatar person={tile.person} />}- >- <Camera person={tile.person} />- </Show>- <Show when={tile.muted}>- <MutedBadge- label={`${homepagePeople[tile.person].name} is muted`}- />- </Show>- <VideoTag>{homepagePeople[tile.person].name}</VideoTag>- </Tile>- )}- </For>- </div>- <div class="call-pip absolute right-4 bottom-4 z-10 aspect-video w-40 shadow-lg sm:w-48">- {local(true)}- </div>- </Show></div></div><Show when={props.chatOpen}>@@ -282,25 +223,6 @@ export function CallOverlayView(props: {</Show></div><div class="relative flex shrink-0 flex-col items-center gap-2 py-3">- <button- type="button"- role="checkbox"- aria-checked={props.sharedWithTeam}- title={- props.sharedWithTeam- ? "The creator's team can view the chat, transcript, and AI summary once the call ends"- : "Let the creator's team view the chat, transcript, and AI summary once the call ends"- }- class="call-team-share order-1"- onClick={() => props.onShareWithTeam()}- >- <span class="call-checkbox" data-checked={props.sharedWithTeam}>- <svg viewBox="0 0 12 12" aria-hidden="true">- <path d="m2.5 6.2 2.3 2.3 4.7-5" />- </svg>- </span>- <span class="whitespace-nowrap">Share with team</span>- </button><div class="call-controls-row"><div class="call-controls-center"><div@@ -324,34 +246,22 @@ export function CallOverlayView(props: {<MediaGrouplabel="Camera controls"settings="Camera settings"- toggleLabel={- props.cameraOff ? 'Turn on camera' : 'Turn off camera'- }- active={!props.cameraOff}- onToggle={props.onCamera}+ toggleLabel="Turn on camera"+ active={false}+ disabled>- <Show when={props.cameraOff} fallback={<VideoCamera />}>- <VideoCameraSlash />- </Show>+ <VideoCameraSlash /></MediaGroup><MediaGrouplabel="Background controls"settings="Background settings"- toggleLabel={- props.background- ? 'Turn off background'- : 'Turn on background'- }- active={props.background}- onToggle={props.onBackground}+ toggleLabel="Turn on background"+ active={false}+ disabled><ImageIcon /></MediaGroup>- <ControlButton- label={props.sharing ? 'Stop sharing screen' : 'Share screen'}- pressed={props.sharing}- onClick={props.onShareScreen}- >+ <ControlButton label="Share screen" disabled><Screencast /></ControlButton><ControlButtondiff --git a/apps/marketing/src/features/marketing/components/calls/CallRecord.tsx b/apps/marketing/src/features/marketing/components/calls/CallRecord.tsxindex 05d1ec896c..26a0f045d1 100644--- a/apps/marketing/src/features/marketing/components/calls/CallRecord.tsx+++ b/apps/marketing/src/features/marketing/components/calls/CallRecord.tsx@@ -72,6 +72,7 @@ export function createCallPlayback(duration: number) {seconds,playing,seekGeneration,+ pause: stop,toggle: () => (playing() ? stop() : play()),seek: (value: number) => {setSeconds(Math.max(0, Math.min(duration, value)));@@ -103,6 +104,8 @@ export function ShareIcon(props: { class?: string }) {export function CallRecordTopBar(props: {title: string;onBack?: () => void;+ onCallAgain?: () => void;+ onAsk?: () => void;}) {return (<ViewShell.TopBar class="call-bar">@@ -119,12 +122,21 @@ export function CallRecordTopBar(props: {<PhoneCall class="size-4 shrink-0 text-ink-muted" /><span class="truncate text-sm font-medium">{props.title}</span><div class="ml-auto flex shrink-0 items-center gap-1">- <Button variant="plain" size="icon-md" label="Call Again">+ <Button+ variant="plain"+ size="icon-md"+ label="Call Again"+ onClick={props.onCallAgain}+ disabled={!props.onCallAgain}+ ><PhoneCall class="size-4" /></Button><Buttonvariant="plain"size="md"+ aria-label="Ask Macro"+ onClick={props.onAsk}+ disabled={!props.onAsk}tooltip="Ask Macro"class="call-bar-action">@@ -134,6 +146,8 @@ export function CallRecordTopBar(props: {<Buttonvariant="plain"size="md"+ aria-label="Share"+ disabledtooltip="Share call"class="call-bar-action">@@ -144,6 +158,7 @@ export function CallRecordTopBar(props: {variant="plain"size="icon-md"label="Copy Share Link"+ disabledclass="call-bar-copy"><LinkIcon class="size-3.5" />diff --git a/apps/marketing/src/features/marketing/components/calls/CallSession.tsx b/apps/marketing/src/features/marketing/components/calls/CallSession.tsxnew file mode 100644index 0000000000..230c821b13--- /dev/null+++ b/apps/marketing/src/features/marketing/components/calls/CallSession.tsx@@ -0,0 +1,63 @@+import { createSignal } from 'solid-js';+import type { WorkspaceComment } from '../../core/dummy-workspace';+import { CallOverlayView, type RemoteTile } from './CallOverlay';+import type { CallPerson } from './call-fixtures';++/** The local side of one live call: devices, chat, and who has joined. */+export function createCallSession(+ initial: RemoteTile[],+ initialChat: WorkspaceComment[] = [],+ you: CallPerson = 'jacob'+) {+ const [joined, setJoined] = createSignal(false);+ const [connecting, setConnecting] = createSignal(false);+ const [remote, setRemote] = createSignal(initial);+ const [muted, setMuted] = createSignal(false);+ const [chatOpen, setChatOpen] = createSignal(false);+ const [chat, setChat] = createSignal<WorkspaceComment[]>(initialChat);+ return {+ chat,+ joined,+ setJoined: (value: boolean) => {+ setJoined(value);+ },+ connecting,+ setConnecting: (value: boolean) => {+ setConnecting(value);+ },+ remote,+ setRemote: (value: RemoteTile[]) => {+ setRemote(value);+ },+ view: (props: { onLeave: () => void; time: string }) => (+ <div class="call-tab-body">+ <CallOverlayView+ remote={remote()}+ you={you}+ connecting={connecting()}+ muted={muted()}+ chatOpen={chatOpen()}+ chat={chat()}+ onMute={() => setMuted(!muted())}+ onChat={() => setChatOpen(!chatOpen())}+ onSendChat={(body) =>+ setChat((list) => [+ ...list,+ {+ id: `chat-${list.length}`,+ person: you,+ body,+ time: props.time,+ },+ ])+ }+ onLeave={() => {+ setJoined(false);+ setChatOpen(false);+ props.onLeave();+ }}+ />+ </div>+ ),+ };+}diff --git a/apps/marketing/src/features/marketing/components/calls/CallStories.test.tsx b/apps/marketing/src/features/marketing/components/calls/CallStories.test.tsxindex a40461f1d2..f343d91b41 100644--- a/apps/marketing/src/features/marketing/components/calls/CallStories.test.tsx+++ b/apps/marketing/src/features/marketing/components/calls/CallStories.test.tsx@@ -8,6 +8,8 @@ import {CallTranscriptDemo,} from './CallStories';+import { CallTeamMemoryDemo } from './CallTeamMemoryDemo';+let intersections: IntersectionObserverCallback[];let motionListeners: (() => void)[];let reduced = false;@@ -74,56 +76,57 @@ 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('Summary')).toBeTruthy();expect(view.getByText('Recording')).toBeTruthy();expect(playerTime(view.container)).toBe('0:00 / 18:22');- const line = view.getByRole('button', { name: 'Go to 1:12: Julia Westphal' });+ const line = view.getByRole('button', { name: 'Go to 1:12: Julia' });fireEvent.click(line);expect(line.getAttribute('aria-pressed')).toBe('true');expect(playerTime(view.container)).toBe('1:12 / 18:22');fireEvent.click(view.getByRole('button', { name: 'Play' }));vi.advanceTimersByTime(3000);expect(playerTime(view.container)).toBe('1:15 / 18:22');+ fireEvent.click(view.getByRole('button', { name: 'In the call' }));+ vi.advanceTimersByTime(3000);+ fireEvent.click(view.getByRole('button', { name: 'After the call' }));+ expect(playerTime(view.container)).toBe('1:15 / 18:22');+ expect(view.getByRole('button', { name: 'Play' })).toBeTruthy();});-it('ends the live call and opens its new record from the Calls tab', () => {+it('adds the finished call to history without opening another record automatically', () => {const view = render(() => <CallDefaultDemo />);- expect(view.getByText('A call is active in this channel')).toBeTruthy();- expect(view.getByText('12:03')).toBeTruthy();+ expect(view.getByRole('grid', { name: 'Calls' })).toBeTruthy();+ expect(view.queryByText('Training prep')).toBeNull();visible(true);- vi.advanceTimersByTime(1000);- expect(view.getByText('12:04')).toBeTruthy();- vi.advanceTimersByTime(1000);- expect(view.queryByText('A call is active in this channel')).toBeNull();- vi.advanceTimersByTime(1400);+ vi.advanceTimersByTime(6000);const calls = within(view.getByRole('grid', { name: 'Calls' }));- expect(calls.getByText('Invite bug triage')).toBeTruthy();- expect(calls.getByText('12m 4s')).toBeTruthy();- vi.advanceTimersByTime(1500);- expect(view.getByRole('heading', { name: 'Invite bug triage' })).toBeTruthy();- expect(view.getByText('[email protected]')).toBeTruthy();- expect(- view.getByRole('button', { name: 'Go to 0:03: Gabriel Birman' })- ).toBeTruthy();- vi.advanceTimersByTime(30000);- expect(view.container.querySelector('.demo-cursor')).toBeNull();+ expect(calls.getByText('Training prep')).toBeTruthy();+ expect(view.queryByRole('heading', { name: 'Training prep' })).toBeNull();+ fireEvent.click(calls.getByRole('gridcell', { name: /Training prep/ }));+ expect(view.getByRole('heading', { name: 'Training prep' })).toBeTruthy();+ expect(view.getByRole('button', { name: 'Go to 0:03: Julia' })).toBeTruthy();});-it('shows the finished record without a cursor for reduced motion', () => {+it('shows finished call history without opening a record for reduced motion', () => {reduced = true;const view = render(() => <CallDefaultDemo />);- expect(view.getByRole('heading', { name: 'Invite bug triage' })).toBeTruthy();+ expect(view.getByRole('grid', { name: 'Calls' })).toBeTruthy();+ expect(view.getByText('Training prep')).toBeTruthy();+ expect(view.queryByRole('heading', { name: 'Training prep' })).toBeNull();expect(view.container.querySelector('.demo-cursor')).toBeNull();});it('jumps to the clicked line, then offers Sync to video time after scrolling away', () => {const view = render(() => <CallTranscriptDemo />);visible(true);- vi.advanceTimersByTime(2100);- const line = view.getByRole('button', { name: 'Go to 1:38: Teo' });+ vi.advanceTimersByTime(1000);+ expect(view.container.querySelector('.demo-cursor')).toBeNull();+ vi.advanceTimersByTime(1100);+ const line = view.getByRole('button', { name: 'Go to 1:12: Julia' });expect(line.getAttribute('aria-pressed')).toBe('true');- expect(playerTime(view.container)).toBe('1:38 / 18:22');+ expect(playerTime(view.container)).toBe('1:12 / 18:22');vi.advanceTimersByTime(1300);const sync = view.getByRole('button', { name: 'Sync to video time' });vi.advanceTimersByTime(2100);@@ -134,28 +137,45 @@ it('jumps to the clicked line, then offers Sync to video time after scrolling awit('lets a visitor choose a transcript line without being moved back by motion', () => {const view = render(() => <CallTranscriptDemo />);visible(true);- const line = view.getByRole('button', { name: 'Go to 1:12: Julia Westphal' });+ const line = view.getByRole('button', { name: 'Go to 0:41: Teo' });fireEvent.pointerDown(line);fireEvent.click(line);reduce();vi.advanceTimersByTime(20000);expect(line.getAttribute('aria-pressed')).toBe('true');- expect(playerTime(view.container)).toBe('1:12 / 18:22');+ expect(playerTime(view.container)).toBe('0:41 / 18:22');});-it('has @Macro read the call and write what was decided into the task', () => {+it('uses the call to reassign the existing task and add pending next steps', () => {const view = render(() => <CallFollowupDemo />);expect(view.getByText(/Calling 1 tool/)).toBeTruthy();visible(true);vi.advanceTimersByTime(4000);- expect(view.getByText(/Called 4 tools/)).toBeTruthy();- expect(view.getByText('call transcript')).toBeTruthy();- const task = within(view.getByRole('region', { name: 'Task' }));+ expect(+ view+ .getByRole('button', { name: 'Called 4 tools' })+ .getAttribute('aria-expanded')+ ).toBe('false');+ expect(view.getByText('Teo → Julia')).toBeTruthy();+ expect(view.getByRole('button', { name: /^Training check-in/ })).toBeTruthy();+ expect(view.queryByRole('region', { name: 'Linked item' })).toBeNull();+ fireEvent.click(+ within(view.getByRole('group', { name: 'Agent answer' })).getByRole(+ 'button',+ { name: 'Prepare Thursday’s training' }+ )+ );+ const task = within(view.getByRole('region', { name: 'Linked item' }));expect(task.getByRole('textbox', { name: 'Task description' }).textContent- ).toContain('From this morning’s launch check-in');+ ).toContain('From the training check-in');+ expect(+ task+ .getByRole('checkbox', { name: 'Get Teo’s notes today' })+ .getAttribute('aria-checked')+ ).toBe('false');expect(- task.getByRole('checkbox', { name: 'Existing accounts switch teams' })+ task.getByRole('checkbox', { name: 'Update the slides' })).toBeTruthy();});@@ -163,10 +183,25 @@ it('starts a call from the channel header and shows everyone who joins', () => {const view = render(() => <CallStartDemo />);expect(view.getByRole('button', { name: 'Call' })).toBeTruthy();visible(true);- vi.advanceTimersByTime(4300);+ vi.advanceTimersByTime(2200);+ expect(view.getByRole('button', { name: 'Call' })).toBeTruthy();+ expect(view.queryByText('Connecting...')).toBeNull();+ const cursor = view.container.querySelector('.demo-cursor');+ expect(cursor).toBeTruthy();+ expect(cursor?.textContent).toBe('');+ vi.advanceTimersByTime(1200);+ expect(cursor?.getAttribute('data-clicking')).toBe('true');+ vi.advanceTimersByTime(500);+ expect(view.getByText('Connecting...')).toBeTruthy();+ expect(view.queryByText('Julia')).toBeNull();+ vi.advanceTimersByTime(1800);+ expect(view.getByText('Julia')).toBeTruthy();+ expect(view.queryByText('Gabriel')).toBeNull();+ vi.advanceTimersByTime(1300);expect(view.queryByRole('button', { name: 'Call' })).toBeNull();- expect(view.getByText('Julia Westphal')).toBeTruthy();- expect(view.getByText('Gabriel Birman')).toBeTruthy();+ expect(view.container.querySelector('.demo-cursor')).toBeNull();+ expect(view.getByText('Julia')).toBeTruthy();+ expect(view.getByText('Gabriel')).toBeTruthy();expect(view.getByRole('status', { name: 'Teo is muted' })).toBeTruthy();expect(view.getByText('You')).toBeTruthy();fireEvent.click(view.getByRole('button', { name: 'Mute microphone' }));@@ -175,3 +210,197 @@ it('starts a call from the channel header and shows everyone who joins', () => {expect(view.getByText('A call is active in this channel')).toBeTruthy();expect(view.getAllByRole('button', { name: 'Join' }).length).toBe(2);});++it('keeps a visitor in the live hero after interacting, including a motion preference change', () => {+ const view = render(() => <CallHeroDemo />);+ visible(true);+ const mute = view.getByRole('button', { name: 'Mute microphone' });+ fireEvent.pointerDown(mute);+ fireEvent.click(mute);+ reduce();+ vi.advanceTimersByTime(20000);+ expect(view.getByRole('button', { name: 'Unmute microphone' })).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Leave call' }));+ expect(view.getByRole('heading', { name: 'Training check-in' })).toBeTruthy();+});++it('starts with one pane in reduced motion and preserves task edits through source navigation', () => {+ reduced = true;+ const view = render(() => <CallFollowupDemo />);+ expect(view.queryByRole('region', { name: 'Linked item' })).toBeNull();+ const result = within(+ view.getByRole('group', { name: 'Agent answer' })+ ).getByRole('button', { name: 'Prepare Thursday’s training' });+ fireEvent.click(result);+ let task = within(view.getByRole('region', { name: 'Linked item' }));+ expect(+ task+ .getAllByRole('button', { name: 'Change assignee' })+ .every((button) => button.textContent?.includes('Julia'))+ ).toBe(true);+ const step = task.getByRole('checkbox', {+ name: 'Update the slides',+ });+ expect(step.getAttribute('aria-checked')).toBe('false');+ fireEvent.click(step);+ fireEvent.keyDown(view.getByRole('button', { name: 'Close linked item' }), {+ key: 'Escape',+ });+ expect(document.activeElement).toBe(result);+ expect(view.queryByRole('region', { name: 'Linked item' })).toBeNull();+ const source = view.getByRole('button', {+ name: /^Training check-in/,+ });+ fireEvent.click(source);+ const close = view.getByRole('button', { name: 'Close linked item' });+ expect(document.activeElement).toBe(close);+ expect(view.getByRole('heading', { name: 'Training check-in' })).toBeTruthy();+ fireEvent.click(close);+ expect(document.activeElement).toBe(source);+ fireEvent.click(result);+ task = within(view.getByRole('region', { name: 'Linked item' }));+ expect(+ task+ .getByRole('checkbox', { name: 'Update the slides' })+ .getAttribute('aria-checked')+ ).toBe('true');+});++it('opening a task takes control before the scripted edit and later motion changes', () => {+ const view = render(() => <CallFollowupDemo />);+ visible(true);+ vi.advanceTimersByTime(1600);+ fireEvent.click(+ view.getByRole('button', { name: 'Prepare Thursday’s training' })+ );+ const task = within(view.getByRole('region', { name: 'Linked item' }));+ reduce();+ vi.advanceTimersByTime(20000);+ expect(+ task+ .getAllByRole('button', { name: 'Change assignee' })+ .every((button) => button.textContent?.includes('Teo'))+ ).toBe(true);+ expect(+ task.queryByRole('checkbox', {+ name: 'Update the slides',+ })+ ).toBeNull();+});++it('keeps a recognizable call visible without screen sharing or simulated video', () => {+ const view = render(() => <CallHeroDemo />);+ expect(+ view.getByRole('button', { name: 'Share screen' }).hasAttribute('disabled')+ ).toBeTruthy();+ visible(true);+ vi.advanceTimersByTime(20000);+ expect(view.getByRole('button', { name: 'Leave call' })).toBeTruthy();+ expect(view.queryByRole('checkbox', { name: 'Share with team' })).toBeNull();+ expect(view.container.querySelector('.call-camera')).toBeNull();+ expect(view.container.querySelector('.call-shared-work')).toBeNull();+ expect(view.queryByText('Your screen')).toBeNull();+ fireEvent.click(view.getByRole('button', { name: 'After the call' }));+ expect(view.container.querySelector('.call-poster-video')).toBeNull();+});++it('finds a missed call from words in its transcript, then opens that source', () => {+ reduced = true;+ const view = render(() => <CallDefaultDemo />);+ fireEvent.input(view.getByRole('searchbox', { name: 'Search calls' }), {+ target: { value: 'half an hour' },+ });+ const rows = view.getAllByRole('gridcell');+ expect(rows).toHaveLength(1);+ expect(rows[0].textContent).toContain('Training prep');+ fireEvent.click(rows[0]);+ expect(view.getByText(/We’ve got half an hour/)).toBeTruthy();+});++it('preserves call chat in the saved record and lets the visitor call again', () => {+ const view = render(() => <CallHeroDemo />);+ fireEvent.click(view.getByRole('button', { name: 'Open chat' }));+ const composer = view.getByRole('textbox', { name: 'Message this call' });+ fireEvent.input(composer, {+ target: { value: 'Please send the final attendee list.' },+ });+ fireEvent.click(view.getByRole('button', { name: 'Send demo message' }));+ fireEvent.click(view.getByRole('button', { name: 'Leave call' }));+ expect(view.getByText('Please send the final attendee list.')).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Call Again' }));+ expect(view.getByRole('button', { name: 'Leave call' })).toBeTruthy();+});++it('replays the start-call story on return, without looping while visible', () => {+ const view = render(() => <CallStartDemo />);+ visible(true);+ vi.advanceTimersByTime(9000);+ expect(view.getByRole('button', { name: 'Leave call' })).toBeTruthy();+ vi.advanceTimersByTime(30000);+ expect(view.getByRole('button', { name: 'Leave call' })).toBeTruthy();+ visible(false);+ visible(true);+ expect(view.getByRole('button', { name: 'Call' })).toBeTruthy();+ vi.advanceTimersByTime(9000);+ expect(view.getByRole('button', { name: 'Leave call' })).toBeTruthy();+});++it('does not replay over a visitor’s call controls after leaving and returning', () => {+ const view = render(() => <CallStartDemo />);+ visible(true);+ vi.advanceTimersByTime(9000);+ const mute = view.getByRole('button', { name: 'Mute microphone' });+ fireEvent.pointerDown(mute);+ fireEvent.click(mute);+ visible(false);+ visible(true);+ vi.advanceTimersByTime(10000);+ expect(view.getByRole('button', { name: 'Unmute microphone' })).toBeTruthy();+ expect(view.queryByRole('button', { name: 'Call' })).toBeNull();+});++it('keeps the completed start-call view for reduced motion on return', () => {+ reduced = true;+ const view = render(() => <CallStartDemo />);+ visible(true);+ visible(false);+ visible(true);+ expect(view.getByRole('button', { name: 'Leave call' })).toBeTruthy();+ expect(view.queryByRole('button', { name: 'Call' })).toBeNull();+});++it('shares a channel call with an absent teammate and opens its transcript', () => {+ const view = render(() => <CallTeamMemoryDemo />);+ expect(+ (+ view.getByRole('checkbox', {+ name: 'Share with team',+ }) as HTMLInputElement+ ).checked+ ).toBe(true);+ fireEvent.click(view.getByRole('button', { name: 'Leave call' }));+ fireEvent.click(view.getByRole('gridcell', { name: /Training prep/ }));+ expect(view.getByRole('heading', { name: 'Summary' })).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Go to 1:02: Julia' }));+ expect(playerTime(view.container)).toContain('1:02');+});+it('does not expose an unshared recording to the absent teammate', () => {+ const view = render(() => <CallTeamMemoryDemo />);+ fireEvent.click(view.getByRole('checkbox', { name: 'Share with team' }));+ fireEvent.click(view.getByRole('button', { name: 'Leave call' }));+ expect(view.queryByRole('gridcell', { name: /Training prep/ })).toBeNull();+ expect(+ view.getByText('This call wasn’t shared with Gabriel’s team.')+ ).toBeTruthy();+});++it('uses the toolbar hang-up control and a cursor to walk through team memory', () => {+ 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();+ 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 a9d573716c..be6ca4944e 100644--- a/apps/marketing/src/features/marketing/components/calls/CallStories.tsx+++ b/apps/marketing/src/features/marketing/components/calls/CallStories.tsx@@ -4,6 +4,7 @@ import ListChecks from '@phosphor/list-checks.svg';import Newspaper from '@phosphor/newspaper.svg';import PencilSimple from '@phosphor/pencil-simple.svg';import Sparkle from '@phosphor/sparkle.svg';+import X from '@phosphor/x.svg';import { UserMessageBubble } from '@ui/components/UserMessageBubble';import {type Accessor,@@ -17,10 +18,8 @@ import {Switch,} from 'solid-js';import type { WorkspaceComment } from '../../core/dummy-workspace';-import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';import { DemoCursor } from '../DemoCursor';-import { DemoMention, DemoMentionText } from '../DemoMention';import { ViewShell } from '../DemoWorkspaceChrome';import { ChannelComposer } from '../email/frozen/ChannelComposer';import { ProductDemo } from '../product/ProductPage';@@ -36,7 +35,14 @@ import {ChannelTopBar,JoinCallEmptyState,} from './CallChannel';-import { CallOverlayView, type RemoteTile } from './CallOverlay';+import { CallFollowupAnswer } from './CallFollowupAnswer';+import type { RemoteTile } from './CallOverlay';+import { createCallSession } from './CallSession';+import { createCallProject, TRAINING_TITLE } from './call-project';+import { createDemoPointer } from './demo-pointer';++export { CallHeroDemo } from './CallHero';+import {CallRecordBody,CallRecordTopBar,@@ -44,142 +50,56 @@ import {type TranscriptControls,} from './CallRecord';import {- announcementReview,type CallPerson,- helpCenterReview,- inviteDesignReview,- inviteTriage,- launchCheckIn,- onboardingWalkthrough,- pricingFeedback,+ rolloutCheckIn,+ rolloutPlanning,type SampleCall,- weeklyPlanning,+ trainingReview,} from './call-fixtures';-import { createDemoPointer } from './demo-pointer';import '../workspace/dummy-workspace.css';import '../demo-markdown.css';import './call-stories.css';-function FlowPointer(props: {- pointer: Accessor<{ x: number; y: number } | undefined>;- clicking: boolean;-}) {- return (- <Show when={props.pointer()}>- {(p) => (- <DemoCursor- label="Jacob"- class="call-flow-pointer"- clicking={props.clicking}- style={{ transform: `translate(${p().x}px, ${p().y}px)` }}- />- )}- </Show>- );-}--/** Hero: the full call record from CallBlockAdapter, local and interactive. */-export function CallHeroDemo() {- const playback = createCallPlayback(launchCheckIn.duration);- return (- <ProductDemo label="Launch check-in call record">- <CallRecordTopBar title={launchCheckIn.title} />- <CallRecordBody- call={launchCheckIn}- playback={playback}- transcriptHeight={420}- />- </ProductDemo>- );-}-const callsByRow: Record<string, SampleCall> = {- triage: inviteTriage,- 'check-in': launchCheckIn,- announcement: announcementReview,- pricing: pricingFeedback,- weekly: weeklyPlanning,- onboarding: onboardingWalkthrough,- 'help-center': helpCenterReview,- design: inviteDesignReview,+ training: trainingReview,+ 'check-in': rolloutCheckIn,+ planning: rolloutPlanning,};const earlierCalls: CallListRow[] = [{id: 'check-in',- title: 'Launch check-in',- summary:- 'Launch stays on Thursday. Teo checks both invite paths by Wednesday night.',+ title: rolloutCheckIn.title,+ transcript: rolloutCheckIn.segments+ .map((segment) => segment.text)+ .join(' '),+ summary: 'Julia leads Thursday’s training at 10.',status: 'attended',duration: '18m 22s',people: ['jacob', 'teo', 'julia'],time: '9:48 AM',},{- id: 'announcement',- title: 'Announcement review',- summary: 'Julia walked through the draft. The pricing paragraph comes out.',- status: 'attended',- duration: '9m 41s',- people: ['julia', 'jacob'],- time: 'Yesterday',- },- {- id: 'pricing',- title: 'Pricing page feedback',- summary: 'Keep the free plan above the fold. Gabriel tests the table.',- status: 'attended',- duration: '24m 10s',- people: ['jacob', 'gabriel', 'julia'],- time: 'Monday',- },- {- id: 'weekly',- title: 'Weekly planning',- summary: 'Launch week. Teo pauses onboarding until the invite fix ships.',- status: 'attended',- duration: '31m 5s',- people: ['jacob', 'julia', 'teo', 'gabriel'],- time: 'Monday',- },- {- id: 'onboarding',- title: 'Onboarding walkthrough',- summary: 'Teo showed the new invite screen. Gabriel wants one fewer step.',- status: 'missed',- duration: '16m 48s',- people: ['teo', 'gabriel'],- time: '09/18/26',- },- {- id: 'help-center',- title: 'Help center review',- summary:- 'Valentina drafted three articles. Julia links them from the post.',- status: 'missed',- duration: '14m 2s',- people: ['valentina', 'julia'],- time: '09/17/26',- },- {- id: 'design',- title: 'Invite screen design review',- summary: 'Keep the team picker first. Teo removes the workspace name step.',+ id: 'planning',+ title: rolloutPlanning.title,+ transcript: rolloutPlanning.segments+ .map((segment) => segment.text)+ .join(' '),+ summary: 'Training is Thursday at 10. Teo prepares the session.',status: 'attended',- duration: '22m 40s',+ duration: '14m 10s',people: ['jacob', 'teo', 'julia'],- time: '09/16/26',+ time: 'Yesterday',},];--const triageRow: CallListRow = {- id: 'triage',- title: 'Invite bug triage',- summary:- 'Gabriel reproduced the invite bug on staging. Teo ships the fix today.',+const trainingRow: CallListRow = {+ id: 'training',+ title: trainingReview.title,+ transcript: trainingReview.segments.map((segment) => segment.text).join(' '),+ summary: 'Keep it to 30 minutes. Julia finishes the slides.',status: 'missed',duration: '12m 4s',- people: ['teo', 'gabriel'],+ people: ['teo', 'julia'],time: '11:02 AM',};@@ -191,73 +111,6 @@ const channelPeople: CallPerson[] = ['valentina',];-/** The local side of one live call: devices, chat, and who has joined. */-function createCallSession(initial: RemoteTile[]) {- const [joined, setJoined] = createSignal(false);- const [connecting, setConnecting] = createSignal(false);- const [remote, setRemote] = createSignal(initial);- const [muted, setMuted] = createSignal(false);- const [cameraOff, setCameraOff] = createSignal(false);- const [background, setBackground] = createSignal(false);- const [sharing, setSharing] = createSignal(false);- const [teamShare, setTeamShare] = createSignal(true);- const [chatOpen, setChatOpen] = createSignal(false);- const [chat, setChat] = createSignal<WorkspaceComment[]>([]);- return {- joined,- setJoined: (value: boolean) => {- setJoined(value);- },- connecting,- setConnecting: (value: boolean) => {- setConnecting(value);- },- remote,- setRemote: (value: RemoteTile[]) => {- setRemote(value);- },- view: (props: { onLeave: () => void; time: string }) => (- <div class="call-tab-body">- <CallOverlayView- remote={remote()}- you="jacob"- connecting={connecting()}- muted={muted()}- cameraOff={cameraOff()}- background={background()}- sharing={sharing()}- sharedWithTeam={teamShare()}- chatOpen={chatOpen()}- chat={chat()}- onMute={() => setMuted(!muted())}- onCamera={() => setCameraOff(!cameraOff())}- onBackground={() => setBackground(!background())}- onShareScreen={() => setSharing(!sharing())}- onShareWithTeam={() => setTeamShare(!teamShare())}- onChat={() => setChatOpen(!chatOpen())}- onSendChat={(body) =>- setChat((list) => [- ...list,- {- id: `chat-${list.length}`,- person: 'jacob',- body,- time: props.time,- },- ])- }- onLeave={() => {- setJoined(false);- setChatOpen(false);- setSharing(false);- props.onLeave();- }}- />- </div>- ),- };-}-/*** ChannelDetail for #launch: the tab strip, the live call, its Calls tab,* and the call records it opens. Walkthroughs drive it through `state`.@@ -387,35 +240,19 @@ function RecordPane(props: { call: SampleCall; onBack: () => void }) {const duringCall: WorkspaceComment[] = [{- id: 'thursday',- person: 'jacob',- body: 'Launch is still Thursday at 9. If anything blocks it, say so in here.',+ id: 'notes',+ person: 'teo',+ body: 'I’ve got the notes open.',time: '10:12 AM',},{- id: 'help',- person: 'valentina',- body: 'Help center articles are drafted and linked in the launch plan.',- time: '10:20 AM',- },- {- id: 'draft',+ id: 'slides',person: 'julia',- body: 'Announcement draft is in the launch plan. Comments welcome.',- time: '10:31 AM',- },- {- id: 'repro',- person: 'gabriel',- body: 'I can reproduce the invite bug on staging. New accounts only.',- time: '10:46 AM',- },- {- id: 'hop-on',- person: 'teo',- body: '@[Gabriel Birman](demo-mention:gabriel) hop on a call? I want to see it before I touch sign-up.',- time: '10:49 AM',+ body: 'Can we go through the slides?',+ time: '10:20 AM',},+ { id: 'hop-on', person: 'teo', body: 'Sure, quick call?', time: '10:31 AM' },+ { id: 'ready', person: 'julia', body: 'Yep.', time: '10:49 AM' },];const appendMessage =@@ -432,67 +269,45 @@ const appendMessage =/** Section 1: a live call ends and its record appears in the channel's Calls tab. */export function CallDefaultDemo() {let root!: HTMLDivElement;- let frame!: HTMLDivElement;- const [automatic, setAutomatic] = createSignal(true);const [phase, setPhase] = createSignal(0);const [live, setLive] = createSignal(true);const [activeFor, setActiveFor] = createSignal('12:03');- const [tab, setTab] = createSignal<ChannelTab>('messages');+ const [tab, setTab] = createSignal<ChannelTab>('calls');const [opened, setOpened] = createSignal<string>();const [messages, setMessages] = createSignal(duringCall);- const session = createCallSession([- { person: 'gabriel', video: true, speaking: true },- { person: 'teo', video: false },- ]);+ const session = createCallSession([{ person: 'julia' }, { person: 'teo' }]);const end = () => {setLive(false);if (tab() === 'call') setTab('messages');};const finish = () => {- setAutomatic(false);end();setTab('calls');- setOpened('triage');};const playback = createProductWalkthrough({root: () => root,- steps: 6,+ steps: 4,reset: () => {},reduced: finish,- delay: (step) => [0, 1000, 1000, 1000, 400, 1100, 400][step] ?? 1000,+ delay: (step) => [0, 1000, 1000, 500, 500][step] ?? 1000,advance: (step) => {setPhase(step);if (step === 1) setActiveFor('12:04');if (step === 2) end();- if (step === 4) setTab('calls');- if (step === 6) finish();+ if (step === 4) finish();},});const interact = () => {- setAutomatic(false);playback.pause();};- const pointer = createDemoPointer({- frame: () => frame,- active: automatic,- target: () =>- [- undefined,- undefined,- '[data-channel-tab="calls"]',- '[data-channel-tab="calls"]',- '[data-call-row="triage"]',- '[data-call-row="triage"]',- ][phase()],- });return (<div ref={root} class="call-flow">- <div ref={frame} class="call-flow-frame" onFocusIn={interact}>+ <div class="call-flow-frame" onFocusIn={interact}><ProductDemolabel="A call ends and its recording appears in the channel"onInteract={interact}- height={480}- mobileHeight={620}+ height={300}+ mobileHeight={390}><LaunchChanneltab={tab}@@ -502,18 +317,16 @@ export function CallDefaultDemo() {messages={messages}onSend={appendMessage(setMessages, '11:03 AM')}activeFor={activeFor}- rows={() => (live() ? earlierCalls : [triageRow, ...earlierCalls])}- fresh={() => (phase() >= 4 ? 'triage' : undefined)}+ rows={() =>+ live() ? earlierCalls : [trainingRow, ...earlierCalls]+ }+ fresh={() => (phase() >= 4 ? 'training' : undefined)}opened={opened}setOpened={setOpened}time="10:58 AM"interact={interact}/></ProductDemo>- <FlowPointer- pointer={pointer}- clicking={phase() === 3 || phase() === 5}- /></div></div>);@@ -522,17 +335,13 @@ export function CallDefaultDemo() {/** Section 2: click a transcript line, the recording seeks, follow mode returns. */export function CallTranscriptDemo() {let root!: HTMLDivElement;- let frame!: HTMLDivElement;let scroller!: HTMLDivElement;- const [automatic, setAutomatic] = createSignal(true);- const [phase, setPhase] = createSignal(0);- const call = launchCheckIn;+ const call = rolloutCheckIn;const player = createCallPlayback(call.duration);let transcript: TranscriptControls | undefined;let visitorScrolled = false;- const decision = call.segments.find((segment) => segment.id === 'verify')!;+ const decision = call.segments.find((segment) => segment.id === 'owner')!;const finish = () => {- setAutomatic(false);if (player.seconds() !== decision.at) player.seek(decision.at);};const playback = createProductWalkthrough({@@ -542,46 +351,29 @@ export function CallTranscriptDemo() {reduced: finish,delay: (step) => [0, 1000, 700, 350, 1300, 1100, 600, 350][step] ?? 1000,advance: (step) => {- setPhase(step);if (step === 3) player.seek(decision.at);if (step === 4) transcript?.wheelAway();if (step === 7) {transcript?.resync();- setAutomatic(false);}},});const interact = () => {- setAutomatic(false);playback.pause();};- const pointer = createDemoPointer({- frame: () => frame,- active: automatic,- target: () =>- [- undefined,- '[data-segment="verify"]',- '[data-segment="verify"]',- '[data-segment="verify"]',- '.call-transcript-scroll',- '[data-sync-video]',- '[data-sync-video]',- ][phase()],- });// Opens scrolled to the recording's controls and the transcript.onMount(() => {const align = () => {if (visitorScrolled) return;const section = scroller.querySelector<HTMLElement>(- '[data-call-section="transcript"]'+ '[data-call-section="recording"]');if (!section) return;const box = scroller.getBoundingClientRect();const bounds = section.getBoundingClientRect();scroller.scrollTop = Math.max(0,- scroller.scrollTop + bounds.bottom - box.bottom + 28+ scroller.scrollTop + bounds.top - box.top - 16);};const frameId = requestAnimationFrame(align);@@ -601,7 +393,7 @@ export function CallTranscriptDemo() {});return (<div ref={root} class="call-flow">- <div ref={frame} class="call-flow-frame" onFocusIn={interact}>+ <div class="call-flow-frame" onFocusIn={interact}><ProductDemolabel="Jump to a moment from its transcript line"onInteract={interact}@@ -622,29 +414,22 @@ export function CallTranscriptDemo() {}}/></ProductDemo>- <FlowPointer- pointer={pointer}- clicking={phase() === 2 || phase() === 6}- /></div></div>);}-const inviteMention = {- id: 'invite',- label: 'Fix the team invite handoff',- kind: 'task' as const,- status: 'In Progress' as const,-};-/** ItemPreview inline in a tool row. */-function TaskChip() {+function TaskChip(props: { onOpen: (button: HTMLButtonElement) => void }) {return (- <span class="call-item-chip">- <ListChecks class="size-4 shrink-0 text-task" />- <span class="truncate">Fix the team invite handoff</span>- </span>+ <button+ type="button"+ class="call-item-preview"+ onClick={(event) => props.onOpen(event.currentTarget)}+ >+ <ListChecks class="size-3.5 shrink-0 text-task" />+ <span class="min-w-0 truncate">{TRAINING_TITLE}</span>+ </button>);}@@ -668,9 +453,9 @@ function ToolRow(props: {);}-const toolRows = [+const toolRows = (openTask: (button: HTMLButtonElement) => void) => [() => (- <ToolRow icon={ListIcon} status="4 items">+ <ToolRow icon={ListIcon} status="3 items"><span class="min-w-0 truncate">Filter for <span class="text-ink">call</span> ordered by{' '}<span class="text-ink">recently updated</span>@@ -679,9 +464,7 @@ const toolRows = [),() => (<ToolRow icon={Newspaper}>- <span class="min-w-0 truncate">- Read <span class="text-ink">call transcript</span>- </span>+ Read <span class="text-ink">call transcript</span></ToolRow>),() => (@@ -690,46 +473,72 @@ const toolRows = [Read <span class="text-ink">document</span></span><span class="shrink-0 text-ink-placeholder">·</span>- <TaskChip />+ <TaskChip onOpen={openTask} /></ToolRow>),() => (<ToolRow icon={PencilSimple}><span class="shrink-0">Edit</span>- <TaskChip />+ <TaskChip onOpen={openTask} /></ToolRow>),];const callNote =- 'From this morning’s launch check-in: Teo checks both invite paths on staging by Wednesday night. Julia holds the announcement until he confirms, then sends it Thursday morning.';+ 'From the training check-in: Julia leads Thursday’s training at 10. Teo sends his notes today.';/** Section 3: @Macro reads the call and updates the task it was about. */export function CallFollowupDemo() {let root!: HTMLDivElement;- const w = createDummyWorkspace('tasks');+ const w = createCallProject();w.open('tasks', 'invite');- const original = w.data.tasks.find((task) => task.id === 'invite')!;- const description = original.description;w.updateTask('invite', { steps: [], comments: [] });const [tools, setTools] = createSignal(1);const [done, setDone] = createSignal(false);const [updated, setUpdated] = createSignal(false);const [open, setOpen] = createSignal(true);const [followups, setFollowups] = createSignal<string[]>([]);+ const [openedItem, setOpenedItem] = createSignal<'call' | 'task'>();+ let sourceTrigger: HTMLButtonElement | undefined;+ let closeItemButton: HTMLButtonElement | undefined;+ const sourcePlayer = createCallPlayback(rolloutCheckIn.duration);+ const openItem = (item: 'call' | 'task', button: HTMLButtonElement) => {+ playback.pause();+ sourcePlayer.pause();+ sourceTrigger = button;+ if (item === 'task') w.open('tasks', 'invite');+ setOpenedItem(item);+ closeItemButton?.focus({ preventScroll: true });+ };+ const closeItem = () => {+ sourcePlayer.pause();+ setOpenedItem(undefined);+ sourceTrigger?.focus({ preventScroll: true });+ };+ const openSource = (button: HTMLButtonElement) => openItem('call', button);+ const openTask = (button: HTMLButtonElement) => openItem('task', button);const update = () => {if (updated()) return;setUpdated(true);w.updateTask('invite', {- description: `${description}\n\n${callNote}`,+ owner: 'julia',+ description: callNote,steps: [{id: 'new',- text: 'New accounts land in the invited team',+ text: 'Get Teo’s notes today',+ done: false,+ },+ {+ id: 'existing',+ text: 'Update the slides',+ done: false,+ },+ {+ id: 'post',+ text: 'Send the invite',done: false,},- { id: 'existing', text: 'Existing accounts switch teams', done: false },- { id: 'post', text: 'Post in #launch when both pass', done: false },],});};@@ -737,6 +546,7 @@ export function CallFollowupDemo() {setTools(4);update();setDone(true);+ setOpen(false);};const playback = createProductWalkthrough({root: () => root,@@ -757,21 +567,30 @@ export function CallFollowupDemo() {label="Ask @Macro to update a task from a call"onInteract={playback.pause}height={560}- mobileHeight={880}+ mobileHeight={600}>- <div class="call-split">+ <div+ class="call-split"+ data-opened={openedItem()}+ onKeyDown={(event) => {+ if (event.key === 'Escape' && openedItem()) {+ event.stopPropagation();+ closeItem();+ }+ }}+ ><section class="call-pane call-agent-pane" aria-label="Agent session"><ViewShell.TopBar class="call-bar"><Sparkle class="size-4 shrink-0 text-ink-muted" /><span class="truncate text-sm font-medium">- Update Teo’s invite task+ Update the training task</span></ViewShell.TopBar><div class="dummy-scroll call-agent-log"><div class="flex w-full flex-col items-end gap-0.5"><UserMessageBubble><span class="text-base">- <DemoMentionText text="@[Macro](demo-mention:macro), use this morning’s launch check-in to update Teo’s invite task." />+ Update the training task from my last call.</span></UserMessageBubble></div>@@ -802,20 +621,21 @@ export function CallFollowupDemo() {</button><Show when={open()}><div class="flex min-w-0 flex-col pl-6">- <For each={toolRows.slice(0, tools())}>+ <For each={toolRows(openTask).slice(0, tools())}>{(row) => row()}</For></div></Show></div></Show>- <Show when={done()}>- <div class="call-agent-text">- Updated <DemoMention item={inviteMention} /> from the launch- check-in. Teo checks both invite paths on staging by- Wednesday night, and Julia holds the announcement until he- confirms. I added both paths to the checklist.- </div>+ <Show when={done() && task()}>+ {(updatedTask) => (+ <CallFollowupAnswer+ task={updatedTask()}+ onOpenTask={openTask}+ onOpenCall={openSource}+ />+ )}</Show></div><For each={followups()}>@@ -825,6 +645,12 @@ export function CallFollowupDemo() {</div>)}</For>+ <Show when={followups().length > 0}>+ <p class="text-sm text-ink-muted">+ This sample keeps your message here. Open Macro to work with+ an agent.+ </p>+ </Show></div><div class="dummy-composer call-agent-composer"><ChannelComposer@@ -834,28 +660,65 @@ export function CallFollowupDemo() {placeholder="Message the agent, @mention anything"onSend={(text) => {playback.pause();- finish();setFollowups((items) => [...items, text]);}}/></div></section>- <section- class="call-pane call-task-pane"- aria-label="Task"- data-updated={updated() ? 'true' : undefined}- >- <Show- when={- w.contentView() === 'tasks' && w.selected() === 'invite'- ? task()- : undefined- }- fallback={<ProductWorkspace workspace={w} />}+ <Show when={openedItem()}>+ <section+ class="call-pane call-task-pane"+ aria-label="Linked item"+ data-updated={updated() ? 'true' : undefined}>- {(item) => <TaskNotebook workspace={w} task={item()} />}- </Show>- </section>+ <ViewShell.TopBar class="call-linked-header">+ <span class="truncate text-sm font-medium">+ {openedItem() === 'call'+ ? rolloutCheckIn.title+ : TRAINING_TITLE}+ </span>+ <button+ ref={closeItemButton}+ type="button"+ aria-label="Close linked item"+ class="call-close-item"+ onClick={closeItem}+ >+ <X class="size-4" />+ </button>+ </ViewShell.TopBar>+ <div class="call-linked-content">+ <Show+ when={openedItem() === 'call'}+ fallback={+ <Show+ when={+ w.contentView() === 'tasks' && w.selected() === 'invite'+ ? task()+ : undefined+ }+ fallback={<ProductWorkspace workspace={w} />}+ >+ {(item) => (+ <TaskNotebook+ workspace={w}+ task={item()}+ hideCollectionNavigation+ />+ )}+ </Show>+ }+ >+ <CallRecordBody+ call={rolloutCheckIn}+ playback={sourcePlayer}+ transcriptHeight={250}+ class="call-record-compact"+ />+ </Show>+ </div>+ </section>+ </Show></div></ProductDemo></div>@@ -863,42 +726,25 @@ export function CallFollowupDemo() {}const joiners: RemoteTile[] = [- { person: 'julia', video: true, speaking: true },- { person: 'teo', video: false, muted: true },- { person: 'gabriel', video: true },+ { person: 'julia' },+ { person: 'teo', muted: true },+ { person: 'gabriel' },];const beforeCall: WorkspaceComment[] = [{- id: 'help',- person: 'valentina',- body: 'Help center articles for the new invite flow are drafted.',- time: '8:52 AM',- },- {- id: 'thursday',- person: 'jacob',- body: 'Two days to launch. Anything still open?',- time: '9:05 AM',- },- {- id: 'staging',- person: 'gabriel',- body: 'Staging is green again. The invite flow still needs a second look.',- time: '9:12 AM',- },- {- id: 'draft',- person: 'julia',- body: 'Announcement draft is ready. Can we talk through the invite timing before I schedule it?',+ id: 'free',+ person: 'teo',+ body: 'Anyone free for a quick call?',time: '9:20 AM',- documentId: 'plan',},+ { id: 'here', person: 'julia', body: 'Yep, I’m here.', time: '9:21 AM' },+ { id: 'same', person: 'gabriel', body: 'Same.', time: '9:21 AM' },{- id: 'around',- person: 'teo',- body: 'Yes, I’m around for the next half hour.',- time: '9:24 AM',+ id: 'calling',+ person: 'jacob',+ body: 'Cool, calling now.',+ time: '9:22 AM',},];@@ -906,7 +752,6 @@ const beforeCall: WorkspaceComment[] = [export function CallStartDemo() {let root!: HTMLDivElement;let frame!: HTMLDivElement;- const [automatic, setAutomatic] = createSignal(true);const [phase, setPhase] = createSignal(0);const [tab, setTab] = createSignal<ChannelTab>('messages');const [live, setLive] = createSignal(false);@@ -919,7 +764,6 @@ export function CallStartDemo() {setTab('call');};const finish = () => {- setAutomatic(false);start();session.setConnecting(false);session.setRemote(joiners);@@ -927,13 +771,20 @@ export function CallStartDemo() {const playback = createProductWalkthrough({root: () => root,steps: 5,- reset: () => {},+ reset: () => {+ setPhase(0);+ setLive(false);+ setTab('messages');+ setOpened(undefined);+ session.setJoined(false);+ session.setConnecting(false);+ session.setRemote([]);+ },reduced: finish,- delay: (step) => [0, 900, 700, 350, 1100, 1100][step] ?? 1000,+ delay: (step) => [0, 2000, 1400, 500, 1800, 1300][step] ?? 1300,advance: (step) => {setPhase(step);if (step === 3) {- setAutomatic(false);session.setConnecting(true);start();}@@ -944,18 +795,41 @@ export function CallStartDemo() {if (step === 5) finish();},});+ // Revisit the walkthrough without repeatedly resetting a visible call.+ onMount(() => {+ let entered = false;+ let replayOnReturn = false;+ const observer = new IntersectionObserver(+ ([entry]) => {+ if (!entry.isIntersecting) {+ if (entered) replayOnReturn = true;+ return;+ }+ if (+ replayOnReturn &&+ !matchMedia('(prefers-reduced-motion: reduce)').matches+ ) {+ playback.replayIfUntouched();+ }+ entered = true;+ replayOnReturn = false;+ },+ { threshold: 0.25 }+ );+ observer.observe(root);+ onCleanup(() => observer.disconnect());+ });const interact = () => {- setAutomatic(false);+ setPhase(0);playback.pause();};const pointer = createDemoPointer({frame: () => frame,- active: automatic,- target: () =>- [undefined, '[data-channel-call]', '[data-channel-call]'][phase()],+ active: () => phase() === 1 || phase() === 2,+ target: () => '[data-channel-call]',});return (- <div ref={root} class="call-flow">+ <div ref={root} class="call-flow call-start-story" data-phase={phase()}><div ref={frame} class="call-flow-frame" onFocusIn={interact}><ProductDemolabel="Start a call from the channel header"@@ -981,14 +855,30 @@ export function CallStartDemo() {messages={messages}onSend={appendMessage(setMessages, '9:31 AM')}activeFor={() => '0:42'}- rows={() => earlierCalls}+ rows={() => earlierCalls.filter((row) => row.id === 'planning')}opened={opened}setOpened={setOpened}time="9:31 AM"interact={interact}/></ProductDemo>- <FlowPointer pointer={pointer} clicking={phase() === 2} />+ <Show when={(phase() === 1 || phase() === 2) && pointer()}>+ {(position) => (+ <div+ class="call-start-pointer-anchor"+ aria-hidden="true"+ style={{+ transform: `translate(${position().x}px, ${position().y}px)`,+ }}+ >+ <DemoCursor+ label=""+ class="call-start-pointer"+ clicking={phase() === 2}+ />+ </div>+ )}+ </Show></div></div>);diff --git a/apps/marketing/src/features/marketing/components/calls/CallTeamMemoryDemo.tsx b/apps/marketing/src/features/marketing/components/calls/CallTeamMemoryDemo.tsxnew file mode 100644index 0000000000..b569b5a72f--- /dev/null+++ b/apps/marketing/src/features/marketing/components/calls/CallTeamMemoryDemo.tsx@@ -0,0 +1,183 @@+import { createSignal, Match, Show, Switch } from 'solid-js';+import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';+import { DemoCursor } from '../DemoCursor';+import { ViewShell } from '../DemoWorkspaceChrome';+import { ProductDemo } from '../product/ProductPage';+import { ChannelCallsList } from './CallChannel';+import {+ CallRecordBody,+ CallRecordTopBar,+ createCallPlayback,+} from './CallRecord';+import { createCallSession } from './CallSession';+import { trainingReview } from './call-fixtures';+import { createDemoPointer } from './demo-pointer';+import './call-stories.css';++/** A channel call shared with the team, then opened by someone who missed it. */+export function CallTeamMemoryDemo() {+ let root!: HTMLDivElement;+ let scroller: HTMLDivElement | undefined;+ const [aim, setAim] = createSignal<string>();+ const [clicking, setClicking] = createSignal(false);+ const [automatic, setAutomatic] = createSignal(true);+ const [phase, setPhase] = createSignal(0);+ const [shared, setShared] = createSignal(true);+ const [query, setQuery] = createSignal('');+ const player = createCallPlayback(trainingReview.duration);+ const session = createCallSession([{ person: 'teo' }], [], 'julia');+ const open = () => {+ player.pause();+ player.seek(0);+ setPhase(2);+ };+ const end = () => {+ session.setJoined(false);+ setPhase(1);+ };+ const revealMoment = () => {+ const line = scroller?.querySelector<HTMLElement>(+ '[aria-label="Go to 1:02: Julia"]'+ );+ if (scroller && line)+ scroller.scrollTop +=+ line.getBoundingClientRect().top -+ scroller.getBoundingClientRect().top -+ 200;+ };+ const playback = createProductWalkthrough({+ root: () => root,+ steps: 9,+ reset: () => {},+ delay: (step) =>+ [0, 1800, 600, 200, 1600, 600, 200, 3800, 600, 200][step] ?? 2000,+ reduced: () => {+ setAim(undefined);+ setShared(true);+ open();+ },+ advance: (step) => {+ setClicking(step === 2 || step === 5 || step === 8);+ if (step === 1) setAim('[aria-label="Leave call"]');+ if (step === 3) {+ setAim(undefined);+ end();+ }+ if (step === 4 && shared()) setAim('[role="gridcell"]');+ if (step === 6 && shared()) {+ setAim(undefined);+ open();+ }+ if (step === 7 && shared()) {+ revealMoment();+ setAim('[aria-label="Go to 1:02: Julia"]');+ }+ if (step === 9 && shared()) {+ player.seek(62);+ setAim(undefined);+ }+ },+ });+ const interact = () => {+ setAutomatic(false);+ setAim(undefined);+ playback.pause();+ };+ const pointer = createDemoPointer({+ frame: () => root,+ target: aim,+ active: automatic,+ });+ return (+ <div ref={root} class="call-team-memory">+ <ProductDemo+ label="A teammate catches up on a shared call"+ height={620}+ mobileHeight={660}+ onInteract={interact}+ >+ <Switch>+ <Match when={phase() === 0}>+ <ViewShell.TopBar>+ <span class="text-sm font-medium">#launch · Training prep</span>+ </ViewShell.TopBar>+ <div class="call-memory-sharing">+ <label>+ <input+ type="checkbox"+ checked={shared()}+ onChange={(e) => setShared(e.currentTarget.checked)}+ />{' '}+ Share with team+ </label>+ </div>+ {session.view({ time: '11:02 AM', onLeave: end })}+ </Match>+ <Match when={phase() === 1}>+ <ViewShell.TopBar>+ <span class="text-sm font-medium">Calls</span>+ </ViewShell.TopBar>+ <ChannelCallsList+ search={query()}+ onSearch={setQuery}+ onOpen={open}+ fresh="training"+ rows={+ shared()+ ? [+ {+ id: 'training',+ title: trainingReview.title,+ summary:+ 'Keep training to 30 minutes. Julia finishes the slides today.',+ transcript: trainingReview.segments+ .map((s) => s.text)+ .join(' '),+ status: 'missed',+ duration: '12m 4s',+ people: trainingReview.people,+ time: 'Just now',+ },+ ]+ : []+ }+ />+ {!shared() && (+ <p class="p-4 text-sm text-ink-muted">+ This call wasn’t shared with Gabriel’s team.+ </p>+ )}+ </Match>+ <Match when={phase() === 2}>+ <CallRecordTopBar+ title={trainingReview.title}+ onBack={() => {+ player.pause();+ setPhase(1);+ }}+ />+ <CallRecordBody+ call={trainingReview}+ playback={player}+ transcriptHeight={270}+ class="call-record-compact"+ scrollRef={(el) => {+ scroller = el;+ }}+ />+ </Match>+ </Switch>+ </ProductDemo>+ <Show when={pointer()}>+ {(point) => (+ <DemoCursor+ label=""+ clicking={clicking()}+ class="call-memory-pointer"+ style={{ transform: `translate(${point().x}px, ${point().y}px)` }}+ />+ )}+ </Show>+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/calls/CallsComparison.tsx b/apps/marketing/src/features/marketing/components/calls/CallsComparison.tsxnew file mode 100644index 0000000000..cda0716375--- /dev/null+++ b/apps/marketing/src/features/marketing/components/calls/CallsComparison.tsx@@ -0,0 +1,71 @@+import type { FeatureComparison } from '../../core/feature-comparisons';+import { FeatureComparisons } from '../comparisons/FeatureComparisons';++// Availability includes paid plans. Compare built-in tools, not integrations.+// Granola explicitly rules out audio/video playback in its feature-request docs.+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',+ macro: true,+ competitor: true,+ },+ {+ feature: 'Calls, tasks, and docs in one app',+ macro: true,+ competitor: false,+ },+ {+ feature: 'Agents update tasks and docs in the app',+ macro: true,+ competitor: false,+ },+ ],+ sources: [+ 'https://docs.macro.com/product/calls',+ 'https://docs.macro.com/product/agents',+ 'https://support.google.com/meet/answer/9308681',+ 'https://support.google.com/meet/answer/14754931',+ 'https://support.google.com/meet/answer/16024610',+ ],+ },+ {+ id: 'granola',+ 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',+ macro: true,+ competitor: true,+ },+ {+ feature: 'Calls, tasks, and docs in one app',+ macro: true,+ competitor: false,+ },+ {+ feature: 'Agents update tasks and docs in the app',+ macro: true,+ competitor: false,+ },+ ],+ sources: [+ 'https://docs.granola.ai/help-center/feature-requests',+ 'https://docs.granola.ai/help-center/consent-security-privacy/security-privacy-data-faqs',+ 'https://docs.granola.ai/help-center/sharing/integrations/mcp',+ ],+ },+];++export function CallsComparison() {+ return <FeatureComparisons 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 82339e2dd2..fb6f17b205 100644--- a/apps/marketing/src/features/marketing/components/calls/call-fixtures.ts+++ b/apps/marketing/src/features/marketing/components/calls/call-fixtures.ts@@ -31,137 +31,131 @@ export type SampleCall = {chat?: WorkspaceComment[];};-export const launchCheckIn: SampleCall = {- title: 'Launch check-in',- ended: 'Sep 24, 2026 · 9:48 AM',+export const rolloutCheckIn: SampleCall = {+ title: 'Training check-in',+ ended: 'Oct 7, 2026 · 9:48 AM',duration: 18 * 60 + 22,people: ['jacob', 'teo', 'julia'],summary: [- '- **Launch stays on Thursday.** The invite handoff is the only open risk.',- '- **Teo** checks both invite paths on staging by Wednesday night: new accounts, and existing accounts switching teams.',- '- **Julia** holds the announcement until Teo confirms, then sends it Thursday morning.',- '- **Jacob** owns the launch checklist and a five-minute check on Wednesday at 5.',+ '- **Julia** leads Thursday’s training at 10.',+ '- **Teo** sends his notes today.',+ '- **Julia** updates the slides and sends the invite.',].join('\n'),segments: [{- id: 'thursday',+ id: 'monday',person: 'jacob',at: 4,- text: 'Quick one. Are we still good for Thursday?',+ text: 'Who’s leading training on Thursday?',},{- id: 'invite-risk',+ id: 'conflict',person: 'teo',at: 41,- text: 'Almost. The invite fix is merged, but new accounts were still landing in their personal workspace yesterday.',+ text: 'I can’t make it. Julia, can you take it?',},{- id: 'hold',+ id: 'owner',person: 'julia',at: 72,- text: 'Then I’ll hold the announcement. It goes out Thursday morning once Teo says it works.',+ text: 'Yep, I’ll run it at 10. Can you send me your notes?',},{id: 'verify',person: 'teo',at: 98,- text: 'I’ll check both invite paths on staging by Wednesday night and post in #launch when it’s done.',+ text: 'Sure, I’ll send them over today.',},{- id: 'owners',- person: 'jacob',- at: 125,- text: 'Good. Teo has the invite check, Julia has the announcement, and I’ll do the checklist.',- },- {- id: 'help-doc',+ id: 'invitations',person: 'julia',- at: 151,- text: 'Can we add the new invite steps to the help doc too?',- },- {- id: 'with-fix',- person: 'teo',- at: 164,- text: 'Yes, I’ll update it with the fix.',+ at: 125,+ text: 'Thanks. I’ll update the slides and send the invite.',},{- id: 'wednesday',+ id: 'task',person: 'jacob',- at: 190,- text: 'Then we’re set. Five-minute check on Wednesday at 5.',- },- {- id: 'final-draft',- person: 'julia',- at: 198,- text: 'Works for me. I’ll bring the final draft.',- },- {- id: 'staging-results',- person: 'teo',- at: 204,- text: 'I’ll have the staging results by then.',+ at: 151,+ text: 'Great, I’ll put you down as the owner.',},],poster: [- { person: 'jacob', video: true },- { person: 'julia', video: true },+ { person: 'jacob', video: false },+ { person: 'julia', video: false },{ person: 'teo', video: false },],- speaking: 'julia',chat: [{- id: 'draft-link',+ id: 'agenda',person: 'julia',- body: 'The announcement draft is in the launch plan.',+ body: 'Send me the notes when you get a chance.',time: '9:37 AM',- documentId: 'plan',},],};-export const inviteTriage: SampleCall = {- title: 'Invite bug triage',- ended: 'Sep 24, 2026 · 11:02 AM',+export const trainingReview: SampleCall = {+ title: 'Training prep',+ ended: 'Oct 7, 2026 · 11:02 AM',duration: 12 * 60 + 4,- people: ['teo', 'gabriel'],+ people: ['teo', 'julia'],summary: [- '- **Gabriel reproduced it on staging.** New accounts land in their personal workspace after accepting an invite. Existing accounts are fine.',- '- **Cause:** sign-up drops the invited team when it creates the personal workspace.',- '- **Teo** keeps the invited team selected through sign-up and ships the fix today. **Gabriel** re-tests both paths before Thursday.',+ '- Keep the session to 30 minutes.',+ '- **Julia** finishes the slides today.',].join('\n'),segments: [{- id: 'repro',- person: 'gabriel',+ id: 'agenda',+ person: 'julia',at: 3,- text: 'I can reproduce it every time. New account, accept the invite, and you land in your personal workspace.',+ text: 'We’ve got half an hour. Is that enough?',},{- id: 'existing',+ id: 'examples',person: 'teo',at: 29,- text: 'Existing accounts too, or just new ones?',+ text: 'Yep. A quick intro, then an example.',},{- id: 'new-only',- person: 'gabriel',- at: 35,- text: 'Just new ones. Existing accounts switch teams fine.',+ id: 'checklists',+ person: 'julia',+ at: 62,+ text: 'Sounds good. I’ll finish the slides today.',},+ ],+ poster: [+ { person: 'julia', video: false },+ { person: 'teo', video: false },+ ],+};++export const rolloutPlanning: SampleCall = {+ title: 'Weekly planning',+ ended: 'Oct 6, 2026 · 4:12 PM',+ duration: 14 * 60 + 10,+ people: ['jacob', 'teo', 'julia'],+ summary:+ '- Training is Thursday at 10.\n- Teo prepares the session. Julia sends the invite.',+ segments: [{- id: 'cause',+ id: 'date',+ person: 'jacob',+ at: 6,+ text: 'Can we do training on Thursday?',+ },+ {+ id: 'training',person: 'teo',- at: 62,- text: 'Then sign-up is dropping the invited team. I’ll keep it selected through sign-up and ship it today.',+ at: 31,+ text: 'Sure. I’ll put something together for 10.',},+ { id: 'attendees', person: 'julia', at: 52, text: 'I’ll send an invite.' },],poster: [- { person: 'gabriel', video: true },+ { person: 'jacob', video: false },+ { person: 'julia', video: false },{ person: 'teo', video: false },],- speaking: 'gabriel',};export function formatVideoTimestamp(totalSeconds: number) {@@ -183,186 +177,3 @@ export function formatCallDuration(totalSeconds: number) {if (minutes > 0) return `${minutes}m ${seconds}s`;return `${seconds}s`;}--export const announcementReview: SampleCall = {- title: 'Announcement review',- ended: 'Sep 23, 2026 · 4:12 PM',- duration: 9 * 60 + 41,- people: ['julia', 'jacob'],- summary: [- '- **Julia** walked through the draft. The pricing paragraph comes out; the product demo video stays.',- '- **Jacob** reads the final version Wednesday night.',- ].join('\n'),- segments: [- {- id: 'draft',- person: 'julia',- at: 6,- text: 'The draft is in the launch plan. I think the pricing paragraph is too much for day one.',- },- {- id: 'cut',- person: 'jacob',- at: 31,- text: 'Agreed, cut it. Keep the demo video at the top.',- },- ],- poster: [- { person: 'julia', video: true },- { person: 'jacob', video: true },- ],- speaking: 'julia',-};--export const pricingFeedback: SampleCall = {- title: 'Pricing page feedback',- ended: 'Sep 21, 2026 · 2:30 PM',- duration: 24 * 60 + 10,- people: ['jacob', 'gabriel', 'julia'],- summary: [- '- Keep the free plan above the fold.',- '- **Gabriel** tests the new comparison table with five customers this week.',- ].join('\n'),- segments: [- {- id: 'free',- person: 'jacob',- at: 12,- text: 'People keep asking if there’s a free plan. It should be the first thing they see.',- },- {- id: 'table',- person: 'gabriel',- at: 48,- text: 'I’ll put the comparison table in front of five customers this week.',- },- ],- poster: [- { person: 'jacob', video: true },- { person: 'gabriel', video: true },- { person: 'julia', video: true },- ],- speaking: 'gabriel',-};--export const weeklyPlanning: SampleCall = {- title: 'Weekly planning',- ended: 'Sep 21, 2026 · 10:34 AM',- duration: 31 * 60 + 5,- people: ['jacob', 'julia', 'teo', 'gabriel'],- summary: [- '- Launch week. Invite handoff, announcement, and help docs are the only open items.',- '- **Teo** pauses the onboarding work until the invite fix ships.',- ].join('\n'),- segments: [- {- id: 'week',- person: 'jacob',- at: 9,- text: 'This week is the launch. Anything that isn’t the launch can wait.',- },- {- id: 'pause',- person: 'teo',- at: 40,- text: 'Then I’ll pause onboarding until the invite fix is out.',- },- ],- poster: [- { person: 'jacob', video: true },- { person: 'julia', video: true },- { person: 'gabriel', video: true },- ],- speaking: 'jacob',-};--export const onboardingWalkthrough: SampleCall = {- title: 'Onboarding walkthrough',- ended: 'Sep 18, 2026 · 3:15 PM',- duration: 16 * 60 + 48,- people: ['teo', 'gabriel'],- summary: [- '- **Teo** showed the new invite screen.',- '- **Gabriel** wants one fewer step before someone opens their first doc.',- ].join('\n'),- segments: [- {- id: 'screen',- person: 'teo',- at: 5,- text: 'This is the new invite screen. Pick a team, then you’re in.',- },- {- id: 'steps',- person: 'gabriel',- at: 37,- text: 'Can we drop the workspace name step? Most people skip it.',- },- ],- poster: [- { person: 'gabriel', video: true },- { person: 'teo', video: false },- ],- speaking: 'teo',-};--export const helpCenterReview: SampleCall = {- title: 'Help center review',- ended: 'Sep 17, 2026 · 1:20 PM',- duration: 14 * 60 + 2,- people: ['valentina', 'julia'],- summary: [- '- **Valentina** drafted three articles for the new invite flow.',- '- **Julia** links them from the announcement.',- ].join('\n'),- segments: [- {- id: 'articles',- person: 'valentina',- at: 8,- text: 'There are three articles: inviting your team, switching teams, and fixing a wrong workspace.',- },- {- id: 'link',- person: 'julia',- at: 33,- text: 'I’ll link all three from the announcement.',- },- ],- poster: [- { person: 'julia', video: true },- { person: 'valentina', video: false },- ],- speaking: 'valentina',-};--export const inviteDesignReview: SampleCall = {- title: 'Invite screen design review',- ended: 'Sep 16, 2026 · 11:45 AM',- duration: 22 * 60 + 40,- people: ['jacob', 'teo', 'julia'],- summary: [- '- Keep the team picker on the first screen.',- '- **Teo** removes the workspace name step.',- ].join('\n'),- segments: [- {- id: 'picker',- person: 'jacob',- at: 14,- text: 'The team picker should be the first thing you see after accepting.',- },- {- id: 'remove',- person: 'teo',- at: 41,- text: 'Agreed. I’ll take out the workspace name step.',- },- ],- poster: [- { person: 'jacob', video: true },- { person: 'julia', video: true },- { person: 'teo', video: false },- ],- speaking: 'jacob',-};diff --git a/apps/marketing/src/features/marketing/components/calls/call-project.ts b/apps/marketing/src/features/marketing/components/calls/call-project.tsnew file mode 100644index 0000000000..86c3e5bbcb--- /dev/null+++ b/apps/marketing/src/features/marketing/components/calls/call-project.ts@@ -0,0 +1,48 @@+import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';++export const TRAINING_TITLE = 'Prepare Thursday’s training';++/** Calls-only sample data, so other pages keep their own demonstrations. */+export function createCallProject() {+ const w = createDummyWorkspace('tasks');+ w.setData('tasks', (task) => task.id === 'invite', {+ title: TRAINING_TITLE,+ description: 'Prepare Thursday’s training at 10. Teo leads the session.',+ owner: 'teo',+ priority: 'High',+ status: 'In Progress',+ tags: ['Customers'],+ relatedDocumentIds: ['plan'],+ steps: [],+ comments: [],+ });+ w.setData('documents', (doc) => doc.id === 'plan', {+ title: 'Training plan',+ tags: ['Customers', 'Launch'],+ body: '## Thursday’s training\n\nTeo leads the session at 10. Prepare the slides and send the invite.',+ comments: [],+ });+ w.setData('channels', (channel) => channel.id === 'launch', 'messages', [+ {+ id: 'training',+ person: 'teo',+ body: 'Can someone cover training on Thursday?',+ time: '9:20 AM',+ },+ {+ id: 'owner',+ person: 'julia',+ body: 'I can take it.',+ time: '9:24 AM',+ taskId: 'invite',+ },+ {+ id: 'plan',+ person: 'jacob',+ body: 'Here’s the plan.',+ time: '9:25 AM',+ documentId: 'plan',+ },+ ]);+ return w;+}diff --git a/apps/marketing/src/features/marketing/components/calls/call-stories.css b/apps/marketing/src/features/marketing/components/calls/call-stories.cssindex 8ded6d44ef..152d6c4bf1 100644--- a/apps/marketing/src/features/marketing/components/calls/call-stories.css+++ b/apps/marketing/src/features/marketing/components/calls/call-stories.css@@ -1,6 +1,5 @@/* Calls page: frozen call record, channel call states, and CallOverlay. */.call-flow-frame { position: relative; }-.call-flow-pointer { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 9; transition: transform 600ms cubic-bezier(.2, .8, .2, 1); }/* Top bars: labels drop to icons when the split header runs out of room. */.call-bar { container-type: inline-size; }@@ -123,11 +122,7 @@/* CallOverlay in the channel's Call tab. */.call-tab-body { display: flex; flex: 1; flex-direction: column; min-height: 0; }-.call-camera { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }-.call-camera-mirror { transform: scaleX(-1); }-.call-tile[data-speaking='true']::after { content: ''; position: absolute; inset: 0; z-index: 5; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--color-accent); pointer-events: none; }.call-tile > [role='status'], .call-tile > div:last-child { z-index: 6; }-.call-pip .call-tile { min-height: 0; }.call-controls-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; padding-inline: 8px; }.call-controls-center { display: flex; justify-content: center; min-width: 0; }.call-control { border-radius: 999px; }@@ -142,17 +137,6 @@.call-controls-center { grid-column-start: 2; }.call-chat-panel { position: static; width: 360px; flex-shrink: 0; }}-.call-team-share { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border: 1px solid color-mix(in oklch, var(--color-ink-muted) 8%, transparent); border-radius: 6px; background: color-mix(in oklch, var(--color-ink-muted) 2.5%, transparent); color: color-mix(in oklch, var(--color-ink-muted) 70%, transparent); font-size: 12px; user-select: none; }-.call-team-share:hover { color: var(--color-ink); background: color-mix(in oklch, var(--color-ink-muted) 6%, transparent); }-.call-team-share[aria-checked='true'] { color: var(--color-ink); }-.call-checkbox { display: grid; place-items: center; width: 14px; height: 14px; border: 1px solid var(--color-edge); border-radius: 4px; }-.call-checkbox > svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }-.call-checkbox[data-checked='true'] { border-color: var(--color-ink); background: var(--color-ink); color: var(--color-panel); }-.call-checkbox[data-checked='true'] > svg { opacity: 1; }-.call-screen-share { display: grid; gap: 10px; width: 52%; padding: 20px; border-radius: 6px; background: var(--color-panel); }-.call-screen-share > span { height: 8px; border-radius: 4px; background: var(--color-edge-muted); }-.call-screen-share > span:first-child { width: 40%; height: 12px; background: var(--color-edge); }-.call-screen-share > span:last-child { width: 70%; }/* Agent session split beside the task it edits. */.call-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); height: 100%; min-height: 0; }@@ -167,7 +151,6 @@.call-tool-group:hover { color: var(--color-ink-muted); }.call-tool-row { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 0; font-size: 14px; line-height: 24px; color: var(--color-ink-extra-muted); animation: call-tool-in 260ms ease both; }.call-tool-text { display: flex; flex: 1; align-items: center; gap: 4px; min-width: 0; overflow: hidden; white-space: nowrap; }-.call-item-chip { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; vertical-align: middle; color: var(--color-ink); }.call-shimmer { background: linear-gradient(90deg, var(--color-ink-extra-muted) 30%, var(--color-ink) 50%, var(--color-ink-extra-muted) 70%) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: call-shimmer 1.6s linear infinite; }.call-task-pane[data-updated='true'] [aria-label='Task description'], .call-task-pane[data-updated='true'] .md-check { animation: call-updated 2s ease both; border-radius: 4px; }@keyframes call-shimmer { to { background-position: -200% 0; } }@@ -189,13 +172,44 @@.call-task-pane .px-6 { padding-inline: 16px; }}@media (prefers-reduced-motion: reduce) {- .call-flow-pointer { display: none; }.call-list-row[data-fresh='true'], .call-tool-row, .call-task-pane[data-updated='true'] [aria-label='Task description'], .call-task-pane[data-updated='true'] .md-check { animation: none; }.call-shimmer { animation: none; color: var(--color-ink-extra-muted); background: none; }.call-player-fill, .call-player-thumb { transition: none; }}-/* The hero's first description line is longer than Email's; keep it on one line. */-@media (min-width: 700px) {- .product-page:has(#call-default) .email-page-hero > .email-page-hero-description { max-width: 640px; }+/* A three-person call uses the same tile size, with the third tile centered. */+.call-grid[data-count='3'] > :last-child { grid-column: 1 / -1; width: calc((100% - 8px) / 2); justify-self: center; }++/* Let visitors read the conversation and see the Call action before joining. */+.call-start-story [data-channel-call] { transition: background-color 400ms ease, box-shadow 400ms ease; }+.call-start-story:is([data-phase='1'], [data-phase='2']) [data-channel-call] { background-color: color-mix(in oklch, var(--color-accent) 14%, transparent); box-shadow: 0 0 0 2px color-mix(in oklch, var(--color-accent) 40%, transparent); }+.call-start-story .call-channel-body { transition: opacity 400ms ease, transform 400ms ease; }+.call-start-story[data-phase='2'] .call-channel-body { opacity: 0; transform: translateY(-4px); }+.call-start-story .call-tab-body { animation: call-join-enter 600ms ease both; }+.call-start-story .call-grid > .call-tile { animation: call-participant-enter 450ms ease both; }+@keyframes call-join-enter { from { opacity: 0; } to { opacity: 1; } }+@keyframes call-participant-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }+@media (prefers-reduced-motion: reduce) {+ .call-start-story [data-channel-call], .call-start-story .call-channel-body { transition: none; }+ .call-start-story .call-tab-body, .call-start-story .call-grid > .call-tile { animation: none; }}++/* The pointer is a short action cue, not a named collaborator. */+.call-start-pointer-anchor { position: absolute; top: 0; left: 0; z-index: 9; pointer-events: none; }+.call-start-pointer { font-size: 28px; animation: call-pointer-approach 900ms cubic-bezier(.2, .8, .2, 1) both; }+.call-start-pointer > span { display: none; }+.call-start-pointer[data-clicking='true'] > svg { animation-duration: 300ms; }+@keyframes call-pointer-approach { from { opacity: 0; transform: translate(-80px, 100px); } 15% { opacity: 1; } to { opacity: 1; transform: translate(0, 0); } }+@media (prefers-reduced-motion: reduce) { .call-start-pointer-anchor { display: none; } }++/* ItemPreview in ReadContent/EditDocument tool rows: a bordered chip, not a link underline. */+.call-item-preview { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 24px; min-width: 0; max-width: 100%; padding: 0 8px; border: 1px solid color-mix(in oklch, var(--color-edge-muted) 50%, transparent); border-radius: 6px; color: var(--color-ink); font-size: 14px; line-height: 20px; vertical-align: middle; text-decoration: none; }+.call-item-preview:hover { background: var(--color-hover); }++.call-memory-sharing { display:flex; align-items:center; justify-content:space-between; padding:8px 12px; gap:12px; border-bottom:1px solid var(--color-edge-muted); }+.call-memory-sharing label { display:flex; align-items:center; gap:8px; font-size:12px; }+.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; }+@media(prefers-reduced-motion:reduce) { .call-memory-pointer { display:none; } }diff --git a/apps/marketing/src/features/marketing/components/channels/ChannelStories.test.tsx b/apps/marketing/src/features/marketing/components/channels/ChannelStories.test.tsxindex b016bf2176..b28cee4a5b 100644--- a/apps/marketing/src/features/marketing/components/channels/ChannelStories.test.tsx+++ b/apps/marketing/src/features/marketing/components/channels/ChannelStories.test.tsx@@ -2,10 +2,18 @@ import { cleanup, fireEvent, render, within } from '@solidjs/testing-library';import { afterEach, beforeEach, expect, it, vi } from 'vitest';import {ChannelAgentDemo,+ ChannelPermissionsDemo,ChannelSharedWorkDemo,ChannelThreadDemo,- ChatInboxDemo,} from './ChannelStories';+import { ChannelWorkSurface } from './ChannelWorkSurface';+import {+ CHANNEL_DOC,+ CHANNEL_EMAIL,+ CHANNEL_TASK,+ createChannelProject,+ FOLLOW_UP_TASK,+} from './channelProject';let intersections: IntersectionObserverCallback[];let motionListeners: (() => void)[];@@ -71,10 +79,10 @@ it('shows the first replies inline and expands the rest from the pill', () => {const thread = view.container.querySelector('[data-thread-id="root"]') as HTMLElement;- expect(within(thread).getByText(/Lead with the invite flow/)).toBeTruthy();- expect(within(thread).queryByText(/publishing at 9/)).toBeNull();+ expect(within(thread).getByText(/yep, 2pm/)).toBeTruthy();+ expect(within(thread).queryByText(/working from home/)).toBeNull();fireEvent.click(within(thread).getByText('2 more replies'));- expect(within(thread).getByText(/publishing at 9/)).toBeTruthy();+ expect(within(thread).getByText(/working from home/)).toBeTruthy();});it('adds a reply to its original thread rather than a new channel message', () => {@@ -88,61 +96,290 @@ it('adds a reply to its original thread rather than a new channel message', () =const input = within(thread()).getByRole('textbox', {name: 'Thread reply',});- input.textContent = 'Confirmed. Keep the invite flow first.';+ input.textContent = 'see you then';fireEvent.input(input);fireEvent.click(within(thread()).getByRole('button', { name: 'Send demo message' }));+ expect(within(thread()).getByText('see you then')).toBeTruthy();expect(- within(thread()).getByText('Confirmed. Keep the invite flow first.')- ).toBeTruthy();+ view.container.querySelectorAll('.sample-channel-thread')+ ).toHaveLength(3);+});++it('shows multiple conversations without a navigation sidebar', () => {+ const view = render(() => <ChannelThreadDemo />);+ expect(view.queryByRole('complementary', { name: 'Home' })).toBeNull();+ expect(view.getByText('new icons are in the folder btw')).toBeTruthy();+ expect(view.getByText('much sharper. let’s use these')).toBeTruthy();+ expect(view.getByText('signup button is fixed on mobile now')).toBeTruthy();expect(view.container.querySelectorAll('.sample-channel-thread')- ).toHaveLength(2);+ ).toHaveLength(3);+ visible(true);+ vi.advanceTimersByTime(3000);+ expect(view.queryByText(/working from home/)).toBeNull();+ fireEvent.click(view.getByRole('button', { name: /2 more replies/ }));+ expect(view.getByText(/working from home/)).toBeTruthy();});-it('clears Home items with E and keeps the rest for later', () => {- const view = render(() => <ChatInboxDemo />);+it('shows channel access in Share and retains the chosen permission after reopening', () => {+ const view = render(() => <ChannelPermissionsDemo />);visible(true);- vi.advanceTimersByTime(900);+ vi.advanceTimersByTime(1300);+ const access = view.getByRole('combobox', {+ name: 'Access for Julia, Teo, Gabriel +1 other',+ });+ expect((access as HTMLSelectElement).value).toBe('view');+ fireEvent.change(access, { target: { value: 'comment' } });+ fireEvent.click(view.getByRole('button', { name: 'Cancel' }));+ fireEvent.click(view.getByRole('button', { name: 'Share' }));+ expect(+ (+ view.getByRole('combobox', {+ name: 'Access for Julia, Teo, Gabriel +1 other',+ }) as HTMLSelectElement+ ).value+ ).toBe('comment');+});++it('shows the completed email split for reduced motion', () => {+ reduced = true;+ const view = render(() => <ChannelSharedWorkDemo />);expect(- view.container.querySelector('[data-home-item="launch-thread"]')+ within(view.getByRole('region', { name: 'Shared work' })).getByText(+ /signup button is still hard to tap/+ )).toBeTruthy();- vi.advanceTimersByTime(3200);+});++it('turns a message into a task assigned to the person who offered', () => {+ const view = render(() => <ChannelAgentDemo />);+ expect(view.queryByRole('button', { name: FOLLOW_UP_TASK })).toBeNull();+ visible(true);+ vi.advanceTimersByTime(1700);+ expect(view.getByRole('button', { name: FOLLOW_UP_TASK })).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: FOLLOW_UP_TASK }));+ const work = within(view.getByRole('region', { name: 'Shared work' }));+ expect(work.getByRole('textbox', { name: 'Task title' }).textContent).toBe(+ FOLLOW_UP_TASK+ );+ expect(+ work.getByRole('textbox', { name: 'Task description' }).textContent+ ).toContain('easier to tap on a phone');+ for (const assignee of work.getAllByRole('button', {+ name: 'Change assignee',+ }))+ expect(assignee.textContent).toContain('Julia');+ expect(work.getByRole('button', { name: 'From launch' })).toBeTruthy();+});++it('shows one agent-created task when motion preference changes', () => {+ const view = render(() => <ChannelAgentDemo />);+ visible(true);+ vi.advanceTimersByTime(1700);+ reduce();+ expect(view.getAllByRole('button', { name: FOLLOW_UP_TASK })).toHaveLength(1);+});++it('opens shared work, preserves document edits, and returns keyboard focus to the link', async () => {+ const view = render(() => <ChannelSharedWorkDemo />);+ const docLink = view.getByRole('button', { name: 'Launch checklist' });+ docLink.focus();+ fireEvent.pointerDown(docLink);+ fireEvent.click(docLink);+ await Promise.resolve();+ expect(document.activeElement).toBe(+ view.getByRole('button', { name: 'Close shared work' })+ );+ const title = view.getByRole('textbox', { name: 'Document title' });+ title.innerText = 'Launch checklist — reviewed';+ fireEvent.blur(title);+ fireEvent.keyDown(view.getByRole('region', { name: 'Shared work' }), {+ key: 'Escape',+ });+ await Promise.resolve();+ expect(document.activeElement).toBe(docLink);+ fireEvent.click(+ view.getByRole('button', { name: 'Launch checklist — reviewed' })+ );+ expect(+ view.getByRole('textbox', { name: 'Document title' }).textContent+ ).toBe('Launch checklist — reviewed');+ fireEvent.click(view.getByRole('button', { name: 'Close shared work' }));+ vi.advanceTimersByTime(15000);+ expect(+ view.getByRole('button', { name: 'Launch checklist — reviewed' })+ ).toBeTruthy();+});++it('dismisses a task menu with Escape without closing the shared task', () => {+ reduced = true;+ const view = render(() => <ChannelAgentDemo />);+ fireEvent.click(view.getByRole('button', { name: FOLLOW_UP_TASK }));+ const work = within(view.getByRole('region', { name: 'Shared work' }));+ const trigger = work+ .getAllByRole('button', { name: 'Change status' })+ .at(-1)!;+ trigger.focus();+ fireEvent.keyDown(trigger, { key: 'ArrowDown' });+ vi.advanceTimersByTime(1);+ fireEvent.keyDown(view.getByRole('menuitem', { name: 'Completed' }), {+ key: 'Escape',+ });+ expect(view.getByRole('region', { name: 'Shared work' })).toBeTruthy();+});++it('uses the chosen emoji, dismisses the toolbar, and toggles only that reaction', () => {+ const view = render(() => <ChannelSharedWorkDemo />);+ const row = view+ .getByRole('button', { name: 'Launch checklist' })+ .closest('article')!;+ fireEvent.click(within(row).getByRole('button', { name: 'React ❤️' }));expect(- view.container.querySelector('[data-home-item="launch-thread"]')- ).toBeNull();- expect(view.container.querySelector('[data-home-item="dm-teo"]')).toBeNull();+ within(row)+ .getByRole('button', { name: '❤️ 1' })+ .getAttribute('aria-pressed')+ ).toBe('true');+ expect(row.getAttribute('data-actions-dismissed')).toBe('true');+ fireEvent.pointerLeave(row);+ fireEvent.pointerEnter(row);+ expect(row.getAttribute('data-actions-dismissed')).toBe('false');+ fireEvent.click(within(row).getByRole('button', { name: 'React 😂' }));+ expect(within(row).getByRole('button', { name: '😂 1' })).toBeTruthy();+ fireEvent.click(within(row).getByRole('button', { name: '❤️ 1' }));+ expect(within(row).queryByRole('button', { name: '❤️ 1' })).toBeNull();+ expect(within(row).getByRole('button', { name: '😂 1' })).toBeTruthy();+});++it('renders docs, email, and tasks inside the message text without duplicate attachments', () => {+ const view = render(() => (+ <ChannelWorkSurface workspace={createChannelProject()} />+ ));+ for (const name of [CHANNEL_DOC, CHANNEL_EMAIL, CHANNEL_TASK]) {+ const mention = view.getByRole('button', { name });+ expect(mention.closest('p')).toBeTruthy();+ expect(view.getAllByRole('button', { name })).toHaveLength(1);+ expect(mention.classList.contains('dummy-entity-link')).toBe(false);+ }+ const email = view.getByRole('button', { name: CHANNEL_EMAIL });+ expect(email.closest('p')?.textContent).toContain(+ 'did you catch the signup button'+ );+ fireEvent.click(email);expect(- view.container.querySelector('[data-home-item="invite-task"]')+ within(view.getByRole('region', { name: 'Shared work' })).getByText(+ /signup button is still hard to tap/+ )).toBeTruthy();- fireEvent.click(view.getByRole('button', { name: 'Mark unread (U)' }));+});++it('opens email and tasks from the first feature demo and preserves manual navigation', () => {+ const view = render(() => <ChannelSharedWorkDemo />);+ const email = view.getByRole('button', { name: CHANNEL_EMAIL });+ fireEvent.pointerDown(email);+ fireEvent.click(email);expect(- view.container.querySelector(- '[data-home-item="dana"] [aria-label="Unread"]'+ within(view.getByRole('region', { name: 'Shared work' })).getByText(+ /signup button is still hard to tap/)).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Close shared work' }));+ fireEvent.click(view.getByRole('button', { name: CHANNEL_TASK }));+ visible(true);+ vi.advanceTimersByTime(15000);+ expect(view.getByRole('textbox', { name: 'Task title' }).textContent).toBe(+ CHANNEL_TASK+ );});-it('opens the mentioned doc from the channel', () => {- reduced = true;+it('keeps scrollable history and visibly clicks the doc before switching the split to email', () => {const view = render(() => <ChannelSharedWorkDemo />);+ expect(+ view.getByText('anyone else getting the old logo on the preview?')+ ).toBeTruthy();+ expect(view.queryByRole('region', { name: 'Shared work' })).toBeNull();+ visible(true);+ vi.advanceTimersByTime(3600);+ expect(+ view.container.querySelector('.demo-cursor[data-clicking="true"]')+ ).toBeTruthy();+ expect(view.queryByRole('region', { name: 'Shared work' })).toBeNull();+ vi.advanceTimersByTime(400);expect(view.getByRole('textbox', { name: 'Document body' })).toBeTruthy();+ vi.advanceTimersByTime(6500);+ expect(+ within(view.getByRole('region', { name: 'Shared work' })).getByText(+ /signup button is still hard to tap/+ )+ ).toBeTruthy();});-it('answers in the channel with the tasks it is talking about', () => {+it('lets Julia bring Cursor into the same agent thread and keeps her task ownership', () => {const view = render(() => <ChannelAgentDemo />);- const log = within(view.getByRole('log', { name: 'Channel launch' }));- expect(log.queryByText(/Nothing else is blocked/)).toBeNull();visible(true);- vi.advanceTimersByTime(1400);- expect(log.getByText(/Nothing else is blocked/)).toBeTruthy();- expect(log.getByText('Fix the team invite handoff')).toBeTruthy();- expect(log.getByText('Prepare the launch checklist')).toBeTruthy();+ vi.advanceTimersByTime(5700);+ const thread = view.container.querySelector(+ '[data-thread-id="follow-up-request"]'+ ) as HTMLElement;+ expect(+ thread.querySelector('[data-demo-mention="cursor"]')?.textContent+ ).toBe('@Cursor');+ expect(+ thread+ .querySelector('[data-demo-mention="cursor"]')+ ?.classList.contains('mention-person')+ ).toBe(true);+ expect(within(thread).getByText(/thanks\./)).toBeTruthy();+ vi.advanceTimersByTime(3300);+ expect(within(thread).getByText(/Found a mobile style/)).toBeTruthy();+ expect(+ thread.querySelectorAll('.sample-agent-avatar[data-agent="cursor"]')+ ).toHaveLength(1);+ expect(within(thread).queryByText(/On it/)).toBeNull();+ fireEvent.click(view.getByRole('button', { name: FOLLOW_UP_TASK }));+ const work = within(view.getByRole('region', { name: 'Shared work' }));+ for (const status of work.getAllByRole('button', { name: 'Change status' }))+ expect(status.textContent).toContain('In Progress');+ for (const owner of work.getAllByRole('button', { name: 'Change assignee' }))+ expect(owner.textContent).toContain('Julia');});-it('shows the agent answer for reduced motion', () => {- reduce();- const view = render(() => <ChannelAgentDemo />);- expect(view.getByText(/Nothing else is blocked/)).toBeTruthy();+it('keeps document edits when email opens in a third split and closes only the selected pane', async () => {+ vi.spyOn(HTMLElement.prototype, 'clientWidth', 'get').mockReturnValue(1440);+ const view = render(() => <ChannelSharedWorkDemo />);+ const docLink = view.getByRole('button', { name: 'Launch checklist' });+ fireEvent.pointerDown(docLink);+ fireEvent.click(docLink);+ const documentPane = () =>+ view.container.querySelector('[data-pane-view="documents"]') as HTMLElement;+ const title = within(documentPane()).getByRole('textbox', {+ name: 'Document title',+ });+ title.innerText = 'Launch checklist reviewed';+ fireEvent.blur(title);+ fireEvent.click(view.getByRole('button', { name: CHANNEL_EMAIL }));+ expect(view.container.querySelectorAll('.channel-work-item')).toHaveLength(2);+ expect(+ within(documentPane()).getByRole('textbox', { name: 'Document title' })+ .textContent+ ).toBe('Launch checklist reviewed');+ const emailPane = view.container.querySelector(+ '[data-pane-view="email"]'+ ) as HTMLElement;+ expect(within(emailPane).getByText(/hard to tap/)).toBeTruthy();+ expect(+ within(emailPane).getByText(/We’ll fix the button before launch/)+ ).toBeTruthy();+ fireEvent.click(+ within(emailPane).getByRole('button', { name: 'Close shared work' })+ );+ await Promise.resolve();+ expect(view.container.querySelector('[data-pane-view="email"]')).toBeNull();+ expect(documentPane()).toBeTruthy();+ fireEvent.click(+ within(documentPane()).getByRole('button', { name: 'Close shared work' })+ );+ await Promise.resolve();+ expect(view.container.querySelectorAll('.channel-work-item')).toHaveLength(0);});diff --git a/apps/marketing/src/features/marketing/components/channels/ChannelStories.tsx b/apps/marketing/src/features/marketing/components/channels/ChannelStories.tsxindex ec5f375bb1..54ade8cffb 100644--- a/apps/marketing/src/features/marketing/components/channels/ChannelStories.tsx+++ b/apps/marketing/src/features/marketing/components/channels/ChannelStories.tsx@@ -1,28 +1,26 @@-import Reply from '@phosphor/arrow-bend-up-left.svg';-import ChatTeardrop from '@phosphor/chat-teardrop.svg';-import Envelope from '@phosphor/envelope.svg';-import Hash from '@phosphor/hash.svg';-import ListChecks from '@phosphor/list-checks.svg';-import Plus from '@phosphor/plus.svg';-import {- type Component,- createEffect,- createSignal,- For,- type JSX,- onCleanup,- onMount,- Show,-} from 'solid-js';-import { Dynamic } from 'solid-js/web';-import type { WorkspaceView } from '../../core/dummy-workspace';-import { homepagePeople } from '../../core/homepage-demo-people';-import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';+import { createEffect, createSignal, onCleanup, onMount, Show } from 'solid-js';+import { unwrap } from 'solid-js/store';+import type { WorkspaceComment } from '../../core/dummy-workspace';import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';+import {+ DocumentShareSheet,+ LAUNCH_MEMBERS,+} from '../documents/DocumentShareSheet';+import { WorkspaceDocuments } from '../workspace/WorkspaceDocuments';+import '../documents/document-stories.css';+import { DemoAgentChip } from '../DemoAgentChip';import { DemoCursor } from '../DemoCursor';-import { ViewSidebar } from '../DemoViewSidebar';import { ProductDemo } from '../product/ProductPage';import { ProductWorkspace } from '../product/ProductWorkspace';+import { WorkspaceDesktopDemo } from '../WorkspaceDesktopDemo';+import { ChannelWorkSurface } from './ChannelWorkSurface';+import {+ channelHistory,+ createChannelChecklist,+ createChannelHeroProject,+ createChannelProject,+ FOLLOW_UP_TASK,+} from './channelProject';import '../workspace/dummy-workspace.css';import './channel-stories.css';@@ -54,377 +52,208 @@ function createCursorTarget(});const observer = new ResizeObserver(measure);const root = frame();- if (root) observer.observe(root);- onCleanup(() => observer.disconnect());+ 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;}-/** @mention a doc in a channel; a new member opens it with no access request. */+/** Full chat navigation makes the hero recognizable as a channel. */+export function ChannelHero() {+ const w = createChannelHeroProject();+ return (+ <div class="channel-hero-demo">+ <WorkspaceDesktopDemo+ heroFrame+ view="messages"+ label="Explore Macro Chat"+ initialData={unwrap(w.data)}+ initialChannelThread="start"+ chatSplits+ />+ </div>+ );+}++/** Open the actual email and plan from the conversation, then keep exploring. */export function ChannelSharedWorkDemo() {let root!: HTMLDivElement;let frame: HTMLDivElement | undefined;- const w = createDummyWorkspace('messages');- w.setData('channels', (c) => c.id === 'launch', 'messages', [- {- id: 'staging',- person: 'gabriel',- body: 'Staging is green. Invite flow and email replies both pass.',- time: '9:02 AM',- },- {- id: 'plan-request',- person: 'julia',- body: 'Here’s the plan for Thursday. Everyone check your part before we share it with the team.',- time: '9:15 AM',- documentId: 'plan',- },- {- id: 'welcome',- person: 'jacob',- body: 'Welcome to #launch @[Teo](demo-mention:teo). Everything we’ve linked here is yours to open.',- time: '9:21 AM',- },- ]);- w.open('messages', 'launch');- const [step, setStep] = createSignal(0);- const [automatic, setAutomatic] = createSignal(true);- const open = () => {- setStep(2);- setAutomatic(false);- w.open('documents', 'plan');+ 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"]'+ );+ const target = log?.querySelector<HTMLElement>(`[data-thread-id="${id}"]`);+ if (!log || !target) return;+ const top =+ log.scrollTop ++ target.getBoundingClientRect().top -+ log.getBoundingClientRect().top -+ 100;+ if (log.scrollTo)+ log.scrollTo({+ top: Math.max(0, top),+ behavior: smooth ? 'smooth' : 'instant',+ });+ else log.scrollTop = Math.max(0, top);+ };+ const clickMention = (id: string) => {+ root+ .querySelector<HTMLButtonElement>(+ `[data-thread-id="${id}"] .sample-inline-reference`+ )+ ?.click();+ setClicking(false);+ setCursorVisible(false);+ setAim(undefined);};const playback = createProductWalkthrough({root: () => root,- steps: 2,+ visibilityThreshold: 0.5,+ steps: 9,reset: () => {},- reduced: open,- delay: (next) => (next === 1 ? 1200 : 1500),- advance: (next) => {- if (next === 2) open();- else setStep(next);+ reduced: () => {+ clickMention('shared-plan');+ clickMention('welcome');+ scrollToMessage('welcome', false);+ },+ delay: (step) =>+ [0, 1800, 800, 1000, 350, 3800, 800, 350, 1000, 350][step] ?? 1400,+ advance: (step) => {+ if (step === 1) {+ scrollToMessage('shared-plan');+ setCursorOrigin({ x: root.clientWidth * 0.68, y: 260 });+ setCursorVisible(true);+ }+ if (step === 2) setAim('shared-plan');+ if (step === 3 || step === 8) setClicking(true);+ if (step === 4) clickMention('shared-plan');+ if (step === 5) {+ const narrow =+ root+ .querySelector('.channel-work-split')+ ?.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) {+ if (aim() === 'close') setClicking(true);+ else setAim('welcome');+ }+ if (step === 7 && aim() === 'close') {+ root.querySelector<HTMLButtonElement>('.channel-work-back')?.click();+ setClicking(false);+ scrollToMessage('welcome');+ setAim('welcome');+ }+ if (step === 9) clickMention('welcome');},});const pointer = createCursorTarget(() => frame,() =>- automatic() && step() === 1- ? '[data-thread-id="plan-request"] .dummy-entity-link'- : undefined+ aim() === 'close'+ ? '.channel-work-back'+ : aim()+ ? `[data-thread-id="${aim()}"] .sample-inline-reference`+ : undefined);return (<div ref={frame} class="channel-demo-frame"><ProductDemoref={(el) => (root = el)}- label="Open a document someone mentioned in the channel"+ label="Open docs, tasks, and email alongside the channel"onInteract={() => {- setAutomatic(false);+ setAim(undefined);+ setClicking(false);+ setCursorVisible(false);playback.pause();}}- height={500}+ height={620}mobileHeight={600}>- <ProductWorkspace workspace={w} />+ <ChannelWorkSurface workspace={w} /></ProductDemo>- <Show when={pointer()}>- {(p) => (- <DemoCursor- label="Teo"- class="channel-demo-cursor"- style={{ transform: `translate(${p().x}px, ${p().y}px)` }}- />- )}+ <Show when={cursorVisible()}>+ <DemoCursor+ label="Jacob"+ clicking={clicking()}+ class="channel-demo-cursor"+ style={{+ transform: `translate(${(pointer() ?? cursorOrigin()).x}px, ${(pointer() ?? cursorOrigin()).y}px)`,+ }}+ /></Show></div>);}-type InboxRow = {- id: string;- group: 'Today' | 'Yesterday';- icon?: Component<JSX.SvgSVGAttributes<SVGSVGElement>>;- person?: keyof typeof homepagePeople;- title: JSX.Element;- time: string;- unread?: boolean;- view: WorkspaceView;- item: string;- thread?: string;-};--const inboxRows: InboxRow[] = [- {- id: 'launch-thread',- group: 'Today',- icon: Reply,- title: (- <>- <span class="shrink-0">Julia</span>- <span class="shrink-0 whitespace-pre"> in </span>- <span class="truncate">#launch</span>- </>- ),- time: '9:41 AM',- unread: true,- view: 'messages',- item: 'launch',- thread: 'm1',- },- {- id: 'dm-teo',- group: 'Today',- person: 'teo',- title: 'Teo',- time: '9:32 AM',- unread: true,- view: 'messages',- item: 'dm-teo',- },- {- id: 'dana',- group: 'Today',- icon: Envelope,- title: 'Next steps for our team',- time: '9:20 AM',- unread: true,- view: 'email',- item: 'dana',- },- {- id: 'invite-task',- group: 'Today',- icon: ListChecks,- title: 'Fix the team invite handoff',- time: '9:05 AM',- view: 'tasks',- item: 'invite',- },- {- id: 'engineers',- group: 'Yesterday',- icon: Hash,- title: 'engineers',- time: 'Sep 28',- view: 'messages',- item: 'engineers',- },- {- id: 'plan-comment',- group: 'Yesterday',- icon: ChatTeardrop,- title: (- <>- <span class="shrink-0">Gabriel</span>- <span class="shrink-0 whitespace-pre"> commented on </span>- <span class="truncate">Q3 launch plan</span>- </>- ),- time: 'Sep 28',- view: 'documents',- item: 'plan',- },- {- id: 'design',- group: 'Yesterday',- icon: Hash,- title: 'design',- time: 'Sep 28',- view: 'messages',- item: 'design',- },-];--/** features/home on desktop: Home header, New chat, date groups, E = Mark done. */-export function ChatInboxDemo() {+/** Show the actual channel grant in Share, with the document behind it. */+export function ChannelPermissionsDemo() {let root!: HTMLDivElement;- const w = createDummyWorkspace('messages');- const [rows, setRows] = createSignal(inboxRows);- const [selected, setSelected] = createSignal<string>();- const [key, setKey] = createSignal<string>();- const select = (id: string | undefined) => {- setSelected(id);- const row = rows().find((r) => r.id === id);- if (!row) return;- w.open(row.view, row.item);- if (row.view === 'messages') {- w.setChannel(row.item);- w.setChannelThread(row.thread);- }- setRows((list) =>- list.map((r) => (r.id === id ? { ...r, unread: false } : r))- );- };- const done = () => {- const list = rows();- const index = list.findIndex((r) => r.id === selected());- if (index < 0) return;- const next = list[index + 1] ?? list[index - 1];- setRows(list.filter((r) => r.id !== selected()));- select(next?.id);- };- const press = (next: string) => {- setKey(next);- if (next === 'e') done();- if (next === 'u')- setRows((list) =>- list.map((r) => (r.id === selected() ? { ...r, unread: true } : r))- );- if (next === 'j' || next === 'k') {- const list = rows();- const index = list.findIndex((r) => r.id === selected());- const target = list[index + (next === 'j' ? 1 : -1)] ?? list[index];- select(target?.id);- }- };+ let shareTrigger: HTMLButtonElement | undefined;+ const w = createChannelChecklist();+ w.open('documents', 'plan');+ const [sharing, setSharing] = createSignal(false);+ const [manual, setManual] = createSignal(false);const playback = createProductWalkthrough({root: () => root,- steps: 4,+ steps: 1,reset: () => {},- reduced: () => {- setRows(inboxRows.slice(2));- select('dana');- },- delay: (step) => [0, 900, 1600, 1500, 1500][step] ?? 1400,- advance: (step) => {- if (step === 1) {- setKey(undefined);- select('launch-thread');- }- if (step === 2 || step === 3) press('e');- if (step === 4) setKey(undefined);- },+ reduced: () => setSharing(true),+ delay: () => 1200,+ advance: () => setSharing(true),});- const pause = () => playback.pause();return (- <div class="chat-inbox-demo">+ <div class="channel-permissions-demo"><ProductDemoref={(el) => (root = el)}- label="Messages wait in Home until you mark them done"- onInteract={pause}- height={520}- mobileHeight={600}+ label="The document is shared with the channel"+ height={610}+ mobileHeight={660}+ onInteract={() => {+ setManual(true);+ playback.pause();+ }}>- <div- class="product-sidebared-scene chat-inbox-scene"- tabIndex={0}- role="group"- aria-label="Home"- onKeyDown={(event) => {- const next = event.key.toLowerCase();- if (['e', 'u', 'j', 'k'].includes(next)) {- event.preventDefault();- pause();- press(next);- }+ <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);}}- >- <ViewSidebar.Root aria-label="Home" class="chat-inbox-list">- <ViewSidebar.Header>- <ViewSidebar.Title>Home</ViewSidebar.Title>- </ViewSidebar.Header>- <ViewSidebar.Primary>- <ViewSidebar.Action onClick={() => pause()}>- <ViewSidebar.Icon>- <Plus />- </ViewSidebar.Icon>- New chat- </ViewSidebar.Action>- </ViewSidebar.Primary>- <ViewSidebar.Content>- <For each={['Today', 'Yesterday'] as const}>- {(group) => (- <Show when={rows().some((r) => r.group === group)}>- <p class="chat-inbox-group">{group}</p>- <ViewSidebar.Nav>- <For each={rows().filter((r) => r.group === group)}>- {(row) => (- <ViewSidebar.Item- class="group/home-item chat-inbox-row"- active={selected() === row.id}- data-home-item={row.id}- onClick={() => {- pause();- select(row.id);- }}- >- <Show- when={row.person}- fallback={- <ViewSidebar.Icon>- <Dynamic component={row.icon} />- </ViewSidebar.Icon>- }- >- {(person) => (- <img- class="size-5 shrink-0 rounded-full"- src={homepagePeople[person()].photo}- alt=""- />- )}- </Show>- <span- class="flex min-w-0 flex-1 items-center truncate"- classList={{ 'text-ink': row.unread }}- >- {row.title}- </span>- <span class="chat-inbox-time">{row.time}</span>- <Show when={row.unread}>- <span- aria-label="Unread"- class="size-1.5 shrink-0 rounded-full bg-accent"- />- </Show>- </ViewSidebar.Item>- )}- </For>- </ViewSidebar.Nav>- </Show>- )}- </For>- </ViewSidebar.Content>- </ViewSidebar.Root>- <div class="dummy-main chat-inbox-preview">- <Show- when={selected()}- fallback={- <p class="chat-inbox-empty">Select something to read it.</p>- }- >- <ProductWorkspace workspace={w} />- </Show>- </div>- </div>+ />+ <DocumentShareSheet+ open={sharing()}+ autoFocus={manual()}+ title={w.data.documents.find((doc) => doc.id === 'plan')?.title ?? ''}+ channel={{ members: LAUNCH_MEMBERS, level: 'view' }}+ onClose={() => {+ setSharing(false);+ shareTrigger?.focus({ preventScroll: true });+ }}+ /></ProductDemo>- <div class="chat-shortcut-dock" aria-label="Home shortcuts">- <For- each={- [- { key: 'j', label: 'Next' },- { key: 'k', label: 'Previous' },- { key: 'e', label: 'Mark done' },- { key: 'u', label: 'Mark unread' },- ] as const- }- >- {(shortcut) => (- <button- type="button"- data-active={key() === shortcut.key}- onClick={() => {- pause();- if (!selected()) select(rows()[0]?.id);- else press(shortcut.key);- }}- aria-label={`${shortcut.label} (${shortcut.key.toUpperCase()})`}- >- <kbd>{shortcut.key.toUpperCase()}</kbd>- {shortcut.label}- </button>- )}- </For>- </div></div>);}@@ -433,168 +262,260 @@ const threadReplies = [{id: 'reply-1',person: 'teo' as const,- body: 'Yes. Lead with the invite flow, that’s what changes for existing teams.',+ body: 'yep, 2pm',time: '9:32 AM',},{id: 'reply-2',person: 'jacob' as const,- body: 'Agreed. And link the rollout doc for anyone moving a whole team over.',+ body: 'works for me',time: '9:34 AM',},{id: 'reply-3',person: 'gabriel' as const,- body: 'I’ll grab screenshots of the new invite screen this afternoon.',+ body: 'same. i’ll bring the mockups',time: '9:36 AM',},{id: 'reply-4',person: 'teo' as const,- body: 'Screenshot of the existing-account path is in the doc now.',+ body: 'meeting room or call?',time: '9:51 AM',},{id: 'reply-5',person: 'julia' as const,- body: 'Perfect, publishing at 9 on Thursday.',+ body: 'call, i’m working from home',time: '9:55 AM',},];/** Inline replies with the curved rail and the "N more replies" pill. */export function ChannelThreadDemo() {- let root!: HTMLDivElement;let frame: HTMLDivElement | undefined;- const w = createDummyWorkspace('messages');+ const w = createChannelProject();w.setData('channels', (c) => c.id === 'launch', 'messages', [{id: 'root',person: 'julia',- body: 'Can we confirm the announcement wording before Thursday?',+ body: 'still on for the design review today?',time: '9:30 AM',- documentId: 'plan',},...threadReplies.map((reply) => ({ ...reply, replyTo: 'root' })),{id: 'next',person: 'valentina',- body: 'Northwind wants a demo of the team workspace next week. Who can take it?',+ body: 'new icons are in the folder btw',time: '10:02 AM',},+ {+ id: 'icons-reply',+ person: 'jacob',+ body: 'much sharper. let’s use these',+ time: '10:04 AM',+ replyTo: 'next',+ },+ {+ id: 'signup',+ person: 'teo',+ body: 'signup button is fixed on mobile now',+ time: '10:12 AM',+ },+ {+ id: 'signup-reply',+ person: 'julia',+ body: 'just tried it. looks good on my phone too',+ time: '10:14 AM',+ replyTo: 'signup',+ },]);w.open('messages', 'launch');- const [aim, setAim] = createSignal(false);- const expand = () => {- setAim(false);- frame- ?.querySelector<HTMLButtonElement>(- '[data-thread-id="root"] .sample-thread-expand'- )- ?.click();- };- const playback = createProductWalkthrough({- root: () => root,- steps: 2,- reset: () => {},- reduced: () => {},- delay: (step) => (step === 1 ? 1000 : 1500),- advance: (step) => {- if (step === 1) setAim(true);- if (step === 2) expand();- },+ onMount(() => {+ const firstFrame = requestAnimationFrame(() => {+ const log = frame?.querySelector<HTMLElement>('.sample-chat-log');+ if (log) log.scrollTop = 0;+ });+ onCleanup(() => cancelAnimationFrame(firstFrame));});- const pointer = createCursorTarget(- () => frame,- () => (aim() ? '[data-thread-id="root"] .sample-thread-expand' : undefined)- );return (- <div ref={frame} class="channel-demo-frame">+ <div ref={frame} class="channel-demo-frame channel-thread-demo"><ProductDemo- ref={(el) => (root = el)}label="Read a thread inline and expand the rest"- onInteract={() => {- setAim(false);- playback.pause();- }}- height={600}- mobileHeight={700}+ height={580}+ mobileHeight={620}><ProductWorkspace workspace={w} /></ProductDemo>- <Show when={pointer()}>- {(p) => (- <DemoCursor- label="Jacob"- class="channel-demo-cursor"- style={{ transform: `translate(${p().x}px, ${p().y}px)` }}- />- )}- </Show></div>);}-/** @Macro answers in the channel from what the team has said and linked. */+/** Macro creates the task; Julia brings Cursor into the same thread to investigate. */export function ChannelAgentDemo() {+ const [sessionOpen, setSessionOpen] = createSignal(false);let root!: HTMLDivElement;- const w = createDummyWorkspace('messages');+ const w = createChannelProject();const initial = [+ ...structuredClone(channelHistory.slice(10)),{- id: 'invite',+ id: 'bug',person: 'teo' as const,- body: 'Invite fix is up for review. New and existing accounts both land in the right team now.',- time: '9:20 AM',+ time: '9:26 AM',+ body: 'signup button is tiny on my phone. can someone fix it?',},{- id: 'announcement',+ id: 'offer',person: 'julia' as const,- body: 'Announcement is drafted. I’ll send it as soon as the invite fix merges.',- time: '9:24 AM',+ time: '9:27 AM',+ body: 'i can take it',},{- id: 'catchup',+ id: 'follow-up-request',person: 'jacob' as const,- body: '@[Macro](demo-mention:macro) I was out yesterday. Catch me up on the launch: who owns what, and is anything blocked?',time: '9:28 AM',+ body: '@[Macro](demo-mention:macro) make that a task for Julia',},];w.setData('channels', (c) => c.id === 'launch', 'messages', initial);- w.open('messages', 'launch');- const finish = () => {+ const createFollowUp = () => {+ w.setData('tasks', (tasks) => [+ ...tasks.filter((task) => task.id !== 'training-invitations'),+ {+ id: 'training-invitations',+ title: FOLLOW_UP_TASK,+ description: 'Make the signup button easier to tap on a phone.',+ owner: 'julia',+ creator: 'jacob',+ channel: 'launch',+ status: 'Not Started',+ priority: 'Medium',+ tags: ['Launch'],+ relatedDocumentIds: [],+ steps: [],+ comments: [],+ },+ ]);w.setData('channels', (c) => c.id === 'launch', 'messages', [...initial,{- id: 'agent-summary',+ id: 'agent-task',person: 'macro',- body: 'Launch is Thursday at 9. Teo’s invite fix is in review, Julia’s announcement is ready and waiting on that fix, and the launch checklist is yours. Nothing else is blocked.',time: '9:28 AM',- taskIds: ['invite', 'announcement', 'checklist'],+ replyTo: 'follow-up-request',+ body: 'Made @[Fix the signup button](demo-mention:training-invitations) and assigned it to @[Julia](demo-mention:julia).',+ taskId: 'training-invitations',},]);- // Like a new message arriving, keep the latest reply in view.requestAnimationFrame(() => {const log = root?.querySelector<HTMLElement>('[role="log"]');if (log) log.scrollTop = log.scrollHeight;});};+ const appendReply = (message: WorkspaceComment) => {+ w.setData(+ 'channels',+ (channel) => channel.id === 'launch',+ 'messages',+ (messages) => [+ ...messages.filter((item) => item.id !== message.id),+ message,+ ]+ );+ w.setChannelThread('follow-up-request');+ requestAnimationFrame(() => {+ const log = root?.querySelector<HTMLElement>(+ '.channel-work-conversation [role="log"]'+ );+ if (log) log.scrollTop = log.scrollHeight;+ });+ };+ const bringCursor = () =>+ appendReply({+ id: 'julia-cursor',+ person: 'julia',+ time: '9:29 AM',+ replyTo: 'follow-up-request',+ body: 'thanks. @[Cursor](demo-mention:cursor) can you look into this? check the mobile styles first',+ });+ const cursorResponds = () => {+ w.updateTask('training-invitations', { status: 'In Progress' });+ appendReply({+ id: 'cursor-finding',+ person: 'cursor',+ time: '9:30 AM',+ replyTo: 'follow-up-request',+ body: '',+ });+ };const playback = createProductWalkthrough({root: () => root,- steps: 1,+ visibilityThreshold: 0.5,+ steps: 3,reset: () => {},- reduced: finish,- delay: () => 1300,- advance: finish,+ reduced: () => {+ createFollowUp();+ bringCursor();+ cursorResponds();+ },+ delay: (step) => [0, 1600, 4000, 3200][step] ?? 1600,+ advance: (step) => {+ if (step === 1) createFollowUp();+ if (step === 2) bringCursor();+ if (step === 3) cursorResponds();+ },});return (<ProductDemoref={(el) => (root = el)}- label="Ask the Macro agent to catch you up in the channel"+ label="Turn a message into an assigned task"onInteract={playback.pause}- height={600}- mobileHeight={720}+ height={560}+ mobileHeight={620}>- <ProductWorkspace workspace={w} />+ <Show+ when={sessionOpen()}+ fallback={+ <ChannelWorkSurface+ workspace={w}+ renderMessageDetails={(message) =>+ message.id === 'cursor-finding' ? (+ <DemoAgentChip+ agentSessionId="signup-investigation"+ requester="Julia"+ request="@Cursor can you look into this? check the mobile styles first"+ markdown="Found a mobile style shrinking the tap target."+ pullRequest={null}+ headerActions={null}+ onOpen={() => {+ playback.pause();+ setSessionOpen(true);+ }}+ />+ ) : undefined+ }+ />+ }+ >+ <div class="flex h-full flex-col p-4 text-left">+ <button+ class="self-start text-sm text-ink-muted mb-6"+ onClick={() => setSessionOpen(false)}+ >+ Back to conversation+ </button>+ <h3 class="text-sm font-semibold mb-6">+ Cursor · Check the signup button+ </h3>+ <p class="text-sm text-ink-muted mb-4">+ Julia: can you look into this? check the mobile styles first+ </p>+ <p class="text-base">+ Found a mobile style shrinking the tap target. The mobile button+ needs the same minimum height as the other signup buttons.+ </p>+ </div>+ </Show></ProductDemo>);}diff --git a/apps/marketing/src/features/marketing/components/channels/ChannelWorkSurface.tsx b/apps/marketing/src/features/marketing/components/channels/ChannelWorkSurface.tsxnew file mode 100644index 0000000000..2ab817ee35--- /dev/null+++ b/apps/marketing/src/features/marketing/components/channels/ChannelWorkSurface.tsx@@ -0,0 +1,282 @@+import ArrowLeft from '@phosphor/arrow-left.svg';+import Envelope from '@phosphor/envelope.svg';+import File from '@phosphor/file.svg';+import X from '@phosphor/x.svg';+import { Button } from '@ui';+import {+ createSignal,+ For,+ type JSX,+ Match,+ onCleanup,+ onMount,+ Show,+ Switch,+} from 'solid-js';+import type {+ WorkspaceComment,+ WorkspaceView,+} from '../../core/dummy-workspace';+import type { DummyWorkspace } from '../../primitives/createDummyWorkspace';+import {+ DocumentShareSheet,+ LAUNCH_MEMBERS,+} from '../documents/DocumentShareSheet';+import { ProductWorkspace } from '../product/ProductWorkspace';+import { TaskNotebook } from '../workspace/frozen/TaskNotebook';+import { WorkspaceChannel } from '../workspace/WorkspaceChannel';+import { WorkspaceDocuments } from '../workspace/WorkspaceDocuments';+import { WorkspaceEmail } from '../workspace/WorkspaceEmail';+import '../documents/document-stories.css';+import '../email/email-demos.css';++type WorkPane = { key: string; view: WorkspaceView; id?: string };++/** Each opened item retains its own view while sharing the same editable data. */+function ChannelWorkPane(props: {+ pane: WorkPane;+ workspace: DummyWorkspace;+ active: boolean;+ narrow: boolean;+ navigate: (view: WorkspaceView, id?: string) => void;+ close: () => void;+ registerClose: (element: HTMLButtonElement) => void;+}) {+ const [sharing, setSharing] = createSignal(false);+ const w = props.workspace;+ const scope: DummyWorkspace = {+ ...w,+ view: () => props.pane.view,+ contentView: () => props.pane.view,+ selected: () => props.pane.id,+ open: props.navigate,+ openItem: props.navigate,+ backToCollection: props.close,+ createTask: (...args) => {+ const id = w.createTask(...args);+ props.navigate('tasks', id);+ return id;+ },+ };+ const doc = () =>+ props.pane.view === 'documents'+ ? w.data.documents.find((item) => item.id === props.pane.id)+ : undefined;+ const task = () =>+ props.pane.view === 'tasks'+ ? w.data.tasks.find((item) => item.id === props.pane.id)+ : undefined;+ return (+ <section+ class="channel-work-item dummy-main"+ data-pane-key={props.pane.key}+ data-pane-view={props.pane.view}+ data-active={props.active}+ inert={props.narrow && !props.active}+ aria-hidden={props.narrow && !props.active}+ aria-label="Shared work"+ onKeyDown={(event) => {+ if (+ event.defaultPrevented ||+ (event.target instanceof Element &&+ event.target.closest(+ '[role="menu"], [role="listbox"], [role="dialog"], .doc-share-scrim'+ ))+ )+ return;+ if (event.key === 'Escape') {+ event.stopPropagation();+ props.close();+ }+ }}+ >+ <Switch fallback={<ProductWorkspace workspace={scope} />}>+ <Match when={doc()}>+ <WorkspaceDocuments+ workspace={scope}+ hideCollectionNavigation+ sharingDescription="Shared with #launch"+ onShare={() => setSharing(true)}+ />+ </Match>+ <Match when={props.pane.view === 'email'}>+ <WorkspaceEmail+ workspace={scope}+ tab="all"+ account="all"+ hideCollectionNavigation+ />+ </Match>+ <Match when={task()}>+ {(item) => (+ <TaskNotebook+ workspace={scope}+ task={item()}+ hideCollectionNavigation+ relatedContent={+ <Show when={item().relatedDocumentIds?.length}>+ <div class="mt-6">+ <p class="mb-2 text-xs text-ink-muted">Related files</p>+ <button+ type="button"+ class="dummy-entity-link"+ onClick={() => props.navigate('documents', 'plan')}+ >+ <File class="size-4 text-note" />+ {w.data.documents.find((doc) => doc.id === 'plan')?.title}+ </button>+ <button+ type="button"+ class="dummy-entity-link"+ onClick={() => props.navigate('email', 'dana')}+ >+ <Envelope class="size-4" />+ {+ w.data.emails.find((mail) => mail.id === 'dana')+ ?.subject+ }+ </button>+ </div>+ </Show>+ }+ />+ )}+ </Match>+ </Switch>+ <Button+ variant="plain"+ size="icon-sm"+ class="channel-work-back"+ label="Back to channel"+ onClick={() => props.navigate('messages')}+ >+ <ArrowLeft class="size-4" />+ </Button>+ <Button+ ref={props.registerClose}+ variant="plain"+ size="icon-sm"+ class="channel-work-close"+ label="Close shared work"+ onClick={props.close}+ >+ <X class="size-4" />+ </Button>+ <DocumentShareSheet+ open={sharing() && !!doc()}+ autoFocus+ title={doc()?.title ?? ''}+ channel={{ members: LAUNCH_MEMBERS, level: 'view' }}+ onClose={() => setSharing(false)}+ />+ </section>+ );+}++/** Opening email adds a third split; closing it reveals the still-mounted document. */+export function ChannelWorkSurface(props: {+ workspace: DummyWorkspace;+ renderMessageDetails?: (message: WorkspaceComment) => JSX.Element;+}) {+ const w = props.workspace;+ let root!: HTMLDivElement;+ const [width, setWidth] = createSignal(0);+ const [panes, setPanes] = createSignal<WorkPane[]>([]);+ const [active, setActive] = createSignal<string>();+ const closeButtons = new Map<string, HTMLButtonElement>();+ const triggers = new Map<string, HTMLElement>();+ const narrow = () => width() < 480 || width() / (panes().length + 1) < 240;+ const navigate = (view: WorkspaceView, id?: string) => {+ if (view === 'messages' || view === 'home') {+ const trigger = triggers.get(active() ?? '');+ if (view === 'messages' && id) w.setChannel(id);+ setActive(undefined);+ queueMicrotask(() => {+ if (trigger?.isConnected) trigger.focus({ preventScroll: true });+ });+ return;+ }+ const key = `${view}:${id ?? 'new'}`;+ const focus =+ document.activeElement instanceof HTMLElement &&+ root?.contains(document.activeElement)+ ? document.activeElement+ : undefined;+ if (focus) triggers.set(key, focus);+ if (!panes().some((pane) => pane.key === key))+ setPanes((items) => [...items, { key, view, id }]);+ setActive(key);+ if (focus)+ queueMicrotask(() =>+ closeButtons.get(key)?.focus({ preventScroll: true })+ );+ };+ const close = (key: string) => {+ const remaining = panes().filter((pane) => pane.key !== key);+ const next = remaining.at(-1);+ const trigger = triggers.get(key);+ setPanes(remaining);+ setActive(next?.key);+ closeButtons.delete(key);+ triggers.delete(key);+ queueMicrotask(() => {+ if (narrow() && next)+ closeButtons.get(next.key)?.focus({ preventScroll: true });+ else if (trigger?.isConnected) trigger.focus({ preventScroll: true });+ });+ };+ const channel: DummyWorkspace = {+ ...w,+ view: () => 'messages',+ contentView: () => 'messages',+ open: navigate,+ openItem: navigate,+ createTask: (...args) => {+ const id = w.createTask(...args);+ navigate('tasks', id);+ return id;+ },+ };+ onMount(() => {+ const measure = () => setWidth(root.clientWidth);+ const observer = new ResizeObserver(measure);+ observer.observe(root);+ measure();+ onCleanup(() => observer.disconnect());+ });+ return (+ <div+ ref={root}+ class="channel-work-split"+ style={{ '--channel-pane-count': panes().length + 1 }}+ data-narrow={narrow()}+ data-open={panes().length > 0}+ data-pane-count={panes().length}+ data-active-pane={active()}+ >+ <div+ class="channel-work-conversation dummy-main"+ inert={narrow() && !!active()}+ aria-hidden={narrow() && !!active()}+ >+ <WorkspaceChannel+ workspace={channel}+ renderMessageDetails={props.renderMessageDetails}+ />+ </div>+ <For each={panes()}>+ {(pane) => (+ <ChannelWorkPane+ pane={pane}+ workspace={w}+ navigate={navigate}+ narrow={narrow()}+ active={active() === pane.key}+ close={() => close(pane.key)}+ registerClose={(element) => closeButtons.set(pane.key, element)}+ />+ )}+ </For>+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/channels/channel-stories.css b/apps/marketing/src/features/marketing/components/channels/channel-stories.cssindex bdd73dee91..e111edf867 100644--- a/apps/marketing/src/features/marketing/components/channels/channel-stories.css+++ b/apps/marketing/src/features/marketing/components/channels/channel-stories.css@@ -31,3 +31,110 @@.channel-demo-cursor, .chat-shortcut-dock > button, .chat-shortcut-dock kbd { transition: none; }}.chat-inbox-group:not(:first-child) { margin-top: 16px; }++.channel-hero-workspace { height: 100%; border: 0; border-radius: 0; }+.channel-work-split { display: grid; grid-template-columns:repeat(var(--channel-pane-count, 1), minmax(0, 1fr)); grid-template-rows:minmax(0, 1fr); position: relative; flex: 1; min-width: 0; min-height: 0; height: 100%; width: 100%; }+.channel-work-conversation, .channel-work-item { display: flex; flex: 1 1 0; position: relative; flex-direction: column; min-width: 0; min-height: 0; }+.channel-work-item { border-left: 1px solid var(--color-edge-muted); background: var(--color-panel); overflow: hidden; }+.channel-work-item > [data-view-shell-top-bar] { padding-right: 44px; }+.channel-work-close { position: absolute; top: 12px; right: 8px; z-index: 6; }+.channel-work-split[data-narrow=true][data-active-pane] > .channel-work-conversation { visibility: hidden; }+.channel-work-split[data-narrow=true] > .channel-work-item { position: absolute; inset: 0; border-left: 0; z-index: 8; }+.chat-inbox-scene:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }+.chat-shortcut-dock > button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 6px; }++/* Use the compact conversation header whenever a split is phone-width. */+@container sample-main (max-width: 620px) {+ .channel-work-conversation > [data-view-shell-top-bar] .sample-tabs-inset { display: none; }+}+.chat-inbox-back { display: none; }+@media (max-width: 699px) {+ .chat-inbox-scene { position: relative; }+ .chat-inbox-scene[data-mobile-preview=true] .chat-inbox-list { visibility: hidden; }+ .chat-inbox-scene[data-mobile-preview=true] .chat-inbox-preview { display: flex; position: absolute; inset: 0; background: var(--color-panel); z-index: 2; }+ .chat-inbox-back { display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--color-edge-muted); font-size: 13px; }+}+.channel-work-item [aria-label='Back to files'] { display: none; }++/* Keep split-pane typography readable inside the standard feature window. */+.channel-wide-demo .channel-work-item { flex: 1; }+.channel-wide-demo .channel-work-item[data-pane-view="documents"] .sample-detail-content > .dummy-scroll { padding-inline: 24px; }+.channel-wide-demo .channel-work-item [aria-label='Document title'] { font-size: 24px; line-height: 1.3; margin-bottom: 16px; }+.channel-wide-demo .channel-work-item [aria-label='Document body'] { font-size: 14px; line-height: 1.6; }+.channel-wide-demo .channel-work-item .website-demo-markdown h2 { margin-top: 24px; margin-bottom: 12px; font-size: 18px; }+.channel-work-item .doc-share-scrim { overflow-y: auto; z-index: 10; }+.channel-permissions-demo .product-demo > .dummy-main { position: relative; }+.channel-permissions-demo .doc-share-scrim { overflow-y: auto; padding-top: 24px; }+.channel-permissions-demo [aria-label='Back to files'] { display: none; }+@media(max-width: 699px) {+ .channel-wide-demo .channel-work-conversation { flex: 1; }+ .channel-wide-demo .channel-work-item[data-pane-view="documents"] .sample-detail-content > .dummy-scroll { padding-inline: 24px; }+ .channel-wide-demo .channel-work-item [aria-label='Document title'] { font-size: 24px; }+}++.channel-work-split[data-narrow=true] > .channel-work-item[data-active=false] { visibility: hidden; pointer-events: none; }+.channel-work-back { display: none; }+.channel-work-split[data-narrow=true] .channel-work-back { display: flex; position: absolute; top: 12px; left: 8px; z-index: 6; }+.channel-work-split[data-narrow=true] .channel-work-item > [data-view-shell-top-bar] { padding-left: 42px; }+.channel-work-item .sample-email-thread .mail-thread-body { padding: 32px 20px; }+.channel-work-item .sample-email-thread .mail-message-text { line-height: 1.6; padding-right: 0; }+@container sample-main (max-width: 440px) {+ .channel-work-item [aria-label='Mark as unread'],+ .channel-work-item [aria-label='Mark done'],+ .channel-work-item [aria-label='Copy email link'],+ .channel-work-item [aria-label='Link copied'] { display: none; }+}++@container sample-main (max-width: 440px) {+ .channel-work-item .sample-email-thread .mail-thread-body { padding: 24px 12px; }+ .channel-work-item .sample-email-thread .macro-message-padding { padding-inline: 0; }+}++.channel-work-split[data-narrow=true] { display:flex; }+.channel-work-conversation, .channel-work-item { container:sample-main / inline-size; }+@media(min-width:700px) {+ .channel-hero-demo .email-desktop-demo { --desktop-stage-width:min(1600px, calc(100vw - 48px)); }+ .channel-hero-demo .email-desktop-wallpaper { padding:24px; }+ .channel-hero-demo .email-desktop-content { height:640px; }+}++@container sample-main (max-width: 360px) {+ .channel-wide-demo .sample-chat-log { padding-inline: 16px; }+}++/* Catch-up is the conversation itself: use the full frame for inline replies. */+.channel-thread-demo .sample-chat-log { padding: 22px 28px; }+.channel-thread-demo .sample-message-row { margin-bottom: 0; }+@media (max-width: 699px) {+ .channel-thread-demo .sample-chat-log { padding: 18px 14px; }+}+@container sample-main (max-width: 620px) {+ .channel-thread-demo [data-view-shell-top-bar] .sample-tabs-inset { display: none; }+}++/* ShareButton / Panel geometry, contained within this demonstration window. */+.channel-permissions-demo .doc-share-scrim {+ inset: 0;+ padding: 32px 24px;+ background: rgb(0 0 0 / 0.4);+ backdrop-filter: blur(4px);+}+.channel-permissions-demo .doc-share-card {+ width: min(800px, 100%);+ border-color: var(--color-edge);+ box-shadow: none;+}+.channel-permissions-demo .doc-share-card > header {+ min-height: 40px;+ padding: 8px 16px;+ border-bottom: 1px solid var(--color-edge-divider);+ line-height: 20px;+}+.channel-permissions-demo .doc-share-people { padding: 16px; }+.channel-permissions-demo .doc-share-person { min-height: 28px; }+.channel-permissions-demo .doc-share-link > p { line-height: 20px; }+@media (max-width: 699px) {+ .channel-permissions-demo .doc-share-scrim { padding: 16px 8px; }+ .channel-permissions-demo .doc-share-card > header { padding-inline: 12px; }+ .channel-permissions-demo .doc-share-people { padding: 12px; }+}diff --git a/apps/marketing/src/features/marketing/components/channels/channelProject.ts b/apps/marketing/src/features/marketing/components/channels/channelProject.tsnew file mode 100644index 0000000000..bc9a275da1--- /dev/null+++ b/apps/marketing/src/features/marketing/components/channels/channelProject.ts@@ -0,0 +1,611 @@+import type { DummyData, WorkspaceComment } from '../../core/dummy-workspace';+import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';++export const CHANNEL_DOC = 'Homepage copy';+export const CHANNEL_EMAIL = 'Website feedback';+export const CHANNEL_TASK = 'Check the mobile layout';+export const FOLLOW_UP_TASK = 'Fix the signup button';++/** Original fictional conversation, with earlier exchanges left available to scroll. */+export const channelHistory: WorkspaceComment[] = [+ {+ id: 'history-morning',+ person: 'julia',+ time: '8:18 AM',+ body: 'morning, doing a last pass on the site',+ },+ {+ id: 'history-images',+ person: 'valentina',+ time: '8:19 AM',+ body: 'new screenshots are in. use the ones from today',+ replyTo: 'history-morning',+ },+ {+ id: 'history-thanks',+ person: 'julia',+ time: '8:20 AM',+ body: 'thank you',+ replyTo: 'history-morning',+ },+ {+ id: 'history-logo',+ person: 'gabriel',+ time: '8:27 AM',+ body: 'anyone else getting the old logo on the preview?',+ },+ {+ id: 'history-refresh',+ person: 'teo',+ time: '8:28 AM',+ body: 'hard refresh. i had the same thing',+ replyTo: 'history-logo',+ },+ {+ id: 'history-fixed',+ person: 'gabriel',+ time: '8:30 AM',+ body: 'yep that did it',+ replyTo: 'history-logo',+ },+ {+ id: 'history-copy',+ person: 'jacob',+ time: '8:41 AM',+ body: 'intro feels a bit long on a phone',+ },+ {+ id: 'history-cut',+ person: 'julia',+ time: '8:43 AM',+ body: 'cutting the second paragraph',+ replyTo: 'history-copy',+ },+ {+ id: 'history-quote',+ person: 'valentina',+ time: '8:45 AM',+ body: 'keep the customer quote though',+ replyTo: 'history-copy',+ },+ {+ id: 'history-keep',+ person: 'jacob',+ time: '8:46 AM',+ body: 'yeah keep that',+ replyTo: 'history-copy',+ },+ {+ id: 'history-links',+ person: 'teo',+ time: '8:54 AM',+ body: 'pricing links are good now. footer next',+ },+ {+ id: 'history-email',+ person: 'gabriel',+ time: '8:57 AM',+ body: 'i’ll check the email that goes out after signup',+ replyTo: 'history-links',+ },+ {+ id: 'history-untested',+ person: 'julia',+ time: '8:58 AM',+ body: 'nice, that’s the one i haven’t tested',+ replyTo: 'history-links',+ },+ {+ id: 'history-export',+ person: 'valentina',+ time: '9:03 AM',+ body: 'last image export is up',+ },+ {+ id: 'history-sharp',+ person: 'jacob',+ time: '9:04 AM',+ body: 'much sharper',+ replyTo: 'history-export',+ },+ {+ id: 'history-finally',+ person: 'valentina',+ time: '9:05 AM',+ body: 'finally 😅',+ replyTo: 'history-export',+ },+];++export const projectMessages: WorkspaceComment[] = [+ ...channelHistory,+ {+ id: 'start',+ person: 'julia',+ time: '9:12 AM',+ body: 'can we ship the site tomorrow?',+ },+ {+ id: 'shared-plan',+ person: 'jacob',+ time: '9:14 AM',+ body: 'copy’s ready. updated @[Homepage copy](demo-mention:plan)',+ documentId: 'plan',+ replyTo: 'start',+ },+ {+ id: 'training',+ person: 'teo',+ time: '9:18 AM',+ body: 'just need to finish @[Check the mobile layout](demo-mention:invite)',+ taskId: 'invite',+ },+ {+ id: 'customer-email',+ person: 'jacob',+ time: '9:19 AM',+ body: 'did you catch the signup button in @[Website feedback](demo-mention:dana)?',+ emailId: 'dana',+ replyTo: 'training',+ },+ {+ id: 'training-reply',+ person: 'teo',+ time: '9:20 AM',+ body: 'yep, fixing it now',+ replyTo: 'training',+ },+];++/** Page-local website launch content; other marketing pages keep their own data. */+export function createChannelProject() {+ const w = createDummyWorkspace('messages');+ w.setData('emails', (item) => item.id === 'dana', {+ subject: CHANNEL_EMAIL,+ sender: 'Valentina',+ snippet: 'The signup button is still hard to tap on a phone.',+ body: 'Hi Jacob,\n\nThe new homepage looks good on desktop. I checked it on my phone too, and the signup button is still hard to tap.\n\nCan we make it the same height as the other buttons before we publish?\n\nThanks,\nValentina',+ shared: 'launch',+ replies: [+ {+ id: 'website-reply',+ person: 'jacob',+ to: 'Valentina',+ body: 'Agreed. We’ll fix the button before launch. Julia is checking the signup flow too.',+ time: '9:52 AM',+ },+ ],+ });+ w.setData('documents', (item) => item.id === 'plan', {+ title: CHANNEL_DOC,+ tags: ['Launch'],+ body: '## A simpler way to work\n\nEverything your team needs to get things done.\n\n## What’s new\n\n- A shorter intro\n- New customer stories\n- One clear signup button',+ comments: [+ {+ id: 'copy-comment',+ person: 'gabriel',+ body: 'intro reads much better now',+ time: 'Yesterday',+ },+ ],+ });+ w.setData('tasks', (item) => item.id === 'invite', {+ title: CHANNEL_TASK,+ owner: 'teo',+ creator: 'jacob',+ description:+ 'Check the homepage on a phone. Make sure the text is readable and the signup button is easy to tap.',+ status: 'In Progress',+ priority: 'High',+ tags: ['Launch'],+ relatedDocumentIds: ['plan'],+ steps: [+ { id: 'agenda', text: 'Check the text size', done: true },+ { id: 'examples', text: 'Test the signup button', done: false },+ ],+ comments: [],+ });+ w.setData(+ 'channels',+ (item) => item.id === 'launch',+ 'messages',+ structuredClone(projectMessages)+ );+ w.setData('channels', (item) => item.id === 'dm-teo', 'messages', [+ {+ id: 'teo-question',+ person: 'teo',+ body: 'got a sec to look at @[Homepage copy](demo-mention:plan)?',+ time: '9:32 AM',+ documentId: 'plan',+ },+ ]);+ w.setData('channels', (channels) =>+ channels.filter((channel) =>+ ['launch', 'design', 'product', 'dm-teo', 'dm-julia'].includes(channel.id)+ )+ );+ w.setData('channels', (channel) => channel.id === 'product', 'messages', [+ {+ id: 'p1',+ person: 'julia',+ body: 'what should we work on next week?',+ time: '10:12 AM',+ },+ {+ id: 'p2',+ person: 'teo',+ body: 'search. heard that from a few people this week',+ time: '10:14 AM',+ replyTo: 'p1',+ },+ {+ id: 'p3',+ person: 'jacob',+ body: 'agreed. let’s talk tomorrow',+ time: '10:15 AM',+ replyTo: 'p1',+ },+ ]);+ w.setData('channels', (channel) => channel.id === 'design', 'messages', [+ {+ id: 'd1',+ person: 'valentina',+ body: 'new icons are ready 👀',+ time: '11:02 AM',+ },+ {+ id: 'd2',+ person: 'julia',+ body: 'love these',+ time: '11:04 AM',+ replyTo: 'd1',+ },+ ]);+ w.setData('channels', (channel) => channel.id === 'dm-julia', 'messages', [+ {+ id: 'j1',+ person: 'julia',+ body: 'can you look at the intro in @[Homepage copy](demo-mention:plan)?',+ time: '9:18 AM',+ documentId: 'plan',+ },+ { id: 'j2', person: 'jacob', body: 'yep, looking now', time: '9:20 AM' },+ ]);+ w.open('messages', 'launch');+ return w;+}++/** The opening and access stories use the same shared checklist. */+export function createChannelChecklist() {+ const w = createChannelProject();+ w.setData('documents', (doc) => doc.id === 'plan', {+ title: 'Launch checklist',+ comments: [+ {+ id: 'checklist-comment',+ person: 'julia',+ body: 'i’ll check signup again once the button fix is in',+ time: '10:02 AM',+ },+ ],+ body: 'Final checks for tomorrow’s website launch. Update this as each part is signed off.\n\n## Before we publish\n\n- [x] Homepage copy reviewed\n- [x] New images exported\n- [ ] Mobile layout checked\n- [ ] Signup and confirmation email tested\n\n## Owners\n\nTeo is checking mobile. Julia is handling signup. Jacob will publish once both are ready.\n\n## After launch\n\nCheck the first signups and confirm the welcome email arrives.',+ });+ w.setData('channels', (channel) => channel.id === 'launch', 'messages', [+ ...structuredClone(channelHistory),+ {+ id: 'last-pass',+ person: 'julia',+ time: '9:40 AM',+ body: 'copy is done. mobile and signup left',+ },+ {+ id: 'last-pass-reply',+ person: 'teo',+ time: '9:41 AM',+ body: 'looking now',+ replyTo: 'last-pass',+ },+ {+ id: 'confirmation',+ person: 'gabriel',+ time: '9:49 AM',+ body: 'confirmation email is landing. subject line still needs checking',+ },+ {+ id: 'confirmation-reply',+ person: 'jacob',+ time: '9:50 AM',+ body: 'keep it short pls',+ replyTo: 'confirmation',+ },+ {+ id: 'shared-plan',+ person: 'julia',+ body: 'added the last few things to @[Launch checklist](demo-mention:plan)',+ documentId: 'plan',+ time: '10:02 AM',+ },+ {+ id: 'welcome',+ person: 'jacob',+ body: 'can you check the signup note in @[Website feedback](demo-mention:dana)?',+ emailId: 'dana',+ time: '10:05 AM',+ },+ {+ id: 'opened',+ person: 'teo',+ body: 'working through @[Check the mobile layout](demo-mention:invite). signup is next',+ taskId: 'invite',+ time: '10:06 AM',+ },+ {+ id: 'phone-check',+ person: 'julia',+ time: '10:08 AM',+ body: 'i’ll do one more signup on my phone',+ },+ {+ id: 'phone-check-reply',+ person: 'teo',+ time: '10:09 AM',+ body: 'thanks, i’ll check android',+ replyTo: 'phone-check',+ },+ ]);+ return w;+}++/** A fuller chat sidebar using the same people as the visible conversation. */+export function createChannelHeroProject() {+ const w = createChannelProject();+ w.setData('channels', (channels): DummyData['channels'] => [+ ...channels,+ {+ id: 'general',+ messages: [+ {+ id: 'general-sync',+ person: 'julia',+ time: '9:02 AM',+ body: 'quick reminder: team sync at 11',+ },+ {+ id: 'general-reply',+ person: 'teo',+ time: '9:03 AM',+ body: 'i’ll be there',+ replyTo: 'general-sync',+ },+ ],+ },+ {+ id: 'engineering',+ messages: [+ {+ id: 'engineering-mobile',+ person: 'teo',+ time: '9:22 AM',+ body: 'mobile fix is ready. checking android now',+ },+ {+ id: 'engineering-ios',+ person: 'gabriel',+ time: '9:24 AM',+ body: 'i’ll check ios',+ replyTo: 'engineering-mobile',+ },+ ],+ },+ {+ id: 'customers',+ messages: [+ {+ id: 'customers-link',+ person: 'gabriel',+ time: '9:30 AM',+ body: 'a few people asked for the signup link',+ },+ {+ id: 'customers-send',+ person: 'julia',+ time: '9:32 AM',+ body: 'sending it after the mobile check',+ replyTo: 'customers-link',+ },+ ],+ },+ {+ id: 'website',+ messages: [+ {+ id: 'website-ready',+ person: 'julia',+ time: '9:35 AM',+ body: 'screenshots and copy are ready',+ },+ {+ id: 'website-export',+ person: 'valentina',+ time: '9:36 AM',+ body: 'last export looks good',+ replyTo: 'website-ready',+ },+ ],+ },+ {+ id: 'random',+ messages: [+ {+ id: 'random-coffee',+ person: 'valentina',+ time: '10:02 AM',+ body: 'coffee?',+ },+ {+ id: 'random-reply',+ person: 'gabriel',+ time: '10:03 AM',+ body: 'always',+ replyTo: 'random-coffee',+ },+ ],+ },+ {+ id: 'dm-gabriel',+ person: 'gabriel',+ messages: [+ {+ id: 'gabriel-email',+ person: 'gabriel',+ time: '9:37 AM',+ body: 'welcome email looks good. did you check it on mobile?',+ },+ {+ id: 'gabriel-reply',+ person: 'jacob',+ time: '9:38 AM',+ body: 'yep, one more pass before we publish',+ },+ ],+ },+ {+ id: 'dm-valentina',+ person: 'valentina',+ messages: [+ {+ id: 'valentina-images',+ person: 'valentina',+ time: '9:40 AM',+ body: 'new images are in. refreshed the ones in @[Homepage copy](demo-mention:plan)',+ documentId: 'plan',+ },+ {+ id: 'valentina-reply',+ person: 'jacob',+ time: '9:41 AM',+ body: 'looks much sharper, thanks',+ },+ ],+ },+ ]);+ const extraChats: Record<string, [WorkspaceComment['person'], string][]> = {+ launch: [+ [+ 'gabriel',+ 'anyone got the final link? i have about six preview tabs open',+ ],+ ['julia', 'same one as this morning'],+ ['gabriel', 'found it. closing the other five for my own sanity'],+ ['teo', 'mobile check is done btw'],+ ],+ product: [+ ['gabriel', 'two people asked if search can remember the last filter'],+ ['julia', 'i keep expecting that too'],+ ['teo', 'can do. should it reset when you switch projects?'],+ [+ 'jacob',+ 'yeah probably. otherwise i’ll forget why nothing is showing up',+ ],+ ['julia', 'put it on the list for tomorrow'],+ ],+ design: [+ ['teo', 'which folder has the small versions?'],+ ['valentina', 'exports / 24. ignore the folder called final lol'],+ ['teo', 'very reassuring'],+ ['valentina', 'there is also final2. do not go in there'],+ ['julia', 'the new search icon is much clearer'],+ ],+ general: [+ ['jacob', 'running 5 late, start without me'],+ ['gabriel', 'we’re still finding the call link so you’re fine'],+ ['valentina', 'it’s in the calendar invite 😭'],+ ['julia', 'also who left a charger in the meeting room'],+ ['teo', 'mine! please don’t let it become the office charger'],+ ],+ engineering: [+ ['gabriel', 'ios looks good. keyboard isn’t covering the button anymore'],+ ['teo', 'finally'],+ ['jacob', 'did we check landscape too?'],+ ['teo', '...one sec'],+ ['teo', 'yep we’re good'],+ ],+ customers: [+ [+ 'julia',+ 'sent the link. they’re trying it with the rest of the team today',+ ],+ ['gabriel', 'nice. did they need help importing anything?'],+ ['julia', 'just their contacts. i’ll walk them through it after lunch'],+ ['jacob', 'ask how the first invite went too'],+ ],+ website: [+ ['valentina', 'tiny thing: the footer still has the old icon'],+ ['teo', 'good catch, fixed'],+ ['julia', 'i’m still seeing it'],+ ['teo', 'hard refresh?'],+ ['julia', 'yep. sorry. classic'],+ ],+ random: [+ ['jacob', 'where are we getting lunch'],+ ['valentina', 'anything except the salad place'],+ ['gabriel', 'noodle place?'],+ ['teo', 'yes'],+ ['julia', 'can someone grab mine? call until 12:30'],+ ['gabriel', 'send me your order'],+ ],+ 'dm-teo': [+ ['jacob', 'yep. the second paragraph is a bit long'],+ ['teo', 'cut it or split it?'],+ ['jacob', 'cut it. the screenshot already explains most of it'],+ ['teo', 'done. much better actually'],+ ['jacob', 'also you left your charger upstairs'],+ ['teo', 'i know 😅'],+ ],+ 'dm-julia': [+ ['jacob', 'left a couple comments. nothing big'],+ ['julia', 'saw them, thanks'],+ ['julia', 'do we still want the quote at the top?'],+ ['jacob', 'yeah keep it. just shorten the intro above it'],+ ['julia', 'on it'],+ ],+ 'dm-gabriel': [+ ['gabriel', 'cool. i’ll send myself one after the change goes out'],+ ['jacob', 'thanks. check the reply address too'],+ ['gabriel', 'yep'],+ ['gabriel', 'btw are you on the customer call tomorrow?'],+ ['jacob', 'first 15 mins. then i have to drop'],+ ['gabriel', 'works, i can take the rest'],+ ],+ 'dm-valentina': [+ [+ 'valentina',+ 'can you check the crop on your laptop? looks different on mine',+ ],+ ['jacob', 'top is a little tight'],+ ['valentina', 'ok gave it more room'],+ ['jacob', 'that’s it 👍'],+ ['valentina', 'leaving the old export in the folder just in case'],+ ],+ };+ for (const [id, messages] of Object.entries(extraChats)) {+ w.setData(+ 'channels',+ (channel) => channel.id === id,+ 'messages',+ (existing) => [+ ...existing,+ ...messages.map(+ ([person, body], index): WorkspaceComment => ({+ id: `${id}-extra-${index}`,+ person,+ body,+ time: `11:${String(12 + index * 2).padStart(2, '0')} AM`,+ })+ ),+ ]+ );+ }+ return w;+}diff --git a/apps/marketing/src/features/marketing/components/comparisons/FeatureComparisons.test.tsx b/apps/marketing/src/features/marketing/components/comparisons/FeatureComparisons.test.tsxnew file mode 100644index 0000000000..71e21f830b--- /dev/null+++ b/apps/marketing/src/features/marketing/components/comparisons/FeatureComparisons.test.tsx@@ -0,0 +1,43 @@+import { cleanup, render, within } from '@solidjs/testing-library';+import { afterEach, expect, it } from 'vitest';+import { setViewportWidth } from '../../../../app/utils/utilBreakpoint';+import {+ emailComparisons,+ taskComparisons,+} from '../../core/feature-comparisons';+import { FeatureComparisons } from './FeatureComparisons';++afterEach(cleanup);++it('shows one table with all email competitors and no disclosure or heading', () => {+ setViewportWidth(1440);+ const view = render(() => (+ <FeatureComparisons comparisons={emailComparisons} />+ ));+ const table = view.getByRole('region', { name: 'Compare Macro' });+ expect(view.container.querySelector('details')).toBeNull();+ expect(view.queryByRole('heading')).toBeNull();+ expect(within(table).getByText('Superhuman Mail')).toBeTruthy();+ expect(within(table).getByText('Gmail')).toBeTruthy();+ expect(within(table).getAllByText('Keyboard shortcuts')).toHaveLength(1);+ expect(+ within(table).getAllByRole('img', { name: 'Yes' }).length+ ).toBeGreaterThan(0);+ expect(+ within(table).getAllByRole('img', { name: 'No' }).length+ ).toBeGreaterThan(0);+});++it('combines Linear and Jira in one mobile-scrollable table', () => {+ setViewportWidth(390);+ const view = render(() => (+ <FeatureComparisons comparisons={taskComparisons} />+ ));+ const table = view.getByRole('region', { name: 'Compare Macro' });+ expect(within(table).getByText('Linear')).toBeTruthy();+ expect(within(table).getByText('Jira')).toBeTruthy();+ expect(table.tabIndex).toBe(0);+ expect(table.style.overflowX).toBe('auto');+ expect(view.container.querySelector('#compare-linear')).toBeTruthy();+ expect(view.container.querySelector('#compare-jira')).toBeTruthy();+});diff --git a/apps/marketing/src/features/marketing/components/comparisons/FeatureComparisons.tsx b/apps/marketing/src/features/marketing/components/comparisons/FeatureComparisons.tsxnew file mode 100644index 0000000000..88445c35c3--- /dev/null+++ b/apps/marketing/src/features/marketing/components/comparisons/FeatureComparisons.tsx@@ -0,0 +1,105 @@+import { For, onCleanup, onMount } from 'solid-js';+import {+ CheckMark,+ type ComparisonColumn,+ ComparisonTable,+ CrossMark,+} 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: {+ comparisons: readonly FeatureComparison[];+}) {+ let container!: HTMLDivElement;+ const rows = () =>+ (props.comparisons[0]?.rows ?? [])+ .filter((row) =>+ props.comparisons.every((comparison) =>+ comparison.rows.some((candidate) => candidate.feature === row.feature)+ )+ )+ .map((row) => ({+ feature: row.feature,+ cells: [+ row.macro,+ ...props.comparisons.map(+ (comparison) =>+ comparison.rows.find(+ (candidate) => candidate.feature === row.feature+ )!.competitor+ ),+ ],+ }));+ onMount(() => {+ let frame = 0;+ const reveal = () => {+ cancelAnimationFrame(frame);+ frame = requestAnimationFrame(() => {+ if (+ props.comparisons.some(+ (comparison) => window.location.hash === `#compare-${comparison.id}`+ )+ ) {+ container.scrollIntoView({ block: 'start' });+ }+ });+ };+ reveal();+ window.addEventListener('hashchange', reveal);+ onCleanup(() => {+ cancelAnimationFrame(frame);+ window.removeEventListener('hashchange', reveal);+ });+ });+ return (+ <div ref={container} class="feature-page-reading feature-comparisons">+ <For each={props.comparisons}>+ {(comparison) => (+ <span+ id={`compare-${comparison.id}`}+ class="feature-comparison-anchor"+ />+ )}+ </For>+ <ComparisonTable+ columns={[+ { label: 'Macro', macro: true },+ ...props.comparisons.map((comparison) => ({+ label: comparison.competitor,+ logo: logos[comparison.id],+ })),+ ]}+ rows={rows()}+ sortRows={false}+ mobileCellWidth={100}+ mobileMinWidth={props.comparisons.length > 1 ? 520 : 390}+ scrollLabel="Compare Macro"+ />+ <div class="feature-comparison-key">+ <span>+ <CheckMark /> Available+ </span>+ <span>+ <CrossMark /> Not offered as a built-in tool+ </span>+ </div>+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/comparisons/feature-comparisons.css b/apps/marketing/src/features/marketing/components/comparisons/feature-comparisons.cssnew file mode 100644index 0000000000..fcfb50c5c5--- /dev/null+++ b/apps/marketing/src/features/marketing/components/comparisons/feature-comparisons.css@@ -0,0 +1,6 @@+.feature-comparisons { position: relative; display: grid; gap: 20px; 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-key > span { display: inline-flex; gap: 8px; align-items: center; }+.feature-comparison-key svg { flex: none; }diff --git a/apps/marketing/src/features/marketing/components/crm/CrmCaptureDemo.tsx b/apps/marketing/src/features/marketing/components/crm/CrmCaptureDemo.tsxindex ad04e4dabe..7e3acdea41 100644--- a/apps/marketing/src/features/marketing/components/crm/CrmCaptureDemo.tsx+++ b/apps/marketing/src/features/marketing/components/crm/CrmCaptureDemo.tsx@@ -10,13 +10,13 @@ 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 Chen is running the rollout on their side.',+ 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.',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 Chen ([email protected]) is running the rollout on their side.',+ 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.',time: '9:52 AM',replyTo: 'capture-request',};diff --git a/apps/marketing/src/features/marketing/components/crm/CrmContextDemos.test.tsx b/apps/marketing/src/features/marketing/components/crm/CrmContextDemos.test.tsxindex 8c47076156..3dfc6a3665 100644--- a/apps/marketing/src/features/marketing/components/crm/CrmContextDemos.test.tsx+++ b/apps/marketing/src/features/marketing/components/crm/CrmContextDemos.test.tsx@@ -150,7 +150,7 @@ it('lists the record’s team, files, and tasks', () => {fireEvent.input(view.getByRole('textbox', { name: 'Search contacts' }), {target: { value: 'priya' },});- expect(contacts.queryByText('Dana Whitfield')).toBeNull();+ expect(contacts.queryByText('Dana')).toBeNull();fireEvent.click(view.getByRole('radio', { name: 'Files' }));expect(view.getByRole('button', { name: 'Team rollout plan 9:30 AM' })diff --git a/apps/marketing/src/features/marketing/components/crm/CrmEnrichmentDemo.tsx b/apps/marketing/src/features/marketing/components/crm/CrmEnrichmentDemo.tsxindex ce2474b006..21a548c90a 100644--- a/apps/marketing/src/features/marketing/components/crm/CrmEnrichmentDemo.tsx+++ b/apps/marketing/src/features/marketing/components/crm/CrmEnrichmentDemo.tsx@@ -25,7 +25,7 @@ const kestrel: SampleCompany = {emails: [{id: 'kestrel-pricing',- sender: 'Jacob Beckerman',+ sender: 'Jacob',subject: 'Re: Pricing for a 30-person team',snippet: 'Happy to walk you through it. Does Friday at 2 work?',time: '10:08 AM',diff --git a/apps/marketing/src/features/marketing/components/demo-agent-chip.css b/apps/marketing/src/features/marketing/components/demo-agent-chip.cssnew file mode 100644index 0000000000..3a21e0795a--- /dev/null+++ b/apps/marketing/src/features/marketing/components/demo-agent-chip.css@@ -0,0 +1,22 @@+/* Cursor reply anatomy from the supplied app screenshot, using shared theme tokens. */+.demo-cursor-response { min-width:0; width:100%; }+.demo-cursor-origin { font-size:13px; line-height:20px; color:var(--color-ink-muted); }+.demo-cursor-origin span { color:var(--color-accent); }+.demo-cursor-quote { display:flex; align-items:baseline; gap:6px; position:relative; min-width:0; margin:12px 0 18px; padding-left:24px; font-size:13px; line-height:20px; color:var(--color-ink-muted); }+.demo-cursor-quote::before { content:''; position:absolute; top:8px; left:2px; width:18px; height:10px; border-top:2px solid var(--color-edge); border-left:2px solid var(--color-edge); border-top-left-radius:8px; }+.demo-cursor-quote strong { flex:none; font-weight:600; }+.demo-cursor-quote > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-style:italic; }+.demo-cursor-card { container-type:inline-size; min-width:0; padding:12px; border:1px solid var(--color-edge); border-radius:16px; color:var(--color-ink); }+.demo-cursor-check { display:flex; align-items:center; justify-content:center; flex:none; width:18px; height:18px; border-radius:50%; background:var(--color-success); color:var(--color-panel); }+.demo-cursor-model { font-size:12px; color:var(--color-ink-muted); }+.demo-cursor-status { border-radius:999px; padding:2px 8px; font-size:12px; color:var(--color-success); background:color-mix(in oklch,var(--color-success) 14%,transparent); }+.demo-cursor-open { border-radius:999px; padding:3px 8px; font-size:12px; gap:4px; }+.demo-cursor-output { display:flex; align-items:center; min-width:0; margin-top:8px; min-height:32px; border-radius:8px; background:var(--color-hover); }+.demo-cursor-output > button { display:flex; align-items:center; gap:8px; width:100%; min-width:0; border:0; border-radius:8px; padding:6px 10px; margin:0; background:transparent; color:var(--color-ink-muted); text-align:left; font-size:13px; }+.demo-cursor-output > button:hover { background:var(--color-active); }+.demo-cursor-pr-title { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }+.demo-cursor-pr-stats { display:flex; gap:6px; margin-left:auto; flex:none; font-size:12px; }+.demo-cursor-pr-stats span:first-child { color:var(--color-success); }+.demo-cursor-pr-stats span:last-child { color:var(--color-failure); }+.demo-cursor-result { padding:6px 10px; font-size:13px; line-height:20px; margin:0; }+@container (max-width:400px) { .demo-cursor-open-label { display:none; } .demo-cursor-model { display:none; } }diff --git a/apps/marketing/src/features/marketing/components/documents/DocumentFrame.tsx b/apps/marketing/src/features/marketing/components/documents/DocumentFrame.tsxindex 9bb59e6322..b1b49220e4 100644--- a/apps/marketing/src/features/marketing/components/documents/DocumentFrame.tsx+++ b/apps/marketing/src/features/marketing/components/documents/DocumentFrame.tsx@@ -5,7 +5,13 @@ import { Button } from '@ui';import { createSignal, type JSX, Show } from 'solid-js';import { ViewShell } from '../DemoWorkspaceChrome';import { DemoTags } from '../workspace/frozen/DemoTags';-import { DetailLayout, PanelToggle } from '../workspace/frozen/DetailPanel';+import {+ DetailLayout,+ PanelGrid,+ PanelRow,+ PanelSection,+ PanelToggle,+} from '../workspace/frozen/DetailPanel';import { DocumentShareSheet, LAUNCH_MEMBERS } from './DocumentShareSheet';import '../workspace/dummy-workspace.css';import '../demo-markdown.css';@@ -19,6 +25,7 @@ import './document-stories.css';export function DocumentFrame(props: {title: string;tags?: readonly string[];+ tagsContent?: JSX.Element;/** Header island before Share, e.g. the offline indicator. */status?: JSX.Element;panel?: JSX.Element;@@ -31,10 +38,12 @@ export function DocumentFrame(props: {/** Cursors and menus, positioned over the window. */overlay?: JSX.Element;children: JSX.Element;+ footer?: JSX.Element;}) {const [tags, setTags] = createSignal<string[]>([...(props.tags ?? [])]);const [panel, setPanel] = createSignal<boolean>();const [sharing, setSharing] = createSignal(false);+ let shareTrigger: HTMLButtonElement | undefined;// A visitor's toggle wins over the walkthrough's panel state.const open = () => panel() ?? props.panelOpen ?? false;return (@@ -59,7 +68,11 @@ export function DocumentFrame(props: {<Buttonsize="sm"data-doc-share- onClick={() => (props.onShare ? props.onShare() : setSharing(true))}+ onClick={(event) => {+ shareTrigger = event.currentTarget;+ if (props.onShare) props.onShare();+ else setSharing(true);+ }}><Share />Share@@ -73,7 +86,24 @@ export function DocumentFrame(props: {/></div></ViewShell.TopBar>- <DetailLayout open={open()} panel={props.panel}>+ <DetailLayout+ open={open()}+ panel={+ props.panel ?? (+ <>+ <PanelSection title="Details" open>+ <PanelGrid>+ <PanelRow label="Owner">Jacob</PanelRow>+ <PanelRow label="Last updated">Today</PanelRow>+ </PanelGrid>+ </PanelSection>+ <PanelSection title="Tags" open>+ <DemoTags tags={tags()} onChange={setTags} />+ </PanelSection>+ </>+ )+ }+ ><div class="dummy-scroll px-6 doc-story-scroll"><div class="doc-story-page"><div@@ -86,7 +116,9 @@ export function DocumentFrame(props: {</div><Show when={props.tags}><div class="doc-story-tags">- <DemoTags tags={tags()} onChange={setTags} />+ {props.tagsContent ?? (+ <DemoTags tags={tags()} onChange={setTags} />+ )}</div></Show><div@@ -98,15 +130,20 @@ export function DocumentFrame(props: {>{props.children}</div>+ {props.footer}</div></div></DetailLayout><Show when={!props.onShare}><DocumentShareSheetopen={sharing()}+ autoFocustitle={props.title}channel={{ members: LAUNCH_MEMBERS, level: 'view' }}- onClose={() => setSharing(false)}+ onClose={() => {+ setSharing(false);+ shareTrigger?.focus({ preventScroll: true });+ }}/></Show>{props.overlay}diff --git a/apps/marketing/src/features/marketing/components/documents/DocumentMentionsDemo.tsx b/apps/marketing/src/features/marketing/components/documents/DocumentMentionsDemo.tsxindex ed6545d87b..087028d85b 100644--- a/apps/marketing/src/features/marketing/components/documents/DocumentMentionsDemo.tsx+++ b/apps/marketing/src/features/marketing/components/documents/DocumentMentionsDemo.tsx@@ -1,372 +1,183 @@-import HashStraight from '@phosphor/hash-straight.svg';-import ListChecks from '@phosphor/list-checks.svg';import { createSignal, For, onCleanup, onMount, Show } from 'solid-js';-import { homepagePeople } from '../../core/homepage-demo-people';+import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';+import { createDemoPointer } from '../agents/createDemoPointer';import { DemoCursor } from '../DemoCursor';import { ProductDemo } from '../product/ProductPage';-import { TagDot } from '../workspace/frozen/DemoTags';import { PanelSection } from '../workspace/frozen/DetailPanel';-import { DocMention, type DocMentionItem, people } from './DocMention';-import { type DocMentionGroup, DocMentionMenu } from './DocMentionMenu';import { DocumentFrame } from './DocumentFrame';import {- createAnchor,- createSceneClock,- type Point,- typed,-} from './documentScene';+ type DocumentSource,+ DocumentSourceLink,+ DocumentSourceView,+} from './DocumentProjectDemo';+import { PROJECT_INTRO, PROJECT_TAGS, PROJECT_TITLE } from './documentProject';-const ITEMS = {- invite: {- kind: 'task',- label: 'Fix the team invite handoff',- status: 'In Progress',- },- deploy: {- kind: 'task',- label: 'Fix the deploy pipeline',- status: 'In Progress',- },- announcement: {- kind: 'task',- label: 'Write the launch announcement',- status: 'In Review',- },- checklist: {- kind: 'task',- label: 'Prepare the launch checklist',- status: 'Not Started',- },- rollout: { kind: 'document', label: 'Team rollout plan' },- meadow: { kind: 'company', label: 'The Meadow' },- email: { kind: 'email', label: 'Team invites for The Meadow' },- launch: { kind: 'channel', label: 'launch' },- today: { kind: 'date', label: 'Today' },-} satisfies Record<string, DocMentionItem>;--/** A bare @ offers every bucket; the editor's menu shows the first few. */-const EVERYTHING: DocMentionGroup[] = [- {- label: 'People & Groups',- total: 14,- rows: [people.julia, people.teo, people.gabriel],- },- {- label: 'Documents, Agents, & Tasks',- total: 62,- rows: [ITEMS.rollout, ITEMS.invite, ITEMS.announcement],- },- { label: 'Channels', total: 9, rows: [ITEMS.launch] },- { label: 'Companies', total: 23, rows: [ITEMS.meadow] },- { label: 'Emails', total: 410, rows: [ITEMS.email] },- { label: 'Dates', rows: [ITEMS.today] },-];--type Segment =- | { text: string }- | {- query: string;- item: DocMentionItem;- groups: DocMentionGroup[];- /** Rows the selection visits before Enter, e.g. arrowing to a channel. */- picks: number[];- browse?: boolean;- };--const LINE: Segment[] = [- { text: 'Teo is fixing ' },- {- query: 'fix',- item: ITEMS.invite,- browse: true,- picks: [0],- groups: [- {- label: 'Documents, Agents, & Tasks',- rows: [ITEMS.invite, ITEMS.deploy],- },- ],- },- { text: ' for ' },- {- query: 'mea',- item: ITEMS.meadow,- picks: [0],- groups: [- { label: 'Companies', rows: [ITEMS.meadow] },- { label: 'Emails', rows: [ITEMS.email] },- ],- },- { text: '. Dana asked about it in ' },- {- query: 'invites',- item: ITEMS.email,- picks: [0],- groups: [{ label: 'Emails', rows: [ITEMS.email] }],- },- { text: ', so post in ' },- {- query: 'launch',- item: ITEMS.launch,- picks: [0, 1, 2],- groups: [- {- label: 'Documents, Agents, & Tasks',- rows: [ITEMS.announcement, ITEMS.checklist],- },- { label: 'Channels', rows: [ITEMS.launch] },- ],- },- { text: ' when it ships.' },-];--// Typing speeds: prose, the @query, the pause on a result, an arrow key.-const CHAR = 22;-const QUERY_CHAR = 70;-const HOLD = 480;-const BROWSE = 750;-const ARROW = 260;--type Timed =- | { text: string; from: number; to: number }- | (Extract<Segment, { query: string }> & {- open: number;- queryFrom: number;- queryTo: number;- pick: number;- });--const timeline = (() => {- let at = 0;- return LINE.map((segment): Timed => {- if ('text' in segment) {- const from = at;- at += segment.text.length * CHAR;- return { text: segment.text, from, to: at };- }- const open = at + QUERY_CHAR;- const queryFrom = open + (segment.browse ? BROWSE : 0);- const queryTo = queryFrom + segment.query.length * QUERY_CHAR;- at = queryTo + HOLD + (segment.picks.length - 1) * ARROW;- return { ...segment, open, queryFrom, queryTo, pick: at };- });-})();-const last = timeline[timeline.length - 1];-const END = ('text' in last ? last.to : last.pick) + 500;-const start = (segment: Timed) =>- 'text' in segment ? segment.from : segment.open - QUERY_CHAR;--/** Typing @ in a doc opens the mention menu over every kind of workspace item. */+/** Each source gets its own split; existing panes and edits remain mounted. */export function DocumentMentionsDemo() {let root!: HTMLDivElement;- let overlay: HTMLDivElement | undefined;- const clock = createSceneClock({ root: () => root, end: END, lead: 600 });- const t = clock.t;- const [wide, setWide] = createSignal(false);- const active = () =>- timeline.reduce(- (current, segment, index) => (t() >= start(segment) ? index : current),- 0+ let splits!: HTMLDivElement;+ const [sources, setSources] = createSignal<DocumentSource[]>([]);+ const [active, setActive] = createSignal<DocumentSource>();+ const [width, setWidth] = createSignal(0);+ const [automatic, setAutomatic] = createSignal(true);+ const [phase, setPhase] = createSignal(0);+ const triggers = new Map<DocumentSource, HTMLElement>();+ const narrow = () => width() < 480 || width() / (sources().length + 1) < 240;+ const add = (source: DocumentSource) => {+ setSources((items) =>+ items.includes(source) ? items : [...items, source]);- const menu = () => {- const segment = timeline[active()];- if (!clock.live() || 'text' in segment || t() < segment.open) return;- if (t() >= segment.pick) return;- if (segment.browse && t() < segment.queryFrom)- return { groups: EVERYTHING, selected: 0 };- const step = Math.floor((t() - segment.queryTo - HOLD / 2) / ARROW) + 1;- const visit = Math.max(0, Math.min(segment.picks.length - 1, step));- return { groups: segment.groups, selected: segment.picks[visit] };+ setActive(source);};- const frame = () => overlay?.parentElement ?? undefined;- const caret = createAnchor({- frame,- track: t,- target: () => ({ selector: '[data-caret="jacob"]' }),+ const playback = createProductWalkthrough({+ root: () => root,+ steps: 5,+ reset: () => {},+ reduced: () => {+ setAutomatic(false);+ setSources(['email', 'task']);+ setActive('task');+ },+ delay: (step) => [0, 1400, 1000, 2400, 1000, 900][step] ?? 1000,+ advance: (step) => {+ setPhase(step);+ if (step === 2) add('email');+ if (step === 4 && width() >= 1020) add('task');+ if (step === 5) setAutomatic(false);+ },});- const query = createAnchor({- frame,- track: t,+ const pause = () => {+ playback.pause();+ setAutomatic(false);+ };+ const open = (source: DocumentSource) => {+ pause();+ if (document.activeElement instanceof HTMLElement)+ triggers.set(source, document.activeElement);+ add(source);+ queueMicrotask(() =>+ root+ .querySelector<HTMLButtonElement>(+ `[aria-label="Close ${source} split"]`+ )+ ?.focus({ preventScroll: true })+ );+ };+ const close = (source: DocumentSource) => {+ pause();+ const remaining = sources().filter((item) => item !== source);+ setSources(remaining);+ setActive(remaining.at(-1));+ queueMicrotask(() => {+ const next =+ narrow() && remaining.length+ ? root.querySelector<HTMLButtonElement>(+ `[aria-label="Close ${remaining.at(-1)} split"]`+ )+ : triggers.get(source);+ next?.focus({ preventScroll: true });+ });+ };+ const pointer = createDemoPointer({+ frame: () => root,target: () =>- menu()- ? {- selector: '[data-mention-query]',- place: (rect): Point => ({ x: rect.left, y: rect.bottom + 6 }),- }+ automatic() && !(narrow() && sources().length)+ ? phase() === 1+ ? '[data-doc-mention="email"]'+ : phase() === 3 && width() >= 1020+ ? '[data-doc-mention="task"]'+ : undefined: undefined,});- const menuLeft = (x: number) => {- const width = overlay?.clientWidth ?? 0;- return Math.max(8, Math.min(x, width - Math.min(384, width - 16) - 8));- };onMount(() => {- const element = frame();- if (!element) return;- const resize = new ResizeObserver(() =>- setWide(element.clientWidth >= 700)- );- resize.observe(element);- onCleanup(() => resize.disconnect());+ const measure = () => setWidth(splits.clientWidth);+ const observer = new ResizeObserver(measure);+ observer.observe(splits);+ measure();+ onCleanup(() => observer.disconnect());});- // Wide windows keep References open beside the doc. Narrow ones open the- // panel over it once the paragraph is written.- const panelOpen = () =>- wide() || (clock.done() && !clock.reduced()) ? true : undefined;- const covered = () => !wide() && panelOpen() === true;return (- <div- ref={root}- class="doc-story doc-story-page-fade doc-story-split"- data-live={clock.live()}- >+ <div class="doc-story" ref={root}><ProductDemo- label="Mention a task, a company, an email, and a channel in a doc"- onInteract={clock.takeOver}- height={560}+ label="Open email and tasks beside the Website brief"+ height={630}mobileHeight={620}+ onInteract={pause}>- <DocumentFrame- title="Q3 launch plan"- tags={['Launch', 'Product']}- panelOpen={panelOpen()}- panel={<ReferencesPanel />}- overlay={- <div ref={overlay} class="doc-story-overlay" aria-hidden="true">- <Show when={menu()}>- {(open) => (- <Show when={query()}>- {(point) => (- <DocMentionMenu- groups={open().groups}- selected={open().selected}- style={{- left: `${menuLeft(point().x)}px`,- top: `${point().y}px`,- }}- />- )}- </Show>- )}- </Show>- <Show when={clock.live() && !covered() && caret()}>- {(point) => (- <DemoCursor- label="Jacob"- class="doc-story-cursor"- style={{- transform: `translate(${point().x}px, ${point().y}px)`,- }}- />- )}- </Show>- </div>- }+ <div+ ref={splits}+ class="doc-multi-split"+ data-narrow={narrow()}+ data-open={sources().length > 0}+ data-pane-count={sources().length + 1}>- <h2>Before Thursday</h2>- <p>- <For each={timeline}>- {(segment, index) => (- <>- {'text' in segment ? (- typed(segment.text, t(), segment.from, segment.to)- ) : (- <Show- when={t() >= segment.pick}- fallback={- <Show when={t() >= start(segment)}>- <span class="doc-mention-query" data-mention-query>- @- {typed(- segment.query,- t(),- segment.queryFrom,- segment.queryTo- )}- </span>- </Show>- }- >- <DocMention item={segment.item} />- </Show>- )}- <Show when={index() === active()}>- <span class="doc-caret" data-caret="jacob" />- </Show>- </>- )}- </For>- </p>- <p>- Launch is Thursday at 9.{' '}- <DocMention item={{ kind: 'person', label: 'Julia' }} /> sends the- announcement once the invite fix ships.- </p>- <h2>Launch checklist</h2>- <ul class="md-list md-check">- <li class="checked md-strike text-ink-extra-muted">- Finalize the product story- </li>- <li>Send the customer email</li>- <li>Publish the changelog</li>- </ul>- <h2>Owners</h2>- <p>- Julia owns the announcement and the customer email. Teo owns the- deploy and release checks.- </p>- </DocumentFrame>- </ProductDemo>- </div>- );-}--/** MarkdownSidePanelSections: Tags, Properties, and References (N). */-function ReferencesPanel() {- return (- <>- <PanelSection title="Tags" open>- <div class="doc-panel-tags">- <For each={['Launch', 'Product']}>- {(tag) => (- <span class="sample-file-tag">- <TagDot label={tag} />- {tag}- </span>+ <div+ class="doc-multi-original dummy-main"+ inert={narrow() && !!active()}+ aria-hidden={narrow() && !!active()}+ >+ <DocumentFrame+ title={PROJECT_TITLE}+ tags={PROJECT_TAGS}+ panel={+ <PanelSection title="References (1)" open>+ <p class="doc-ref-head">+ Jacob in{' '}+ <DocumentSourceLink source="channel" onOpen={open} />+ </p>+ <p class="doc-ref-body">+ put everything in here · Website brief+ </p>+ </PanelSection>+ }+ >+ <h2>Pricing</h2>+ <p>+ Use the details from{' '}+ <DocumentSourceLink source="email" onOpen={open} />.+ </p>+ <p>{PROJECT_INTRO}</p>+ <h2>Implementation</h2>+ <p>+ Teo owns <DocumentSourceLink source="task" onOpen={open} />.+ Check mobile before publishing.+ </p>+ <h2>Discussion</h2>+ <p>+ Shared in <DocumentSourceLink source="channel" onOpen={open} />.+ Teo will post the preview there.+ </p>+ </DocumentFrame>+ </div>+ <For each={sources()}>+ {(source) => (+ <div+ class="doc-multi-pane dummy-main"+ data-active={active() === source}+ inert={narrow() && active() !== source}+ aria-hidden={narrow() && active() !== source}+ >+ <DocumentSourceView+ source={source}+ onClose={() => close(source)}+ autoFocus={false}+ label={`Linked ${source}`}+ closeLabel={`Close ${source} split`}+ />+ </div>)}</For></div>- </PanelSection>- <PanelSection title="References (2)" open>- <div class="doc-ref-row">- <div class="doc-ref-head">- <img src={homepagePeople.julia.photo} alt="" />- <b>Julia</b>- <span class="doc-ref-in">in</span>- <span class="doc-ref-source">- <HashStraight />- <span>launch</span>- </span>- <span class="doc-ref-time">· 2 hours ago</span>- </div>- <div class="doc-ref-body">- Plan for Thursday is in{' '}- <DocMention item={{ kind: 'document', label: 'Q3 launch plan' }} />.- Comments welcome before noon.- </div>- </div>- <div class="doc-ref-row">- <div class="doc-ref-head">- <img src={homepagePeople.teo.photo} alt="" />- <b>Teo</b>- <span class="doc-ref-in">in</span>- <span class="doc-ref-source">- <ListChecks class="text-task" />- <span>Fix the team invite handoff</span>- </span>- <span class="doc-ref-time">· 3 hours ago</span>- </div>- </div>- </PanelSection>- </>+ </ProductDemo>+ <Show when={pointer()}>+ {(p) => (+ <DemoCursor+ label="Jacob"+ class="doc-organize-pointer"+ style={{ transform: `translate(${p().x}px, ${p().y}px)` }}+ />+ )}+ </Show>+ </div>);}diff --git a/apps/marketing/src/features/marketing/components/documents/DocumentOrganizationDemo.tsx b/apps/marketing/src/features/marketing/components/documents/DocumentOrganizationDemo.tsxnew file mode 100644index 0000000000..363502e97c--- /dev/null+++ b/apps/marketing/src/features/marketing/components/documents/DocumentOrganizationDemo.tsx@@ -0,0 +1,372 @@+import ArrowLeft from '@phosphor/arrow-left.svg';+import Envelope from '@phosphor/envelope.svg';+import FileText from '@phosphor/file-text.svg';+import Folder from '@phosphor/folder.svg';+import ListChecks from '@phosphor/list-checks.svg';+import X from '@phosphor/x.svg';+import { Button } from '@ui';+import { createSignal, For, Show } from 'solid-js';+import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';+import { createDemoPointer } from '../agents/createDemoPointer';+import { DemoCursor } from '../DemoCursor';+import { ViewShell } from '../DemoWorkspaceChrome';+import { SearchBar } from '../email/frozen/SearchBar';+import { ProductDemo } from '../product/ProductPage';+import { TagDot } from '../workspace/frozen/DemoTags';+import { DocumentFrame } from './DocumentFrame';+import { DocumentSourceView } from './DocumentProjectDemo';+import { PROJECT_INTRO, PROJECT_TAGS, PROJECT_TITLE } from './documentProject';++type Collection = 'Website' | 'Images' | 'Launch' | 'Product';+const rows = [+ {+ id: 'brief',+ title: PROJECT_TITLE,+ kind: 'doc',+ folder: 'Website',+ tags: ['Launch', 'Product'],+ updated: '10:24 AM',+ body: '',+ },+ {+ id: 'copy',+ title: 'Homepage copy',+ kind: 'doc',+ folder: 'Website',+ tags: ['Launch'],+ updated: 'Yesterday',+ body: 'Lead with what the product does. Keep the opening short and show the product before the signup button.',+ },+ {+ id: 'voice',+ title: 'Writing guidelines',+ kind: 'doc',+ folder: 'Website',+ tags: ['Product'],+ updated: 'Tuesday',+ body: 'Use short sentences. Name the action. Read it out loud before publishing.',+ },+ {+ id: 'images',+ title: 'Images',+ kind: 'folder',+ folder: 'Website',+ tags: [],+ updated: 'Tuesday',+ body: '',+ },+ {+ id: 'email',+ title: 'Pricing changes',+ kind: 'email',+ folder: '',+ tags: ['Launch'],+ updated: '9:17 AM',+ body: '',+ },+ {+ id: 'task',+ title: 'Update pricing page',+ kind: 'task',+ folder: '',+ tags: ['Launch', 'Product'],+ updated: '10:18 AM',+ body: '',+ },+ {+ id: 'notes',+ title: 'Launch notes',+ kind: 'doc',+ folder: '',+ tags: ['Launch'],+ updated: 'Yesterday',+ body: 'Send the announcement after the pricing page goes live. Include one screenshot and a link to the new page.',+ },+ {+ id: 'image-notes',+ title: 'Screenshot checklist',+ kind: 'doc',+ folder: 'Images',+ tags: [],+ updated: 'Tuesday',+ body: 'Capture the homepage at desktop and phone widths. Use the light background for the announcement.',+ },+];++/** Frozen folder list and tag-filtered search, with one persistent document. */+export function DocumentOrganizationDemo() {+ let root!: HTMLDivElement;+ const [collection, setCollection] = createSignal<Collection>('Website');+ const [selected, setSelected] = createSignal<string>();+ const [query, setQuery] = createSignal('');+ const [automatic, setAutomatic] = createSignal(true);+ const [pointAt, setPointAt] = createSignal<string>();+ let returnFocus: HTMLElement | undefined;+ const playback = createProductWalkthrough({+ root: () => root,+ steps: 5,+ reset: () => {},+ reduced: () => {+ setAutomatic(false);+ },+ delay: (step) => [0, 1600, 1000, 2200, 1100, 1000][step] ?? 1000,+ advance: (step) => {+ if (step === 1) setPointAt('[data-doc-row="brief"]');+ if (step === 2) {+ setSelected('brief');+ setPointAt(undefined);+ }+ if (step === 3) setPointAt('[data-doc-tag="Launch"]');+ if (step === 4) {+ setCollection('Launch');+ setSelected(undefined);+ setPointAt(undefined);+ }+ if (step === 5) setAutomatic(false);+ },+ });+ const pause = () => {+ setAutomatic(false);+ setPointAt(undefined);+ playback.pause();+ };+ const pointer = createDemoPointer({+ frame: () => root,+ target: () => (automatic() ? pointAt() : undefined),+ });+ const changeCollection = (next: Collection) => {+ pause();+ setCollection(next);+ setSelected(undefined);+ setQuery('');+ queueMicrotask(() =>+ root+ .querySelector<HTMLInputElement>('.doc-collection input')+ ?.focus({ preventScroll: true })+ );+ };+ const open = (id: string) => {+ pause();+ returnFocus =+ document.activeElement instanceof HTMLElement+ ? document.activeElement+ : undefined;+ setSelected(id);+ queueMicrotask(() =>+ [+ ...root.querySelectorAll<HTMLButtonElement>(+ '[aria-label="Back to collection"]'+ ),+ ]+ .find((button) => !button.closest('[hidden]'))+ ?.focus({ preventScroll: true })+ );+ };+ const back = () => {+ pause();+ setSelected(undefined);+ queueMicrotask(() => returnFocus?.focus({ preventScroll: true }));+ };+ const tagged = () => collection() === 'Launch' || collection() === 'Product';+ const items = () =>+ rows.filter(+ (row) =>+ (tagged()+ ? row.tags.includes(collection())+ : row.folder === collection()) &&+ row.title.toLowerCase().includes(query().toLowerCase())+ );+ const other = () =>+ rows.find((row) => row.id === selected() && row.id !== 'brief');+ return (+ <div class="doc-story doc-organization" ref={root}>+ <ProductDemo+ label="Explore folders and tags"+ height={520}+ mobileHeight={570}+ onInteract={pause}+ >+ <div+ class="doc-organizer"+ data-open={!!selected()}+ onKeyDown={(event) => {+ if (event.key === 'Escape' && selected()) {+ event.stopPropagation();+ back();+ }+ }}+ >+ <div class="doc-collection" hidden={!!selected()}>+ <ViewShell.TopBar>+ <Show when={collection() !== 'Website'}>+ <Button+ variant="plain"+ size="icon-sm"+ label="Back to Website folder"+ onClick={() => changeCollection('Website')}+ >+ <ArrowLeft />+ </Button>+ </Show>+ <Show when={tagged()} fallback={<Folder class="size-4" />}>+ <TagDot label={collection()} />+ </Show>+ <span class="text-sm">{tagged() ? 'Search' : collection()}</span>+ </ViewShell.TopBar>+ <div class="doc-collection-search">+ <SearchBar+ label="Search this collection"+ placeholder={tagged() ? 'Search tagged items' : 'Search folder'}+ value={query()}+ onValueChange={setQuery}+ />+ </div>+ <Show when={tagged()}>+ <div class="doc-filter">+ <span>Tags</span>+ <TagDot label={collection()} />+ <b>{collection()}</b>+ <button+ type="button"+ aria-label="Clear tag filter"+ onClick={() => changeCollection('Website')}+ >+ <X class="size-3" />+ </button>+ </div>+ </Show>+ <div class="dummy-scroll doc-collection-rows">+ <For each={items()}>+ {(row) => (+ <button+ type="button"+ data-doc-row={row.id}+ class="doc-collection-row"+ onClick={() =>+ row.kind === 'folder'+ ? changeCollection('Images')+ : open(row.id)+ }+ >+ <Show+ when={row.kind === 'email'}+ fallback={+ <Show+ when={row.kind === 'task'}+ fallback={+ <Show+ when={row.kind === 'folder'}+ fallback={<FileText class="text-note" />}+ >+ <Folder />+ </Show>+ }+ >+ <ListChecks class="text-task" />+ </Show>+ }+ >+ <Envelope />+ </Show>+ <span>{row.title}</span>+ <div class="doc-row-tags">+ <For each={row.tags}>+ {(tag) => (+ <span>+ <TagDot label={tag} />+ {tag}+ </span>+ )}+ </For>+ </div>+ <time>{row.updated}</time>+ </button>+ )}+ </For>+ <Show when={!items().length}>+ <p class="p-6 text-sm text-ink-muted">No matching items</p>+ </Show>+ </div>+ </div>+ <div+ class="doc-organized-page dummy-main"+ hidden={selected() !== 'brief'}+ >+ <DocumentFrame+ title={PROJECT_TITLE}+ tags={PROJECT_TAGS}+ onBack={back}+ backLabel="Back to collection"+ tagsContent={+ <div class="doc-click-tags">+ <For each={PROJECT_TAGS}>+ {(tag) => (+ <button+ type="button"+ data-doc-tag={tag}+ onClick={() =>+ changeCollection(+ tag === 'Launch' ? 'Launch' : 'Product'+ )+ }+ >+ <TagDot label={tag} />+ {tag}+ </button>+ )}+ </For>+ </div>+ }+ >+ <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>+ <h2>Pricing</h2>+ <p>{PROJECT_INTRO}</p>+ <h2>Before we publish</h2>+ <p>+ Teo checks mobile. Julia reviews the copy. Jacob tests signup.+ </p>+ </DocumentFrame>+ </div>+ <Show when={other()}>+ {(row) => (+ <Show+ when={row().kind === 'doc'}+ fallback={+ <DocumentSourceView+ source={row().kind === 'email' ? 'email' : 'task'}+ onClose={back}+ autoFocus+ />+ }+ >+ <div class="dummy-main">+ <DocumentFrame+ title={row().title}+ tags={row().tags}+ onBack={back}+ backLabel="Back to collection"+ >+ <p>{row().body}</p>+ </DocumentFrame>+ </div>+ </Show>+ )}+ </Show>+ </div>+ </ProductDemo>+ <Show when={pointer()}>+ {(p) => (+ <DemoCursor+ label="Julia"+ class="doc-organize-pointer"+ style={{ transform: `translate(${p().x}px, ${p().y}px)` }}+ />+ )}+ </Show>+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/documents/DocumentProjectDemo.tsx b/apps/marketing/src/features/marketing/components/documents/DocumentProjectDemo.tsxnew file mode 100644index 0000000000..b8e23a5ed4--- /dev/null+++ b/apps/marketing/src/features/marketing/components/documents/DocumentProjectDemo.tsx@@ -0,0 +1,302 @@+import X from '@phosphor/x.svg';+import { Button } from '@ui';+import {+ createEffect,+ createSignal,+ For,+ Match,+ on,+ onCleanup,+ onMount,+ type ParentProps,+ Show,+ Switch,+} from 'solid-js';+import type {+ WorkspaceComment,+ WorkspaceView,+} from '../../core/dummy-workspace';+import { ChannelComposer } from '../email/frozen/ChannelComposer';+import { ProductDemo } from '../product/ProductPage';+import { ProductWorkspace } from '../product/ProductWorkspace';+import { MessageRow } from '../workspace/frozen/MessageRow';+import { TaskNotebook } from '../workspace/frozen/TaskNotebook';+import { WorkspaceEmail } from '../workspace/WorkspaceEmail';+import { DocMention, type DocMentionItem } from './DocMention';+import { DocumentFrame } from './DocumentFrame';+import {+ createDocumentProject,+ PROJECT_EMAIL,+ PROJECT_INTRO,+ PROJECT_TAGS,+ PROJECT_TASK,+ PROJECT_TITLE,+} from './documentProject';+import { createSceneClock, typed } from './documentScene';++export type DocumentSource = 'email' | 'task' | 'channel';+const SPLIT_MIN_WIDTH = 720;+const SOURCES: Record<+ DocumentSource,+ { view: WorkspaceView; id: string; item: DocMentionItem }+> = {+ email: { view: 'email', id: 'dana', item: PROJECT_EMAIL },+ task: { view: 'tasks', id: 'invite', item: PROJECT_TASK },+ channel: {+ view: 'messages',+ id: 'website',+ item: { kind: 'channel', label: 'website' },+ },+};++/** A source opens in a sibling split, using the app's compact close control. */+export function DocumentSourceView(props: {+ source: DocumentSource;+ onClose: () => void;+ autoFocus: boolean;+ label?: string;+ closeLabel?: string;+}) {+ const w = createDocumentProject();+ createEffect(+ on(+ () => props.source,+ (source) => {+ w.open(SOURCES[source].view, SOURCES[source].id);+ }+ )+ );+ const linkedWorkspace = { ...w, backToCollection: props.onClose };+ const task = () =>+ w.contentView() === 'tasks'+ ? w.data.tasks.find((item) => item.id === w.selected())+ : undefined;+ let close!: HTMLButtonElement;+ createEffect(+ on(+ () => [props.source, props.autoFocus] as const,+ ([, autoFocus]) => {+ if (autoFocus) close?.focus({ preventScroll: true });+ }+ )+ );+ return (+ <section+ class="doc-source-view dummy-main"+ aria-label={props.label ?? 'Linked source'}+ onKeyDown={(event) => {+ if (event.key === 'Escape') {+ event.stopPropagation();+ props.onClose();+ }+ }}+ >+ <Switch fallback={<ProductWorkspace workspace={linkedWorkspace} />}>+ <Match when={w.contentView() === 'email'}>+ <WorkspaceEmail+ workspace={linkedWorkspace}+ tab="all"+ account="all"+ hideCollectionNavigation+ />+ </Match>+ <Match when={task()}>+ {(item) => (+ <TaskNotebook+ workspace={linkedWorkspace}+ task={item()}+ hideCollectionNavigation+ />+ )}+ </Match>+ </Switch>+ <Button+ ref={close}+ variant="plain"+ size="icon-sm"+ class="doc-source-close"+ label={props.closeLabel ?? 'Close split'}+ onClick={props.onClose}+ >+ <X class="size-4" />+ </Button>+ </section>+ );+}++export function DocumentSourceLink(props: {+ source: DocumentSource;+ onOpen: (source: DocumentSource) => void;+}) {+ return (+ <button+ type="button"+ contentEditable={false}+ class="doc-source-link"+ onClick={() => props.onOpen(props.source)}+ >+ <DocMention item={SOURCES[props.source].item} />+ </button>+ );+}++/** Keep the document visible in a split; a narrow frame shows one pane at a time. */+export function DocumentSourceSurface(+ props: ParentProps<{+ source?: DocumentSource;+ onClose: () => void;+ focusSource?: boolean;+ }>+) {+ let root!: HTMLDivElement;+ const [narrow, setNarrow] = createSignal(true);+ onMount(() => {+ const measure = () => setNarrow(root.clientWidth < SPLIT_MIN_WIDTH);+ const observer = new ResizeObserver(measure);+ observer.observe(root);+ measure();+ onCleanup(() => observer.disconnect());+ });+ return (+ <div+ ref={root}+ class="doc-source-split"+ data-narrow={narrow()}+ data-source-open={!!props.source}+ >+ <div+ class="doc-source-original dummy-main"+ inert={!!props.source && narrow()}+ >+ {props.children}+ </div>+ <Show when={props.source}>+ {(source) => (+ <DocumentSourceView+ source={source()}+ onClose={props.onClose}+ autoFocus={props.focusSource ?? true}+ />+ )}+ </Show>+ </div>+ );+}++export function DocumentProjectDemo() {+ let root!: HTMLDivElement;+ const clock = createSceneClock({ root: () => root, end: 5200, lead: 900 });+ const [source, setSource] = createSignal<DocumentSource>();+ const [focusSource, setFocusSource] = createSignal(false);+ const [comments, setComments] = createSignal<WorkspaceComment[]>([+ {+ id: 'julia-invitations',+ person: 'julia',+ time: '10:24 AM',+ body: 'can we put the free plan above the FAQ?',+ },+ ]);+ let trigger: HTMLElement | undefined;+ const open = (next: DocumentSource) => {+ clock.pause();+ trigger =+ document.activeElement instanceof HTMLElement+ ? document.activeElement+ : undefined;+ setFocusSource(true);+ setSource(next);+ };+ const back = () => {+ setSource(undefined);+ (+ trigger ??+ root.querySelector<HTMLButtonElement>(+ '.doc-source-original .doc-source-link'+ )+ )?.focus({ preventScroll: true });+ };+ return (+ <ProductDemo+ ref={(element) => {+ root = element;+ }}+ label="Write together in the Website brief"+ onInteract={clock.pause}+ height={660}+ mobileHeight={650}+ >+ <DocumentSourceSurface+ source={source()}+ onClose={back}+ focusSource={focusSource()}+ >+ <DocumentFrame+ title={PROJECT_TITLE}+ tags={PROJECT_TAGS}+ footer={+ <div class="doc-project-discussion">+ <div class="text-xs text-ink-extra-muted mb-3">Discussion</div>+ <For each={comments()}>+ {(comment) => <MessageRow message={comment} />}+ </For>+ <ChannelComposer+ label="Comment on the Website brief"+ placeholder="Leave a comment…"+ onSend={(body) =>+ setComments((items) => [+ ...items,+ {+ id: crypto.randomUUID(),+ person: 'jacob',+ time: 'Now',+ body,+ },+ ])+ }+ />+ </div>+ }+ >+ <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>+ <h2>Pricing</h2>+ <p>+ {PROJECT_INTRO} Julia’s notes are in{' '}+ <DocumentSourceLink source="email" onOpen={open} />.+ </p>+ <h2>Before we publish</h2>+ <ul class="md-list">+ <li>+ Teo owns <DocumentSourceLink source="task" onOpen={open} />.+ </li>+ <li>+ Julia checks the copy.+ {typed(' Keep the headings short.', clock.t(), 1200, 3800)}+ <Show when={clock.live() && !clock.done()}>+ <span+ class="doc-caret doc-named-caret"+ data-caret="julia"+ data-name="Julia"+ />+ </Show>+ </li>+ <li>+ Jacob tests signup.+ {typed(' Check it on mobile too.', clock.t(), 2000, 5200)}+ <Show when={clock.live() && !clock.done()}>+ <span+ class="doc-caret doc-named-caret"+ data-caret="jacob"+ data-name="Jacob"+ />+ </Show>+ </li>+ </ul>+ </DocumentFrame>+ </DocumentSourceSurface>+ </ProductDemo>+ );+}diff --git a/apps/marketing/src/features/marketing/components/documents/DocumentShareSheet.tsx b/apps/marketing/src/features/marketing/components/documents/DocumentShareSheet.tsxindex 886664229a..1f281672b2 100644--- a/apps/marketing/src/features/marketing/components/documents/DocumentShareSheet.tsx+++ b/apps/marketing/src/features/marketing/components/documents/DocumentShareSheet.tsx@@ -94,13 +94,17 @@ 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 };+ 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);+ const [channelLevel, setChannelLevel] = createSignal(+ props.channel?.level ?? 'view'+ );const [shared, setShared] = createSignal<{ id: string; name: string; person?: HomepagePersonId; level: Level }[]>([]);@@ -134,12 +138,21 @@ export function DocumentShareSheet(props: {<sectionclass="doc-share-card"role="dialog"+ ref={(element) => {+ if (props.autoFocus)+ queueMicrotask(() => element.querySelector('input')?.focus());+ }}aria-modal="false"aria-labelledby={titleId}><header id={titleId}><span>Share:</span>- <FileText class="text-note" />+ <Show+ when={props.entityLabel === 'conversation'}+ fallback={<FileText class="text-note" />}+ >+ <ChatTeardrop />+ </Show><span>{props.title}</span></header><div class="doc-share-to">@@ -191,7 +204,9 @@ export function DocumentShareSheet(props: {</section><section class="doc-share-card" aria-label="People with access"><header>- <span>People with access to this document</span>+ <span>+ People with access to this {props.entityLabel ?? 'document'}+ </span></header><div class="doc-share-people"><div class="doc-share-person">@@ -201,21 +216,25 @@ export function DocumentShareSheet(props: {</span><span class="doc-share-owner">Owner</span></div>- <div- class="doc-share-person"- data-new={props.channel.fresh ? 'true' : undefined}- data-channel-access- >- <span>- <Users />- <span>{props.channel.members}</span>- </span>- <AccessLevel- label={`Access for ${props.channel.members}`}- value={channelLevel()}- onChange={setChannelLevel}- />- </div>+ <Show when={props.channel}>+ {(channel) => (+ <div+ class="doc-share-person"+ data-new={channel().fresh ? 'true' : undefined}+ data-channel-access+ >+ <span>+ <Users />+ <span>{channel().members}</span>+ </span>+ <AccessLevel+ label={`Access for ${channel().members}`}+ value={channelLevel()}+ onChange={setChannelLevel}+ />+ </div>+ )}+ </Show><For each={shared()}>{(row) => (<div class="doc-share-person" data-new="true">diff --git a/apps/marketing/src/features/marketing/components/documents/DocumentSharingDemo.tsx b/apps/marketing/src/features/marketing/components/documents/DocumentSharingDemo.tsxindex 7a2b5475db..ce6179daef 100644--- a/apps/marketing/src/features/marketing/components/documents/DocumentSharingDemo.tsx+++ b/apps/marketing/src/features/marketing/components/documents/DocumentSharingDemo.tsx@@ -1,11 +1,15 @@import { createSignal, Show } from 'solid-js';-import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';import { DemoCursor } from '../DemoCursor';import { ProductDemo } from '../product/ProductPage';import { WorkspaceChannel } from '../workspace/WorkspaceChannel';import { DocumentFrame } from './DocumentFrame';import { DocumentShareSheet, LAUNCH_MEMBERS } from './DocumentShareSheet';+import {+ createDocumentProject,+ PROJECT_TAGS,+ PROJECT_TITLE,+} from './documentProject';import { controlPoint, createAnchor } from './documentScene';/**@@ -17,34 +21,8 @@ import { controlPoint, createAnchor } from './documentScene';export function DocumentSharingDemo() {let root!: HTMLDivElement;let overlay: HTMLDivElement | undefined;- const w = createDummyWorkspace('messages');- w.setData('channels', (c) => c.id === 'launch', 'messages', [- {- id: 'demo-video',- person: 'gabriel',- body: 'Product demo is recorded. I dropped the link in the announcement draft.',- time: '9:12 AM',- },- {- id: 'invite-fix',- person: 'teo',- body: 'Invite fix is in review. Should land this afternoon.',- time: '9:20 AM',- },- {- id: 'announcement',- person: 'julia',- body: 'Announcement draft is done. I’ll schedule it once Teo’s fix ships.',- time: '9:24 AM',- },- {- id: 'plan',- person: 'jacob',- body: 'Plan for Thursday is up. Comments welcome @[Q3 launch plan](demo-mention:plan)',- time: '9:31 AM',- },- ]);- w.open('messages', 'launch');+ const w = createDocumentProject();+ w.open('messages', 'website');const [phase, setPhase] = createSignal(0);const [automatic, setAutomatic] = createSignal(true);const [doc, setDoc] = createSignal(false);@@ -80,11 +58,11 @@ export function DocumentSharingDemo() {if (!automatic()) return;const selector = [undefined,- '[data-demo-mention="plan"]',- '[data-demo-mention="plan"]',+ 'button.sample-inline-reference',+ 'button.sample-inline-reference','[data-doc-share]','[data-doc-share]',- '[data-channel-access] .doc-share-level',+ undefined,][phase()];return selector ? { selector, place: controlPoint } : undefined;},@@ -106,7 +84,7 @@ export function DocumentSharingDemo() {onClick={(event) => {if ((event.target as HTMLElement).closest(- '[data-demo-mention="plan"]'+ 'button.sample-inline-reference'))setDoc(true);@@ -117,39 +95,44 @@ export function DocumentSharingDemo() {}><DocumentFrame- title="Q3 launch plan"- tags={['Launch', 'Product']}+ title={PROJECT_TITLE}+ tags={PROJECT_TAGS}onBack={() => {setSharing(false);setDoc(false);}}- backLabel="Back to #launch"+ backLabel="Back to #website"onShare={() => setSharing(true)}>- <h2>Launch checklist</h2>+ <h2>Before we publish</h2><ul class="md-list md-check"><li class="checked md-strike text-ink-extra-muted">- Finalize the product story+ Update the pricing table</li>- <li>Send the customer email</li>- <li>Publish the changelog</li>+ <li>Check the copy</li>+ <li>Test signup on mobile</li></ul><h2>Owners</h2><p>- Julia owns the announcement and the customer email. Teo owns the- deploy and release checks. Jacob owns customer conversations.+ Julia reviews the copy. Teo checks pricing. Jacob tests signup.</p></DocumentFrame></Show><DocumentShareSheetopen={doc() && sharing()}- title="Q3 launch plan"+ autoFocus={!automatic()}+ title={PROJECT_TITLE}channel={{members: LAUNCH_MEMBERS,level: 'view',fresh: automatic(),}}- onClose={() => setSharing(false)}+ onClose={() => {+ setSharing(false);+ root+ .querySelector<HTMLButtonElement>('[data-doc-share]')+ ?.focus({ preventScroll: true });+ }}/><div ref={overlay} class="doc-story-overlay" aria-hidden="true"><Show when={automatic() && pointer()}>diff --git a/apps/marketing/src/features/marketing/components/documents/DocumentStories.test.tsx b/apps/marketing/src/features/marketing/components/documents/DocumentStories.test.tsxindex 54338eb4a0..5fb09628ca 100644--- a/apps/marketing/src/features/marketing/components/documents/DocumentStories.test.tsx+++ b/apps/marketing/src/features/marketing/components/documents/DocumentStories.test.tsx@@ -1,10 +1,11 @@import { cleanup, fireEvent, render, within } from '@solidjs/testing-library';import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { DocumentOrganizationDemo } from './DocumentOrganizationDemo';+import { DocumentProjectDemo } from './DocumentProjectDemo';import {DocumentAgentDemo,DocumentMentionsDemo,DocumentOfflineDemo,- DocumentSharingDemo,} from './DocumentStories';let intersections: IntersectionObserverCallback[];@@ -69,139 +70,198 @@ function reduce() {const body = (view: ReturnType<typeof render>) =>view.getByRole('textbox', { name: 'Document body' });-it('rewrites the intro and types the checklist while Jacob keeps writing', () => {+it('reads the sources before editing and keeps both collaborators in one paragraph', () => {const view = render(() => <DocumentAgentDemo />);- expect(body(view).textContent).toContain('We’re introducing the team');+ const hit = view.container.querySelector('[data-search-hit="email"]');+ expect(view.queryByRole('textbox', { name: 'Message Macro' })).toBeNull();visible(true);- vi.advanceTimersByTime(2000);- expect(body(view).textContent).not.toContain('We’re introducing the team');- expect(body(view).textContent).toContain('Thursday we launch');- expect(body(view).textContent).toContain('Dana’s team');- vi.advanceTimersByTime(30000);- expect(body(view).textContent).toContain('Jacob: confirm the launch checks.');+ vi.advanceTimersByTime(2600);+ expect(body(view).textContent).toContain('Add annual plans later');+ expect(view.getByText('Read thread')).toBeTruthy();+ vi.advanceTimersByTime(4200);+ expect(body(view).textContent).not.toContain('Add annual plans later');+ const agent = body(view).querySelector('[data-caret="claude"]');+ const human = body(view).querySelector('[data-caret="jacob"]');+ expect(agent).toBeTruthy();+ expect(human).toBeTruthy();+ expect(agent?.parentElement).toBe(human?.parentElement);+ expect(view.container.querySelector('[data-search-hit="email"]')).toBe(hit);+ vi.advanceTimersByTime(20000);+ expect(body(view).textContent).toContain('Annual plans get two months free');expect(body(view).textContent).toContain(- 'Dana’s team gets a heads-up the night before.'+ 'Link to the billing FAQ below the table.');- expect(vi.getTimerCount()).toBe(0);+ expect(view.getByRole('button', { name: 'Called 4 tools' })).toBeTruthy();+});++it('lets a visitor inspect the agent source and stops automatic changes', () => {+ const view = render(() => <DocumentAgentDemo />);+ visible(true);+ const hit = view.getByRole('button', {+ name: /Pricing changes.*Annual gets/,+ });+ hit.focus();+ fireEvent.pointerDown(hit);+ fireEvent.click(hit);+ expect(view.getByRole('region', { name: 'Linked source' })).toBeTruthy();+ vi.advanceTimersByTime(20000);+ fireEvent.click(view.getByRole('button', { name: 'Close split' }));+ expect(body(view).textContent).toContain('Add annual plans later');+ expect(document.activeElement).toBe(hit);});-it('leaves the document editable and never replaces the visitor’s text', () => {+it('never replaces visitor edits after manual takeover or a motion change', () => {const view = render(() => <DocumentAgentDemo />);visible(true);const editor = body(view);fireEvent.pointerDown(editor);- editor.innerHTML = '<p>Our team’s revised launch plan.</p>';- fireEvent.blur(editor);+ editor.innerHTML = '<p>Keep this draft.</p>';reduce();vi.advanceTimersByTime(30000);- expect(editor.textContent).toContain('Our team’s revised launch plan.');- expect(editor.textContent).not.toContain('Teo: verify');- expect(view.container.querySelector('.demo-cursor')).toBeNull();+ expect(editor.textContent).toBe('Keep this draft.');});-it('shows the finished document for reduced motion', () => {+it('shows the completed agent edit without animation for reduced motion', () => {reduced = true;const view = render(() => <DocumentAgentDemo />);- expect(body(view).textContent).toContain('Teo: verify the invite flow.');- expect(view.container.querySelector('.demo-cursor')).toBeNull();- vi.advanceTimersByTime(100);- expect(vi.getTimerCount()).toBe(0);+ expect(body(view).textContent).toContain('Annual plans get two months free');+ expect(body(view).textContent).toContain(+ 'Link to the billing FAQ below the table.'+ );+ expect(view.queryByRole('textbox', { name: 'Message Macro' })).toBeNull();});-it('goes from offline to reconnecting to synced, with Julia’s edit merged', () => {+it('merges an offline edit with the teammate edit on reconnect', () => {const view = render(() => <DocumentOfflineDemo />);expect(view.getByRole('status', { name: 'Offline' })).toBeTruthy();- expect(- view.getByText("You're offline. Changes will sync when you reconnect.")- ).toBeTruthy();visible(true);- vi.advanceTimersByTime(3800);- expect(body(view).textContent).toContain(- 'Pricing doesn’t change for existing teams.'- );- expect(body(view).textContent).not.toContain('Send it Thursday at 9.');- vi.advanceTimersByTime(300);+ vi.advanceTimersByTime(5100);+ expect(body(view).textContent).toContain('Add a screenshot of the new page.');+ expect(body(view).textContent).not.toContain('Julia has the email ready');+ vi.advanceTimersByTime(800);expect(view.getByRole('status', { name: 'Reconnecting' })).toBeTruthy();- vi.advanceTimersByTime(30000);+ vi.advanceTimersByTime(10000);expect(view.queryByRole('status')).toBeNull();expect(body(view).textContent).toContain(- 'Send it Thursday at 9. Lead with the shared inbox. Pricing doesn’t change for existing teams.'+ 'Julia has the email ready. Send it tomorrow. Add a screenshot');- expect(vi.getTimerCount()).toBe(0);});-it('shows the merged, synced document for reduced motion', () => {- reduced = true;- const view = render(() => <DocumentOfflineDemo />);- expect(view.queryByRole('status')).toBeNull();- expect(body(view).textContent).toContain('Send it Thursday at 9.');- expect(body(view).textContent).toContain('existing teams.');+it('keeps the same edited document when opening it through a tag', () => {+ const view = render(() => <DocumentOrganizationDemo />);+ fireEvent.click(view.getByRole('button', { name: /Website brief/ }));+ const editor = body(view);+ editor.append(document.createTextNode(' Keep the free plan.'));+ fireEvent.click(view.getByRole('button', { name: 'Launch' }));+ expect(view.getByRole('button', { name: /Pricing changes/ })).toBeTruthy();+ expect(+ view.getByRole('button', { name: /Update pricing page/ })+ ).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: /Website brief/ }));+ expect(body(view)).toBe(editor);+ expect(editor.textContent).toContain('Keep the free plan.');+ vi.advanceTimersByTime(20000);+ expect(body(view)).toBe(editor);});-it('opens the mention menu and inserts a task, company, email, and channel', () => {- const view = render(() => <DocumentMentionsDemo />);- visible(true);- vi.advanceTimersByTime(1100);- // The scripted menu is decorative, so it sits in the aria-hidden overlay.- const menu = within(- view.getByRole('listbox', { name: 'Mentions', hidden: true })+it('filters the folder and navigates a nested folder', () => {+ const view = render(() => <DocumentOrganizationDemo />);+ fireEvent.input(+ view.getByRole('searchbox', { name: 'Search this collection' }),+ { target: { value: 'writing' } }+ );+ expect(view.getByRole('button', { name: /Writing guidelines/ })).toBeTruthy();+ expect(view.queryByRole('button', { name: /Website brief/ })).toBeNull();+ fireEvent.input(+ view.getByRole('searchbox', { name: 'Search this collection' }),+ { target: { value: '' } });- expect(menu.getByText('People & Groups')).toBeTruthy();- vi.advanceTimersByTime(900);- expect(menu.getByText('Documents, Agents, & Tasks')).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: /Images/ }));expect(- menu.getByRole('option', { selected: true, hidden: true }).textContent- ).toContain('Fix the team invite handoff');- vi.advanceTimersByTime(30000);- expect(view.queryByRole('listbox', { hidden: true })).toBeNull();- const kinds = [- ...body(view).querySelectorAll<HTMLElement>('[data-doc-mention]'),- ].map((mention) => `${mention.dataset.docMention}:${mention.textContent}`);- expect(kinds).toEqual(- expect.arrayContaining([- 'task:Fix the team invite handoff',- 'company:The Meadow',- 'email:Team invites for The Meadow',- 'channel:launch',- ])+ view.getByRole('button', { name: /Screenshot checklist/ })+ ).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Back to Website folder' }));+ expect(view.getByRole('button', { name: /Website brief/ })).toBeTruthy();+});++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 editor = body(view);+ fireEvent.pointerDown(editor);+ editor.append(document.createTextNode(' Keep this sentence.'));+ const email = view.getByRole('button', { name: 'Pricing changes' });+ email.focus();+ fireEvent.click(email);+ const source = within(view.getByRole('region', { name: 'Linked source' }));+ expect(source.getByText(/People keep asking/)).toBeTruthy();+ expect(+ view.container.querySelector('.doc-source-original')?.hasAttribute('inert')+ ).toBe(false);+ const close = source.getByRole('button', { name: 'Close split' });+ expect(document.activeElement).toBe(close);+ fireEvent.keyDown(close, { key: 'Escape' });+ expect(view.queryByRole('region', { name: 'Linked source' })).toBeNull();+ expect(document.activeElement).toBe(email);+ expect(body(view)).toBe(editor);+ expect(editor.textContent).toContain('Keep this sentence.');+});++it('keeps email and task splits open together without remounting the doc', () => {+ vi.spyOn(HTMLElement.prototype, 'clientWidth', 'get').mockReturnValue(1232);+ const view = render(() => <DocumentMentionsDemo />);+ const editor = body(view);+ editor.append(document.createTextNode(' Keep this edit.'));+ fireEvent.click(+ within(editor).getByRole('button', { name: 'Pricing changes' }));- expect(view.getByText('References (2)')).toBeTruthy();- expect(vi.getTimerCount()).toBe(0);+ const email = view.getByRole('region', { name: 'Linked email' });+ fireEvent.click(+ within(editor).getByRole('button', { name: /Update pricing page/ })+ );+ expect(view.getByRole('region', { name: 'Linked email' })).toBe(email);+ expect(+ within(view.getByRole('region', { name: 'Linked task' })).getByText(+ 'Check the page on mobile'+ )+ ).toBeTruthy();+ expect(body(view)).toBe(editor);+ fireEvent.click(view.getByRole('button', { name: 'Close task split' }));+ expect(view.getByRole('region', { name: 'Linked email' })).toBe(email);+ fireEvent.click(view.getByRole('button', { name: 'Close email split' }));+ expect(body(view).textContent).toContain('Keep this edit.');+ fireEvent.click(within(editor).getByRole('button', { name: 'website' }));+ expect(+ within(view.getByRole('region', { name: 'Linked channel' })).getByText(+ 'got it, i’ll take the pricing page'+ )+ ).toBeTruthy();});-it('shows every mention without the menu for reduced motion', () => {- reduced = true;+it('keeps source playback stopped after closing a split', () => {const view = render(() => <DocumentMentionsDemo />);- expect(view.queryByRole('listbox', { hidden: true })).toBeNull();- expect(body(view).textContent).toContain('when it ships.');- expect(body(view).querySelectorAll('[data-doc-mention]').length).toBe(5);+ visible(true);+ vi.advanceTimersByTime(2600);+ expect(view.getByRole('region', { name: 'Linked email' })).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Close email split' }));+ vi.advanceTimersByTime(20000);+ expect(view.queryByRole('region', { name: 'Linked email' })).toBeNull();+ expect(view.queryByRole('region', { name: 'Linked task' })).toBeNull();});-it('opens the doc from #launch and shows the channel already has access', () => {- const view = render(() => <DocumentSharingDemo />);- expect(view.getByRole('log', { name: 'Channel launch' })).toBeTruthy();+it('compacts completed tool calls and lets the visitor reopen them', () => {+ const view = render(() => <DocumentAgentDemo />);visible(true);- vi.advanceTimersByTime(30000);- const access = within(- view.getByRole('region', { name: 'People with access' })- );- expect(access.getByText('Julia, Teo, Gabriel +1 other')).toBeTruthy();- expect(- (- access.getByLabelText(- 'Access for Julia, Teo, Gabriel +1 other'- ) as HTMLSelectElement- ).value- ).toBe('view');- expect(view.getByText('Link sharing off')).toBeTruthy();- expect(vi.getTimerCount()).toBe(0);+ vi.advanceTimersByTime(20000);+ const toggle = view.getByRole('button', { name: 'Called 4 tools' });+ expect(toggle.getAttribute('aria-expanded')).toBe('false');+ fireEvent.click(toggle);+ expect(toggle.getAttribute('aria-expanded')).toBe('true');+ expect(view.getByRole('region', { name: 'Tool calls' })).toBeTruthy();});-it('shares the doc with a person and keeps the access after closing', () => {- const view = render(() => <DocumentSharingDemo />);- fireEvent.click(- view.container.querySelector('[data-demo-mention="plan"]') as HTMLElement- );+it('keeps the document share controls interactive', () => {+ const view = render(() => <DocumentProjectDemo />);fireEvent.click(view.getByRole('button', { name: 'Share' }));const dialog = within(view.getByRole('dialog'));fireEvent.input(dialog.getByLabelText('Email or group'), {@@ -211,16 +271,9 @@ it('shares the doc with a person and keeps the access after closing', () => {target: { value: 'comment' },});fireEvent.click(dialog.getByRole('button', { name: /Share/ }));- const people = () =>- within(view.getByRole('region', { name: 'People with access' }));- expect(people().getByText('Teo')).toBeTruthy();expect(- (people().getByLabelText('Access for Teo') as HTMLSelectElement).value+ (view.getByLabelText('Access for Teo') as HTMLSelectElement).value).toBe('comment');fireEvent.click(dialog.getByRole('button', { name: 'Cancel' }));expect(view.queryByRole('dialog')).toBeNull();- fireEvent.click(view.getByRole('button', { name: 'Share' }));- expect(- (people().getByLabelText('Access for Teo') as HTMLSelectElement).value- ).toBe('comment');});diff --git a/apps/marketing/src/features/marketing/components/documents/DocumentStories.tsx b/apps/marketing/src/features/marketing/components/documents/DocumentStories.tsxindex 6a32c84447..a7a281f227 100644--- a/apps/marketing/src/features/marketing/components/documents/DocumentStories.tsx+++ b/apps/marketing/src/features/marketing/components/documents/DocumentStories.tsx@@ -1,377 +1,269 @@import Cloud from '@phosphor/cloud.svg';import CloudWarning from '@phosphor/cloud-warning.svg';import { Tooltip } from '@ui/components/Tooltip';-import { For, Show } from 'solid-js';-import { DemoCursor } from '../DemoCursor';+import { createSignal, Show } from 'solid-js';+import { type AgentToolCall, AgentToolGroup } from '../agents/AgentTranscript';import { HomepageConversation } from '../HomepageConversation';import { HomepageMention } from '../HomepageMention';import { ProductDemo } from '../product/ProductPage';import { DocumentFrame } from './DocumentFrame';import {- controlPoint,- createAnchor,- createSceneClock,- typed,-} from './documentScene';+ type DocumentSource,+ DocumentSourceSurface,+} from './DocumentProjectDemo';+import { PROJECT_INTRO, PROJECT_TAGS, PROJECT_TITLE } from './documentProject';+import { createSceneClock, typed } from './documentScene';export { DocumentMentionsDemo } from './DocumentMentionsDemo';export { DocumentSharingDemo } from './DocumentSharingDemo';-/** A collaborator's insertion point inside the editable text. */function Caret(props: { who: 'claude' | 'jacob' | 'julia' }) {- return <span class="doc-caret" data-caret={props.who} />;+ return (+ <span+ class="doc-caret doc-named-caret"+ data-caret={props.who}+ data-name={+ props.who === 'claude'+ ? 'Macro'+ : props.who === 'julia'+ ? 'Julia'+ : 'Jacob'+ }+ />+ );}--const OLD_INTRO =- 'We’re introducing the team workspace on Thursday. It brings email, messages, tasks, and docs into one place, so a team can stop switching between five apps to get work done. The invite flow and the announcement still need a final check before we publish.';-const NEW_INTRO =- 'Thursday we launch the team workspace: email, chat, tasks, and docs in one place.';-const CHECK_HEADING = 'Before we publish';-const CHECKLIST = [- 'Teo: verify the invite flow.',- 'Julia: final read of the announcement.',- 'Jacob: confirm the launch checks.',-];-const ANNOUNCEMENT = 'Julia sends it at 9.';-const JACOB_ADDS = ' Dana’s team gets a heads-up the night before.';--// Claude selects the intro, retypes it, then writes the checklist line by-// line. Jacob keeps writing further down the whole time.-const AGENT = {- select: 250,- replace: 750,- intro: 2050,- heading: [2200, 2500],- items: [- [2600, 3200],- [3250, 3900],- [3950, 4550],- ],- jacob: [600, 3000],- end: 4700,-} as const;--/** Claude edits the open document with its own cursor while Jacob types. */export function DocumentAgentDemo() {- let root!: HTMLDivElement;- let overlay: HTMLDivElement | undefined;+ let editorRoot!: HTMLDivElement;const clock = createSceneClock({- root: () => root,- end: AGENT.end,- lead: 700,+ root: () => editorRoot,+ end: 10200,+ lead: 900,});- const t = clock.t;- const claudeAt = () => {- if (t() < AGENT.select) return 'start';- if (t() < AGENT.replace) return 'selected';- if (t() < AGENT.heading[0]) return 'intro';- if (t() < AGENT.items[0][0]) return 'heading';- const item = AGENT.items.reduce(- (current, [from], index) => (t() >= from ? index : current),- 0- );- return `item-${item}`;+ const [source, setSource] = createSignal<DocumentSource>();+ const [searchOpen, setSearchOpen] = createSignal(true);+ const [toolsOpen, setToolsOpen] = createSignal<boolean>();+ let trigger: HTMLElement | undefined;+ const pause = () => clock.pause();+ const open = (next: DocumentSource) => {+ pause();+ trigger =+ document.activeElement instanceof HTMLElement+ ? document.activeElement+ : undefined;+ setSource(next);};- const frame = () => overlay?.parentElement ?? undefined;- const claude = createAnchor({- frame,- track: t,- target: () => ({ selector: '[data-caret="claude"]' }),- });- const jacob = createAnchor({- frame,- track: t,- target: () => ({ selector: '[data-caret="jacob"]' }),- });+ const close = () => {+ setSource(undefined);+ trigger?.focus({ preventScroll: true });+ };+ const calls: AgentToolCall[] = [+ {+ kind: 'search',+ query: 'website pricing',+ hits: [+ {+ kind: 'email',+ title: 'Pricing changes',+ sender: 'Julia',+ snippet: 'Annual gets two months free. Keep the free plan visible.',+ time: 'Today',+ onOpen: () => open('email'),+ },+ {+ kind: 'task',+ title: 'Update pricing page',+ snippet: 'Teo · In Progress · Check mobile before publishing.',+ time: 'Today',+ onOpen: () => open('task'),+ },+ ],+ },+ { kind: 'read-thread' },+ { kind: 'read-document', title: 'Update pricing page' },+ { kind: 'action', label: 'Edit Website brief' },+ ];return (- <div- ref={root}- class="doc-story doc-story-page-fade"- data-live={clock.live()}- >- <div class="product-demo-request">+ <div class="doc-story doc-agent-rebuilt" data-live={clock.live()}>+ <div+ class="doc-agent-conversation"+ onPointerDown={pause}+ onKeyDown={pause}+ ><HomepageConversationmessages={[{person: 'julia',text: (<>- <span class="homepage-person-mention">@Claude</span>, make the- intro in{' '}+ <span class="homepage-person-mention">@Macro</span> update{' '}<HomepageMentionkind="md"- label="Q3 launch plan"- description="Thursday’s launch: the intro, owners, and the announcement plan."+ label={PROJECT_TITLE}+ description="The website copy and pricing changes."href="#document-agents"/>{' '}- shorter and add a checklist with Teo, Julia, and Jacob’s next- steps.+ from the latest pricing email.</>),},]}/></div>+ <div+ class="doc-agent-tools workspace-demo"+ data-open={toolsOpen() ?? !clock.done()}+ data-theme="dark"+ onPointerDown={pause}+ onKeyDown={pause}+ >+ <AgentToolGroup+ open={toolsOpen() ?? !clock.done()}+ onOpenChange={setToolsOpen}+ animateCollapse+ active={clock.live() && !clock.done()}+ searchOpen={searchOpen()}+ onSearchOpenChange={setSearchOpen}+ calls={calls.slice(+ 0,+ clock.t() < 1600+ ? 1+ : clock.t() < 2500+ ? 2+ : clock.t() < 3200+ ? 3+ : 4+ )}+ />+ </div><ProductDemo- label="Claude edits the launch plan while Jacob keeps writing"- onInteract={clock.takeOver}- height={540}- mobileHeight={640}+ ref={(element) => {+ editorRoot = element;+ }}+ label="An agent and Jacob edit the Website brief together"+ height={480}+ mobileHeight={530}+ onInteract={pause}>- <DocumentFrame- title="Q3 launch plan"- tags={['Launch', 'Product']}- overlay={- <div ref={overlay} class="doc-story-overlay" aria-hidden="true">- <Show when={clock.live() && claude()}>- {(point) => (- <DemoCursor- label="Claude"- class="doc-story-cursor"- style={{- transform: `translate(${point().x}px, ${point().y}px)`,- }}- />- )}- </Show>- <Show when={clock.live() && jacob()}>- {(point) => (- <DemoCursor- label="Jacob"- class="doc-story-cursor"- style={{- transform: `translate(${point().x}px, ${point().y}px)`,- }}- />- )}- </Show>- </div>- }- >- <h2>Thursday’s launch</h2>- <p>- <Show- when={t() < AGENT.replace}- fallback={- <>- {typed(NEW_INTRO, t(), AGENT.replace, AGENT.intro)}- <Show when={claudeAt() === 'intro'}>- <Caret who="claude" />- </Show>- </>- }- >- <Show when={claudeAt() === 'start'}>- <Caret who="claude" />- </Show>+ <DocumentSourceSurface source={source()} onClose={close}>+ <DocumentFrame title={PROJECT_TITLE} tags={PROJECT_TAGS}>+ <h2>Pricing</h2>+ <p class="doc-stable-edit"><span- class={- claudeAt() === 'selected' ? 'doc-story-selected' : undefined- }- >- {OLD_INTRO}- </span>- <Show when={claudeAt() === 'selected'}>- <Caret who="claude" />- </Show>- </Show>- </p>- <Show when={t() >= AGENT.heading[0]}>- <h2>- {typed(CHECK_HEADING, t(), AGENT.heading[0], AGENT.heading[1])}- <Show when={claudeAt() === 'heading'}>- <Caret who="claude" />- </Show>- </h2>- </Show>- <Show when={t() >= AGENT.items[0][0]}>- <ul class="md-list md-check">- <For each={CHECKLIST}>- {(item, index) => (- <Show when={t() >= AGENT.items[index()][0]}>- <li>- {typed(- item,- t(),- AGENT.items[index()][0],- AGENT.items[index()][1]- )}- <Show when={claudeAt() === `item-${index()}`}>- <Caret who="claude" />- </Show>- </li>- </Show>+ class="doc-edit-measure"+ aria-hidden="true"+ contentEditable={false}+ data-content={`${PROJECT_INTRO} Link to the billing FAQ below the table.`}+ />+ <span class="doc-edit-live">+ <Show+ when={clock.t() >= 3600}+ fallback={+ <span+ class={+ clock.t() >= 3200 ? 'doc-story-selected' : undefined+ }+ >+ Show monthly pricing. Add annual plans later.+ </span>+ }+ >+ {typed(PROJECT_INTRO, clock.t(), 3600, 8200)}+ </Show>+ <Show+ when={clock.live() && clock.t() >= 3200 && clock.t() < 8400}+ >+ <Caret who="claude" />+ </Show>+ {typed(+ ' Link to the billing FAQ below the table.',+ clock.t(),+ 5000,+ 9500)}- </For>+ <Show+ when={clock.live() && clock.t() >= 5000 && clock.t() < 9700}+ >+ <Caret who="jacob" />+ </Show>+ </span>+ </p>+ <h2>Before we publish</h2>+ <ul class="md-list">+ <li>Teo checks the pricing table.</li>+ <li>Julia reviews the copy.</li>+ <li>Jacob tests signup on mobile.</li></ul>- </Show>- <h2>Announcement</h2>- <p>- {ANNOUNCEMENT}- {typed(JACOB_ADDS, t(), AGENT.jacob[0], AGENT.jacob[1])}- <Caret who="jacob" />- </p>- <h2>Owners</h2>- <p>- Julia owns the announcement and the customer email. Teo owns the- deploy and release checks. Jacob owns customer conversations.- </p>- <h2>After launch</h2>- <p>- Check activation on Friday and send Dana’s team the rollout plan.- </p>- </DocumentFrame>+ <h2>Launch</h2>+ <p>+ Publish once pricing and signup are checked. Send the announcement+ the next morning.+ </p>+ </DocumentFrame>+ </DocumentSourceSurface></ProductDemo></div>);}-const JULIA_EDIT = 'Send it Thursday at 9. ';-const ANNOUNCEMENT_LINE = 'Lead with the shared inbox.';-const JACOB_OFFLINE = ' Pricing doesn’t change for existing teams.';--// Offline while Jacob writes, reconnecting, then synced with Julia's edit to-// the same paragraph merged in front of his.-const OFFLINE = {- hover: 1100,- type: [1500, 3200],- connecting: 3500,- synced: 4400,- end: 4600,-} as const;--/** The real offline indicator while Jacob writes; Julia's edit merges in. */export function DocumentOfflineDemo() {let root!: HTMLDivElement;- let overlay: HTMLDivElement | undefined;- const clock = createSceneClock({- root: () => root,- end: OFFLINE.end,- lead: 500,- });- const t = clock.t;+ const clock = createSceneClock({ root: () => root, end: 6800, lead: 800 });const status = () =>- t() < OFFLINE.connecting- ? 'offline'- : t() < OFFLINE.synced- ? 'connecting'- : undefined;- const hovering = () => clock.live() && t() < OFFLINE.hover;- const synced = () => t() >= OFFLINE.synced;- const gliding = () => t() >= OFFLINE.hover && t() < OFFLINE.type[0];- const frame = () => overlay?.parentElement ?? undefined;- const jacob = createAnchor({- frame,- track: t,- target: () =>- hovering()- ? { selector: '[data-sync-status]', place: controlPoint }- : { selector: '[data-caret="jacob"]' },- });- const julia = createAnchor({- frame,- track: t,- target: () => (synced() ? { selector: '[data-caret="julia"]' } : undefined),- });+ clock.t() < 4800 ? 'offline' : clock.t() < 6000 ? 'connecting' : undefined;return (- <div- ref={root}- class="doc-story doc-story-page-fade"- data-live={clock.live()}- >+ <div ref={root} class="doc-story" data-live={clock.live()}><ProductDemo- label="Jacob writes offline, then his edits merge with Julia’s"- onInteract={clock.takeOver}- height={470}- mobileHeight={560}+ label="Offline edits merge when you reconnect"+ height={370}+ mobileHeight={410}+ onInteract={clock.pause}><DocumentFrame- title="Q3 launch plan"- tags={['Launch', 'Product']}+ title="Launch checklist"+ tags={['Launch']}status={<Show when={status()}>- {(current) => (- <span class="doc-sync">- <Tooltip- as="span"- label={- current() === 'offline'- ? "You're offline. Changes will sync when you reconnect."- : 'Reconnecting…'+ {(state) => (+ <Tooltip+ as="span"+ label={+ state() === 'offline'+ ? "You're offline. Changes will sync when you reconnect."+ : 'Reconnecting…'+ }+ >+ <span+ role="status"+ aria-label={+ state() === 'offline' ? 'Offline' : 'Reconnecting'}+ class="doc-sync-status"+ data-status={state()}>- <span- role="status"- data-sync-status- class="doc-sync-status"- data-status={current()}- aria-label={- current() === 'offline' ? 'Offline' : 'Reconnecting'- }- >- <Show when={current() === 'offline'} fallback={<Cloud />}>- <CloudWarning />- </Show>- </span>- </Tooltip>- <Show when={hovering() && current() === 'offline'}>- <span class="doc-tooltip" aria-hidden="true">- You're offline. Changes will sync when you reconnect.- </span>- </Show>- </span>+ <Show when={state() === 'offline'} fallback={<Cloud />}>+ <CloudWarning />+ </Show>+ </span>+ </Tooltip>)}</Show>}- overlay={- <div ref={overlay} class="doc-story-overlay" aria-hidden="true">- <Show when={clock.live() && jacob()}>- {(point) => (- <DemoCursor- label="Jacob"- class={`doc-story-cursor${gliding() ? ' doc-story-glide' : ''}`}- style={{- transform: `translate(${point().x}px, ${point().y}px)`,- }}- />- )}- </Show>- <Show when={clock.live() && julia()}>- {(point) => (- <DemoCursor- label="Julia"- class="doc-story-cursor"- style={{- transform: `translate(${point().x}px, ${point().y}px)`,- }}- />- )}- </Show>- </div>- }>- <h2>Launch checklist</h2>- <ul class="md-list md-check">- <li class="checked md-strike text-ink-extra-muted">- Finalize the product story- </li>- <li>Send the customer email</li>- <li>Publish the changelog</li>+ <h2>Final checks</h2>+ <ul class="md-list">+ <li>Check pricing on desktop and mobile.</li>+ <li>Test the signup links.</li></ul><h2>Announcement</h2><p>- <Show when={synced()}>- <span class="doc-story-merged">{JULIA_EDIT}</span>- <Caret who="julia" />+ <Show when={clock.t() >= 6000}>+ <span class="doc-story-merged">Julia has the email ready. </span>+ </Show>+ Send it tomorrow.+ {typed(' Add a screenshot of the new page.', clock.t(), 1000, 4200)}+ <Show when={clock.live() && clock.t() < 4800}>+ <Caret who="jacob" /></Show>- {ANNOUNCEMENT_LINE}- {typed(JACOB_OFFLINE, t(), OFFLINE.type[0], OFFLINE.type[1])}- <Caret who="jacob" />- </p>- <h2>Owners</h2>- <p>- Julia owns the announcement and the customer email. Teo owns the- deploy and release checks.</p></DocumentFrame></ProductDemo>diff --git a/apps/marketing/src/features/marketing/components/documents/document-stories.css b/apps/marketing/src/features/marketing/components/documents/document-stories.cssindex a9964b19d3..2474816a8d 100644--- a/apps/marketing/src/features/marketing/components/documents/document-stories.css+++ b/apps/marketing/src/features/marketing/components/documents/document-stories.css@@ -131,3 +131,116 @@.doc-story-merged, .doc-share-card, .doc-share-person[data-new='true'] { animation: none; }.doc-sync-status[data-status='connecting'] > svg { animation: none; }}++/* Split layout follows the app: adjacent panes on desktop, one pane on mobile. */+.doc-source-split { position: relative; display: flex; flex: 1; min-width: 0; min-height: 0; height: 100%; }+.doc-source-original, .doc-source-view { position: relative; display: flex; flex: 1 1 0; flex-direction: column; min-width: 0; min-height: 0; }+.doc-source-view { border-left: 1px solid var(--color-edge-muted); background: var(--color-panel); overflow: hidden; }+.doc-source-view > [data-view-shell-top-bar] { padding-right: 42px; }+.doc-source-close { position: absolute; right: 8px; top: 12px; z-index: 6; }+.doc-source-split[data-narrow=true][data-source-open=true] > .doc-source-original { visibility: hidden; }+.doc-source-split[data-narrow=true] > .doc-source-view { position: absolute; inset: 0; z-index: 8; border-left: 0; }+.doc-source-split .doc-share-scrim { z-index: 9; }+@container sample-main (max-width: 620px) {+ .doc-source-original .doc-story-page { padding-top: 28px; }+ .doc-source-original .doc-story-title { font-size: 22px; }+ .doc-source-original .doc-story-body { font-size: 14px; }+}+.doc-source-link { display: inline; border-radius: 3px; color: inherit; text-align: left; }+.doc-source-link:hover { background: var(--color-hover); }+.doc-source-link:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }+.doc-project-discussion { margin-top: 32px; }+.doc-agent-context { min-height: 212px; max-width: 700px; margin: 0 auto 12px; padding-inline: 16px; text-align: left; }++/* In a phone-sized source pane, keep the title, sharing, details, and close visible. */+@container sample-main (max-width: 420px) {+ .doc-source-view [aria-label='Mark as unread'],+ .doc-source-view [aria-label='Mark done'],+ .doc-source-view [aria-label='Copy email link'],+ .doc-source-view [aria-label='Link copied'] { display: none; }+}++/* Docs keeps its complete, scrollable editor above the decorative stage tail. */+.docs-page .doc-story-page { padding-top: 30px; padding-bottom: 32px; }+.docs-page .doc-story-body { font-size: 15px; line-height: 1.7; }+.docs-page .doc-story-title { font-size: 26px; line-height: 34px; }+.docs-page .doc-story-body > h2 { margin-top: 24px; }+.docs-page .email-desktop-demo { mask-image: none; -webkit-mask-image: none; }+.docs-page .email-desktop-wallpaper { padding-bottom: 48px; }+.docs-page .email-desktop-demo .product-demo { height: 660px; }+.docs-page .email-desktop-demo .doc-story-page { max-width: 720px; }+.doc-named-caret::before { content: attr(data-name); position: absolute; bottom: 100%; left: 0; padding: 1px 5px; background: var(--doc-caret, #6b7280); color: white; border-radius: 3px 3px 3px 0; font-size: 10px; line-height: 15px; white-space: nowrap; }+.doc-organization { position: relative; }+.doc-organizer { display: flex; flex: 1; min-height: 0; min-width: 0; }+.doc-organizer [hidden] { display: none !important; }+.doc-collection { display: flex; flex: 1; flex-direction: column; min-height: 0; min-width: 0; }+.doc-collection-search { padding: 18px 20px 12px; max-width: 560px; }+.doc-collection-rows { padding: 4px 10px 24px; }+.doc-collection-row { display: flex; align-items: center; gap: 12px; padding: 14px 14px; width: 100%; min-width: 0; text-align: left; border-radius: 8px; font-size: 14px; }+.doc-collection-row:hover { background: var(--color-hover); }+.doc-collection-row:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }+.doc-collection-row > svg { width: 18px; height: 18px; flex: none; }+.doc-collection-row > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }+.doc-collection-row time { min-width: 76px; text-align: right; font-size: 12px; color: var(--color-ink-extra-muted); }+.doc-row-tags { display: flex; gap: 12px; font-size: 11px; color: var(--color-ink-muted); }+.doc-row-tags > span, .doc-click-tags button { display: inline-flex; align-items: center; gap: 6px; }+.doc-filter { display: flex; align-items: center; gap: 8px; margin: 0 24px 12px; font-size: 12px; }+.doc-filter > span:first-child { color: var(--color-ink-muted); }+.doc-filter b { font-weight: 500; }+.doc-filter button { padding: 4px; border-radius: 4px; }+.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; }+@media (max-width: 699px) {+ .docs-page .doc-story-page { padding-top: 24px; }+ .docs-page .doc-story-title { font-size: 23px; line-height: 30px; }+ .docs-page .doc-story-body { font-size: 14px; }+ .docs-page .email-desktop-demo .product-demo { height: 650px; }+ .doc-collection-row { gap: 8px; padding-inline: 8px; }+ .doc-collection-row time { min-width: 60px; font-size: 11px; }+ .doc-row-tags { display: none; }+}+@media (prefers-reduced-motion: reduce) { .doc-organize-pointer { transition: none; } }+.docs-page .email-desktop-content { height: 660px; }+@media (max-width: 699px) { .docs-page .email-desktop-content { height: 650px; } }++/* The agent transcript sits directly on the page, before the shared editor. */+.doc-agent-conversation { max-width: 700px; margin: 0 auto 12px; }+.doc-agent-conversation .homepage-conversation { margin-bottom: 0; }+.doc-agent-conversation .homepage-message { max-width: 100%; }+.doc-agent-tools { max-width: 700px; min-height: 228px; margin: 0 auto 8px; padding-inline: 16px; text-align: left; }+.product-page .docs-jump-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }+@media (max-width: 699px) {+ .doc-agent-tools { min-height: 248px; padding-inline: 0; }+ .product-page .docs-jump-links { gap: 12px; }+ .docs-jump-links .email-feature-graphic { width: 100%; height: 78px; }+ .docs-jump-links a { min-width: 0; font-size: 12px; }+}++/* Keep the prompt still and reserve the final paragraph's line wrapping. */+.doc-agent-conversation .homepage-enter { animation: none; opacity: 1; transform: none; }+.doc-agent-conversation .homepage-message-body { white-space: normal; }+.doc-story-body > .doc-stable-edit { display: grid; }+.doc-stable-edit > span { grid-area: 1 / 1; min-width: 0; }+.doc-edit-measure { visibility: hidden; pointer-events: none; user-select: none; }+.doc-stable-edit .doc-caret { height: 1em; line-height: 1; }++/* Equal source panes within the standard feature window. */+.doc-multi-split { position: relative; display: flex; flex: 1; min-height: 0; min-width: 0; }+.doc-multi-original, .doc-multi-pane { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; min-height: 0; }+.doc-multi-split[data-narrow=true][data-open=true] > .doc-multi-original { visibility: hidden; }+.doc-multi-split[data-narrow=true] > .doc-multi-pane { position: absolute; inset: 0; visibility: hidden; }+.doc-multi-split[data-narrow=true] > .doc-multi-pane[data-active=true] { visibility: visible; z-index: 8; }+.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); }+.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; } }++.docs-page .email-page-hero-description { white-space:nowrap; }+.docs-page .email-page-hero-break { display:block; }+@media(max-width:699px) {+ .docs-page .email-page-hero > .email-page-hero-description { font-size:clamp(10px, 2.9vw, 14px); }+}diff --git a/apps/marketing/src/features/marketing/components/documents/documentProject.ts b/apps/marketing/src/features/marketing/components/documents/documentProject.tsnew file mode 100644index 0000000000..85692564cd--- /dev/null+++ b/apps/marketing/src/features/marketing/components/documents/documentProject.ts@@ -0,0 +1,102 @@+import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';+import type { DocMentionItem } from './DocMention';++export const PROJECT_TITLE = 'Website brief';+export const PROJECT_TAGS = ['Launch', 'Product'];+export const PROJECT_EMAIL = {+ kind: 'email',+ label: 'Pricing changes',+} satisfies DocMentionItem;+export const PROJECT_TASK = {+ kind: 'task',+ label: 'Update pricing page',+ status: 'In Progress',+} satisfies DocMentionItem;+export const PROJECT_INTRO =+ 'Show monthly and annual prices together. Annual plans get two months free. Keep the free plan visible.';+export const PROJECT_STEPS = [+ 'Update the pricing table',+ 'Check the page on mobile',+ 'Test the signup links',+];++/** Page-owned fixtures. The same document is opened from folders, tags and chat. */+export function createDocumentProject() {+ const w = createDummyWorkspace('documents');+ w.setData('emails', (email) => email.id === 'dana', {+ sender: 'Julia',+ subject: PROJECT_EMAIL.label,+ snippet: 'Let’s show monthly and annual prices together.',+ body: 'Hey Jacob,\n\nLet’s show monthly and annual prices together. Annual gets two months free.\n\nCan we keep the free plan visible too? People keep asking if we still have one.\n\nJulia',+ tags: ['launch'],+ replies: [],+ });+ w.setData('tasks', (task) => task.id === 'invite', {+ title: PROJECT_TASK.label,+ description:+ 'Update the pricing page from the Website brief. Show both billing options and keep the free plan visible.',+ owner: 'teo',+ channel: 'website',+ priority: 'High',+ status: 'In Progress',+ tags: [...PROJECT_TAGS],+ steps: PROJECT_STEPS.map((text, index) => ({+ id: `pricing-${index}`,+ text,+ done: index === 0,+ })),+ comments: [+ {+ id: 'pricing-question',+ person: 'teo',+ time: '10:18 AM',+ body: 'table is done. checking mobile next',+ },+ ],+ });+ w.setData('documents', (doc) => doc.id === 'plan', {+ title: PROJECT_TITLE,+ tags: [...PROJECT_TAGS],+ body: `## What we’re changing\n\nMake the homepage easier to scan. Show what the product does before asking people to sign up.\n\n## Pricing\n\n${PROJECT_INTRO}\n\n## Before we publish\n\n${PROJECT_STEPS.map((step) => `- [ ] ${step}`).join('\n')}`,+ comments: [],+ });+ w.setData('channels', (c) => c.id === 'launch', {+ id: 'website',+ messages: [+ {+ id: 'monday',+ person: 'julia',+ body: 'can we get the new pricing page out this week?',+ time: '9:12 AM',+ },+ {+ id: 'mobile',+ person: 'teo',+ body: 'yep. mobile needs a little work first',+ time: '9:14 AM',+ },+ {+ id: 'email',+ person: 'julia',+ body: 'sent over the pricing changes',+ time: '9:17 AM',+ },+ {+ id: 'plan',+ person: 'jacob',+ body: 'put everything in here',+ documentId: 'plan',+ time: '9:31 AM',+ },+ {+ id: 'reply',+ person: 'teo',+ body: 'got it, i’ll take the pricing page',+ time: '9:33 AM',+ },+ ],+ });+ w.setChannel('website');+ w.open('documents', 'plan');+ return w;+}diff --git a/apps/marketing/src/features/marketing/components/documents/documentScene.ts b/apps/marketing/src/features/marketing/components/documents/documentScene.tsindex 723e06b220..2366e7a540 100644--- a/apps/marketing/src/features/marketing/components/documents/documentScene.ts+++ b/apps/marketing/src/features/marketing/components/documents/documentScene.ts@@ -38,6 +38,11 @@ export function createSceneClock(options: {live,reduced,done: () => t() >= options.end,+ /** Stop in place before a visitor edits the current content. */+ pause: () => {+ playback.pause();+ setLive(false);+ },/** The visitor's first interaction settles the scene, then stops it. */takeOver: () => {if (!live()) return;diff --git a/apps/marketing/src/features/marketing/components/email/EmailComparison.tsx b/apps/marketing/src/features/marketing/components/email/EmailComparison.tsxindex 547e589007..0f1169c7ce 100644--- a/apps/marketing/src/features/marketing/components/email/EmailComparison.tsx+++ b/apps/marketing/src/features/marketing/components/email/EmailComparison.tsx@@ -1,74 +1,6 @@-import CaretDown from '@phosphor/caret-down.svg';-import {- type ComparisonColumn,- ComparisonLegend,- type ComparisonRow,- ComparisonTable,-} from '../../../../app/components/sections/ComparisonTable';-import LogoGmail from '../../../../assets/icons/logo-gmail.svg';-import LogoOutlook from '../../../../assets/icons/logo-outlook.svg';-import LogoSuperhuman from '../../../../assets/icons/logo-superhuman.svg';--const comparisonColumns: ComparisonColumn[] = [- { label: 'Macro Mail' },- { label: 'Superhuman', logo: LogoSuperhuman },- { label: 'Outlook', logo: LogoOutlook },- { label: 'Gmail', logo: LogoGmail },-];--const comparisonRows: ComparisonRow[] = [- {- feature: 'Multiple accounts in one inbox',- cells: [true, true, 'partial', 'partial'],- },- {- feature: 'Keyboard-first design',- cells: [true, true, 'partial', 'partial'],- },- {- feature: 'Agents draft & send for you',- cells: [true, 'partial', 'partial', 'partial'],- },- { feature: 'No-cost access', cells: [true, false, true, true] },- {- feature: 'Email, chat & tasks in one place',- cells: [true, false, 'partial', false],- },- {- feature: 'Share email threads with your team',- cells: [true, false, 'partial', false],- },- { feature: 'Split-screen multitasking', cells: [true, false, true, false] },- {- feature: 'Agents search email, chat, docs & calls',- cells: [true, false, false, false],- },- {- feature: '@mention docs, people & tasks',- cells: [true, false, false, false],- },- {- feature: 'Memory built from workspace activity',- cells: [true, false, false, false],- },- { feature: 'Open source', cells: [true, false, false, false] },-];+import { emailComparisons } from '../../core/feature-comparisons';+import { FeatureComparisons } from '../comparisons/FeatureComparisons';export function EmailComparison() {- return (- <details class="feature-page-comparison">- <summary>- <span>Compare email clients</span>- <CaretDown aria-hidden="true" />- </summary>- <div class="feature-page-comparison-content">- <ComparisonTable columns={comparisonColumns} rows={comparisonRows} />- <ComparisonLegend />- <p>- For current plans and limits, see <a href="/pricing">Macro pricing</a>- .- </p>- </div>- </details>- );+ return <FeatureComparisons comparisons={emailComparisons} />;}diff --git a/apps/marketing/src/features/marketing/components/email/EmailDesktopDemo.tsx b/apps/marketing/src/features/marketing/components/email/EmailDesktopDemo.tsxindex 78a2a9e96c..2abba0a8e0 100644--- a/apps/marketing/src/features/marketing/components/email/EmailDesktopDemo.tsx+++ b/apps/marketing/src/features/marketing/components/email/EmailDesktopDemo.tsx@@ -3,6 +3,7 @@ import { WorkspaceDesktopDemo } from '../WorkspaceDesktopDemo';export function EmailDesktopDemo() {return (<WorkspaceDesktopDemo+ heroFrameview="email"label="Try Macro Mail"caption="Your inbox, in context. Click around — this workspace is yours to explore."diff --git a/apps/marketing/src/features/marketing/components/email/EmailSharingDemo.tsx b/apps/marketing/src/features/marketing/components/email/EmailSharingDemo.tsxindex acf3690573..a0ce306e64 100644--- a/apps/marketing/src/features/marketing/components/email/EmailSharingDemo.tsx+++ b/apps/marketing/src/features/marketing/components/email/EmailSharingDemo.tsx@@ -158,7 +158,7 @@ function ChannelResult(props: { onOpen: () => void; updated: boolean }) {<Envelope class="size-4" /> Email thread <span>Live</span></span><strong>Next steps for our team</strong>- <span>Dana Whitfield · Jacob Beckerman</span>+ <span>Dana · Jacob</span><span class="mail-shared-thread-preview">{props.updated? incomingReply@@ -316,7 +316,7 @@ export function EmailSharingDemo(props: { onClose?: () => void } = {}) {<Show when={opened() && phase() >= 7}><div class="mail-arrived-reply glass-input"><header>- <strong>Dana Whitfield</strong>+ <strong>Dana</strong><span>Just now</span></header><p>{incomingReply}</p>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 ff4d4d1200..b4eb2ea63b 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@@ -52,3 +52,77 @@.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,+.email-desktop-canvas > [data-deferred-demo] { height:100%; }+@media (min-width:700px) {+ .email-desktop-demo[data-desktop-canvas=true] { --desktop-stage-width:min(1052px, 96vw); }+ .email-desktop-demo[data-desktop-canvas=true] .email-desktop-wallpaper { padding:32px 24px; }+ .email-desktop-demo[data-desktop-canvas=true] .email-desktop-content { height:calc(640px * var(--workspace-scale)); }+ .email-desktop-demo[data-desktop-canvas=true] .email-desktop-canvas {+ width:var(--workspace-width);+ height:640px;+ transform:scale(var(--workspace-scale));+ transform-origin:top left;+ }+}+++/* 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));+}+:root body .email-desktop-demo[data-hero-frame=true] .email-desktop-wallpaper {+ position: relative;+ isolation: isolate;+ padding: 50px;+ border-radius: 16px;+ background: #191a1e;+}+:root body .email-desktop-demo[data-hero-frame=true] .email-desktop-wallpaper::before {+ content: '';+ position: absolute;+ inset: 0;+ z-index: -1;+ pointer-events: none;+ background: url('../../../../assets/desktop/monterey-dark.jpg') center / cover;+ filter: grayscale(1) brightness(1.6) contrast(1.05);+}+:root body .email-desktop-demo[data-hero-frame=true] .email-desktop-window {+ border-radius: 16px;+ box-shadow: 0 24px 60px #0006, 0 3px 12px #0003;+}+:root body .email-desktop-demo[data-hero-frame=true] .email-desktop-titlebar {+ height: 36px;+ background: #171717;+}+:root body .email-desktop-demo[data-hero-frame=true] .email-desktop-content {+ height: 640px;+}+:root body .email-desktop-demo[data-hero-frame=true] .email-desktop-content .product-demo {+ height: 100%;+ border-radius: 0;+ box-shadow: none;+ mask-image: none;+ -webkit-mask-image: none;+}+@media (min-width: 700px) {+ :root body .email-desktop-demo[data-hero-frame=true][data-desktop-canvas=true] .email-desktop-canvas {+ height: calc(640px / var(--workspace-scale));+ }+}+@media (max-width: 699px) {+ :root body .email-desktop-demo[data-hero-frame=true] {+ --desktop-stage-width: calc(100vw - 24px);+ }+ :root body .email-desktop-demo[data-hero-frame=true] .email-desktop-wallpaper {+ padding: 16px;+ border-radius: 12px;+ }+ :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/frozen/ChannelComposer.tsx b/apps/marketing/src/features/marketing/components/email/frozen/ChannelComposer.tsxindex 6daf65cd7d..1728968ba1 100644--- a/apps/marketing/src/features/marketing/components/email/frozen/ChannelComposer.tsx+++ b/apps/marketing/src/features/marketing/components/email/frozen/ChannelComposer.tsx@@ -16,14 +16,19 @@ 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 function ChannelComposer(props: {onSend: (message: string) => void;label?: string;placeholder?: string;leadingAction?: JSX.Element;+ attachmentIcon?: JSX.Element;accessory?: JSX.Element;agent?: boolean;richMentions?: boolean;+ compact?: boolean;+ onReady?: (handle: ChannelComposerHandle | undefined) => void;}) {const [draft, setDraft] = createSignal('');const [attachments, setAttachments] = createSignal<string[]>([]);@@ -35,6 +40,16 @@ export function ChannelComposer(props: {input.style.height = `${Math.min(input.scrollHeight, 200)}px`;};onMount(() => {+ props.onReady?.({+ setText: (text) => {+ if (!input) return;+ if (input instanceof HTMLTextAreaElement) input.value = text;+ else input.textContent = text;+ setDraft(text);+ queueMicrotask(resize);+ },+ });+ onCleanup(() => props.onReady?.(undefined));const observer = new ResizeObserver(resize);if (input?.parentElement) observer.observe(input.parentElement);onCleanup(() => observer.disconnect());@@ -91,10 +106,11 @@ export function ChannelComposer(props: {<Layoutdata-agent-composer={props.agent || undefined}oneLineInput={- !draft().includes('\n') &&- (input?.tagName === 'DIV'- ? (input.textContent?.length ?? 0)- : draft().length) < 70+ props.compact ??+ (!draft().includes('\n') &&+ (input?.tagName === 'DIV'+ ? (input.textContent?.length ?? 0)+ : draft().length) < 70)}><Layout.Body>@@ -183,7 +199,7 @@ export function ChannelComposer(props: {label="Attach files"onClick={() => filePicker?.click()}>- <Paperclip />+ {props.attachmentIcon ?? <Paperclip />}</InputActionButton>)}</Layout.ActionsLeft>diff --git a/apps/marketing/src/features/marketing/components/email/frozen/EmailThread.tsx b/apps/marketing/src/features/marketing/components/email/frozen/EmailThread.tsxindex ad73834a5f..b89a5b0533 100644--- a/apps/marketing/src/features/marketing/components/email/frozen/EmailThread.tsx+++ b/apps/marketing/src/features/marketing/components/email/frozen/EmailThread.tsx@@ -27,7 +27,7 @@ export function EmailThread(props: {}) {const [details, setDetails] = createSignal(false);const sent = () => props.email.folder === 'sent';- const sender = () => (sent() ? 'Jacob Beckerman' : props.email.sender);+ const sender = () => (sent() ? 'Jacob' : props.email.sender);return (<div class="mail-thread"><Show when={!props.hideHeader}>@@ -114,10 +114,7 @@ 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 Beckerman <[email protected]>'}+ To: {sent() ? props.email.sender : 'Jacob <[email protected]>'}</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 16c526ed50..d12997bb2c 100644--- a/apps/marketing/src/features/marketing/components/feature-page.css+++ b/apps/marketing/src/features/marketing/components/feature-page.css@@ -68,3 +68,52 @@.feature-page-jump-links a { gap: 10px; }.email-feature-graphic { width: 128px; height: 80px; }}+++/* One spacing owner per boundary; do not stack section padding with margins. */+.feature-page[data-product-spacing=true] {+ --feature-section-space: 96px;+ --feature-demo-space: 40px;+}+.feature-page[data-product-spacing=true] .feature-page-section {+ margin-block: var(--feature-section-space) 0;+ padding-block: 0;+}+.feature-page[data-product-spacing=true] .feature-page-section .homepage-feature-heading {+ margin-bottom: var(--feature-demo-space);+}+.feature-page[data-product-spacing=true] .feature-page-visual .product-demo-stage {+ padding-top: 0;+}+.feature-page[data-product-spacing=true] .feature-page-reading {+ margin-block: var(--feature-section-space) 0;+ padding-block: 0;+}+.feature-page[data-product-spacing=true] .feature-page-reading-rule { display: none; }+.feature-page[data-product-spacing=true] .feature-page-reading > h2 {+ margin-top: 0;+ margin-bottom: 24px;+}+.feature-page[data-product-spacing=true] .homepage-feature-end {+ margin-top: var(--feature-section-space);+ padding-top: 64px;+ padding-bottom: 56px;+}+.feature-page[data-product-spacing=true] .feature-page-jump-links {+ padding-block: 0;+}+.feature-page[data-product-spacing=true] .email-desktop-demo {+ margin-bottom: 64px;+}+.feature-page[data-product-spacing=true] .tasks-founder-letter {+ margin-top: 0;+ margin-bottom: 0;+}+@media (max-width: 699px) {+ .feature-page[data-product-spacing=true] {+ --feature-section-space: 64px;+ --feature-demo-space: 28px;+ }+ .feature-page[data-product-spacing=true] .email-desktop-demo { margin-bottom: 40px; }+ .feature-page[data-product-spacing=true] .homepage-feature-end { padding-block: 48px; }+}diff --git a/apps/marketing/src/features/marketing/components/homepage-agent-trace.css b/apps/marketing/src/features/marketing/components/homepage-agent-trace.cssindex 75d9807203..7b3b29b57f 100644--- a/apps/marketing/src/features/marketing/components/homepage-agent-trace.css+++ b/apps/marketing/src/features/marketing/components/homepage-agent-trace.css@@ -11,9 +11,6 @@.homepage-agent-pr-link:hover { text-decoration-color: currentColor; }.homepage-agent-pr-link:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }.homepage-agent-chip { border-radius: 14px; }-.homepage-agent-story [data-magic-chip] { margin: 0; border: 0; border-radius: 14px; background: var(--color-panel); text-align: left; }-.homepage-agent-story [data-magic-chip-fade] { background: linear-gradient(to top, var(--color-panel), transparent); }-.homepage-agent-story [data-magic-chip-header] { height: auto; min-height: 44px; padding-block: 6px; padding-right: 6px; }.homepage-agent-merge { height: 32px; border-radius: 8px; padding-inline: 10px; }.homepage-agent-dialog { --glass-scale: 1.5; display: flex; flex-direction: column; width: min(860px, calc(100vw - 32px)); height: min(760px, calc(100dvh - 64px)); overflow: hidden; font: 400 14px/1.6 var(--font-sans), sans-serif; color: var(--color-ink); background: var(--color-surface-2); }@@ -24,9 +21,6 @@.homepage-agent-story .homepage-message { max-width: 100%; }.homepage-message-reply { margin-left: 0; padding-left: 0; }.homepage-message-reply::before { left: -26px; width: 16px; }- .homepage-agent-story [data-magic-chip-header] { flex-wrap: wrap; row-gap: 4px; padding-block: 8px; }- .homepage-agent-story [data-magic-chip-header] > button:first-child { min-width: 130px; }- .homepage-agent-story [data-magic-chip-header] > div { max-width: none; }.homepage-agent-dialog { width: calc(100vw - 16px); height: auto; max-height: 94dvh; }.homepage-agent-dialog-header { padding: 14px 16px; }.homepage-agent-dialog-tabs { padding: 8px 16px; }diff --git a/apps/marketing/src/features/marketing/components/product/ProductPage.tsx b/apps/marketing/src/features/marketing/components/product/ProductPage.tsxindex 65a5387149..d77cdf7342 100644--- a/apps/marketing/src/features/marketing/components/product/ProductPage.tsx+++ b/apps/marketing/src/features/marketing/components/product/ProductPage.tsx@@ -1,5 +1,5 @@import MacroLogo from '@icon/macro-logo.svg';-import type { JSX, ParentProps } from 'solid-js';+import { type JSX, type ParentProps, Show } from 'solid-js';import { FeaturePage, FeaturePageCta } from '../FeaturePage';import '../email/email-hero.css';import './product-page.css';@@ -8,7 +8,7 @@ import './product-demo-stage.css';/** Email's approved geometry, scoped to the product-page rollout. */export function ProductPage(props: ParentProps) {return (- <FeaturePage>+ <FeaturePage productSpacing><div class="product-page">{props.children}</div></FeaturePage>);@@ -17,8 +17,8 @@ export function ProductPage(props: ParentProps) {export function ProductHero(props: {product: string;title: readonly [string, string];- description: readonly [string, string];- cta: string;+ description: string | readonly [string, string];+ cta?: string;}) {return (<header class="feature-page-hero email-page-hero">@@ -31,10 +31,16 @@ export function ProductHero(props: {<span>{props.title[1]}</span></h1><p class="email-page-hero-description">- {props.description[0]}- <br class="email-page-hero-break" /> {props.description[1]}+ {typeof props.description === 'string' ? (+ props.description+ ) : (+ <>+ {props.description[0]}+ <br class="email-page-hero-break" /> {props.description[1]}+ </>+ )}</p>- <FeaturePageCta name={props.cta} />+ <Show when={props.cta}>{(cta) => <FeaturePageCta name={cta()} />}</Show></header>);}diff --git a/apps/marketing/src/features/marketing/components/product/product-demo-stage.css b/apps/marketing/src/features/marketing/components/product/product-demo-stage.cssindex 57c6444efa..03f5edc3f0 100644--- a/apps/marketing/src/features/marketing/components/product/product-demo-stage.css+++ b/apps/marketing/src/features/marketing/components/product/product-demo-stage.css@@ -32,7 +32,7 @@box-sizing: border-box;height: calc(var(--product-demo-height) + var(--product-demo-fade-tail));padding-bottom: var(--product-demo-fade-tail);- background: linear-gradient(145deg, #17181b, #101112 60%);+ background: var(--color-panel);mask-image: linear-gradient(#000 calc(100% - var(--product-demo-fade-tail)),rgb(0 0 0 / 0.65) calc(100% - 32px),diff --git a/apps/marketing/src/features/marketing/components/product/product-page.css b/apps/marketing/src/features/marketing/components/product/product-page.cssindex dbf647ac9d..5188cc7e9a 100644--- a/apps/marketing/src/features/marketing/components/product/product-page.css+++ b/apps/marketing/src/features/marketing/components/product/product-page.css@@ -17,7 +17,6 @@.product-page .product-demo { height: var(--demo-h, 580px); border-radius: 16px; overflow: hidden; background-color: var(--color-panel); box-shadow: var(--glass-shadow); }.product-demo > .dummy-main { height: 100%; }.product-demo .sample-chat-log { padding: 32px; }-.product-demo .sample-message-row { margin-bottom: 22px; }.product-demo .sample-details { display: none; }.product-demo .sample-detail-layout[data-panel-open=true] .sample-details { display: block; }.product-demo-request { margin-bottom: 28px; }diff --git a/apps/marketing/src/features/marketing/components/reviews/GithubWorkflow.tsx b/apps/marketing/src/features/marketing/components/reviews/GithubWorkflow.tsxnew file mode 100644index 0000000000..eeaa0e219a--- /dev/null+++ b/apps/marketing/src/features/marketing/components/reviews/GithubWorkflow.tsx@@ -0,0 +1,526 @@+import ArrowLeft from '@phosphor/arrow-left.svg';+import GitPullRequest from '@phosphor/git-pull-request.svg';+import { Button } from '@ui';+import { createEffect, createSignal, Show } from 'solid-js';+import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';+import {+ AgentAnswer,+ AgentPrompt,+ AgentToolGroup,+ AgentTurn,+} from '../agents/AgentTranscript';+import { createDemoPointer } from '../agents/createDemoPointer';+import { DemoAgentChip } from '../DemoAgentChip';+import { DemoCursor } from '../DemoCursor';+import { DemoMention } from '../DemoMention';+import { ViewShell } from '../DemoWorkspaceChrome';+import { DocumentShareSheet } from '../documents/DocumentShareSheet';+import { ProductDemo } from '../product/ProductPage';+import { TaskMention } from '../workspace/frozen/TaskMention';+import { TaskNotebook } from '../workspace/frozen/TaskNotebook';+import { WorkspaceChannel } from '../workspace/WorkspaceChannel';+import { createGithubWorkspace, GITHUB_TASK } from './githubProject';+import { PrMention } from './ReviewPrMention';+import { PullRequestView } from './ReviewPullRequest';+import { signInPr } from './review-fixtures';+import '../workspace/dummy-workspace.css';+import './review-stories.css';++export function GithubPrHero() {+ const [changes, setChanges] = createSignal(true);+ return (+ <ProductDemo+ label="Pull request and code changes"+ height={640}+ mobileHeight={580}+ >+ <PullRequestView+ pr={signInPr}+ changes={changes()}+ onChanges={setChanges}+ />+ </ProductDemo>+ );+}++/** The same channel and PR, with independent local state for each scene. */+export function GithubConversationDemo(props: { agent?: boolean }) {+ const w = createGithubWorkspace(props.agent);+ const task = () => w.data.tasks.find((item) => item.id === GITHUB_TASK)!;+ let root!: HTMLDivElement;+ let trigger: HTMLElement | undefined;+ const [share, setShare] = createSignal(false);+ const [detail, setDetail] = createSignal<'pr' | 'task' | 'session'>();+ const [changes, setChanges] = createSignal(false);+ const [phase, setPhase] = createSignal(0);+ const [automatic, setAutomatic] = createSignal(true);+ createEffect(() => {+ detail();+ changes();+ queueMicrotask(() => {+ const log = root?.querySelector<HTMLElement>(+ '.github-conversation [role="log"]'+ );+ if (log) log.scrollTop = log.scrollHeight;+ });+ });+ const reply = () => {+ w.updateTask(GITHUB_TASK, {+ status: 'In Review',+ steps: task().steps.map((step) => ({ ...step, done: true })),+ });+ if (+ !w.data.channels[0].messages.some((item) => item.id === 'agent-result')+ ) {+ w.setData('channels', 0, 'messages', (all) => [+ ...all,+ {+ id: 'agent-result',+ person: 'cursor' as const,+ time: '10:14 AM',+ body: '',+ replyTo: 'request',+ },+ ]);+ queueMicrotask(() => {+ const log = root.querySelector<HTMLElement>('[role="log"]');+ if (log) log.scrollTop = log.scrollHeight;+ });+ }+ };+ const playback = createProductWalkthrough({+ root: () => root,+ steps: props.agent ? 2 : 5,+ reset: () => {},+ reduced: () => {+ if (props.agent) reply();+ else {+ setDetail('pr');+ setChanges(true);+ }+ setAutomatic(false);+ },+ delay: (step) =>+ props.agent+ ? ([0, 3500, 1200][step] ?? 1000)+ : ([0, 2600, 1000, 1600, 900, 1000][step] ?? 1000),+ advance: (step) => {+ setPhase(step);+ if (props.agent) {+ if (step === 1) reply();+ if (step === 2) setAutomatic(false);+ } else {+ if (step === 2) setDetail('pr');+ if (step === 4) setChanges(true);+ if (step === 5) setAutomatic(false);+ }+ },+ });+ const pause = () => {+ setAutomatic(false);+ playback.pause();+ };+ const open = (next: 'pr' | 'task' | 'session') => {+ pause();+ trigger =+ document.activeElement instanceof HTMLElement+ ? document.activeElement+ : undefined;+ setDetail(next);+ setChanges(false);+ queueMicrotask(() =>+ root.querySelector<HTMLButtonElement>('[data-detail-back]')?.focus()+ );+ };+ const back = () => {+ setDetail(undefined);+ setChanges(false);+ queueMicrotask(() => trigger?.isConnected && trigger.focus());+ };+ const pointer = createDemoPointer({+ frame: () => root,+ target: () =>+ automatic() && !props.agent && phase() > 0 && phase() < 5+ ? phase() < 3+ ? '[data-pr-mention]'+ : '[data-changes-toggle]'+ : undefined,+ });+ return (+ <div ref={root} class="review-flow-frame" onWheel={pause}>+ <ProductDemo+ label={+ props.agent+ ? 'A coding agent fixes the mobile sign-in task'+ : 'Open a pull request from the website channel'+ }+ height={650}+ mobileHeight={640}+ onInteract={pause}+ >+ <div+ class="github-surface"+ data-detail={detail() ?? ''}+ data-changes={changes()}+ onKeyDown={(event) => {+ if (event.key === 'Escape' && detail()) {+ event.stopPropagation();+ back();+ }+ }}+ >+ <div class="github-conversation">+ <WorkspaceChannel+ workspace={{+ ...w,+ openItem: (view, id) => {+ if (view === 'tasks') open('task');+ else if (view === 'agents') open('session');+ else w.openItem(view, id);+ },+ }}+ renderMessageBody={(message) =>+ message.id === 'pr' ? (+ <p class="review-message-body">+ fix is up:{' '}+ <PrMention+ pr={signInPr}+ status="open"+ onOpen={() => open('pr')}+ />+ </p>+ ) : message.id === 'request' ? (+ <p class="review-message-body">+ <DemoMention+ item={{ id: 'cursor', kind: 'person', label: 'Cursor' }}+ />{' '}+ can you fix this?+ </p>+ ) : message.id === 'task' ? (+ <p class="review-message-body">+ put the steps here:{' '}+ <TaskMention+ inline+ task={task()}+ onOpen={() => open('task')}+ />+ </p>+ ) : undefined+ }+ renderMessageDetails={(message) =>+ message.id === 'agent-result' ? (+ <DemoAgentChip+ agentSessionId="mobile-sign-in"+ requester="Julia"+ request="@Cursor can you fix this?"+ markdown="Fix mobile sign-in · 6 tests passed"+ headerActions={null}+ onOpen={() => open('session')}+ pullRequest={+ <button+ type="button"+ class="github-chip-pr"+ onClick={() => open('pr')}+ >+ <GitPullRequest class="size-4 shrink-0 text-success" />+ <span class="demo-cursor-pr-title">+ #491 · Fix mobile sign-in+ </span>+ <span class="demo-cursor-pr-stats">+ <span>+14</span>+ <span>−3</span>+ </span>+ </button>+ }+ />+ ) : undefined+ }+ />+ </div>+ <Show when={detail()}>+ <div class="github-detail">+ <div class="github-detail-back">+ <Button+ data-detail-back+ variant="plain"+ size="sm"+ onClick={back}+ >+ <ArrowLeft />+ Back to channel+ </Button>+ </div>+ <Show when={detail() === 'pr'}>+ <PullRequestView+ pr={signInPr}+ changes={changes()}+ onChanges={setChanges}+ />+ </Show>+ <Show when={detail() === 'task'}>+ <TaskNotebook+ workspace={{+ ...w,+ openItem: (view, id) => {+ if (view === 'messages') back();+ else w.openItem(view, id);+ },+ }}+ onShare={() => setShare(true)}+ task={task()}+ hideCollectionNavigation+ pills={+ <PrMention+ pr={signInPr}+ status="open"+ onOpen={() => open('pr')}+ />+ }+ sourceContent={+ <button type="button" onClick={back}>+ From #website+ </button>+ }+ />+ </Show>+ <Show when={detail() === 'session'}>+ <ViewShell.TopBar>+ <span class="text-sm font-medium">+ Cursor · Fix mobile sign-in+ </span>+ <Button+ variant="plain"+ size="sm"+ onClick={() => {+ setDetail('pr');+ setChanges(true);+ }}+ >+ Changes+ </Button>+ </ViewShell.TopBar>+ <div class="dummy-scroll agent-transcript github-session">+ <AgentTurn>+ <AgentPrompt text="Fix mobile sign-in. Repro steps are in WEB-42." />+ </AgentTurn>+ <AgentTurn>+ <AgentToolGroup+ calls={[+ { kind: 'read-channel', channel: 'website', count: 7 },+ { kind: 'read-document', title: 'Fix mobile sign-in' },+ {+ kind: 'action',+ label: 'Read SignIn.tsx and SignIn.test.tsx',+ },+ {+ kind: 'action',+ label: 'Use the form submit handler for both buttons',+ },+ {+ kind: 'action',+ label: 'Run sign-in tests: 6 passed',+ },+ { kind: 'action', label: 'Open pull request #491' },+ ]}+ />+ <AgentAnswer+ text="The mobile button had no submit action. Both buttons now submit the form. Mobile, desktop, Enter key, and error checks pass."+ mentions={{}}+ />+ <PrMention+ pr={signInPr}+ status="open"+ onOpen={() => setDetail('pr')}+ />+ </AgentTurn>+ </div>+ </Show>+ </div>+ </Show>+ </div>+ </ProductDemo>+ <DocumentShareSheet+ open={share()}+ title={task().title}+ autoFocus+ onClose={() => setShare(false)}+ />+ <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)` }}+ />+ )}+ </Show>+ </div>+ );+}++export function GithubTaskDemo() {+ const w = createGithubWorkspace();+ const task = () => w.data.tasks.find((item) => item.id === GITHUB_TASK)!;+ w.updateTask(GITHUB_TASK, { status: 'In Progress' });+ let root!: HTMLDivElement;+ const [linked, setLinked] = createSignal(false);+ const [merged, setMerged] = createSignal(false);+ const [prOpen, setPrOpen] = createSignal(false);+ const [confirm, setConfirm] = createSignal(false);+ const [phase, setPhase] = createSignal(0);+ const [automatic, setAutomatic] = createSignal(true);+ const [share, setShare] = createSignal(false);+ const [source, setSource] = createSignal(false);+ const link = () => {+ setLinked(true);+ w.updateTask(GITHUB_TASK, { status: 'In Review' });+ };+ const merge = () => {+ setMerged(true);+ setConfirm(false);+ w.updateTask(GITHUB_TASK, { status: 'Completed' });+ };+ const playback = createProductWalkthrough({+ root: () => root,+ steps: 8,+ reset: () => {},+ reduced: () => {+ link();+ merge();+ setAutomatic(false);+ },+ delay: (step) =>+ [0, 1800, 1300, 1000, 2000, 900, 1200, 1200, 1300][step] ?? 1000,+ advance: (step) => {+ setPhase(step);+ if (step === 1) link();+ if (step === 3) setPrOpen(true);+ if (step === 5) setConfirm(true);+ if (step === 7) merge();+ if (step === 8) {+ setPrOpen(false);+ setAutomatic(false);+ }+ },+ });+ const pause = () => {+ setAutomatic(false);+ playback.pause();+ };+ const pointer = createDemoPointer({+ frame: () => root,+ target: () =>+ !automatic()+ ? undefined+ : phase() >= 6 && phase() < 8+ ? '[data-confirm-merge]'+ : phase() >= 4 && phase() < 6+ ? '[data-merge]'+ : phase() >= 2 && phase() < 4+ ? '[data-pr-mention]'+ : undefined,+ });+ return (+ <div ref={root} class="review-flow-frame" onWheel={pause}>+ <ProductDemo+ label="A linked pull request updates its task"+ height={650}+ mobileHeight={700}+ onInteract={pause}+ >+ <div+ class="github-task-scene"+ data-pr-open={prOpen()}+ onKeyDown={(event) => {+ if (event.key === 'Escape' && !confirm()) {+ setPrOpen(false);+ setSource(false);+ }+ }}+ >+ <div class="github-task-document">+ <Show+ when={!source()}+ fallback={+ <>+ <Button+ variant="plain"+ size="sm"+ onClick={() => setSource(false)}+ >+ <ArrowLeft />+ Back to task+ </Button>+ <WorkspaceChannel workspace={w} />+ </>+ }+ >+ <TaskNotebook+ workspace={{+ ...w,+ openItem: (view, id) => {+ if (view === 'messages') setSource(true);+ else w.openItem(view, id);+ },+ }}+ onShare={() => setShare(true)}+ task={task()}+ hideCollectionNavigation+ pills={+ <Show when={linked()}>+ <PrMention+ pr={signInPr}+ status={merged() ? 'merged' : 'open'}+ onOpen={() => {+ pause();+ setPrOpen(true);+ }}+ />+ </Show>+ }+ sourceContent={+ <button+ type="button"+ class="text-sm text-ink-muted"+ onClick={() => setSource(true)}+ >+ From #website+ </button>+ }+ />+ </Show>+ </div>+ <Show when={prOpen()}>+ <div class="github-task-pr">+ <PullRequestView+ pr={signInPr}+ status={merged() ? 'merged' : 'open'}+ onMerge={merge}+ mergeRequested={confirm()}+ onMergeRequest={setConfirm}+ crumb={{ label: 'Task', onClick: () => setPrOpen(false) }}+ />+ </div>+ </Show>+ </div>+ </ProductDemo>+ <DocumentShareSheet+ open={share()}+ title={task().title}+ autoFocus+ onClose={() => setShare(false)}+ />+ <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)` }}+ />+ )}+ </Show>+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/reviews/ReviewChanges.tsx b/apps/marketing/src/features/marketing/components/reviews/ReviewChanges.tsxnew file mode 100644index 0000000000..941b598653--- /dev/null+++ b/apps/marketing/src/features/marketing/components/reviews/ReviewChanges.tsx@@ -0,0 +1,134 @@+import ArrowsOut from '@phosphor/arrows-out-simple.svg';+import Sidebar from '@phosphor/sidebar-simple.svg';+import X from '@phosphor/x.svg';+import { Button } from '@ui';+import { createSignal, For, onMount, Show } from 'solid-js';+import signInHtml from '../../assets/github-signin-0.html?raw';+import testsHtml from '../../assets/github-signin-1.html?raw';+import { ViewShell } from '../DemoWorkspaceChrome';++const files = [+ { path: 'src/auth/SignIn.tsx', html: signInHtml, additions: 3, deletions: 3 },+ {+ path: 'src/auth/SignIn.test.tsx',+ html: testsHtml,+ additions: 11,+ deletions: 0,+ },+];+/** Frozen native Changes header, file selection, and Pierre diff renderer. */+export function ReviewChanges(props: {+ onClose: () => void;+ expanded: boolean;+ onExpand: () => void;+}) {+ const [file, setFile] = createSignal(0);+ const [tree, setTree] = createSignal(false);+ return (+ <section class="github-changes" aria-label="Pull request changes">+ <ViewShell.TopBar>+ <span class="github-branch" title="web-42/mobile-sign-in → main">+ <strong class="github-diff-title">Fix mobile sign-in</strong>+ web-42/mobile-sign-in → main · #491+ </span>+ <span class="text-success text-xs">+14</span>+ <span class="text-failure text-xs">−3</span>+ <Button+ variant="plain"+ size="icon-sm"+ label={+ props.expanded+ ? 'Back to the split'+ : 'Expand changes to the full width'+ }+ onClick={props.onExpand}+ >+ <ArrowsOut />+ </Button>+ <Button+ variant="plain"+ size="icon-sm"+ label="Close the changes pane"+ onClick={props.onClose}+ >+ <X />+ </Button>+ </ViewShell.TopBar>+ <div class="github-diff-tools">+ <Button+ variant="plain"+ size="icon-sm"+ label={tree() ? 'Hide file tree' : 'Show file tree'}+ aria-expanded={tree()}+ onClick={() => setTree(!tree())}+ >+ <Sidebar />+ </Button>+ <span>2 files changed</span>+ </div>+ <Show when={tree()}>+ <nav class="github-file-tree" aria-label="Changed files">+ <For each={files}>+ {(item, index) => (+ <button+ type="button"+ aria-current={file() === index() ? 'true' : undefined}+ onClick={() => {+ setFile(index());+ setTree(false);+ }}+ >+ {item.path}+ </button>+ )}+ </For>+ </nav>+ </Show>+ <div class="github-diff-scroll">+ <For each={files}>+ {(item, index) => (+ <div>+ <button+ class="github-file-heading"+ type="button"+ aria-expanded={file() === index()}+ onClick={() => setFile(index())}+ >+ <span>{file() === index() ? '⌄' : '›'}</span>+ <span>{item.path}</span>+ <span class="text-success">+{item.additions}</span>+ <Show when={item.deletions}>+ <span class="text-failure">−{item.deletions}</span>+ </Show>+ </button>+ <Show when={file() === index()}>+ <FrozenDiff html={item.html} path={item.path} />+ </Show>+ </div>+ )}+ </For>+ </div>+ </section>+ );+}++function FrozenDiff(props: { html: string; path: string }) {+ let host!: HTMLDivElement;+ onMount(() => {+ host.attachShadow({ mode: 'open' }).innerHTML = props.html;+ });+ return (+ <div+ ref={host}+ class="github-diff-render"+ aria-label={`Changes to ${props.path}`}+ style={{+ '--diffs-font-family': 'var(--font-mono)',+ '--diffs-font-size': '12px',+ '--diffs-line-height': '22px',+ '--diffs-tab-size': '2',+ '--diffs-gap-block': '0',+ }}+ />+ );+}diff --git a/apps/marketing/src/features/marketing/components/reviews/ReviewHome.tsx b/apps/marketing/src/features/marketing/components/reviews/ReviewHome.tsxindex 9f198fe088..de7e169b2d 100644--- a/apps/marketing/src/features/marketing/components/reviews/ReviewHome.tsx+++ b/apps/marketing/src/features/marketing/components/reviews/ReviewHome.tsx@@ -36,11 +36,12 @@ import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';import { ViewSidebar } from '../DemoViewSidebar';import { ProductWorkspace } from '../product/ProductWorkspace';import { WorkspaceAgents } from '../workspace/WorkspaceAgents';+import { GITHUB_TASK, githubHistory, githubTask } from './githubProject';import { PrIcon, PullRequestView } from './ReviewPullRequest';import {type DemoPullRequest,- invitePr,onboardingPr,+ signInPr,} from './review-fixtures';/** One single-line HomeListEntity row and the item it opens. */@@ -62,20 +63,20 @@ export type HomeGroup = { label: string; rows: HomeRow[] };export const reviewRequestRow: HomeRow = {id: 'pr-491',kind: 'pr',- label: `${invitePr.title} #${invitePr.number}`,+ label: `${signInPr.title} #${signInPr.number}`,time: '11:36 AM',unread: true,- pr: invitePr,+ pr: signInPr,};const row = {engineers: {- id: 'channel-engineers',+ id: 'channel-website',kind: 'channel',- label: 'engineers',+ label: 'website',time: '11:17 AM',unread: true,- open: { view: 'messages', id: 'engineers' },+ open: { view: 'messages', id: 'website' },},dm: {id: 'dm-teo',@@ -126,9 +127,9 @@ const row = {invite: {id: 'task-invite',kind: 'task',- label: 'Fix the team invite handoff',+ label: 'Fix mobile sign-in',time: '8:31 AM',- open: { view: 'tasks', id: 'invite' },+ open: { view: 'tasks', id: GITHUB_TASK },},} satisfies Record<string, HomeRow>;@@ -158,6 +159,21 @@ export function createHomeInbox(options: {pending?: string[];}) {const w = createDummyWorkspace('home');+ w.setData('channels', (channels) => [+ ...channels,+ {+ id: 'website',+ messages: githubHistory.map((message) => ({ ...message })),+ },+ ]);+ w.setData('tasks', (tasks) => [+ ...tasks,+ {+ ...githubTask,+ steps: githubTask.steps.map((step) => ({ ...step })),+ comments: [...githubTask.comments],+ },+ ]);w.setData('documents', (doc) => doc.id === 'plan', 'comments', [{id: 'plan-screenshots',diff --git a/apps/marketing/src/features/marketing/components/reviews/ReviewPrMention.tsx b/apps/marketing/src/features/marketing/components/reviews/ReviewPrMention.tsxindex 278dea8d5a..774e260add 100644--- a/apps/marketing/src/features/marketing/components/reviews/ReviewPrMention.tsx+++ b/apps/marketing/src/features/marketing/components/reviews/ReviewPrMention.tsx@@ -47,7 +47,10 @@ export function PrMention(props: {onBlur={(event) => props.onHover?.(false, event)}onClick={open}onKeyDown={(event) => {- if (event.key === 'Enter') open(event);+ if (event.key === 'Enter') {+ event.preventDefault();+ open(event);+ }}}><span class="review-pr-mention-icon">diff --git a/apps/marketing/src/features/marketing/components/reviews/ReviewPullRequest.tsx b/apps/marketing/src/features/marketing/components/reviews/ReviewPullRequest.tsxindex 9a2c6ad9f2..6e065769af 100644--- a/apps/marketing/src/features/marketing/components/reviews/ReviewPullRequest.tsx+++ b/apps/marketing/src/features/marketing/components/reviews/ReviewPullRequest.tsx@@ -4,7 +4,8 @@ import CaretDown from '@phosphor/caret-down.svg';import CaretRight from '@phosphor/caret-right.svg';import GitMerge from '@phosphor/git-merge.svg';import GitPullRequest from '@phosphor/git-pull-request.svg';-import { Button, cn } from '@ui';+import SquareSplit from '@phosphor/square-split-horizontal.svg';+import { Button, cn, Dialog } from '@ui';import { ToggleSwitch } from '@ui/components/ToggleSwitch';import { createSignal, For, type JSX, Show } from 'solid-js';import {@@ -13,6 +14,7 @@ import {} from '../../core/homepage-demo-people';import { DemoMarkdown } from '../DemoMarkdown';import { ViewShell } from '../DemoWorkspaceChrome';+import { ReviewChanges } from './ReviewChanges';import type {DemoGithubComment,DemoPullRequest,@@ -115,122 +117,215 @@ function GithubComment(props: { comment: DemoGithubComment; reply?: boolean }) {/*** block-pr's PrDetail: title, status/author/repo/size pills, the GitHub- * description, and the read-only "Discussion" timeline. There is no diff;- * Open on GitHub covers the code.+ * description, read-only discussion, and a local Changes pane.*/export function PullRequestView(props: {pr: DemoPullRequest;status?: PrStatus;+ changes?: boolean;+ onChanges?: (open: boolean) => void;+ onMerge?: () => void;+ mergeRequested?: boolean;+ onMergeRequest?: (open: boolean) => void;/** Where the PR was opened from, e.g. Home's return breadcrumb. */crumb?: { label: string; onClick: () => void };}) {const status = () => props.status ?? props.pr.status;+ const [localChanges, setLocalChanges] = createSignal(false);+ const [spotlit, setSpotlit] = createSignal(false);+ const [localConfirm, setLocalConfirm] = createSignal(false);+ const changes = () => props.changes ?? localChanges();+ const toggleChanges = (open: boolean) => {+ setLocalChanges(open);+ props.onChanges?.(open);+ };+ const confirm = () => props.mergeRequested ?? localConfirm();+ const setConfirm = (open: boolean) => {+ setLocalConfirm(open);+ props.onMergeRequest?.(open);+ };+ let mount!: HTMLDivElement;const [expanded, setExpanded] = createSignal(true);const [hideBots, setHideBots] = createSignal(false);const bots = () => props.pr.comments.filter((c) => isBot(c.login)).length;const comments = () =>props.pr.comments.filter((c) => !hideBots() || !isBot(c.login));return (- <>- <ViewShell.TopBar>- <Show when={props.crumb}>- {(crumb) => (- <>- <button- type="button"- class="text-sm text-ink-muted"- onClick={() => crumb().onClick()}+ <div+ ref={mount}+ class="review-pr-layout"+ data-changes={changes()}+ data-spotlit={spotlit()}+ onKeyDown={(event) => {+ if (event.key === 'Escape' && changes() && !confirm()) {+ event.stopPropagation();+ toggleChanges(false);+ }+ }}+ >+ <div class="review-pr-document">+ <ViewShell.TopBar>+ <Show when={props.crumb}>+ {(crumb) => (+ <>+ <button+ type="button"+ class="text-sm text-ink-muted"+ onClick={() => crumb().onClick()}+ >+ {crumb().label}+ </button>+ <span class="text-ink-muted px-1">›</span>+ </>+ )}+ </Show>+ <PrIcon status={status()} class="shrink-0" />+ <span class="min-w-0 truncate text-sm font-semibold">+ {props.pr.title}+ </span>+ <div class="ml-auto flex shrink-0 items-center gap-2 pr-1">+ <Show when={props.onMerge && status() === 'open'}>+ <Button+ data-merge+ variant="outline"+ size="sm"+ onClick={() => setConfirm(true)}>- {crumb().label}- </button>- <span class="text-ink-muted px-1">›</span>- </>- )}- </Show>- <PrIcon status={status()} class="shrink-0" />- <span class="min-w-0 truncate text-sm font-semibold">- {props.pr.title}- </span>- <div class="ml-auto flex shrink-0 items-center gap-2 pr-1">- <Button variant="outline" size="sm">- Open on GitHub- </Button>- </div>- </ViewShell.TopBar>- <div class="dummy-scroll">- <div class="review-pr" data-pr={props.pr.number}>- <h1>{props.pr.title}</h1>- <div class="review-pr-meta">- <Pill class={STATUS_CLASS[status()]}>- <PrIcon status={status()} class="size-3 shrink-0" />- {status().charAt(0).toUpperCase() + status().slice(1)}- </Pill>- <Pill class="text-ink-muted">- <DemoAvatar person={props.pr.author} class="size-3.5" />- {props.pr.login}- </Pill>- <Pill class="text-ink-muted">{prRef(props.pr)}</Pill>- <Pill>- <span class="text-success">+{props.pr.additions}</span>- <span class="text-failure">−{props.pr.deletions}</span>- </Pill>- </div>- <div class="review-pr-description">- <DemoMarkdown markdown={props.pr.description} />- </div>- <section class="review-pr-timeline" aria-label="Discussion">- <div class="review-pr-timeline-head">- <span class="review-pr-rule review-pr-rule-short" />- <button- type="button"- aria-expanded={expanded()}- onClick={() => setExpanded(!expanded())}+ <GitMerge class="size-3.5" />+ Merge+ </Button>+ </Show>+ <Show when={props.pr.number === 491}>+ <Button+ data-changes-toggle+ variant="plain"+ size="sm"+ label="Changes"+ aria-pressed={changes()}+ onClick={() => toggleChanges(!changes())}>- <Show- when={expanded()}- fallback={<CaretRight class="size-3" />}+ <SquareSplit class="size-3.5" />+ <span class="github-changes-label">Changes</span>+ </Button>+ </Show>+ </div>+ </ViewShell.TopBar>+ <div class="dummy-scroll">+ <div class="review-pr" data-pr={props.pr.number}>+ <h1>{props.pr.title}</h1>+ <div class="review-pr-meta">+ <Pill class={STATUS_CLASS[status()]}>+ <PrIcon status={status()} class="size-3 shrink-0" />+ {status().charAt(0).toUpperCase() + status().slice(1)}+ </Pill>+ <Pill class="text-ink-muted">+ <DemoAvatar person={props.pr.author} class="size-3.5" />+ {props.pr.login}+ </Pill>+ <Pill class="text-ink-muted">+ {props.pr.repo.split('/').at(-1)} #{props.pr.number}+ </Pill>+ <Pill>+ <span class="text-success">+{props.pr.additions}</span>+ <span class="text-failure">−{props.pr.deletions}</span>+ </Pill>+ </div>+ <div class="review-pr-description">+ <DemoMarkdown markdown={props.pr.description} />+ </div>+ <section class="review-pr-timeline" aria-label="Discussion">+ <div class="review-pr-timeline-head">+ <span class="review-pr-rule review-pr-rule-short" />+ <button+ type="button"+ aria-expanded={expanded()}+ onClick={() => setExpanded(!expanded())}>- <CaretDown class="size-3" />+ <Show+ when={expanded()}+ fallback={<CaretRight class="size-3" />}+ >+ <CaretDown class="size-3" />+ </Show>+ Discussion+ </button>+ <span class="review-pr-rule" />+ <Show when={bots() > 0}>+ <ToggleSwitch+ class="shrink-0"+ checked={hideBots()}+ onChange={setHideBots}+ label={`Hide bots (${bots()})`}+ labelClass="text-xs text-ink-muted"+ /></Show>- Discussion- </button>- <span class="review-pr-rule" />- <Show when={bots() > 0}>- <ToggleSwitch- class="shrink-0"- checked={hideBots()}- onChange={setHideBots}- label={`Hide bots (${bots()})`}- labelClass="text-xs text-ink-muted"- />- </Show>- </div>- <Show when={expanded()}>- <div class="review-pr-comments">- <For each={comments()}>- {(comment) => (- <div- class="review-gh-thread"- data-thread-open={- comment.replies?.length ? 'true' : undefined- }- >- <GithubComment comment={comment} />- <Show when={comment.replies?.length}>- <div class="review-gh-replies">- <For each={comment.replies}>- {(reply) => <GithubComment comment={reply} reply />}- </For>- </div>- </Show>- </div>- )}- </For></div>- </Show>- </section>+ <Show when={expanded()}>+ <div class="review-pr-comments">+ <For each={comments()}>+ {(comment) => (+ <div+ class="review-gh-thread"+ data-thread-open={+ comment.replies?.length ? 'true' : undefined+ }+ >+ <GithubComment comment={comment} />+ <Show when={comment.replies?.length}>+ <div class="review-gh-replies">+ <For each={comment.replies}>+ {(reply) => (+ <GithubComment comment={reply} reply />+ )}+ </For>+ </div>+ </Show>+ </div>+ )}+ </For>+ </div>+ </Show>+ </section>+ </div></div></div>- </>+ <Show when={changes()}>+ <ReviewChanges+ expanded={spotlit()}+ onExpand={() => setSpotlit(!spotlit())}+ onClose={() => {+ toggleChanges(false);+ setSpotlit(false);+ }}+ />+ </Show>+ <Dialog+ mount={mount}+ open={confirm()}+ onOpenChange={setConfirm}+ position="center"+ class="github-merge-dialog"+ >+ <Dialog.Title>Merge pull request?</Dialog.Title>+ <Dialog.Description>+ Merge {props.pr.title} into main.+ </Dialog.Description>+ <div class="flex justify-end gap-2 mt-6">+ <Button variant="plain" onClick={() => setConfirm(false)}>+ Cancel+ </Button>+ <Button+ data-confirm-merge+ variant="outline"+ onClick={() => {+ setConfirm(false);+ props.onMerge?.();+ }}+ >+ Merge pull request+ </Button>+ </div>+ </Dialog>+ </div>);}diff --git a/apps/marketing/src/features/marketing/components/reviews/ReviewStories.test.tsx b/apps/marketing/src/features/marketing/components/reviews/ReviewStories.test.tsxindex 52cfd0ca0e..89745aa54a 100644--- a/apps/marketing/src/features/marketing/components/reviews/ReviewStories.test.tsx+++ b/apps/marketing/src/features/marketing/components/reviews/ReviewStories.test.tsx@@ -1,6 +1,11 @@import { cleanup, fireEvent, render, within } from '@solidjs/testing-library';import { afterEach, beforeEach, expect, it, vi } from 'vitest';-import { GithubHomeHero, PrLinkDemo, ReviewInboxDemo } from './ReviewStories';+import {+ GithubConversationDemo,+ GithubPrHero,+ GithubTaskDemo,+} from './GithubWorkflow';+import { PrLinkDemo, ReviewInboxDemo } from './ReviewStories';let intersections: IntersectionObserverCallback[];let motionListeners: (() => void)[];@@ -13,6 +18,7 @@ beforeEach(() => {hidden = false;vi.useFakeTimers();vi.stubGlobal('fetch', vi.fn());+ vi.stubGlobal('scrollTo', vi.fn());vi.spyOn(document, 'hidden', 'get').mockImplementation(() => hidden);vi.stubGlobal('matchMedia', () => ({get matches() {@@ -58,139 +64,149 @@ function visible(value: boolean) {);}-const REQUEST = 'Keep the invited team through sign-up #491';+const REQUEST = 'Fix mobile sign-in #491';const home = (view: ReturnType<typeof render>) =>within(view.getByRole('complementary', { name: 'Home' }));-it('delivers a review request to Home, opens the pull request, then marks it done', () => {+it('opens a review request and leaves it until the visitor marks it done', () => {const view = render(() => <ReviewInboxDemo />);- expect(home(view).queryByRole('button', { name: REQUEST })).toBeNull();visible(true);- vi.advanceTimersByTime(900);- const request = home(view).getByRole('button', { name: REQUEST });- expect(within(request).getByRole('img', { name: 'Unread' })).toBeTruthy();- expect(home(view).getByText('Last few minutes')).toBeTruthy();- vi.advanceTimersByTime(2000);- expect(- view.getByRole('heading', { name: 'Keep the invited team through sign-up' })- ).toBeTruthy();- expect(view.getByText('launch-team/web#491')).toBeTruthy();- expect(view.getByText('src/invite/accept-invite.ts:42')).toBeTruthy();- expect(view.getByRole('button', { name: 'Open on GitHub' })).toBeTruthy();- expect(within(request).queryByRole('img', { name: 'Unread' })).toBeNull();- vi.advanceTimersByTime(2600);- expect(home(view).queryByRole('button', { name: REQUEST })).toBeNull();- expect(view.getByRole('status').textContent).toContain('Marked as done');+ vi.advanceTimersByTime(30000);expect(home(view)- .getByRole('button', { name: 'engineers' })+ .getByRole('button', { name: REQUEST }).getAttribute('aria-current')).toBe('page');+ expect(view.queryByText('Marked as done')).toBeNull();+ fireEvent.keyDown(view.getByRole('heading', { name: 'Fix mobile sign-in' }), {+ key: 'e',+ });+ expect(home(view).queryByRole('button', { name: REQUEST })).toBeNull();fireEvent.click(view.getByRole('button', { name: 'Undo' }));expect(home(view).getByRole('button', { name: REQUEST })).toBeTruthy();- vi.advanceTimersByTime(30000);- expect(vi.getTimerCount()).toBe(0);});-it('shows the review request open, without a cursor, for reduced motion', () => {+it('shows the request without motion and keeps GitHub discussion read-only', () => {reduced = true;const view = render(() => <ReviewInboxDemo />);- expect(- home(view)- .getByRole('button', { name: REQUEST })- .getAttribute('aria-current')- ).toBe('page');- expect(view.getByText('src/invite/accept-invite.ts:42')).toBeTruthy();+ expect(view.getByText('src/auth/SignIn.tsx:18')).toBeTruthy();expect(view.container.querySelector('.demo-cursor')).toBeNull();+ expect(view.queryByRole('switch', { name: /Hide bots/ })).toBeNull();+ expect(view.queryByText('No issues found in this change.')).toBeNull();+ expect(view.getByText(/both go through the form now/)).toBeTruthy();});-it('lets a visitor open Home items, filter bots, and press E to mark a PR done', () => {- const view = render(() => <GithubHomeHero />);+it('opens PR changes and returns to the conversation without losing the conversation', async () => {+ const view = render(() => <PrLinkDemo />);+ await Promise.resolve();+ expect(view.getByRole('log', { name: 'Channel website' })).toBeTruthy();expect(- view.getByRole('heading', { name: 'Keep the invited team through sign-up' })- ).toBeTruthy();- fireEvent.click(view.getByRole('switch', { name: 'Hide bots (1)' }));- expect(view.queryByText(/Bugbot reviewed/)).toBeNull();- expect(view.getByText(/Expired invites go to the error page/)).toBeTruthy();- fireEvent.click(- home(view).getByRole('button', {- name: 'Shorten the onboarding checklist #479',+ fireEvent.keyDown(view.getByRole('link', { name: REQUEST }), {+ key: 'Enter',})- );+ ).toBe(false);expect(- view.getByRole('heading', { name: 'Shorten the onboarding checklist' })+ view.getByRole('heading', { name: 'Fix mobile sign-in' })).toBeTruthy();- expect(view.getByText('Merged')).toBeTruthy();- fireEvent.keyDown(- view.getByRole('heading', { name: 'Shorten the onboarding checklist' }),- { key: 'e' }- );+ fireEvent.click(view.getByRole('button', { name: 'Changes' }));expect(- home(view).queryByRole('button', {- name: 'Shorten the onboarding checklist #479',- })- ).toBeNull();- expect(view.getByRole('status').textContent).toContain('Marked as done');+ view.getByRole('region', { name: 'Pull request changes' })+ ).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Close the changes pane' }));+ fireEvent.click(view.getByRole('button', { name: 'Back to channel' }));+ visible(true);+ vi.advanceTimersByTime(30000);expect(- home(view)- .getByRole('button', { name: 'Next steps for our team' })- .getAttribute('aria-current')- ).toBe('page');+ view.queryByRole('heading', { name: 'Fix mobile sign-in' })+ ).toBeNull();+ expect(view.getByText('thanks, checking now')).toBeTruthy();});-/** jsdom has no layout; give the overlays a box to measure. */-function layout() {- vi.spyOn(HTMLElement.prototype, 'getBoundingClientRect').mockReturnValue({- x: 40,- y: 120,- left: 40,- top: 120,- right: 340,- bottom: 144,- width: 300,- height: 24,- toJSON: () => ({}),- });-}--it('previews a pull request link on hover and follows it to merged', () => {- layout();+it('finishes the conversation walkthrough on readable changes, without merging', () => {const view = render(() => <PrLinkDemo />);- const link = view.getByRole('link', { name: REQUEST });- expect(link.getAttribute('data-status')).toBe('open');- expect(view.queryByRole('dialog')).toBeNull();visible(true);- vi.advanceTimersByTime(2250);- const card = view.getByRole('dialog', {- name: 'Preview of launch-team/web#491',- });- expect(card.textContent).toContain('open');- expect(card.textContent).toContain('+38');- expect(card.textContent).toContain('12 passed');- expect(view.container.querySelector('.demo-cursor')).toBeTruthy();- vi.advanceTimersByTime(2200);- expect(link.getAttribute('data-status')).toBe('merged');- expect(card.textContent).toContain('merged');- fireEvent.click(link);- expect(- view.getByRole('heading', { name: 'Keep the invited team through sign-up' })+ vi.advanceTimersByTime(30000);+ expect(+ view.getByRole('region', { name: 'Pull request changes' })).toBeTruthy();- fireEvent.click(view.getByRole('button', { name: '#launch' }));- expect(view.getByRole('log', { name: 'Channel launch' })).toBeTruthy();+ expect(+ view.getByRole('link', { name: REQUEST }).getAttribute('data-status')+ ).toBe('open');+ expect(view.container.querySelector('.demo-cursor')).toBeNull();});-it('opens the preview for a visitor who hovers the link', () => {- layout();- const view = render(() => <PrLinkDemo />);- const link = view.getByRole('link', { name: REQUEST });- fireEvent.mouseEnter(link);- vi.advanceTimersByTime(50);+it('changes files and closes the hero changes pane', () => {+ const view = render(() => <GithubPrHero />);+ fireEvent.click(view.getByRole('button', { name: /SignIn.test.tsx/ }));+ expect(+ view.getByLabelText('Changes to src/auth/SignIn.test.tsx').shadowRoot+ ?.textContent+ ).toContain('signs in at');+ fireEvent.click(view.getByRole('button', { name: 'Close the changes pane' }));expect(- view.getByRole('dialog', { name: 'Preview of launch-team/web#491' })+ view.queryByRole('region', { name: 'Pull request changes' })+ ).toBeNull();+ fireEvent.click(view.getByRole('button', { name: 'Changes' }));+ expect(+ view.getByRole('region', { name: 'Pull request changes' })).toBeTruthy();- fireEvent.mouseLeave(link);- expect(view.queryByRole('dialog', { hidden: true })).toBeNull();+});++it('syncs the task after a confirmed merge and does not change its checklist', () => {+ const view = render(() => <GithubTaskDemo />);visible(true);+ vi.advanceTimersByTime(1800);+ expect(+ view.getAllByRole('button', { name: 'Change status' })[0].textContent+ ).toContain('In Review');+ fireEvent.click(view.getByRole('link', { name: REQUEST }));+ fireEvent.click(view.getByRole('button', { name: 'Merge' }));+ fireEvent.click(view.getByRole('button', { name: 'Cancel' }));+ expect(+ view.getAllByRole('button', { name: 'Change status' })[0].textContent+ ).toContain('In Review');+ fireEvent.click(view.getByRole('button', { name: 'Merge' }));+ fireEvent.click(view.getByRole('button', { name: 'Merge pull request' }));+ expect(+ view.getAllByRole('button', { name: 'Change status' })[0].textContent+ ).toContain('Completed');+ expect(+ view+ .getAllByRole('checkbox')+ .filter(+ (el) =>+ el.getAttribute('aria-checked') === 'true' ||+ (el as HTMLInputElement).checked+ )+ ).toHaveLength(2);vi.advanceTimersByTime(30000);- expect(link.getAttribute('data-status')).toBe('open');+ expect(+ view.getByRole('heading', { name: 'Fix mobile sign-in' })+ ).toBeTruthy();+});++it('shows one coding-agent response with an openable session and PR', async () => {+ const view = render(() => <GithubConversationDemo agent />);+ visible(true);+ vi.advanceTimersByTime(10000);+ await Promise.resolve();+ expect(+ view.container.querySelectorAll('[data-magic-chip="mobile-sign-in"]')+ ).toHaveLength(1);+ expect(view.getByText('#491 · Fix mobile sign-in')).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Open session' }));+ expect(view.getByText('Cursor · Fix mobile sign-in')).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Changes' }));+ expect(+ view.getByRole('region', { name: 'Pull request changes' })+ ).toBeTruthy();+});++it('uses completed local states for reduced motion', () => {+ reduced = true;+ const view = render(() => <GithubTaskDemo />);+ expect(+ view.getAllByRole('button', { name: 'Change status' })[0].textContent+ ).toContain('Completed');+ expect(view.container.querySelector('.demo-cursor')).toBeNull();});diff --git a/apps/marketing/src/features/marketing/components/reviews/ReviewStories.tsx b/apps/marketing/src/features/marketing/components/reviews/ReviewStories.tsxindex 0b752b5440..a3a9a712c4 100644--- a/apps/marketing/src/features/marketing/components/reviews/ReviewStories.tsx+++ b/apps/marketing/src/features/marketing/components/reviews/ReviewStories.tsx@@ -1,43 +1,23 @@-import Hash from '@phosphor/hash.svg';-import Phone from '@phosphor/phone.svg';-import Sparkle from '@phosphor/sparkle.svg';-import UserPlus from '@phosphor/user-plus.svg';-import { Button } from '@ui';import {type Accessor,createEffect,createSignal,- For,- Match,onCleanup,onMount,Show,- Switch,} from 'solid-js';-import type { WorkspaceComment } from '../../core/dummy-workspace';-import { homepagePeople } from '../../core/homepage-demo-people';import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';import { DemoCursor } from '../DemoCursor';-import { DemoMentionText } from '../DemoMention';-import { ViewShell } from '../DemoWorkspaceChrome';-import { ChannelComposer } from '../email/frozen/ChannelComposer';import { ProductDemo } from '../product/ProductPage';-import { Segments } from '../workspace/frozen/DetailPanel';-import { MessageRow } from '../workspace/frozen/MessageRow';import {arrivalGroups,createHomeInbox,DoneToast,HomeDetail,- HomeRail,HomeSidebar,- heroGroups,markDoneOnE,reviewRequestRow,} from './ReviewHome';-import { PrMention, PrPreviewCard } from './ReviewPrMention';-import { PullRequestView } from './ReviewPullRequest';-import { invitePr, type PrStatus } from './review-fixtures';import '../workspace/dummy-workspace.css';import './review-stories.css';@@ -90,38 +70,17 @@ const pointAt = (target: DOMRect, frame: DOMRect): Point => ({y: target.top - frame.top + target.height / 2,});-/** Hero: Home with a review request open, every row clickable. */-export function GithubHomeHero() {- const inbox = createHomeInbox({ groups: heroGroups, initial: 'pr-491' });- return (- <ProductDemo label="Explore pull requests in Home">- <div- class="review-home"- data-pane={inbox.pane()}- onKeyDown={markDoneOnE(inbox)}- >- <HomeRail />- <HomeSidebar inbox={inbox} />- <div class="dummy-main review-home-main">- <HomeDetail inbox={inbox} />- </div>- <DoneToast inbox={inbox} />- </div>- </ProductDemo>- );-}-/*** A review request arrives at the top of Home. Jacob opens it, reads the PR,- * and marks it done (E), which removes it and opens the next item.- * Phases: 0 Home, 1 request arrives, 2 point at it, 3 open, 4 done.+ * then the demo stays put until the visitor marks it done.+ * Phases: 0 Home, 1 request arrives, 2 point at it, 3 open.*/export function ReviewInboxDemo() {let root!: HTMLDivElement;let frame!: HTMLDivElement;const inbox = createHomeInbox({groups: arrivalGroups,- initial: 'channel-engineers',+ initial: 'channel-website',pending: ['pr-491'],});const [phase, setPhase] = createSignal(0);@@ -133,7 +92,7 @@ export function ReviewInboxDemo() {};const playback = createProductWalkthrough({root: () => root,- steps: 4,+ steps: 3,reset: () => {},// A still frame is most useful with the pull request open.reduced: openRequest,@@ -141,10 +100,7 @@ export function ReviewInboxDemo() {advance: (step) => {if (step === 1) arrive();if (step === 3) openRequest();- if (step === 4) {- inbox.markDone(reviewRequestRow.id);- setAutomatic(false);- }+ if (step === 3) setAutomatic(false);setPhase(step);},});@@ -159,7 +115,7 @@ export function ReviewInboxDemo() {automatic()? [undefined,- '[data-home-row="channel-engineers"]',+ '[data-home-row="channel-website"]','[data-home-row="pr-491"]','[data-home-row="pr-491"]',][phase()]@@ -205,266 +161,4 @@ export function ReviewInboxDemo() {);}-const CHANNEL_TABS = ['Messages', 'Attachments', 'Calls', 'Participants'];--/**- * A pull request link in a channel renders as a mention; hovering it shows- * the preview card, and the mention follows the PR when it merges.- * Phases: 0 channel, 1 cursor in, 2 hover the link, 3 card, 4 merged.- */-export function PrLinkDemo() {- let root!: HTMLDivElement;- let frame!: HTMLDivElement;- const [phase, setPhase] = createSignal(0);- const [automatic, setAutomatic] = createSignal(true);- const [status, setStatus] = createSignal<PrStatus>('open');- const [hovered, setHovered] = createSignal(false);- const [opened, setOpened] = createSignal(false);- const [tab, setTab] = createSignal('Messages');- const [reacted, setReacted] = createSignal<string[]>([]);- const [sent, setSent] = createSignal<WorkspaceComment[]>([]);- const playback = createProductWalkthrough({- root: () => root,- steps: 4,- reset: () => {},- reduced: () => {- setHovered(true);- setStatus('merged');- },- delay: (step) => [0, 700, 900, 600, 2200][step] ?? 1400,- advance: (step) => {- setPhase(step);- if (step === 3) setHovered(true);- if (step === 4) setStatus('merged');- },- });- const pause = () => {- setAutomatic(false);- playback.pause();- };- // Hover moves between the link and its card without closing it.- const hover = (next: boolean, event: MouseEvent | FocusEvent) => {- pause();- const related = event.relatedTarget as Node | null;- if (!next && related && frame.contains(related)) {- const element = related instanceof Element ? related : null;- if (element?.closest('[data-pr-mention], .review-pr-card')) return;- }- setHovered(next);- };- const pointer = trackTarget({- frame: () => frame,- selector: () =>- automatic() && phase() >= 1- ? phase() === 1- ? '[data-message="staging"] p'- : '[data-pr-mention]'- : undefined,- measure: pointAt,- });- const cardOpen = () => hovered() && !opened() && tab() === 'Messages';- const card = trackTarget({- frame: () => frame,- selector: () => (cardOpen() ? '[data-pr-mention]' : undefined),- measure: (target, bounds) => ({- x: Math.max(- 8,- Math.min(target.left - bounds.left, bounds.width - CARD_WIDTH - 8)- ),- y: target.bottom - bounds.top + 8,- }),- });- const react = (id: string) =>- setReacted((ids) =>- ids.includes(id) ? ids.filter((x) => x !== id) : [...ids, id]- );- const message = (- id: string,- person: WorkspaceComment['person'],- time: string,- body = ''- ) => ({- id,- person,- time,- body,- reactions: reacted().includes(id) ? ['jacob' as const] : undefined,- });- return (- <div ref={root} class="review-flow">- <div ref={frame} class="review-flow-frame" onFocusIn={pause}>- <ProductDemo- label="Hover a pull request link in a channel to see its status"- onInteract={pause}- height={470}- mobileHeight={560}- >- <Show- when={!opened()}- fallback={- <PullRequestView- pr={invitePr}- status={status()}- crumb={{ label: '#launch', onClick: () => setOpened(false) }}- />- }- >- <ViewShell.TopBar>- <Hash class="size-4" />- <span class="text-sm font-medium">launch</span>- <Segments- label="Conversation view"- items={CHANNEL_TABS}- value={tab()}- onChange={setTab}- />- <div class="ml-auto flex items-center gap-1">- <Button size="sm" variant="plain" class="review-channel-invite">- <UserPlus class="size-3" />- Invite- </Button>- <Button size="sm" variant="plain">- <Phone class="size-3" />- Call- </Button>- <Button size="sm" variant="plain">- <Sparkle class="size-3" />- Ask Macro- </Button>- </div>- </ViewShell.TopBar>- <div- class="dummy-scroll sample-chat-log review-channel-log"- role="log"- aria-label="Channel launch"- >- <Switch- fallback={- <p class="py-12 text-center text-sm text-ink-muted">- {tab() === 'Calls'- ? 'No calls in this channel'- : 'No documents in this channel yet.'}- </p>- }- >- <Match when={tab() === 'Participants'}>- <For each={['jacob', 'julia', 'teo', 'gabriel'] as const}>- {(person) => (- <div class="flex items-center gap-3 py-3">- <img- class="size-8 rounded-full"- alt=""- src={homepagePeople[person].photo}- />- {homepagePeople[person].name}- </div>- )}- </For>- </Match>- <Match when={tab() === 'Messages'}>- <div class="sample-date-divider">- <span>Today</span>- </div>- <div class="sample-channel-thread" data-message="staging">- <MessageRow- message={message(- 'staging',- 'gabriel',- '9:58 AM',- 'staging still drops new people into their personal workspace after they accept an invite'- )}- onReact={() => react('staging')}- />- </div>- <div class="sample-channel-thread" data-message="fix">- <MessageRow- message={message('fix', 'teo', '10:14 AM')}- onReact={() => react('fix')}- >- <p class="review-message-body">- fix is up:{' '}- <PrMention- pr={invitePr}- status={status()}- hovered={hovered() || (automatic() && phase() >= 2)}- onHover={hover}- onOpen={() => {- pause();- setHovered(false);- setOpened(true);- }}- />- <DemoMentionText text=" @[Jacob](demo-mention:jacob) can you review before Thursday?" />- </p>- </MessageRow>- </div>- <div class="sample-channel-thread" data-message="announce">- <MessageRow- message={message(- 'announce',- 'julia',- '10:16 AM',- 'if it lands today I’ll send the announcement tomorrow morning'- )}- onReact={() => react('announce')}- />- </div>- <For each={sent()}>- {(item) => (- <div class="sample-channel-thread">- <MessageRow message={item} />- </div>- )}- </For>- </Match>- </Switch>- </div>- <Show when={tab() === 'Messages'}>- <div class="dummy-composer sample-chat-composer">- <ChannelComposer- richMentions- label="Message #launch"- placeholder="Type @ to share with #launch"- onSend={(body) =>- setSent((items) => [- ...items,- {- id: `sent-${items.length}`,- person: 'jacob',- time: '10:20 AM',- body,- },- ])- }- />- </div>- </Show>- </Show>- </ProductDemo>- <Show when={cardOpen()}>- <PrPreviewCard- pr={invitePr}- status={status()}- class="review-flow-card"- style={{- transform: `translate(${card()?.x ?? 0}px, ${card()?.y ?? 0}px)`,- visibility: card() ? undefined : 'hidden',- }}- onHover={hover}- />- </Show>- <Show when={pointer()}>- {(p) => (- <DemoCursor- label="Jacob"- class="review-flow-pointer"- style={{ transform: `translate(${p().x}px, ${p().y}px)` }}- />- )}- </Show>- </div>- </div>- );-}--const CARD_WIDTH = 320;+export { GithubConversationDemo as PrLinkDemo } from './GithubWorkflow';diff --git a/apps/marketing/src/features/marketing/components/reviews/githubProject.ts b/apps/marketing/src/features/marketing/components/reviews/githubProject.tsnew file mode 100644index 0000000000..fb07764e0d--- /dev/null+++ b/apps/marketing/src/features/marketing/components/reviews/githubProject.ts@@ -0,0 +1,180 @@+import type {+ WorkspaceComment,+ WorkspaceTask,+} from '../../core/dummy-workspace';+import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';++export const GITHUB_TASK = 'web-42';+export const githubHistory: WorkspaceComment[] = [+ {+ id: 'morning',+ person: 'julia',+ time: '8:42 AM',+ body: 'doing a last pass on the site this morning',+ },+ {+ id: 'screenshots',+ person: 'valentina',+ time: '8:44 AM',+ body: 'new screenshots are in. refresh if you still see the old ones',+ replyTo: 'morning',+ },+ {+ id: 'footer',+ person: 'teo',+ time: '9:02 AM',+ body: 'footer links are fixed',+ },+ {+ id: 'thanks',+ person: 'julia',+ time: '9:04 AM',+ body: 'nice, thanks',+ replyTo: 'footer',+ },+ {+ id: 'bug',+ person: 'julia',+ time: '9:48 AM',+ body: 'sign-in button does nothing on my phone. desktop is fine',+ },+ {+ id: 'repro',+ person: 'teo',+ time: '9:50 AM',+ body: 'same here. looks like the mobile button isn’t submitting the form',+ replyTo: 'bug',+ },+ {+ id: 'task',+ person: 'julia',+ time: '9:52 AM',+ body: 'put the steps here:',+ taskId: GITHUB_TASK,+ replyTo: 'bug',+ },+];+export const githubTask: WorkspaceTask = {+ id: GITHUB_TASK,+ title: 'Fix mobile sign-in',+ description:+ 'At mobile widths, tapping Sign in does nothing. The same account works on desktop.\n\nOpen /sign-in on a phone, enter your email and password, then tap Sign in.',+ status: 'In Review',+ priority: 'High',+ owner: 'teo',+ creator: 'julia',+ tags: ['Website'],+ channel: 'website',+ steps: [+ { id: 'mobile', text: 'Sign-in works on mobile', done: true },+ { id: 'desktop', text: 'Desktop and Enter key still work', done: true },+ ],+ comments: [+ {+ id: 'verified',+ person: 'teo',+ time: '10:24 AM',+ body: 'checked both widths. tests are passing too',+ },+ ],+};+export function createGithubWorkspace(agent = false) {+ const w = createDummyWorkspace('messages');+ w.setData('tasks', [+ {+ ...githubTask,+ status: agent ? 'In Progress' : 'In Review',+ steps: githubTask.steps.map((step) => ({ ...step, done: !agent })),+ comments: agent ? [] : [...githubTask.comments],+ },+ ]);+ w.setData('channels', [+ {+ id: 'website',+ messages: [+ ...githubHistory.map((message) => ({ ...message })),+ ...(agent+ ? [+ {+ id: 'request',+ person: 'julia' as const,+ time: '9:54 AM',+ body: '@[Cursor](demo-mention:cursor) can you fix this?',+ taskId: GITHUB_TASK,+ },+ ]+ : [+ { id: 'pr', person: 'teo' as const, time: '10:14 AM', body: '' },+ {+ id: 'reviewing',+ person: 'julia' as const,+ time: '10:16 AM',+ body: 'thanks, checking now',+ replyTo: 'pr',+ },+ ]),+ ],+ },+ ]);+ w.openItem('messages', 'website');+ w.setChannel('website');+ return w;+}++export const signInFiles = [+ {+ path: 'src/auth/SignIn.tsx',+ oldText: `export function SignIn() {+ const submit = useSignIn();++ return (+ <form>+ <EmailField />+ <PasswordField />+ <button class="desktop" onClick={submit}>+ Sign in+ </button>+ <button class="mobile" type="button">+ Sign in+ </button>+ </form>+ );+}+`,+ newText: `export function SignIn() {+ const submit = useSignIn();++ return (+ <form onSubmit={submit}>+ <EmailField />+ <PasswordField />+ <button class="desktop" type="submit">+ Sign in+ </button>+ <button class="mobile" type="submit">+ Sign in+ </button>+ </form>+ );+}+`,+ },+ {+ path: 'src/auth/SignIn.test.tsx',+ oldText: `import { expect, test } from '@playwright/test';+`,+ newText: `import { expect, test } from '@playwright/test';++for (const width of [390, 1280]) {+ test(\`signs in at \${width}px\`, async ({ page }) => {+ await page.setViewportSize({ width, height: 844 });+ await page.goto('/sign-in');+ await page.getByLabel('Email').fill('[email protected]');+ await page.getByLabel('Password').fill('test-password');+ await page.getByRole('button', { name: 'Sign in', exact: true }).click();+ await expect(page).toHaveURL('/home');+ });+}+`,+ },+];diff --git a/apps/marketing/src/features/marketing/components/reviews/review-fixtures.ts b/apps/marketing/src/features/marketing/components/reviews/review-fixtures.tsindex 80f9218eeb..64a7bb0ee2 100644--- a/apps/marketing/src/features/marketing/components/reviews/review-fixtures.ts+++ b/apps/marketing/src/features/marketing/components/reviews/review-fixtures.ts@@ -31,57 +31,50 @@ export type DemoPullRequest = {comments: DemoGithubComment[];};-/** The same pull request the Tasks page links to its task. */-export const invitePr: DemoPullRequest = {+/** One original PR shared by the GitHub page’s independent scenes. */+export const signInPr: DemoPullRequest = {id: 'pr-491',- title: 'Keep the invited team through sign-up',- repo: 'launch-team/web',+ title: 'Fix mobile sign-in',+ repo: 'macro-inc/website',number: 491,status: 'open',author: 'teo',login: 'teo',- additions: 38,- deletions: 6,- checksPassed: 12,+ additions: 14,+ deletions: 3,+ checksPassed: 6,description:- '## What changed\n\nNew teammates who accept an invite now stay in the invited team through sign-up. Existing accounts switch to that team after they sign in.\n\nFixes LAUNCH-42.\n\n## Testing\n\n- New account from an invite link\n- Existing account from an invite link\n- Expired invite still shows the error page',+ '## What changed\n\nThe mobile sign-in button now submits the form, just like the desktop button. Both layouts use the same submit handler.\n\nFixes WEB-42.\n\n## Tested\n\n- Sign in at mobile and desktop widths\n- Submit with the Enter key\n- Show an error for incorrect passwords',comments: [{- id: 'expired',+ id: 'keyboard',person: 'julia',- login: 'juliawestphal',+ login: 'julia',time: '10:21 AM',- badge: 'src/invite/accept-invite.ts:42',+ badge: 'src/auth/SignIn.tsx:18',anchor: true,- body: 'If the invite has expired this still falls through to the personal workspace. Can we keep the error page for that case?',+ body: 'does enter still work on desktop?',replies: [{- id: 'expired-reply',+ id: 'keyboard-reply',person: 'teo',login: 'teo',- time: '10:34 AM',- body: 'Good catch. Expired invites go to the error page again, and there’s a test for it now.',+ time: '10:24 AM',+ body: 'yep, both go through the form now. added a test for enter too',},],},- {- id: 'bugbot',- person: 'cursor',- login: 'cursor[bot]',- time: '10:36 AM',- body: 'Bugbot reviewed this pull request and found no new issues.',- },],};export const onboardingPr: DemoPullRequest = {id: 'pr-479',title: 'Shorten the onboarding checklist',- repo: 'launch-team/web',+ repo: 'macro-inc/website',number: 479,status: 'merged',author: 'jacob',- login: 'jbeckerman',+ login: 'jacob',additions: 12,deletions: 31,checksPassed: 9,diff --git a/apps/marketing/src/features/marketing/components/reviews/review-stories.css b/apps/marketing/src/features/marketing/components/reviews/review-stories.cssindex 63bd3392ab..7edb4c635a 100644--- a/apps/marketing/src/features/marketing/components/reviews/review-stories.css+++ b/apps/marketing/src/features/marketing/components/reviews/review-stories.css@@ -88,7 +88,6 @@.review-channel-invite { display: none; }.review-message-body { font-size: 14px; }.review-toast { right: 12px; bottom: 12px; width: calc(100% - 24px); }- .product-page #coding-agents.feature-page-section { padding-top: 56px; }.product-page #coding-agents .homepage-feature-title { gap: 16px; }.product-page #coding-agents .homepage-feature-heading h2 { font-size: clamp(28px, 3.2vw, 40px); white-space: normal; }/* The homepage lays this demo out at an 18px gutter; give it the same room. */@@ -98,3 +97,56 @@.review-flow-pointer { display: none; }.review-home-row[data-arriving='true'], .review-flow-card { animation: none; }}++/* GitHub scenes keep the same native pane hierarchy at every frame width. */+.github-surface, .github-task-scene { display: flex; flex: 1; min-width: 0; min-height: 0; container: github-scene / inline-size; }+.github-conversation, .github-detail, .github-task-document, .github-task-pr { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }+.github-detail, .github-task-pr { border-left: 1px solid var(--color-edge); }+.github-surface[data-detail]:not([data-detail='']) .github-conversation { flex: 0 0 40%; }+.github-detail-back { flex: none; padding: 5px 8px; border-bottom: 1px solid var(--color-edge-muted); }+.github-detail-back svg { width: 14px; height: 14px; }+.github-conversation .sample-chat-log { padding-block: 20px; }+.github-conversation .sample-chat-log > .sample-channel-thread:last-child { margin-bottom: 0; }+.github-chip-pr { padding: 2px 6px; color: var(--color-success); }+.github-session { padding: 24px; }+.review-pr-layout { display: flex; flex: 1; min-width: 0; min-height: 0; position: relative; container: pr-layout / inline-size; }+.review-pr-document { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }+.review-pr-layout[data-changes='true'] .review-pr-document { flex-basis: 44%; }+.review-pr-layout[data-spotlit='true'] .review-pr-document { display: none; }+.github-changes { display: flex; flex: 1 1 56%; flex-direction: column; min-width: 0; min-height: 0; border-left: 1px solid var(--color-edge); background: var(--color-panel); }+.github-branch { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 11px/1.5 var(--font-mono); }+.github-diff-tools { display: flex; align-items: center; gap: 8px; padding: 8px; font-size: 12px; color: var(--color-ink-muted); }+.github-file-tree { display: flex; flex-direction: column; padding: 0 12px 8px; font: 12px/1.5 var(--font-mono); }+.github-file-tree button { padding: 6px; text-align: left; border-radius: 4px; }+.github-file-tree button:hover, .github-file-tree button[aria-current] { background: var(--color-hover); }+.github-diff-scroll { min-height: 0; overflow: auto; flex: 1; padding-bottom: 20px; }+.github-file-heading { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border-block: 1px solid var(--color-edge-muted); font: 11px/1.5 var(--font-mono); text-align: left; }+.github-file-heading span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }+.github-diff-render { color-scheme: dark; min-width: 0; }+.github-merge-dialog { width: min(420px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--color-edge); border-radius: 16px; background: var(--color-panel); color: var(--color-ink); font-family: 'Inter Variable', Inter, sans-serif; }+.github-merge-dialog h2 { font-size: 18px; font-weight: 600; }+.github-merge-dialog p { margin-top: 12px; font-size: 14px; color: var(--color-ink-muted); }+@container pr-layout (max-width: 600px) {+ .review-pr-layout[data-changes='true'] > .review-pr-document { display: none; }+ .github-changes { border-left: 0; }+ .github-changes-label { display: none; }+ .review-pr { padding: 28px 20px; }+}+@container github-scene (max-width: 700px) {+ .github-surface[data-detail]:not([data-detail='']) > .github-conversation { display: none; }+ .github-task-scene[data-pr-open='true'] > .github-task-document { display: none; }+ .github-detail, .github-task-pr { border-left: 0; }+}+@media (max-width: 699px) {+ .github-session { padding: 18px; }+}+.github-conversation { container: github-chat / inline-size; }+.github-task-document { container: sample-main / inline-size; }+@container github-chat (max-width: 640px) {+ .github-conversation .sample-tabs-inset { display: none; }+ .github-conversation .sample-chat-log { padding-inline: 8px; }+}+.github-task-scene { contain: layout; }+.github-conversation .review-message-body .agent-answer { display: inline; }+.github-diff-title { display: none; font: 500 13px/1.5 'Inter Variable', Inter, sans-serif; }+@container pr-layout (max-width: 600px) { .github-diff-title { display: block; } }diff --git a/apps/marketing/src/features/marketing/components/spreadsheet-demo-data.ts b/apps/marketing/src/features/marketing/components/spreadsheet-demo-data.tsindex 0457a966f7..77b08d927c 100644--- a/apps/marketing/src/features/marketing/components/spreadsheet-demo-data.ts+++ b/apps/marketing/src/features/marketing/components/spreadsheet-demo-data.ts@@ -19,13 +19,13 @@ export const CUSTOMERS: Record<string, DemoCell> = {D1: header('Last active'),E1: header('Events'),F1: header('Plan'),- A2: { value: 'Dana Whitfield' },+ A2: { value: 'Dana' },B2: { value: 'Northwind' },C2: { value: '[email protected]' },D2: { value: 'Today' },E2: { value: '1842', format: 'number', decimals: 0 },F2: { value: 'Team' },- A3: { value: 'Maya Chen' },+ A3: { value: 'Maya' },B3: { value: 'Lumen' },C3: { value: '[email protected]' },D3: { value: 'Yesterday' },diff --git a/apps/marketing/src/features/marketing/components/tasks/TaskContextDemo.test.tsx b/apps/marketing/src/features/marketing/components/tasks/TaskContextDemo.test.tsxnew file mode 100644index 0000000000..3007f499cc--- /dev/null+++ b/apps/marketing/src/features/marketing/components/tasks/TaskContextDemo.test.tsx@@ -0,0 +1,168 @@+import { cleanup, fireEvent, render } from '@solidjs/testing-library';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { TaskContextDemo } from './TaskContextDemo';++let reduced = true;+let intersections: IntersectionObserverCallback[];+beforeEach(() => {+ reduced = true;+ intersections = [];+ vi.stubGlobal(+ 'IntersectionObserver',+ class {+ constructor(callback: IntersectionObserverCallback) {+ intersections.push(callback);+ }+ observe() {}+ disconnect() {}+ }+ );+ vi.stubGlobal('fetch', vi.fn());+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ observe() {}+ unobserve() {}+ disconnect() {}+ }+ );+ vi.stubGlobal('matchMedia', () => ({+ get matches() {+ return reduced;+ },+ addEventListener: vi.fn(),+ removeEventListener: vi.fn(),+ }));+});+afterEach(() => {+ cleanup();+ expect(fetch).not.toHaveBeenCalled();+ vi.unstubAllGlobals();+ vi.useRealTimers();+});++it('opens the brief from an inline task mention and restores focus on close', async () => {+ const view = render(() => <TaskContextDemo />);+ const link = view.getByRole('button', { name: 'Open Customer brief' });+ fireEvent.click(link);+ expect(+ view.getByRole('textbox', { name: 'Document body' }).textContent+ ).toContain('Update the homepage and pricing page.');+ await Promise.resolve();+ expect(document.activeElement).toBe(+ view.getByRole('button', { name: 'Close linked source' })+ );+ fireEvent.keyDown(view.getByRole('button', { name: 'Close linked source' }), {+ key: 'Escape',+ });+ expect(view.queryByRole('region', { name: 'Linked task source' })).toBeNull();+ expect(document.activeElement).toBe(link);+});++it('keeps task edits while opening the original customer email', () => {+ const view = render(() => <TaskContextDemo />);+ const description = view.getByRole('textbox', { name: 'Task description' });+ Object.defineProperty(description, 'innerText', {+ value: 'Include two pricing options.',+ configurable: true,+ });+ fireEvent.blur(description);+ fireEvent.click(view.getByRole('button', { name: 'Open Proposal request' }));+ expect(view.getByText(/Please send a proposal by Friday/)).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Close linked source' }));+ expect(+ view.getByRole('textbox', { name: 'Task description' }).textContent+ ).toBe('Include two pricing options.');+});++it('opens the linked conversation and follows its document reference', () => {+ const view = render(() => <TaskContextDemo />);+ fireEvent.click(view.getByRole('button', { name: 'Open sales' }));+ expect(view.getByRole('log', { name: 'Channel sales' })).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: 'Customer brief' }));+ expect(+ view.getByRole('textbox', { name: 'Document title' }).textContent+ ).toBe('Customer brief');+});++it('preserves linked document edits and updates the task mention after a rename', () => {+ const view = render(() => <TaskContextDemo />);+ fireEvent.click(view.getByRole('button', { name: 'Open Customer brief' }));+ const title = view.getByRole('textbox', { name: 'Document title' });+ Object.defineProperty(title, 'innerText', {+ value: 'Updated customer brief',+ configurable: true,+ });+ fireEvent.blur(title);+ const body = view.getByRole('textbox', { name: 'Document body' });+ body.innerHTML = '<h2>Scope</h2><p>Include two pricing options.</p>';+ fireEvent.blur(body);+ fireEvent.click(view.getByRole('button', { name: 'Close linked source' }));+ fireEvent.click(+ view.getByRole('button', { name: 'Open Updated customer brief' })+ );+ expect(+ view.getByRole('textbox', { name: 'Document body' }).textContent+ ).toContain('Include two pricing options.');+ expect(+ view.getByRole('textbox', { name: 'Document body' }).querySelector('h2')+ ?.textContent+ ).toBe('Scope');+});++it('returns to the task list if the sample task is deleted', async () => {+ const view = render(() => <TaskContextDemo />);+ fireEvent.keyDown(view.getByRole('button', { name: 'Task actions' }), {+ key: 'ArrowDown',+ });+ await Promise.resolve();+ const remove = view.getByRole('menuitem', { name: 'Delete sample task' });+ remove.focus();+ fireEvent.keyDown(remove, { key: 'Enter' });+ expect(await view.findByText('No matching tasks.')).toBeTruthy();+});++it('types the sharing line, opens mentions at @, and ends with the channel inserted', () => {+ 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();+ expect(view.getByRole('option', { name: 'sales' })).toBeTruthy();+ vi.advanceTimersByTime(1200);+ expect(view.queryByRole('listbox')).toBeNull();+ expect(view.getByRole('button', { name: 'Open sales' })).toBeTruthy();+ expect(+ view.getByRole('textbox', { name: 'Task sharing instruction' }).textContent+ ).toContain('Share the draft for review in sales.');+ vi.advanceTimersByTime(20000);+ expect(view.queryByRole('region', { name: 'Linked task source' })).toBeNull();+});++it('keeps a visitor’s sharing instruction instead of continuing playback', () => {+ reduced = false;+ vi.useFakeTimers();+ const view = render(() => <TaskContextDemo />);+ const input = view.getByRole('textbox', { name: 'Task sharing instruction' });+ fireEvent.pointerDown(input);+ input.textContent = 'Keep my own instruction.';+ fireEvent.input(input);+ for (const callback of intersections)+ callback(+ [{ isIntersecting: true } as IntersectionObserverEntry],+ {} as IntersectionObserver+ );+ vi.advanceTimersByTime(20000);+ expect(input.textContent).toBe('Keep my own instruction.');+ expect(view.queryByRole('button', { name: 'Open sales' })).toBeNull();+});diff --git a/apps/marketing/src/features/marketing/components/tasks/TaskContextDemo.tsx b/apps/marketing/src/features/marketing/components/tasks/TaskContextDemo.tsxnew file mode 100644index 0000000000..5dd86a237c--- /dev/null+++ b/apps/marketing/src/features/marketing/components/tasks/TaskContextDemo.tsx@@ -0,0 +1,348 @@+import Envelope from '@phosphor/envelope.svg';+import X from '@phosphor/x.svg';+import { Button } from '@ui';+import {+ createSignal,+ Match,+ onCleanup,+ onMount,+ Show,+ Switch,+} from 'solid-js';+import type { WorkspaceView } from '../../core/dummy-workspace';+import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';+import { createDemoPointer } from '../agents/createDemoPointer';+import { DemoCursor } from '../DemoCursor';+import { ViewShell } from '../DemoWorkspaceChrome';+import { DocMention, type DocMentionItem } from '../documents/DocMention';+import { DocMentionMenu } from '../documents/DocMentionMenu';+import { DocumentShareSheet } from '../documents/DocumentShareSheet';+import { EmailThread } from '../email/frozen/EmailThread';+import { ProductDemo } from '../product/ProductPage';+import { ProductWorkspace } from '../product/ProductWorkspace';+import { TaskNotebook } from '../workspace/frozen/TaskNotebook';+import { WorkspaceChannel } from '../workspace/WorkspaceChannel';+import { WorkspaceDocuments } from '../workspace/WorkspaceDocuments';+import { createProposalWorkspace } from './proposalWorkspace';+import './task-context.css';++type Source = 'brief' | 'email' | 'channel';+const mentions: Record<Source, DocMentionItem> = {+ brief: { kind: 'document', label: 'Customer brief' },+ email: { kind: 'email', label: 'Proposal request' },+ channel: { kind: 'channel', label: 'sales' },+};++/** Task description mentions open the actual source beside the task. */+export function TaskContextDemo() {+ const w = createProposalWorkspace();+ const task = () =>+ w.data.tasks.find((item) => item.id === w.selected()) ?? w.data.tasks[0];+ const [source, setSource] = createSignal<Source>();+ const [sharing, setSharing] = createSignal(false);+ const [shareTarget, setShareTarget] = createSignal<'task' | 'brief'>('task');+ const brief = () => w.data.documents.find((item) => item.id === 'brief')!;+ const mentionItem = (value: Source): DocMentionItem =>+ value === 'brief'+ ? { ...mentions.brief, label: brief().title }+ : 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 [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 playback = createProductWalkthrough({+ root: () =>+ root.querySelector<HTMLElement>('.task-context-share-line') ?? 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();+ },+ });+ const pause = () => {+ playback.pause();+ setAutomatic(false);+ };+ const pointer = createDemoPointer({+ frame: () => root,+ target: () =>+ automatic() && pickerOpen()+ ? '.task-context-picker [role="option"]'+ : undefined,+ });+ let closeButton: HTMLButtonElement | undefined;+ let trigger: HTMLButtonElement | undefined;+ const close = () => {+ setSource(undefined);+ trigger?.focus({ preventScroll: true });+ };+ const open = (value: Source, button: HTMLButtonElement) => {+ pause();+ setPickerOpen(false);+ trigger = button;+ setSource(value);+ queueMicrotask(() => closeButton?.focus({ preventScroll: true }));+ };+ const mention = (value: Source) => (+ <button+ type="button"+ contentEditable={false}+ class="task-context-mention"+ aria-label={`Open ${mentionItem(value).label}`}+ onClick={(event) => open(value, event.currentTarget)}+ >+ <DocMention item={mentionItem(value)} />+ </button>+ );+ onMount(() => {+ const measure = () => setNarrow(root.clientWidth < 760);+ const observer = new ResizeObserver(measure);+ observer.observe(root);+ measure();+ onCleanup(() => observer.disconnect());+ });+ const linkedWorkspace = {+ ...w,+ openItem: (view: WorkspaceView) => {+ if (view === 'documents') setSource('brief');+ else if (view === 'email') setSource('email');+ else close();+ },+ };+ return (+ <ProductDemo+ label="A task with its brief, customer email, and conversation"+ onInteract={pause}+ height={540}+ mobileHeight={560}+ >+ <div+ ref={root}+ class="task-context-layout"+ data-narrow={narrow()}+ data-source-open={!!source()}+ onPointerDown={(event) => {+ if (!(event.target as Element).closest('.task-context-share-line'))+ setPickerOpen(false);+ }}+ onKeyDown={(event) => {+ if (event.key === 'Escape' && source() && !event.defaultPrevented) {+ event.stopPropagation();+ close();+ }+ }}+ >+ <div+ class="task-context-primary dummy-main"+ inert={!!source() && narrow()}+ >+ <Show+ when={task()}+ keyed+ fallback={<ProductWorkspace workspace={w} />}+ >+ {(currentTask) => (+ <TaskNotebook+ workspace={w}+ task={currentTask}+ hideCollectionNavigation+ onShare={() => {+ setShareTarget('task');+ setSharing(true);+ }}+ sourceContent={<span />}+ descriptionContent={+ <>+ <div+ contentEditable+ role="textbox"+ aria-label="Task description"+ class="task-context-description"+ onBlur={(event) =>+ w.updateTask(currentTask.id, {+ description: event.currentTarget.innerText,+ })+ }+ >+ {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()}>+ <div+ class="task-context-picker"+ onClick={(event) => {+ if (+ (event.target as Element).closest(+ '[role="option"]'+ )+ )+ selectChannel();+ }}+ >+ <DocMentionMenu+ groups={[+ { label: 'Channels', rows: [mentions.channel] },+ ]}+ selected={0}+ style={{+ position: 'absolute',+ left: '0',+ bottom: 'calc(100% + 6px)',+ width: 'min(320px, 100%)',+ }}+ />+ </div>+ </Show>+ </div>+ </>+ }+ />+ )}+ </Show>+ </div>+ <Show when={source()}>+ <section+ class="task-context-source dummy-main"+ aria-label="Linked task source"+ >+ <Switch>+ <Match when={source() === 'brief'}>+ <WorkspaceDocuments+ workspace={{+ ...linkedWorkspace,+ selected: () => 'brief',+ backToCollection: close,+ }}+ hideCollectionNavigation+ onShare={() => {+ setShareTarget('brief');+ setSharing(true);+ }}+ />+ </Match>+ <Match when={source() === 'email'}>+ <ViewShell.TopBar>+ <Envelope class="size-4" />+ <span class="text-sm truncate">Proposal request</span>+ </ViewShell.TopBar>+ <div class="dummy-scroll sample-email-thread">+ <EmailThread+ email={w.data.emails.find((item) => item.id === 'dana')!}+ hideHeader+ hideReply+ />+ </div>+ </Match>+ <Match when={source() === 'channel'}>+ <WorkspaceChannel workspace={linkedWorkspace} />+ </Match>+ </Switch>+ <Button+ ref={closeButton}+ class="task-context-close"+ label="Close linked source"+ variant="plain"+ size="icon-sm"+ onClick={close}+ >+ <X />+ </Button>+ </section>+ </Show>+ <Show when={pointer()}>+ {(point) => (+ <DemoCursor+ label="Jacob"+ class="task-context-pointer"+ clicking={step() === frames + 2}+ style={{ transform: `translate(${point().x}px, ${point().y}px)` }}+ />+ )}+ </Show>+ </div>+ <DocumentShareSheet+ open={sharing()}+ title={+ shareTarget() === 'brief' ? brief().title : (task()?.title ?? 'Task')+ }+ entityLabel={shareTarget() === 'brief' ? 'document' : 'task'}+ onClose={() => setSharing(false)}+ />+ </ProductDemo>+ );+}diff --git a/apps/marketing/src/features/marketing/components/tasks/TaskCreationFlow.tsx b/apps/marketing/src/features/marketing/components/tasks/TaskCreationFlow.tsxindex c0d3b5934c..266d762667 100644--- a/apps/marketing/src/features/marketing/components/tasks/TaskCreationFlow.tsx+++ b/apps/marketing/src/features/marketing/components/tasks/TaskCreationFlow.tsx@@ -1,61 +1,52 @@import { createEffect, createSignal, onCleanup, onMount, Show } from 'solid-js';import { createStore } from 'solid-js/store';import type { WorkspaceTask } from '../../core/dummy-workspace';-import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';import { DemoCursor } from '../DemoCursor';import { ProductDemo } from '../product/ProductPage';import { TaskComposer } from '../workspace/frozen/TaskComposer';import { WorkspaceChannel } from '../workspace/WorkspaceChannel';-import { WorkspaceTasks } from '../workspace/WorkspaceTasks';+import { TaskProjectView } from './TaskProjectView';+import {+ createTaskProject,+ REQUEST_CONTEXT,+ REQUEST_TASK,+} from './taskProject';import './task-creation-flow.css';-const context =- 'Reproduced it. New teammates land in their personal workspace after accepting an invite.';-const request =- 'Keep the invited team selected through sign-up @[Teo](demo-mention:teo)';--/**- * The channel ActionMenu's Task button opens ComposeTask with the message as- * its title, a link back to the message, and the mentioned person assigned.- * Phases: 0 channel, 1 hover the message, 2 composer, 3 priority, 4 created.- */+/** One request becomes an owned task, then a completed link in the plan. */export function TaskCreationFlow() {let root!: HTMLDivElement;let frame!: HTMLDivElement;- const w = createDummyWorkspace('messages');- w.setData('channels', (c) => c.id === 'launch', 'messages', [- {- id: 'checks',- person: 'gabriel',- body: 'Ran through signup on staging. Existing accounts are fine, new ones are not.',- time: '9:11 AM',- },- { id: 'context', person: 'teo', body: context, time: '9:16 AM' },- { id: 'invite-request', person: 'julia', body: request, time: '9:18 AM' },- ]);- w.open('messages', 'launch');+ const w = createTaskProject('messages');+ w.setData('tasks', []);+ w.setData('channels', 0, 'messages', 1, 'taskId', undefined);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>({id: 'task-draft',- title: 'Keep the invited team selected through sign-up',+ title: REQUEST_TASK,description: '',- owner: 'teo',+ owner: 'julia',creator: 'jacob',priority: 'Medium',status: 'Not Started',- channel: 'launch',+ channel: 'sales',tags: [],steps: [],comments: [],});+ const [dueDate, setDueDate] = createSignal<string>();const create = () => {let id = taskId();if (!id) {- id = w.createTask(draft.title, context, 'launch');+ id = 'proposal';+ w.setData('tasks', [+ { ...draft, id, description: REQUEST_CONTEXT, tags: ['Customers'] },+ ]);+ w.setData('channels', 0, 'messages', 1, 'taskId', id);setTaskId(id);}w.updateTask(id, {@@ -66,18 +57,40 @@ export function TaskCreationFlow() {});w.open('tasks', id);setPhase(4);+ };+ const finish = () => {+ if (!taskId()) create();+ w.updateTask(taskId()!, {+ status: 'Completed',+ description: 'Proposal ready: scope, pricing, and a delivery timeline.',+ });+ setPhase(6);setAutomatic(false);};const playback = createProductWalkthrough({root: () => root,- steps: 4,+ steps: 7,reset: () => {},- reduced: create,- delay: (step) => [0, 1200, 1600, 1500, 1500][step] ?? 1400,+ reduced: finish,+ delay: (step) =>+ [0, 1200, 1600, 1500, 1500, 2200, 2500, 2400][step] ?? 1400,advance: (step) => {- if (step === 3) setDraft('priority', 'High');+ if (step === 3) {+ setDraft('priority', 'High');+ setDueDate('Friday');+ }if (step === 4) create();- else setPhase(step);+ 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);},});const pause = () => {@@ -91,6 +104,8 @@ export function TaskCreationFlow() {'[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)@@ -118,22 +133,47 @@ export function TaskCreationFlow() {});return (<div ref={root} class="task-creation-flow">- <div ref={frame} class="task-flow-frame" onFocusIn={pause}>+ <div+ ref={frame}+ class="task-flow-frame"+ role="group"+ aria-label="Task walkthrough"+ onKeyDown={(event) => {+ if (event.key === 'Escape' && phase() >= 2 && phase() < 4) {+ pause();+ setPhase(0);+ }+ if (+ (event.metaKey || event.ctrlKey) &&+ event.key === 'Enter' &&+ phase() >= 2 &&+ phase() < 4 &&+ draft.title.trim()+ ) {+ event.preventDefault();+ pause();+ create();+ }+ }}+ ><ProductDemo- label="Create a task from a channel message"+ label="Follow a request from message to completion"onInteract={pause}- height={520}- mobileHeight={600}+ height={560}+ mobileHeight={620}>- <Show- when={phase() < 4}- fallback={<WorkspaceTasks workspace={w} filter="all" />}- >+ <Show when={phase() < 4} fallback={<TaskProjectView workspace={w} />}><WorkspaceChannelworkspace={w}- hoveredMessage={phase() === 1 ? 'invite-request' : undefined}- onTaskMessage={() => {+ hoveredMessage={phase() === 1 ? 'proposal-request' : undefined}+ onTaskMessage={(message) => {pause();+ setDraft(+ 'title',+ message.id === 'proposal-request'+ ? REQUEST_TASK+ : message.body+ );setPhase(2);}}/>@@ -141,7 +181,8 @@ export function TaskCreationFlow() {<div class="task-flow-popover"><TaskComposerdraft={draft}- sourceChannel="launch"+ sourceChannel="sales"+ dueDateLabel={dueDate()}update={(patch) => setDraft(patch)}submit={() => {pause();@@ -159,7 +200,7 @@ export function TaskCreationFlow() {<Show when={automatic() && pointer()}>{(p) => (<DemoCursor- label="Jacob"+ label={phase() >= 4 ? 'Julia' : 'Jacob'}class="task-flow-pointer"clicking={phase() === 3}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.tsxnew file mode 100644index 0000000000..1246042a4f--- /dev/null+++ b/apps/marketing/src/features/marketing/components/tasks/TaskProjectView.tsx@@ -0,0 +1,189 @@+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 { ProductWorkspace } from '../product/ProductWorkspace';+import { WorkspaceDesktopDemo } from '../WorkspaceDesktopDemo';+import { TaskMention } from '../workspace/frozen/TaskMention';+import { TaskNotebook } from '../workspace/frozen/TaskNotebook';+import { REQUEST_DOCUMENT } from './taskProject';+import './task-stories.css';++export function TaskDueDate() {+ return (+ <span class="task-due-date" title="Due Friday">+ <CalendarBlank class="size-3" />+ Friday+ </span>+ );+}++/** Linked sources and task edits share the same local workspace. */+export function TaskProjectView(props: {+ workspace: DummyWorkspace;+ documentSource?: boolean;+}) {+ const w = props.workspace;+ let root!: HTMLDivElement;+ const [returnId, setReturnId] = createSignal<string>();+ let returnLabel = 'From sales';+ const selected = () =>+ w.contentView() === 'tasks'+ ? w.data.tasks.find((task) => task.id === w.selected())+ : undefined;+ createEffect(() => {+ const task = selected();+ if (task) setReturnId(task.id);+ });+ const close = () => {+ const id = returnId();+ if (!id || !w.data.tasks.some((task) => task.id === id)) return;+ w.open('tasks', id);+ queueMicrotask(() => {+ const button = [+ ...root.querySelectorAll<HTMLButtonElement>('button'),+ ].find(+ (item) => item.textContent?.replace(/\s+/g, ' ').trim() === returnLabel+ );+ button?.focus({ preventScroll: true });+ });+ };+ const sourceOpen = () =>+ !!returnId() && ['messages', 'documents'].includes(w.contentView());+ return (+ <div+ ref={root}+ class="task-project-view"+ role="group"+ aria-label="Task and linked sources"+ onKeyDown={(event) => {+ if (event.key === 'Escape' && sourceOpen()) {+ event.stopPropagation();+ close();+ }+ }}+ onClick={(event) => {+ const button = (event.target as HTMLElement).closest('button');+ if (button?.textContent?.includes('From')) {+ returnLabel = 'From sales';+ queueMicrotask(() =>+ root+ .querySelector<HTMLButtonElement>('[aria-label="Close source"]')+ ?.focus({ preventScroll: true })+ );+ }+ }}+ >+ <Switch fallback={<ProductWorkspace workspace={w} />}>+ <Match when={selected()}>+ {(task) => (+ <TaskNotebook+ workspace={w}+ task={task()}+ hideCollectionNavigation={props.documentSource}+ sourceContent={+ props.documentSource ? (+ <button+ type="button"+ class="task-plan-link dummy-entity-link"+ onClick={() => w.open('documents', 'customer-brief')}+ >+ <FileText class="size-4" />+ {REQUEST_DOCUMENT}+ </button>+ ) : undefined+ }+ pills={+ <Show when={task().id === 'proposal'}>+ <TaskDueDate />+ </Show>+ }+ relatedContent={+ <Show when={!props.documentSource}>+ <button+ type="button"+ class="task-plan-link dummy-entity-link"+ onClick={() => {+ returnLabel = REQUEST_DOCUMENT;+ w.open('documents', 'customer-brief');+ queueMicrotask(() =>+ root+ .querySelector<HTMLButtonElement>(+ '[aria-label="Back to task"]'+ )+ ?.focus({ preventScroll: true })+ );+ }}+ >+ <FileText class="size-4" />+ {REQUEST_DOCUMENT}+ </button>+ </Show>+ }+ />+ )}+ </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>+ </Match>+ </Switch>+ <Show when={sourceOpen() && w.contentView() === 'messages'}>+ <Button+ class="task-source-close"+ variant="plain"+ size="icon-sm"+ label="Close source"+ onClick={close}+ >+ <X />+ </Button>+ </Show>+ </div>+ );+}++export function TaskHeroDemo() {+ return (+ <WorkspaceDesktopDemo+ heroFrame+ view="tasks"+ label="Explore Macro Tasks"+ desktopWidth={1280}+ tasksShowcase+ />+ );+}diff --git a/apps/marketing/src/features/marketing/components/tasks/TaskStories.test.tsx b/apps/marketing/src/features/marketing/components/tasks/TaskStories.test.tsxindex 310dc26547..1732972ba4 100644--- a/apps/marketing/src/features/marketing/components/tasks/TaskStories.test.tsx+++ b/apps/marketing/src/features/marketing/components/tasks/TaskStories.test.tsx@@ -1,11 +1,12 @@import { cleanup, fireEvent, render, within } from '@solidjs/testing-library';import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { TaskProjectView } from './TaskProjectView';import {TaskAgentChannelDemo,- TaskFromChecklistDemo,TaskFromMessageDemo,TaskGithubDemo,} from './TaskStories';+import { createTaskProject } from './taskProject';let intersections: IntersectionObserverCallback[];let motionListeners: (() => void)[];@@ -18,6 +19,12 @@ beforeEach(() => {hidden = false;vi.useFakeTimers();vi.stubGlobal('fetch', vi.fn());+ Object.defineProperty(HTMLElement.prototype, 'scrollTo', {+ configurable: true,+ value: vi.fn(function (this: HTMLElement, options: ScrollToOptions) {+ this.scrollTop = options.top ?? this.scrollTop;+ }),+ });vi.spyOn(document, 'hidden', 'get').mockImplementation(() => hidden);vi.stubGlobal('matchMedia', () => ({get matches() {@@ -54,6 +61,7 @@ afterEach(() => {vi.useRealTimers();vi.restoreAllMocks();vi.unstubAllGlobals();+ Reflect.deleteProperty(HTMLElement.prototype, 'scrollTo');});function visible(value: boolean) {for (const callback of intersections)@@ -77,16 +85,16 @@ it('turns a message into a task with its title, assignee, and source channel', (vi.advanceTimersByTime(1600);const title = view.getByRole('textbox', { name: 'New task title' });expect((title as HTMLInputElement).value).toBe(- 'Keep the invited team selected through sign-up'+ 'Prepare the customer proposal');expect(view.getAllByRole('button', { name: 'Change assignee' })[0].textContent- ).toContain('Teo');+ ).toContain('Julia');vi.advanceTimersByTime(3200);expect(view.getByRole('textbox', { name: 'Task title' }).textContent).toBe(- 'Keep the invited team selected through sign-up'+ 'Prepare the customer proposal');- expect(view.getByRole('button', { name: 'From launch' })).toBeTruthy();+ expect(view.getByRole('button', { name: 'From sales' })).toBeTruthy();expect(view.getAllByRole('button', { name: 'Change priority' })[0].textContent).toContain('High');@@ -100,51 +108,73 @@ it('keeps a visitor’s task draft instead of advancing over it', () => {fireEvent.click(buttons[buttons.length - 1]);const title = view.getByRole('textbox', { name: 'New task title' });fireEvent.input(title, {- target: { value: 'Keep the invited workspace selected' },+ target: { value: 'Include two pricing options' },});reduce();visible(true);vi.advanceTimersByTime(30000);- expect((title as HTMLInputElement).value).toBe(- 'Keep the invited workspace selected'- );+ expect((title as HTMLInputElement).value).toBe('Include two pricing options');fireEvent.submit(view.getByRole('form', { name: 'Create task' }));expect(view.getByRole('textbox', { name: 'Task title' }).textContent).toBe(- 'Keep the invited workspace selected'+ 'Include two pricing options');});it('shows the created task without a cursor for reduced motion', () => {reduced = true;const view = render(() => <TaskFromMessageDemo />);- expect(view.getByRole('button', { name: 'From launch' })).toBeTruthy();+ expect(view.getByRole('button', { name: 'From sales' })).toBeTruthy();expect(view.container.querySelector('.demo-cursor')).toBeNull();});-it('lets @Macro create assigned tasks from one channel message', () => {+it('types Jacob’s requests into the composer before sending them', () => {const view = render(() => <TaskAgentChannelDemo />);- expect(view.queryByText('Own the launch checklist')).toBeNull();+ const input = view.getByRole('textbox', { name: 'Message #sales' });+ const log = within(view.getByRole('log', { name: 'Channel sales' }));visible(true);- vi.advanceTimersByTime(2600);- const log = within(view.getByRole('log', { name: 'Channel launch' }));- expect(log.getByText('Fix the team invite handoff')).toBeTruthy();- expect(log.getByText('Final read of the launch announcement')).toBeTruthy();- fireEvent.click(log.getByText('Own the launch checklist'));- expect(view.getByRole('textbox', { name: 'Task title' }).textContent).toBe(- 'Own the launch checklist'- );+ vi.advanceTimersByTime(1400);+ expect(input.textContent).toContain('@Macro');+ expect(log.queryByText(/make tasks for this proposal/)).toBeNull();+ vi.advanceTimersByTime(2300);+ expect(input.textContent).toBe('');+ expect(log.getByText(/make tasks for this proposal/)).toBeTruthy();+ vi.advanceTimersByTime(3100);+ const threadInput = view.getByRole('textbox', { name: 'Thread reply' });+ expect(threadInput.textContent).toContain('Julia');+ expect(threadInput.textContent).not.toContain('@Macro');+ expect(+ log.queryByText(/Julia will draft/, { selector: 'article p' })+ ).toBeNull();+ fireEvent.pointerDown(threadInput);+ threadInput.textContent = 'Keep my draft';+ fireEvent.input(threadInput);+ vi.advanceTimersByTime(30000);+ expect(threadInput.textContent).toBe('Keep my draft');+ expect(+ log.queryByText(/Julia will draft/, { selector: 'article p' })+ ).toBeNull();});-it('converts a selected checklist into task links', () => {- const view = render(() => <TaskFromChecklistDemo />);+it('lets @Macro create assigned tasks from one channel message', () => {+ const view = render(() => <TaskAgentChannelDemo />);+ expect(view.queryByText('Draft the customer proposal')).toBeNull();visible(true);- vi.advanceTimersByTime(1300);- fireEvent.click(view.getByRole('button', { name: 'Tasks' }));+ vi.advanceTimersByTime(8000);+ const log = within(view.getByRole('log', { name: 'Channel sales' }));+ expect(log.getByText('Draft the customer proposal')).toBeTruthy();expect(- view.getByText('Final read of the announcement').closest('button')- ).toBeTruthy();- vi.advanceTimersByTime(30000);- expect(vi.getTimerCount()).toBe(0);+ log+ .getByText('Created and assigned both tasks.')+ .closest('.sample-thread-replies')+ ?.closest('[data-thread-id]')+ ?.getAttribute('data-thread-id')+ ).toBe('make-tasks');+ expect(view.queryByRole('button', { name: 'Close source' })).toBeNull();+ expect(log.getByText('Review the pricing')).toBeTruthy();+ fireEvent.click(log.getByText('Review the pricing'));+ expect(view.getByRole('textbox', { name: 'Task title' }).textContent).toBe(+ 'Review the pricing'+ );});it('moves the task to In Review, then Completed, as its pull request changes', () => {@@ -158,5 +188,141 @@ it('moves the task to In Review, then Completed, as its pull request changes', (expect(view.getAllByRole('button', { name: 'Change status' })[0].textContent).toContain('Completed');- expect(view.getByText('launch-team/web#491')).toBeTruthy();+ expect(view.getByText('company/website#491')).toBeTruthy();+});++it('finishes the human task and keeps its completed status in the plan', () => {+ const view = render(() => <TaskFromMessageDemo />);+ visible(true);+ vi.advanceTimersByTime(15000);+ fireEvent.click(+ view.getByRole('button', { name: 'Prepare the customer proposal' })+ );+ expect(+ view.getAllByRole('button', { name: 'Change status' })[0].textContent+ ).toContain('Completed');+ expect(+ view.getByRole('textbox', { name: 'Task description' }).textContent+ ).toContain('Proposal ready: scope, pricing');+});++it('changes the existing proposal task to Julia after an explicit request', () => {+ const view = render(() => <TaskAgentChannelDemo />);+ visible(true);+ vi.advanceTimersByTime(24000);+ expect(+ view+ .getByText('The proposal is now assigned to Julia.')+ .closest('.sample-thread-replies')+ ?.closest('[data-thread-id]')+ ?.getAttribute('data-thread-id')+ ).toBe('make-tasks');+ const followup = view.getByText(+ 'Julia will draft the proposal instead. Can you update the task?'+ );+ expect(+ followup+ .closest('.sample-thread-replies')+ ?.closest('[data-thread-id]')+ ?.getAttribute('data-thread-id')+ ).toBe('make-tasks');+ expect(view.container.querySelectorAll('[data-thread-id]')).toHaveLength(1);+ fireEvent.click(+ view.getAllByRole('button', { name: 'Draft the customer proposal' })[0]+ );+ expect(+ view.getAllByRole('button', { name: 'Change assignee' })[0].textContent+ ).toContain('Julia');+});++it('does not perform the scripted reassignment after the visitor takes over', () => {+ const view = render(() => <TaskAgentChannelDemo />);+ visible(true);+ vi.advanceTimersByTime(8000);+ fireEvent.pointerDown(+ view.getByRole('group', {+ name: 'Ask Macro to create tasks and change an owner',+ })+ );+ reduce();+ vi.advanceTimersByTime(20000);+ expect(view.queryByText('The proposal is now assigned to Julia.')).toBeNull();+});++it('pauses an offscreen or hidden walkthrough without losing its place', () => {+ const view = render(() => <TaskFromMessageDemo />);+ visible(true);+ vi.advanceTimersByTime(1300);+ visible(false);+ vi.advanceTimersByTime(20000);+ expect(view.queryByRole('form', { name: 'Create task' })).toBeNull();+ hidden = true;+ visible(true);+ vi.advanceTimersByTime(20000);+ expect(view.queryByRole('form', { name: 'Create task' })).toBeNull();+ hidden = false;+ document.dispatchEvent(new Event('visibilitychange'));+ vi.advanceTimersByTime(1700);+ expect(view.getByRole('form', { name: 'Create task' })).toBeTruthy();+});++it('preserves edits when opening a source and returning with Escape', async () => {+ const view = render(() => (+ <TaskProjectView workspace={createTaskProject()} />+ ));+ const title = view.getByRole('textbox', { name: 'Task title' });+ Object.defineProperty(title, 'innerText', {+ value: 'Prepare the final plan',+ configurable: true,+ });+ fireEvent.blur(title);+ fireEvent.click(view.getByRole('button', { name: 'From sales' }));+ expect(view.getByRole('log', { name: 'Channel sales' })).toBeTruthy();+ fireEvent.keyDown(view.getByRole('button', { name: 'Close source' }), {+ key: 'Escape',+ });+ await Promise.resolve();+ expect(view.getByRole('textbox', { name: 'Task title' }).textContent).toBe(+ 'Prepare the final plan'+ );+ expect(document.activeElement).toBe(+ view.getByRole('button', { name: 'From sales' })+ );+});++it('finishes a partially played conversation in reduced motion without duplicate messages', () => {+ const view = render(() => <TaskAgentChannelDemo />);+ visible(true);+ vi.advanceTimersByTime(5000);+ reduce();+ reduce();+ vi.advanceTimersByTime(20000);+ const log = view.getByRole('log', { name: 'Channel sales' });+ expect(log.querySelectorAll('article')).toHaveLength(4);+ expect(log.querySelectorAll('[data-thread-id]')).toHaveLength(1);+ expect(+ within(log).getAllByText('Created and assigned both tasks.')+ ).toHaveLength(1);+ expect(+ within(log).getAllByText('The proposal is now assigned to Julia.')+ ).toHaveLength(1);+ expect(view.queryByRole('textbox', { name: 'Thread reply' })).toBeNull();+});++it('resumes the same agent draft after leaving view without skipping or duplicating messages', () => {+ const view = render(() => <TaskAgentChannelDemo />);+ visible(true);+ vi.advanceTimersByTime(1400);+ const input = view.getByRole('textbox', { name: 'Message #sales' });+ const draft = input.textContent;+ visible(false);+ vi.advanceTimersByTime(20000);+ expect(input.textContent).toBe(draft);+ expect(view.queryByText('Created and assigned both tasks.')).toBeNull();+ visible(true);+ vi.advanceTimersByTime(20000);+ expect(+ view.getByRole('log', { name: 'Channel sales' }).querySelectorAll('article')+ ).toHaveLength(4);+ expect(view.getByText('The proposal is now assigned to Julia.')).toBeTruthy();});diff --git a/apps/marketing/src/features/marketing/components/tasks/TaskStories.tsx b/apps/marketing/src/features/marketing/components/tasks/TaskStories.tsxindex 41778b5e5f..d214788b26 100644--- a/apps/marketing/src/features/marketing/components/tasks/TaskStories.tsx+++ b/apps/marketing/src/features/marketing/components/tasks/TaskStories.tsx@@ -1,23 +1,18 @@-import ChatTeardrop from '@phosphor/chat-teardrop.svg';-import CheckSquare from '@phosphor/check-square.svg';-import FileText from '@phosphor/file-text.svg';-import GridFour from '@phosphor/grid-four.svg';-import LinkIcon from '@phosphor/link.svg';-import TextB from '@phosphor/text-b.svg';-import TextItalic from '@phosphor/text-italic.svg';-import TextStrikethrough from '@phosphor/text-strikethrough.svg';-import { createSignal, For, Show } from 'solid-js';-import type { TaskStatus, WorkspaceTask } from '../../core/dummy-workspace';+import { batch, createSignal, onCleanup, Show } from 'solid-js';+import type {+ TaskStatus,+ WorkspaceComment,+ WorkspaceTask,+} from '../../core/dummy-workspace';import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';import { createProductWalkthrough } from '../../primitives/createProductWalkthrough';-import { DemoCursor } from '../DemoCursor';import { PrStatusIcon } from '../DemoPrDocument';-import { ViewShell } from '../DemoWorkspaceChrome';+import type { ChannelComposerHandle } from '../email/frozen/ChannelComposer';import { ProductDemo } from '../product/ProductPage';import { ProductWorkspace } from '../product/ProductWorkspace';-import { TaskMention } from '../workspace/frozen/TaskMention';import { TaskNotebook } from '../workspace/frozen/TaskNotebook';-import { WorkspaceTasks } from '../workspace/WorkspaceTasks';+import { WorkspaceChannel } from '../workspace/WorkspaceChannel';+import { createProposalWorkspace } from './proposalWorkspace';import '../workspace/dummy-workspace.css';import '../demo-markdown.css';import './task-stories.css';@@ -28,251 +23,209 @@ export function TaskFromMessageDemo() {return <TaskCreationFlow />;}-const launchAsks = [+const proposalAsks = [+ { title: 'Draft the customer proposal', owner: 'teo', priority: 'High' },{- title: 'Fix the team invite handoff',- owner: 'teo',- priority: 'Urgent',- },- {- title: 'Final read of the launch announcement',- owner: 'julia',- priority: 'High',- },- {- title: 'Own the launch checklist',+ title: 'Review the pricing',owner: 'jacob',priority: 'Medium',},] as const;-/** @Macro in a channel: one request becomes several assigned tasks. */+/** Explicit requests create tasks and then change one assignment. */export function TaskAgentChannelDemo() {let root!: HTMLDivElement;- const w = createDummyWorkspace('messages');- const thread = [- {- id: 'launch-asks',- person: 'julia' as const,- body: 'Last pass before Thursday. The invite still drops people in their personal workspace, the announcement needs a final read, and nobody owns the checklist yet.',- time: '9:20 AM',- },- {- id: 'make-tasks',- person: 'jacob' as const,- body: '@[Macro](demo-mention:macro) make tasks for these. Teo takes the invite fix, Julia the announcement, I’ll take the checklist.',- time: '9:22 AM',- },- ];- w.setData('channels', (c) => c.id === 'launch', 'messages', thread);- w.open('messages', 'launch');- let created = false;- const finish = () => {- if (created) return;- created = true;- const ids = launchAsks.map((ask) => {- const id = w.createTask(ask.title, '', 'launch');- w.updateTask(id, { owner: ask.owner, priority: ask.priority });- return id;+ const w = createProposalWorkspace();+ w.open('messages', 'sales');+ w.setData('tasks', []);+ const [typing, setTyping] = createSignal(false);+ const firstRequest =+ '@Macro make tasks for this proposal. Teo drafts it; I’ll review the pricing.';+ const secondRequest =+ 'Julia will draft the proposal instead. Can you update the task?';+ w.setData('channels', 0, 'messages', []);+ const [replyTarget, setReplyTarget] = createSignal<string>();+ const composers = new Map<string, ChannelComposerHandle>();+ let scrollFrame: number | undefined;+ let takenOver = false;+ let smooth = true;+ const follow = () => {+ if (takenOver) return;+ if (scrollFrame !== undefined) cancelAnimationFrame(scrollFrame);+ scrollFrame = requestAnimationFrame(() => {+ scrollFrame = undefined;+ const log = root.querySelector<HTMLElement>('[role="log"]');+ if (log && !takenOver)+ log.scrollTo({+ top: log.scrollHeight,+ behavior: smooth ? 'smooth' : 'instant',+ });});- w.setData('channels', (c) => c.id === 'launch', 'messages', [- ...thread,+ };+ onCleanup(() => {+ if (scrollFrame !== undefined) cancelAnimationFrame(scrollFrame);+ });+ const hasMessage = (id: string) =>+ w.data.channels[0].messages.some((message) => message.id === id);+ const writeDraft = (text: string) => {+ composers.get(replyTarget() ?? 'main')?.setText(text);+ setTyping(!!text);+ };+ const sendRequest = () => {+ if (hasMessage('make-tasks')) return;+ writeDraft('');+ w.setData('channels', 0, 'messages', (items): WorkspaceComment[] => [+ ...items,{- id: 'macro-tasks',- person: 'macro',- body: 'Created 3 tasks for Thursday’s launch and assigned them.',- time: '9:22 AM',- taskIds: ids,+ id: 'make-tasks',+ person: 'jacob',+ time: '9:20 AM',+ body: '@[Macro](demo-mention:macro) make tasks for this proposal. Teo drafts it; I’ll review the pricing.',},]);- w.open('messages', 'launch');+ w.setChannelThread('make-tasks');};- const playback = createProductWalkthrough({- root: () => root,- steps: 2,- reset: () => {},- reduced: finish,- delay: (step) => (step === 1 ? 900 : 1600),- advance: (step) => {- if (step === 2) finish();- },- });- return (- <ProductDemo- ref={(el) => (root = el)}- label="Ask the Macro agent to make tasks from a channel message"- onInteract={playback.pause}- height={540}- mobileHeight={640}- >- <ProductWorkspace workspace={w} />- </ProductDemo>- );-}--const checklist = [- 'Verify both invite paths before Thursday',- 'Final read of the announcement',- 'Record the product demo',-];--/**- * MarkdownPopup's selection toolbar offers "Tasks" when the selection holds- * checkboxes. Each checkbox becomes a task mention in place.- */-export function TaskFromChecklistDemo() {- let root!: HTMLDivElement;- const w = createDummyWorkspace('documents');- const [phase, setPhase] = createSignal(0);- const [tasks, setTasks] = createSignal<WorkspaceTask[]>([]);- const convert = () => {- if (tasks().length) return;- const owners = ['teo', 'julia', 'jacob'] as const;- const ids = checklist.map((title, index) => {- const id = w.createTask(title, '', 'launch');- w.updateTask(id, { owner: owners[index] });- return id;+ let ids: string[] = [];+ const create = () =>+ batch(() => {+ if (ids.length) return;+ const tasks: WorkspaceTask[] = proposalAsks.map((ask) => ({+ id: crypto.randomUUID(),+ title: ask.title,+ description:+ ask.title === 'Draft the customer proposal'+ ? 'Draft the proposal using the customer brief and request. Include scope, pricing, and a delivery date.'+ : 'Check the price and scope before we send the proposal.',+ owner: ask.owner,+ priority: ask.priority,+ creator: 'jacob',+ status: 'Not Started',+ tags: ['Customers'],+ relatedDocumentIds: ['brief'],+ channel: 'sales',+ steps: [],+ comments: [],+ }));+ ids = tasks.map((task) => task.id);+ w.setData('tasks', tasks);+ w.setData('channels', 0, 'messages', (items): WorkspaceComment[] => [+ ...items,+ {+ id: 'created',+ replyTo: 'make-tasks',+ person: 'macro',+ body: 'Created and assigned both tasks.',+ time: '9:20 AM',+ taskIds: ids,+ },+ ]);+ follow();});- w.open('documents', 'plan');- setTasks(ids.map((id) => w.data.tasks.find((task) => task.id === id)!));- setPhase(3);+ const beginReply = () => {+ setReplyTarget('make-tasks');+ follow();+ };+ const requestUpdate = () => {+ if (hasMessage('reassign')) return;+ writeDraft('');+ w.setData('channels', 0, 'messages', (items): WorkspaceComment[] => [+ ...items,+ {+ id: 'reassign',+ replyTo: 'make-tasks',+ person: 'jacob',+ body: secondRequest,+ time: '9:24 AM',+ },+ ]);+ setReplyTarget(undefined);+ follow();+ };+ const update = () => {+ if (hasMessage('updated') || !ids.length) return;+ w.updateTask(ids[0], { owner: 'julia' });+ w.setData('channels', 0, 'messages', (items): WorkspaceComment[] => [+ ...items,+ {+ id: 'updated',+ replyTo: 'make-tasks',+ person: 'macro',+ body: 'The proposal is now assigned to Julia.',+ time: '9:24 AM',+ taskId: ids[0],+ },+ ]);+ 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),+ { delay: 450, run: sendRequest },+ { delay: 1400, run: create },+ { delay: 2200, run: beginReply },+ ...typeMessage(secondRequest, 300),+ { delay: 450, run: requestUpdate },+ { delay: 1400, run: update },+ ];const playback = createProductWalkthrough({- root: () => root,- steps: 3,+ root: () =>+ root.querySelector<HTMLElement>('.sample-chat-composer') ?? root,+ visibilityThreshold: 1,+ steps: steps.length,reset: () => {},- reduced: convert,- delay: (step) => [0, 1200, 1500, 1400][step] ?? 1400,- advance: (step) => {- if (step === 3) convert();- else setPhase(step);+ reduced: () => {+ smooth = false;+ sendRequest();+ create();+ requestUpdate();+ update();},+ delay: (step) => steps[step - 1]?.delay ?? 35,+ advance: (step) => steps[step - 1]?.run(),});- const opened = () =>- w.contentView() === 'tasks'- ? w.data.tasks.find((t) => t.id === w.selected())- : undefined;+ const pause = () => {+ takenOver = true;+ if (scrollFrame !== undefined) cancelAnimationFrame(scrollFrame);+ scrollFrame = undefined;+ playback.pause();+ setTyping(false);+ };return (<ProductDemoref={(el) => (root = el)}- label="Turn checklist items in a document into tasks"- onInteract={playback.pause}- height={460}- mobileHeight={560}+ label="Ask Macro to create tasks and change an owner"+ onInteract={pause}+ height={560}+ mobileHeight={620}>- <Show when={!opened()} fallback={<ProductWorkspace workspace={w} />}>- <ViewShell.TopBar>- <FileText class="size-4 text-note" />- <span class="text-sm font-medium">Q3 launch plan</span>- </ViewShell.TopBar>- <div class="dummy-scroll task-checklist-doc">- <h1>Q3 launch plan</h1>- <h2>Before Thursday</h2>- <div- class="task-checklist-block"- data-selected={phase() >= 1 && phase() < 3}- >- <Show when={phase() >= 1 && phase() < 3}>- <div- class="task-checklist-toolbar"- role="toolbar"- aria-label="Selection"- >- <button type="button">AI edit</button>- <button- type="button"- data-convert-tasks- onClick={() => {- playback.pause();- convert();- }}- >- <CheckSquare class="size-4" />- Tasks- <Show when={phase() === 2}>- <DemoCursor- label="Jacob"- class="task-checklist-cursor"- clicking- />- </Show>- </button>- <span class="task-checklist-divider" />- <button type="button" aria-label="Bold">- <TextB class="size-4" />- </button>- <button type="button" aria-label="Italic">- <TextItalic class="size-4" />- </button>- <button type="button" aria-label="Strikethrough">- <TextStrikethrough class="size-4" />- </button>- <button type="button" aria-label="Insert link">- <LinkIcon class="size-4" />- </button>- <span class="task-checklist-divider" />- <button type="button">- <GridFour class="size-4" />- Table- </button>- <span class="task-checklist-divider" />- <button type="button" aria-label="Comment">- <ChatTeardrop class="size-4" />- </button>- </div>- </Show>- <Show- when={tasks().length}- fallback={- <ul class="task-checklist-list">- <For each={checklist}>- {(item) => (- <li>- <span class="task-checklist-box" aria-hidden="true" />- <span class="task-checklist-text">{item}</span>- </li>- )}- </For>- </ul>- }- >- <ul class="task-checklist-list" data-converted="true">- <For each={tasks()}>- {(task) => (- <li>- <TaskMention- task={- w.data.tasks.find((t) => t.id === task.id) ?? task- }- onOpen={() => {- playback.pause();- w.open('tasks', task.id);- }}- />- </li>- )}- </For>- </ul>- </Show>- </div>- <p class="task-checklist-after">- Launch is Thursday at 9. Julia sends the announcement once the- invite fix ships.- </p>- <h2>Owners</h2>- <p class="task-checklist-after">- Teo owns sign-up, Julia owns the announcement, and Jacob runs the- final checklist.- </p>- </div>- </Show>+ <div class="task-agent-scene" data-typing={typing()} onWheel={pause}>+ <Show+ when={w.contentView() === 'messages'}+ fallback={<ProductWorkspace workspace={w} />}+ >+ <WorkspaceChannel+ workspace={w}+ scriptedReply={replyTarget}+ stableComposer+ onComposerReady={(handle, thread) => {+ const key = thread ?? 'main';+ if (handle) composers.set(key, handle);+ else composers.delete(key);+ }}+ />+ </Show>+ </div></ProductDemo>);}const PR = {- title: 'Keep the invited team through sign-up',- repo: 'launch-team/web',+ title: 'Fix mobile sign-in',+ repo: 'company/website',number: 491,};@@ -281,12 +234,30 @@ export function TaskGithubDemo() {let root!: HTMLDivElement;const w = createDummyWorkspace('tasks');w.open('tasks', 'invite');+ w.setChannel('website');+ w.setData('channels', [+ {+ id: 'website',+ messages: [+ {+ id: 'sign-in-request',+ person: 'julia',+ body: 'The sign-in button does nothing on mobile. Can you fix it?',+ time: '9:10 AM',+ taskId: 'invite',+ },+ ],+ },+ ]);w.updateTask('invite', {+ title: 'Fix the sign-in button',+ description: 'The sign-in button does nothing on mobile.',+ channel: 'website',+ tags: ['Website'],status: 'In Progress',steps: [- { id: 'new', text: 'New accounts land in the invited team', done: true },- { id: 'existing', text: 'Existing accounts switch teams', done: true },- { id: 'tests', text: 'Regression tests for both paths', done: false },+ { id: 'mobile', text: 'Sign-in works on mobile', done: true },+ { id: 'desktop', text: 'Desktop sign-in still works', done: true },],comments: [],});@@ -301,18 +272,12 @@ export function TaskGithubDemo() {reset: () => {},reduced: () => {move('merged', 'Completed');- w.updateTask('invite', {- steps: task().steps.map((item) => ({ ...item, done: true })),- });},delay: (step) => [0, 1000, 2200, 2200][step] ?? 1400,advance: (step) => {if (step === 1) move('open', 'In Review');if (step === 3) {move('merged', 'Completed');- w.updateTask('invite', {- steps: task().steps.map((item) => ({ ...item, done: true })),- });}},});@@ -327,7 +292,7 @@ export function TaskGithubDemo() {><Showwhen={w.contentView() === 'tasks' && w.selected() === 'invite'}- fallback={<WorkspaceTasks workspace={w} filter="all" />}+ fallback={<ProductWorkspace workspace={w} />}><TaskNotebookworkspace={w}diff --git a/apps/marketing/src/features/marketing/components/tasks/TasksComparison.tsx b/apps/marketing/src/features/marketing/components/tasks/TasksComparison.tsxindex 1d875ab98f..38ddd00be7 100644--- a/apps/marketing/src/features/marketing/components/tasks/TasksComparison.tsx+++ b/apps/marketing/src/features/marketing/components/tasks/TasksComparison.tsx@@ -1,78 +1,6 @@-import CaretDown from '@phosphor/caret-down.svg';-import {- type ComparisonColumn,- ComparisonLegend,- type ComparisonRow,- ComparisonTable,-} from '../../../../app/components/sections/ComparisonTable';-import LogoAsana from '../../../../assets/icons/logo-asana.svg';-import LogoClickUp from '../../../../assets/icons/logo-clickup.svg';-import LogoJira from '../../../../assets/icons/logo-jira.svg';-import LogoLinear from '../../../../assets/icons/logo-linear.svg';--const comparisonColumns: ComparisonColumn[] = [- { label: 'Macro' },- { label: 'Linear', logo: LogoLinear },- { label: 'Asana', logo: LogoAsana },- { label: 'Jira', logo: LogoJira },- { label: 'ClickUp', logo: LogoClickUp },-];--const comparisonRows: ComparisonRow[] = [- {- feature: 'Status, priority & assignee',- cells: [true, true, true, true, true],- },- {- feature: 'Create a task from an email',- cells: [true, true, true, true, true],- },- {- feature: 'Keyboard-first workflows',- cells: [true, true, 'partial', 'partial', true],- },- {- feature: 'Custom properties when you want them',- cells: [true, 'partial', true, true, true],- },- {- feature: 'Agents that can complete tasks',- cells: [true, 'partial', true, 'partial', true],- },- {- feature: 'GitHub: branch, PR & merge move the task',- cells: [true, true, false, 'partial', 'partial'],- },- {- feature: '@mention a task in docs & channels',- cells: [true, 'partial', false, false, 'partial'],- },- {- feature: 'Tasks in the same app as email & chat',- cells: [true, false, false, false, true],- },- {- feature: 'Open source (AGPLv3)',- cells: [true, false, false, false, false],- },-];+import { taskComparisons } from '../../core/feature-comparisons';+import { FeatureComparisons } from '../comparisons/FeatureComparisons';export function TasksComparison() {- return (- <details class="feature-page-comparison">- <summary>- <span>Compare task managers</span>- <CaretDown aria-hidden="true" />- </summary>- <div class="feature-page-comparison-content">- <ComparisonTable columns={comparisonColumns} rows={comparisonRows} />- <ComparisonLegend />- <p>- Read more about{' '}- <a href="/posts/linear-alternative">Macro and Linear</a>, or see{' '}- <a href="/pricing">plans and limits</a>.- </p>- </div>- </details>- );+ return <FeatureComparisons comparisons={taskComparisons} />;}diff --git a/apps/marketing/src/features/marketing/components/tasks/TasksWorkspace.test.tsx b/apps/marketing/src/features/marketing/components/tasks/TasksWorkspace.test.tsxnew file mode 100644index 0000000000..487ffcd925--- /dev/null+++ b/apps/marketing/src/features/marketing/components/tasks/TasksWorkspace.test.tsx@@ -0,0 +1,194 @@+import { cleanup, fireEvent, render, within } from '@solidjs/testing-library';+import { createRoot } from 'solid-js';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';+import { createTasksWorkspace } from './createTasksWorkspace';+import { TasksWorkspaceMain } from './TasksWorkspace';+import { TasksWorkspaceSidebar } from './TasksWorkspaceSidebar';++beforeEach(() => {+ vi.stubGlobal('fetch', vi.fn());+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ observe() {}+ unobserve() {}+ disconnect() {}+ }+ );+ vi.stubGlobal('matchMedia', () => ({+ matches: false,+ addEventListener: vi.fn(),+ removeEventListener: vi.fn(),+ }));+});+afterEach(() => {+ cleanup();+ expect(fetch).not.toHaveBeenCalled();+ vi.unstubAllGlobals();+});++function workspace() {+ const c = createTasksWorkspace(createDummyWorkspace('tasks'));+ return c;+}++it('keeps project membership independent of tags and moves an existing task between projects', () => {+ createRoot((dispose) => {+ const c = workspace();+ c.openProject('sales', 'tasks');+ expect(c.tasks()).toHaveLength(5);+ c.assignProject('proposal', 'sales');+ expect(c.tasks().map((task) => task.id)).toContain('proposal');+ c.openProject('customers', 'tasks');+ expect(c.tasks().map((task) => task.id)).not.toContain('proposal');+ c.navigate('all');+ expect(c.w.data.tasks).toHaveLength(12);+ expect(c.metadata.proposal.projectId).toBe('sales');+ dispose();+ });+});++it('creates a task in the current project without changing its generated identity', () => {+ createRoot((dispose) => {+ const c = workspace();+ c.openProject('sales', 'tasks');+ c.setComposer('task');+ c.create({+ ...c.w.data.tasks[0],+ id: 'draft',+ title: 'Confirm Friday’s check-in',+ });+ const task = c+ .tasks()+ .find((item) => item.title === 'Confirm Friday’s check-in')!;+ expect(task.id).not.toBe('draft');+ expect(c.metadata[task.id].projectId).toBe('sales');+ expect(c.tasks()).toHaveLength(6);+ expect(c.composer()).toBeUndefined();+ dispose();+ });+});++it('keeps filtering and grouping scoped to the project, with live status changes', () => {+ createRoot((dispose) => {+ const c = workspace();+ c.openProject('sales', 'tasks');+ c.toggleFilter('status', 'Completed');+ expect(c.tasks().map((task) => task.id)).toEqual(['contacts']);+ c.saveTask('training', { status: 'Completed' });+ expect(c.tasks().map((task) => task.id)).toEqual(['training', 'contacts']);+ c.openProject('customers', 'tasks');+ expect(c.filters.status).toEqual([]);+ expect(c.tasks()).toHaveLength(4);+ dispose();+ });+});++it('opens the real project overview and task collection from the sidebar', () => {+ let disposeState: (() => void) | undefined;+ const c = createRoot((dispose) => {+ disposeState = dispose;+ return workspace();+ });+ const view = render(() => (+ <>+ <TasksWorkspaceSidebar+ state={c}+ collapse={() => {}}+ onNavigate={() => {}}+ />+ <TasksWorkspaceMain state={c} />+ </>+ ));+ fireEvent.click(+ within(view.getByRole('navigation', { name: 'My projects' })).getByRole(+ 'button',+ { name: 'Customer proposal' }+ )+ );+ expect(+ view.getByRole('textbox', { name: 'Project description' }).textContent+ ).toContain('Prepare a proposal');+ c.setSection('tasks');+ const table = within(view.getByRole('table', { name: 'Tasks list' }));+ expect(table.getAllByRole('button', { name: /^Open task / })).toHaveLength(5);+ fireEvent.click(+ table.getByRole('button', { name: 'Open task Draft the customer proposal' })+ );+ const description = view.getByRole('textbox', { name: 'Task description' });+ Object.defineProperty(description, 'innerText', {+ value: 'The walkthrough is ready.',+ configurable: true,+ });+ fireEvent.blur(description);+ fireEvent.click(+ view.getAllByRole('button', { name: 'Customer proposal' })[1]+ );+ expect(view.getByRole('table', { name: 'Tasks list' })).toBeTruthy();+ expect(+ c.w.data.tasks.find((task) => task.id === 'training')?.description+ ).toBe('The walkthrough is ready.');+ disposeState?.();+});++it('creates independent project records and restores fixture state on reset', () => {+ createRoot((dispose) => {+ const c = workspace();+ c.setComposer('project');+ c.create({ ...c.projects[0], id: 'draft', title: 'Customer workshop' });+ const project = c.projects.find(+ (item) => item.title === 'Customer workshop'+ )!;+ expect(project.id).not.toBe('draft');+ c.openProject(project.id, 'tasks');+ expect(c.tasks()).toHaveLength(0);+ c.reset();+ expect(c.projects).toHaveLength(3);+ expect(c.w.data.tasks).toHaveLength(12);+ dispose();+ });+});++it('restores separate layouts for the main task list and each project', () => {+ createRoot((dispose) => {+ const c = workspace();+ c.setLayout('Board');+ c.setGroup('Assignee');+ c.openProject('sales', 'tasks');+ expect(c.layout()).toBe('List');+ expect(c.group()).toBe('Status');+ c.setLayout('Board');+ c.openProject('customers', 'tasks');+ expect(c.layout()).toBe('List');+ c.openProject('sales', 'tasks');+ expect(c.layout()).toBe('Board');+ c.navigate('all');+ expect(c.layout()).toBe('Board');+ expect(c.group()).toBe('Assignee');+ dispose();+ });+});++it('expands project search and clears it on Escape without losing the project', () => {+ let disposeState: (() => void) | undefined;+ const c = createRoot((dispose) => {+ disposeState = dispose;+ return workspace();+ });+ c.openProject('sales', 'tasks');+ const view = render(() => <TasksWorkspaceMain state={c} />);+ fireEvent.click(+ view.getByRole('button', { name: 'Search in Customer proposal' })+ );+ const search = view.getByRole('searchbox', {+ name: 'Search in Customer proposal',+ });+ fireEvent.input(search, { target: { value: 'Draft the scope' } });+ expect(c.tasks()).toHaveLength(1);+ fireEvent.keyDown(search, { key: 'Escape' });+ expect(c.search()).toBe('');+ expect(c.projectId()).toBe('sales');+ expect(c.tasks()).toHaveLength(5);+ disposeState?.();+});diff --git a/apps/marketing/src/features/marketing/components/tasks/TasksWorkspace.tsx b/apps/marketing/src/features/marketing/components/tasks/TasksWorkspace.tsxnew file mode 100644index 0000000000..d0d4e4377b--- /dev/null+++ b/apps/marketing/src/features/marketing/components/tasks/TasksWorkspace.tsx@@ -0,0 +1,908 @@+import Calendar from '@phosphor/calendar-blank.svg';+import Caret from '@phosphor/caret-right.svg';+import Check from '@phosphor/check.svg';+import ListChecks from '@phosphor/list-checks.svg';+import Stack from '@phosphor/stack.svg';+import X from '@phosphor/x.svg';+import { Button, Dialog, Dropdown } from '@ui';+import { TabsInset } from '@ui/components/TabsInset';+import { createEffect, createSignal, For, Show } from 'solid-js';+import type { WorkspaceTask } from '../../core/dummy-workspace';+import { homepagePeople } from '../../core/homepage-demo-people';+import { ViewShell } from '../DemoWorkspaceChrome';+import { DocumentShareSheet } from '../documents/DocumentShareSheet';+import { ChannelComposer } from '../email/frozen/ChannelComposer';+import { PanelToggle } from '../workspace/frozen/DetailPanel';+import { MessageRow } from '../workspace/frozen/MessageRow';+import { PropertyValueIcon } from '../workspace/frozen/PropertyValueIcon';+import { TaskNotebook } from '../workspace/frozen/TaskNotebook';+import {+ PRIORITY_IDS,+ STATUS_IDS,+ TaskOwnerMenu,+ TaskPriorityMenu,+ TaskStatusMenu,+} from '../workspace/frozen/TaskProperties';+import { projectStatuses, type TasksWorkspace } from './createTasksWorkspace';+import { TasksWorkspaceControls } from './TasksWorkspaceControls';+import type { DemoProject } from './tasksWorkspaceData';+import './tasks-workspace.css';++function ProjectStatus(props: {+ project: DemoProject;+ save: (status: DemoProject['status']) => void;+ inline?: boolean;+}) {+ return (+ <Dropdown modal={false}>+ <Dropdown.Trigger+ aria-label="Change project status"+ class={props.inline ? 'sample-list-property' : 'tasks-native-pill'}+ >+ <PropertyValueIcon+ optionId={STATUS_IDS[props.project.status]}+ class="size-3"+ />+ <span>{props.project.status}</span>+ </Dropdown.Trigger>+ <Dropdown.Content portalScope="local">+ <Dropdown.Group>+ <For each={projectStatuses}>+ {(status) => (+ <Dropdown.Item onSelect={() => props.save(status)}>+ <PropertyValueIcon+ optionId={STATUS_IDS[status]}+ class="size-3"+ />+ {status}+ <Show when={status === props.project.status}>+ <Check class="size-3 ml-auto" />+ </Show>+ </Dropdown.Item>+ )}+ </For>+ </Dropdown.Group>+ </Dropdown.Content>+ </Dropdown>+ );+}++export function TaskProjectPicker(props: {+ state: TasksWorkspace;+ taskId: string;+}) {+ const c = props.state;+ return (+ <Dropdown modal={false}>+ <Dropdown.Trigger+ class="tasks-native-project-cell"+ aria-label="Change project"+ title={c.projectName(props.taskId)}+ >+ <Stack class="size-3 shrink-0" />+ <span class="truncate">{c.projectName(props.taskId)}</span>+ </Dropdown.Trigger>+ <Dropdown.Content portalScope="local">+ <Dropdown.Group>+ <Dropdown.Item onSelect={() => c.assignProject(props.taskId, '')}>+ No project+ </Dropdown.Item>+ <For each={c.projects}>+ {(project) => (+ <Dropdown.Item+ onSelect={() => c.assignProject(props.taskId, project.id)}+ >+ <Stack class="size-3" />+ {project.title}+ </Dropdown.Item>+ )}+ </For>+ </Dropdown.Group>+ </Dropdown.Content>+ </Dropdown>+ );+}++function DateValue(props: { value?: string }) {+ return (+ <Show when={props.value}>+ {(value) => (+ <span class="tasks-native-date">+ <Calendar class="size-3" />+ {new Date(`${value()}T12:00:00`).toLocaleDateString('en-US', {+ month: 'short',+ day: 'numeric',+ })}+ </span>+ )}+ </Show>+ );+}++function TasksGrid(props: { state: TasksWorkspace }) {+ const c = props.state;+ const [collapsed, setCollapsed] = createSignal<string[]>([]);+ const [selected, setSelected] = createSignal<string[]>([]);+ createEffect(() => {+ c.tab();+ c.projectId();+ setSelected([]);+ setCollapsed([]);+ });+ const toggle = (id: string) =>+ setSelected((ids) =>+ ids.includes(id) ? ids.filter((item) => item !== id) : [...ids, id]+ );+ const save = (item: WorkspaceTask, patch: Partial<WorkspaceTask>) =>+ c.projectList()+ ? c.saveProject(item.id, patch)+ : c.saveTask(item.id, patch);+ const title = (item: WorkspaceTask) =>+ c.projectList() ? `Open project ${item.title}` : `Open task ${item.title}`;+ const open = (item: WorkspaceTask) =>+ c.projectList() ? c.openProject(item.id) : c.openTask(item.id);+ const board = () => c.layout() === 'Board' && !c.projectList();+ const drop = (event: DragEvent, key: string) => {+ event.preventDefault();+ const id = event.dataTransfer?.getData('text/plain');+ if (!id) return;+ const task = c.w.data.tasks.find((item) => item.id === id);+ if (!task) return;+ if (c.group() === 'Status') {+ const status = Object.keys(STATUS_IDS).find((value) => value === key) as+ | WorkspaceTask['status']+ | undefined;+ if (status) c.saveTask(id, { status });+ }+ if (c.group() === 'Priority') {+ const priority = Object.keys(PRIORITY_IDS).find(+ (value) => value === key+ ) as WorkspaceTask['priority'] | undefined;+ if (priority) c.saveTask(id, { priority });+ }+ if (c.group() === 'Project')+ c.assignProject(+ id,+ c.projects.find((item) => item.title === key)?.id ?? ''+ );+ if (c.group() === 'Assignee') {+ const owner = Object.keys(homepagePeople).find(+ (value) => value === key+ ) as WorkspaceTask['owner'] | undefined;+ if (owner) c.saveTask(id, { owner });+ }+ };+ return (+ <>+ <Show when={selected().length}>+ <div class="tasks-native-selection">+ <span>{selected().length} selected</span>+ <Dropdown modal={false}>+ <Dropdown.Trigger size="sm">Set status</Dropdown.Trigger>+ <Dropdown.Content portalScope="local">+ <For+ each={+ c.projectList()+ ? projectStatuses+ : (Object.keys(STATUS_IDS) as WorkspaceTask['status'][])+ }+ >+ {(status) => (+ <Dropdown.Item+ onSelect={() => {+ for (const id of selected()) {+ if (c.projectList()) c.saveProject(id, { status });+ else c.saveTask(id, { status });+ }+ setSelected([]);+ }}+ >+ {status}+ </Dropdown.Item>+ )}+ </For>+ </Dropdown.Content>+ </Dropdown>+ <Button size="sm" variant="plain" onClick={() => setSelected([])}>+ Clear selection+ </Button>+ </div>+ </Show>+ <div+ class="tasks-native-list"+ data-board={board()}+ role={board() ? 'group' : 'table'}+ aria-label={+ c.projectList() ? 'Projects' : board() ? 'Task board' : 'Tasks list'+ }+ >+ <Show when={!board()}>+ <div role="row" class="tasks-native-grid tasks-native-grid-header">+ <span role="columnheader" />+ <span role="columnheader">+ {c.projectList() ? 'Project' : 'Task'}+ </span>+ <span role="columnheader">Status</span>+ <span role="columnheader">Priority</span>+ <span role="columnheader">Assignees</span>+ <span role="columnheader">+ {c.projectList() ? 'Due date' : 'Project'}+ </span>+ <span role="columnheader" class="tasks-native-updated">+ Updated+ </span>+ </div>+ </Show>+ <div class={board() ? 'tasks-native-board' : ''} data-group={c.group()}>+ <For each={c.groups()}>+ {(group) => (+ <section+ class="tasks-native-task-group"+ onDragOver={(event) => {+ if (board()) event.preventDefault();+ }}+ onDrop={(event) => drop(event, group.key)}+ >+ <Show when={c.group() !== 'None'}>+ <button+ type="button"+ class="tasks-native-group-heading"+ aria-expanded={!collapsed().includes(group.key)}+ onClick={() =>+ setCollapsed((values) =>+ values.includes(group.key)+ ? values.filter((value) => value !== group.key)+ : [...values, group.key]+ )+ }+ >+ <Caret+ class="size-3"+ style={{+ transform: collapsed().includes(group.key)+ ? ''+ : 'rotate(90deg)',+ }}+ />+ <Show when={c.group() === 'Priority'}>+ <PropertyValueIcon+ optionId={+ PRIORITY_IDS[group.key as WorkspaceTask['priority']]+ }+ class="size-3.5"+ />+ </Show>+ <Show when={c.group() === 'Status'}>+ <PropertyValueIcon+ optionId={+ STATUS_IDS[group.key as WorkspaceTask['status']]+ }+ class="size-3.5"+ />+ </Show>+ <span>+ {c.group() === 'Assignee'+ ? homepagePeople[group.key as WorkspaceTask['owner']]+ ?.shortName+ : group.key}+ </span>+ <span class="tasks-native-count">{group.items.length}</span>+ </button>+ </Show>+ <Show when={!collapsed().includes(group.key)}>+ <For each={group.items}>+ {(item) => (+ <div+ role={board() ? 'article' : 'row'}+ class={+ board()+ ? 'tasks-native-card'+ : 'tasks-native-grid tasks-native-row'+ }+ draggable={board()}+ onDragStart={(event) =>+ event.dataTransfer?.setData('text/plain', item.id)+ }+ >+ <Show when={!board()}>+ <input+ type="checkbox"+ aria-label={`Select ${item.title}`}+ checked={selected().includes(item.id)}+ onChange={() => toggle(item.id)}+ />+ </Show>+ <button+ type="button"+ class="tasks-native-name"+ data-open-task={item.id}+ title={item.title}+ aria-label={title(item)}+ onClick={() => open(item)}+ >+ <Show+ when={c.projectList()}+ fallback={<ListChecks class="size-4 text-task" />}+ >+ <Stack class="size-4 text-ink-muted" />+ </Show>+ <span>{item.title}</span>+ </button>+ <div class="tasks-native-status">+ <Show+ when={c.projectList()}+ fallback={+ <TaskStatusMenu+ inline+ task={item}+ onSave={(status) => save(item, { status })}+ />+ }+ >+ <ProjectStatus+ inline+ project={item as DemoProject}+ save={(status) => save(item, { status })}+ />+ </Show>+ </div>+ <div class="tasks-native-priority">+ <TaskPriorityMenu+ inline+ task={item}+ onSave={(priority) => save(item, { priority })}+ />+ </div>+ <div class="tasks-native-assignee">+ <TaskOwnerMenu+ inline+ task={item}+ onSave={(owner) => save(item, { owner })}+ />+ </div>+ <div class="tasks-native-project">+ <Show+ when={c.projectList()}+ fallback={+ <TaskProjectPicker state={c} taskId={item.id} />+ }+ >+ <DateValue value={(item as DemoProject).dueDate} />+ </Show>+ </div>+ <time class="tasks-native-updated">+ {c.projectList()+ ? 'Today'+ : (c.metadata[item.id]?.updated ?? 0) > 96+ ? 'Today'+ : (c.metadata[item.id]?.updated ?? 0) > 92+ ? 'Yesterday'+ : 'Oct 6'}+ </time>+ </div>+ )}+ </For>+ </Show>+ </section>+ )}+ </For>+ </div>+ <Show when={!c.groups().some((group) => group.items.length)}>+ <p class="tasks-native-empty">+ {c.search() ||+ c.filters.status.length ||+ c.filters.owner.length ||+ c.filters.priority.length+ ? 'No matching items.'+ : c.projectList()+ ? 'No projects yet.'+ : 'No tasks yet.'}+ </p>+ </Show>+ </div>+ </>+ );+}++function ProjectOverview(props: {+ state: TasksWorkspace;+ project: DemoProject;+}) {+ const c = props.state;+ return (+ <div class="tasks-native-overview dummy-scroll">+ <div>+ <h1+ contentEditable+ role="textbox"+ aria-label="Project name"+ onBlur={(event) =>+ c.saveProject(props.project.id, {+ title:+ event.currentTarget.innerText.trim() || props.project.title,+ })+ }+ >+ {props.project.title}+ </h1>+ <div class="tasks-native-properties">+ <ProjectStatus+ project={props.project}+ save={(status) => c.saveProject(props.project.id, { status })}+ />+ <TaskPriorityMenu+ task={props.project}+ onSave={(priority) => c.saveProject(props.project.id, { priority })}+ />+ <TaskOwnerMenu+ task={props.project}+ onSave={(owner) => c.saveProject(props.project.id, { owner })}+ />+ <DateValue value={props.project.dueDate} />+ </div>+ <div+ contentEditable+ role="textbox"+ aria-label="Project description"+ class="tasks-native-description"+ onBlur={(event) =>+ c.saveProject(props.project.id, {+ description: event.currentTarget.innerText,+ })+ }+ >+ {props.project.description}+ </div>+ <h2 class="tasks-native-discussion-title">Discussion</h2>+ <For each={props.project.comments}>+ {(message) => <MessageRow message={message} />}+ </For>+ <ChannelComposer+ label="Comment on project"+ placeholder="Leave a comment…"+ onSend={(body) =>+ c.saveProject(props.project.id, {+ comments: [+ ...props.project.comments,+ {+ id: crypto.randomUUID(),+ person: 'jacob',+ body,+ time: 'Just now',+ },+ ],+ })+ }+ />+ </div>+ </div>+ );+}++function WorkspaceComposer(props: {+ state: TasksWorkspace;+ mount: HTMLElement;+}) {+ const c = props.state;+ const [title, setTitle] = createSignal('');+ const [description, setDescription] = createSignal('');+ const [due, setDue] = createSignal('');+ const [draft, setDraft] = createSignal<WorkspaceTask>({+ id: 'draft',+ title: '',+ description: '',+ status: 'Not Started',+ priority: 'Medium',+ owner: 'jacob',+ creator: 'jacob',+ channel: c.projectId() ?? 'customers',+ tags: [],+ steps: [],+ comments: [],+ });+ const update = (patch: Partial<WorkspaceTask>) =>+ setDraft((value) => ({ ...value, ...patch }));+ return (+ <Dialog+ open+ mount={props.mount}+ position="center"+ onOpenChange={(open) => {+ if (!open) c.setComposer(undefined);+ }}+ class="tasks-native-modal"+ >+ <form+ onSubmit={(event) => {+ event.preventDefault();+ if (title().trim())+ c.create(+ { ...draft(), title: title().trim(), description: description() },+ due()+ );+ }}+ >+ <div class="flex items-center justify-between">+ <Dialog.Title class="text-sm text-ink-muted">+ {c.composer() === 'project' ? 'New project' : 'New task'}+ </Dialog.Title>+ <Dialog.CloseButton aria-label="Close composer" tabIndex={-1}>+ <X class="size-4" />+ </Dialog.CloseButton>+ </div>+ <input+ aria-label={c.composer() === 'project' ? 'Project name' : 'Task name'}+ placeholder={+ c.composer() === 'project' ? 'Project name' : 'Task name'+ }+ value={title()}+ onInput={(event) => setTitle(event.currentTarget.value)}+ />+ <textarea+ aria-label="Description"+ placeholder="Add description…"+ value={description()}+ onInput={(event) => setDescription(event.currentTarget.value)}+ />+ <div class="tasks-native-properties">+ <Show+ when={c.composer() === 'project'}+ fallback={+ <TaskStatusMenu+ task={draft()}+ onSave={(status) => update({ status })}+ />+ }+ >+ <ProjectStatus+ project={{ ...draft(), dueDate: due() }}+ save={(status) => update({ status })}+ />+ </Show>+ <TaskPriorityMenu+ task={draft()}+ onSave={(priority) => update({ priority })}+ />+ <TaskOwnerMenu task={draft()} onSave={(owner) => update({ owner })} />+ <label class="tasks-native-date tasks-native-date-input">+ <Calendar class="size-3" />+ <span>+ {due()+ ? new Date(`${due()}T12:00:00`).toLocaleDateString('en-US', {+ month: 'short',+ day: 'numeric',+ })+ : 'Due date'}+ </span>+ <input+ type="date"+ aria-label="Due date"+ value={due()}+ onInput={(event) => setDue(event.currentTarget.value)}+ />+ </label>+ <Show when={c.composer() === 'task' && c.project()}>+ {(project) => (+ <span class="tasks-native-pill">+ <Stack class="size-3" />+ {project().title}+ </span>+ )}+ </Show>+ </div>+ <div class="tasks-native-composer-footer">+ <span class="text-xs text-ink-muted">Shared with Team</span>+ <Button+ type="submit"+ size="sm"+ variant="strong"+ disabled={!title().trim()}+ >+ {c.composer() === 'project' ? 'Create Project' : 'Create Task'}+ </Button>+ </div>+ </form>+ </Dialog>+ );+}++function AddTasks(props: { state: TasksWorkspace }) {+ const c = props.state;+ const [search, setSearch] = createSignal('');+ const [selected, setSelected] = createSignal<string[]>([]);+ const choices = () =>+ c.w.data.tasks.filter(+ (task) =>+ c.metadata[task.id]?.projectId !== c.projectId() &&+ task.title.toLowerCase().includes(search().toLowerCase())+ );+ return (+ <Dropdown+ open={c.adding()}+ placement="bottom-end"+ modal={false}+ onOpenChange={(open) => {+ if (open) {+ setSearch('');+ setSelected([]);+ }+ c.setAdding(open);+ }}+ >+ <Dropdown.Trigger size="sm" variant="outline">+ Add existing tasks+ </Dropdown.Trigger>+ <Dropdown.Content portalScope="local" class="tasks-native-add-dropdown">+ <input+ aria-label="Find tasks to add"+ placeholder="Search tasks…"+ value={search()}+ onInput={(event) => setSearch(event.currentTarget.value)}+ onKeyDown={(event) => event.stopPropagation()}+ />+ <div class="tasks-native-add-list">+ <For each={choices()}>+ {(task) => (+ <Dropdown.CheckboxItem+ checked={selected().includes(task.id)}+ onChange={() =>+ setSelected((ids) =>+ ids.includes(task.id)+ ? ids.filter((id) => id !== task.id)+ : [...ids, task.id]+ )+ }+ >+ {task.title}+ </Dropdown.CheckboxItem>+ )}+ </For>+ </div>+ <div+ class="tasks-native-composer-footer"+ onKeyDown={(event) => event.stopPropagation()}+ >+ <Button size="sm" onClick={() => c.setAdding(false)}>+ Cancel+ </Button>+ <Button+ variant="strong"+ size="sm"+ disabled={!selected().length}+ onClick={() => {+ for (const id of selected()) c.assignProject(id, c.projectId()!);+ c.setAdding(false);+ }}+ >+ Add {selected().length} {selected().length === 1 ? 'task' : 'tasks'}+ </Button>+ </div>+ </Dropdown.Content>+ </Dropdown>+ );+}++export function TasksWorkspaceMain(props: { state: TasksWorkspace }) {+ const c = props.state;+ let root!: HTMLDivElement;+ const [sharing, setSharing] = createSignal(false);+ const [details, setDetails] = createSignal(false);+ const location = () =>+ c.tab() === 'mine'+ ? 'My Tasks'+ : c.tab() === 'created'+ ? 'Created by me'+ : c.tab() === 'projects'+ ? 'Projects'+ : 'All Tasks';+ const navigation = () => (+ <>+ <button+ type="button"+ class="tasks-native-breadcrumb"+ onClick={() => c.navigate(c.tab())}+ >+ {location()}+ </button>+ <Show when={c.project()}>+ {(project) => (+ <>+ <Caret class="size-3" />+ <button+ type="button"+ class="tasks-native-breadcrumb"+ onClick={() => {+ c.back();+ c.setSection('tasks');+ }}+ >+ <Stack class="size-3" />+ {project().title}+ </button>+ </>+ )}+ </Show>+ <Show when={c.task()}>+ <Caret class="size-3" />+ </Show>+ </>+ );+ return (+ <div+ ref={root}+ class="tasks-native-main"+ onKeyDown={(event) => {+ if (event.defaultPrevented) return;+ if (event.key === 'Escape' && details()) {+ setDetails(false);+ event.stopPropagation();+ return;+ }+ if ((event.metaKey || event.ctrlKey) && event.key === 'f') {+ event.preventDefault();+ const search = root.querySelector<HTMLInputElement>(+ 'input[type="search"]'+ );+ if (search) search.focus();+ else+ root+ .querySelector<HTMLButtonElement>('[data-project-search-trigger]')+ ?.click();+ }+ if (event.key === 'Escape' && c.task() && !c.composer() && !sharing()) {+ const id = c.task()!.id;+ c.back();+ queueMicrotask(() =>+ root+ .querySelector<HTMLButtonElement>(`[data-open-task="${id}"]`)+ ?.focus()+ );+ }+ }}+ >+ <Show+ when={c.task()}+ fallback={+ <>+ <ViewShell.TopBar>+ {navigation()}+ <Show when={c.project()}>+ <TabsInset+ aria-label="Project sections"+ list={[+ { value: 'overview', label: 'Overview' },+ { value: 'tasks', label: 'Tasks' },+ ]}+ value={c.section()}+ onChange={(value) =>+ c.setSection(value === 'tasks' ? 'tasks' : 'overview')+ }+ />+ <Button+ class="ml-auto"+ variant="plain"+ size="sm"+ onClick={() => setSharing(true)}+ >+ Share+ </Button>+ <PanelToggle open={details()} onChange={setDetails} />+ </Show>+ </ViewShell.TopBar>+ <Show when={!c.projectId()}>+ <div class="tasks-native-mobile-tabs">+ <For+ each={[+ { id: 'mine' as const, label: 'My Tasks' },+ { id: 'all' as const, label: 'All Tasks' },+ { id: 'created' as const, label: 'Created by me' },+ { id: 'projects' as const, label: 'Projects' },+ ]}+ >+ {(item) => (+ <button+ type="button"+ aria-pressed={c.tab() === item.id && !c.projectId()}+ onClick={() => c.navigate(item.id)}+ >+ {item.label}+ </button>+ )}+ </For>+ </div>+ </Show>+ <Show+ when={c.project() && c.section() === 'overview'}+ fallback={+ <>+ <TasksWorkspaceControls+ state={c}+ actions={+ <Show when={c.projectId()}>+ <AddTasks state={c} />+ <Button size="sm" onClick={() => c.setComposer('task')}>+ New task+ </Button>+ </Show>+ }+ />+ <TasksGrid state={c} />+ </>+ }+ >+ <ProjectOverview state={c} project={c.project()!} />+ </Show>+ </>+ }+ >+ {(task) => (+ <TaskNotebook+ workspace={{+ ...c.w,+ updateTask: c.saveTask,+ backToCollection: c.back,+ }}+ task={task()}+ hideCollectionNavigation+ sourceContent={+ !c.w.data.channels.some((channel) =>+ channel.messages.some((message) => message.taskId === task().id)+ ) ? (+ <span />+ ) : undefined+ }+ navigation={navigation()}+ onShare={() => setSharing(true)}+ pills={+ <>+ <TaskProjectPicker state={c} taskId={task().id} />+ <DateValue value={c.metadata[task().id]?.dueDate} />+ </>+ }+ />+ )}+ </Show>+ <Show when={c.composer()}>+ <WorkspaceComposer state={c} mount={root} />+ </Show>+ <Show when={details() && c.project() && !c.task()}>+ <aside class="tasks-native-details" aria-label="Project details">+ <div class="flex items-center justify-between">+ <h2>Properties</h2>+ <Button+ variant="plain"+ size="icon-sm"+ label="Close project details"+ onClick={() => setDetails(false)}+ >+ <X />+ </Button>+ </div>+ <p class="text-xs text-ink-muted">Status</p>+ <ProjectStatus+ project={c.project()!}+ save={(status) => c.saveProject(c.projectId()!, { status })}+ />+ <p class="text-xs text-ink-muted">Priority</p>+ <TaskPriorityMenu+ task={c.project()!}+ onSave={(priority) => c.saveProject(c.projectId()!, { priority })}+ />+ <p class="text-xs text-ink-muted">Assignees</p>+ <TaskOwnerMenu+ task={c.project()!}+ onSave={(owner) => c.saveProject(c.projectId()!, { owner })}+ />+ <p class="text-xs text-ink-muted">Due date</p>+ <DateValue value={c.project()?.dueDate} />+ </aside>+ </Show>+ <DocumentShareSheet+ open={sharing()}+ title={c.task()?.title ?? c.project()?.title ?? location()}+ entityLabel={c.task() ? 'task' : 'project'}+ onClose={() => setSharing(false)}+ />+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/tasks/TasksWorkspaceControls.tsx b/apps/marketing/src/features/marketing/components/tasks/TasksWorkspaceControls.tsxnew file mode 100644index 0000000000..01cd5daab0--- /dev/null+++ b/apps/marketing/src/features/marketing/components/tasks/TasksWorkspaceControls.tsx@@ -0,0 +1,320 @@+import Check from '@phosphor/check.svg';+import Filter from '@phosphor/funnel-simple.svg';+import Board from '@phosphor/kanban.svg';+import List from '@phosphor/list-bullets.svg';+import SearchIcon from '@phosphor/magnifying-glass.svg';+import Sort from '@phosphor/sort-ascending.svg';+import Stack from '@phosphor/stack.svg';+import X from '@phosphor/x.svg';+import { Button, Dropdown } from '@ui';+import { createSignal, For, type JSX, Show } from 'solid-js';+import { homepagePeople } from '../../core/homepage-demo-people';+import { SearchBar } from '../email/frozen/SearchBar';+import {+ type GroupBy,+ priorities,+ projectStatuses,+ type TasksWorkspace,+ taskStatuses,+} from './createTasksWorkspace';++/** Presentation from view-shell/ListDropdowns; commands stay in this demo. */+export function NativeMenu<T extends string>(props: {+ label: string;+ icon: JSX.Element;+ value: T;+ options: readonly T[];+ onChange: (value: T) => void;+ children?: JSX.Element;+}) {+ return (+ <Dropdown placement="bottom-end" modal={false}>+ <Dropdown.Trigger variant="ghost" size="icon-md" label={props.label}>+ {props.icon}+ {props.children}+ </Dropdown.Trigger>+ <Dropdown.Content portalScope="local" class="min-w-40">+ <Dropdown.Group>+ <Dropdown.RadioGroup+ value={props.value}+ onChange={(value) => {+ const next = props.options.find((item) => item === value);+ if (next) props.onChange(next);+ }}+ >+ <For each={props.options}>+ {(option) => (+ <Dropdown.RadioItem closeOnSelect value={option}>+ <span class="flex-1">{option}</span>+ <Dropdown.ItemIndicator>+ <Check class="size-3.5 text-accent" />+ </Dropdown.ItemIndicator>+ </Dropdown.RadioItem>+ )}+ </For>+ </Dropdown.RadioGroup>+ </Dropdown.Group>+ </Dropdown.Content>+ </Dropdown>+ );+}++/** ProjectTaskSearch from the app: expand in place; Escape clears and closes. */+function ProjectTaskSearch(props: { state: TasksWorkspace }) {+ const c = props.state;+ const [expanded, setExpanded] = createSignal(false);+ let trigger: HTMLButtonElement | undefined;+ let input: HTMLInputElement | undefined;+ const label = () => `Search in ${c.project()?.title ?? 'project'}`;+ const close = () => {+ c.setSearch('');+ setExpanded(false);+ queueMicrotask(() => trigger?.focus());+ };+ return (+ <Show+ when={expanded()}+ fallback={+ <Button+ ref={trigger}+ variant="outline"+ size="icon-md"+ label={label()}+ data-project-search-trigger+ aria-expanded={false}+ onClick={() => {+ setExpanded(true);+ queueMicrotask(() => input?.focus());+ }}+ >+ <SearchIcon />+ </Button>+ }+ >+ <div class="tasks-native-project-search">+ <SearchIcon class="size-3.5" />+ <input+ ref={input}+ type="search"+ aria-label={label()}+ placeholder={label()}+ value={c.search()}+ onInput={(event) => c.setSearch(event.currentTarget.value)}+ onKeyDown={(event) => {+ if (event.key === 'Escape') {+ event.stopPropagation();+ close();+ }+ }}+ />+ <Button+ variant="plain"+ size="icon-sm"+ label="Close project search"+ onClick={close}+ >+ <X />+ </Button>+ </div>+ </Show>+ );+}++export function TasksWorkspaceControls(props: {+ state: TasksWorkspace;+ actions?: JSX.Element;+}) {+ const c = props.state;+ const [filterOpen, setFilterOpen] = createSignal(false);+ const [filterText, setFilterText] = createSignal('');+ const [filterError, setFilterError] = createSignal(false);+ const filterGroups = () => [+ {+ key: 'status' as const,+ label: 'Status',+ values: c.projectList() ? projectStatuses : taskStatuses,+ },+ { key: 'priority' as const, label: 'Priority', values: priorities },+ {+ key: 'owner' as const,+ label: 'Assignee',+ values: ['jacob', 'julia', 'teo', 'gabriel'],+ },+ ];+ const filterLabel = (key: string, value: string) =>+ key === 'owner'+ ? homepagePeople[value as keyof typeof homepagePeople].shortName+ : value;+ const applyText = () => {+ const text = filterText().toLowerCase();+ const status = taskStatuses.filter((value) =>+ text.includes(value.toLowerCase())+ );+ const priority = priorities.filter((value) =>+ text.includes(value.toLowerCase())+ );+ const owner = ['jacob', 'julia', 'teo', 'gabriel'].filter((value) =>+ text.includes(value)+ );+ if (!status.length && !priority.length && !owner.length) {+ setFilterError(true);+ return;+ }+ c.setFilters({+ status: text.includes('not completed')+ ? taskStatuses.filter((value) => value !== 'Completed')+ : [...status],+ priority: [...priority],+ owner,+ tag: '',+ });+ setFilterOpen(false);+ setFilterError(false);+ };+ return (+ <div class="tasks-native-toolbar" data-project={!!c.projectId()}>+ <Show+ when={c.projectId()}+ fallback={+ <SearchBar+ label={+ c.projectList()+ ? 'Search projects'+ : c.projectId()+ ? 'Search project tasks'+ : 'Search tasks'+ }+ placeholder={c.projectList() ? 'Search projects' : 'Search tasks'}+ value={c.search()}+ onValueChange={c.setSearch}+ hotkey="cmd+f"+ class="min-w-0 flex-1 max-w-md"+ />+ }+ >+ <ProjectTaskSearch state={c} />+ </Show>+ <div class="tasks-native-controls">+ <Show when={!c.projectList()}>+ <NativeMenu+ label="Task layout"+ icon={c.layout() === 'Board' ? <Board /> : <List />}+ value={c.layout()}+ options={['List', 'Board']}+ onChange={(value) => {+ c.setLayout(value);+ if (value === 'Board' && c.group() === 'None')+ c.setGroup('Status');+ }}+ />+ </Show>+ <NativeMenu+ label={c.projectList() ? 'Sort projects' : 'Sort tasks'}+ icon={<Sort />}+ value={c.sort()}+ options={['Updated', 'Created']}+ onChange={c.setSort}+ />+ <NativeMenu+ label={c.projectList() ? 'Group projects' : 'Group by'}+ icon={<Stack />}+ value={c.group()}+ options={+ [+ 'None',+ 'Status',+ 'Priority',+ 'Assignee',+ ...(!c.projectList() ? ['Project'] : []),+ ] as GroupBy[]+ }+ onChange={c.setGroup}+ />+ <Dropdown+ open={filterOpen()}+ onOpenChange={setFilterOpen}+ placement="bottom-end"+ modal={false}+ >+ <Dropdown.Trigger+ variant="ghost"+ size="icon-md"+ label={c.projectList() ? 'Filter projects' : 'Filter tasks'}+ class="relative"+ >+ <Filter />+ <Show+ when={+ c.filters.status.length ++ c.filters.priority.length ++ c.filters.owner.length+ }+ >+ <span class="tasks-native-filter-count">+ {c.filters.status.length ++ c.filters.priority.length ++ c.filters.owner.length}+ </span>+ </Show>+ </Dropdown.Trigger>+ <Dropdown.Content portalScope="local" class="w-60">+ <Show when={!c.projectList()}>+ <div class="px-2 pb-2">+ <input+ class="tasks-native-ai-filter"+ aria-label="Filter with AI"+ placeholder="Filter with AI…"+ value={filterText()}+ onInput={(event) => setFilterText(event.currentTarget.value)}+ onKeyDown={(event) => {+ event.stopPropagation();+ if (event.key === 'Enter') {+ event.preventDefault();+ applyText();+ }+ }}+ />+ <Show when={filterError()}>+ <p class="text-xs text-ink-muted">+ Try a status, priority, or person.+ </p>+ </Show>+ </div>+ </Show>+ <For each={filterGroups()}>+ {(group) => (+ <Dropdown.Sub>+ <Dropdown.SubTrigger>{group.label}</Dropdown.SubTrigger>+ <Dropdown.SubContent portalScope="local">+ <Dropdown.Group>+ <For each={group.values}>+ {(value) => (+ <Dropdown.CheckboxItem+ checked={c.filters[group.key].includes(value)}+ onChange={() => c.toggleFilter(group.key, value)}+ >+ {filterLabel(group.key, value)}+ </Dropdown.CheckboxItem>+ )}+ </For>+ </Dropdown.Group>+ </Dropdown.SubContent>+ </Dropdown.Sub>+ )}+ </For>+ <Dropdown.Separator />+ <Dropdown.Item+ onSelect={() => {+ c.clear();+ setFilterText('');+ }}+ >+ Clear filters+ </Dropdown.Item>+ </Dropdown.Content>+ </Dropdown>+ {props.actions}+ </div>+ </div>+ );+}diff --git a/apps/marketing/src/features/marketing/components/tasks/TasksWorkspaceSidebar.tsx b/apps/marketing/src/features/marketing/components/tasks/TasksWorkspaceSidebar.tsxnew file mode 100644index 0000000000..d3a3f5afe4--- /dev/null+++ b/apps/marketing/src/features/marketing/components/tasks/TasksWorkspaceSidebar.tsx@@ -0,0 +1,151 @@+import Caret from '@phosphor/caret-down.svg';+import CheckSquare from '@phosphor/check-square.svg';+import List from '@phosphor/list-checks.svg';+import Note from '@phosphor/note-pencil.svg';+import Plus from '@phosphor/plus.svg';+import Sidebar from '@phosphor/sidebar-simple.svg';+import Stack from '@phosphor/stack.svg';+import { createSignal, For, Show } from 'solid-js';+import { ViewSidebar } from '../DemoViewSidebar';+import type { TasksWorkspace } from './createTasksWorkspace';++/** TasksSidebar / ProjectsSidebar: real navigation and the native project section. */+export function TasksWorkspaceSidebar(props: {+ state: TasksWorkspace;+ collapse: () => void;+ onNavigate: () => void;+}) {+ const c = props.state;+ const [projectsOpen, setProjectsOpen] = createSignal(true);+ const [tagsOpen, setTagsOpen] = createSignal(true);+ const open = (action: () => void) => {+ action();+ props.onNavigate();+ };+ return (+ <ViewSidebar.Root aria-label="Tasks navigation">+ <ViewSidebar.Header>+ <div class="flex items-center gap-1">+ <ViewSidebar.Control+ label="Collapse sidebar"+ onClick={props.collapse}+ >+ <Sidebar />+ </ViewSidebar.Control>+ <ViewSidebar.Title>Tasks</ViewSidebar.Title>+ </div>+ </ViewSidebar.Header>+ <ViewSidebar.Primary>+ <ViewSidebar.Action+ onClick={() => c.setComposer(c.projectList() ? 'project' : 'task')}+ >+ <ViewSidebar.Icon>+ <Plus />+ </ViewSidebar.Icon>+ {c.projectList() ? 'New project' : 'New task'}+ </ViewSidebar.Action>+ </ViewSidebar.Primary>+ <ViewSidebar.Content>+ <ViewSidebar.Nav aria-label="Task views">+ <For+ each={[+ { id: 'mine' as const, label: 'My Tasks', icon: CheckSquare },+ { id: 'all' as const, label: 'All Tasks', icon: List },+ { id: 'created' as const, label: 'Created by me', icon: Note },+ { id: 'projects' as const, label: 'Projects', icon: Stack },+ ]}+ >+ {(item) => (+ <ViewSidebar.Item+ active={c.tab() === item.id && !c.projectId()}+ onClick={() => open(() => c.navigate(item.id))}+ >+ <ViewSidebar.Icon>+ <item.icon />+ </ViewSidebar.Icon>+ {item.label}+ </ViewSidebar.Item>+ )}+ </For>+ </ViewSidebar.Nav>+ <section>+ <div class="tasks-native-sidebar-heading">+ <button+ type="button"+ aria-expanded={projectsOpen()}+ onClick={() => setProjectsOpen(!projectsOpen())}+ >+ My projects+ <Caret+ class="size-3"+ style={{ transform: projectsOpen() ? '' : 'rotate(-90deg)' }}+ />+ </button>+ <ViewSidebar.Control+ label="New project"+ onClick={() => c.setComposer('project')}+ >+ <Plus />+ </ViewSidebar.Control>+ </div>+ <Show when={projectsOpen()}>+ <ViewSidebar.Nav aria-label="My projects">+ <For each={c.projects}>+ {(project) => (+ <ViewSidebar.Item+ title={project.title}+ active={c.projectId() === project.id}+ onClick={() => open(() => c.openProject(project.id))}+ >+ <ViewSidebar.Icon>+ <Stack />+ </ViewSidebar.Icon>+ <span class="truncate">{project.title}</span>+ </ViewSidebar.Item>+ )}+ </For>+ </ViewSidebar.Nav>+ </Show>+ </section>+ <section>+ <div class="tasks-native-sidebar-heading">+ <button+ type="button"+ aria-expanded={tagsOpen()}+ onClick={() => setTagsOpen(!tagsOpen())}+ >+ Tags+ <Caret+ class="size-3"+ style={{ transform: tagsOpen() ? '' : 'rotate(-90deg)' }}+ />+ </button>+ </div>+ <Show when={tagsOpen()}>+ <ViewSidebar.Nav aria-label="Task tags">+ <For each={['Team', 'Customers', 'Website']}>+ {(tag) => (+ <ViewSidebar.Item+ active={c.filters.tag === tag}+ onClick={() =>+ open(() => {+ if (c.projectList() || c.projectId()) c.navigate('all');+ c.setFilters('tag', c.filters.tag === tag ? '' : tag);+ })+ }+ >+ <span+ class="sample-tag-dot"+ data-color={tag === 'Customers' ? 2 : 0}+ />+ {tag}+ </ViewSidebar.Item>+ )}+ </For>+ </ViewSidebar.Nav>+ </Show>+ </section>+ </ViewSidebar.Content>+ </ViewSidebar.Root>+ );+}diff --git a/apps/marketing/src/features/marketing/components/tasks/createTasksWorkspace.ts b/apps/marketing/src/features/marketing/components/tasks/createTasksWorkspace.tsnew file mode 100644index 0000000000..524a0cf52b--- /dev/null+++ b/apps/marketing/src/features/marketing/components/tasks/createTasksWorkspace.ts@@ -0,0 +1,325 @@+import { batch, createMemo, createSignal } from 'solid-js';+import { createStore, reconcile } from 'solid-js/store';+import type { WorkspaceTask } from '../../core/dummy-workspace';+import type { DummyWorkspace } from '../../primitives/createDummyWorkspace';+import { taskChannelHistory } from './taskChannelHistory';+import { type DemoProject, tasksWorkspaceData } from './tasksWorkspaceData';++export type TasksTab = 'mine' | 'all' | 'created' | 'projects';+export type GroupBy = 'None' | 'Status' | 'Priority' | 'Assignee' | 'Project';+export const taskStatuses = [+ 'Not Started',+ 'In Progress',+ 'In Review',+ 'Completed',+ 'Canceled',+] as const;+export const priorities = ['Urgent', 'High', 'Medium', 'Low'] as const;+export const projectStatuses = [+ 'Not Started',+ 'In Progress',+ 'Completed',+] as const;++/** Local commands replace the app's queries; navigation and project membership are real demo state. */+export function createTasksWorkspace(w: DummyWorkspace) {+ const seed = tasksWorkspaceData();+ w.setData('tasks', seed.tasks);+ w.setData(+ 'channels',+ seed.projects.map((project) => ({+ id: project.id,+ messages: [+ ...seed.tasks+ .filter((task) => task.channel === project.id)+ .map((task) => ({+ id: `request-${task.id}`,+ person: task.creator,+ time: 'Yesterday',+ body: task.description,+ taskId: task.id,+ })),+ ...taskChannelHistory(project.id),+ ],+ }))+ );+ w.setChannel('sales');+ const [projects, setProjects] = createStore(seed.projects);+ const [metadata, setMetadata] = createStore(seed.metadata);+ seed.projects.forEach((project, index) =>+ setMetadata(project.id, {+ projectId: '',+ updated: 100 - index,+ created: index,+ })+ );+ const [tab, setTab] = createSignal<TasksTab>('all');+ const [projectId, setProjectId] = createSignal<string>();+ const [section, setSection] = createSignal<'overview' | 'tasks'>('overview');+ const [search, setSearch] = createSignal('');+ const [group, setGroup] = createSignal<GroupBy>('Priority');+ const [layout, setLayout] = createSignal<'List' | 'Board'>('List');+ const [sort, setSort] = createSignal<'Updated' | 'Created'>('Updated');+ const [filters, setFilters] = createStore({+ status: [] as string[],+ priority: [] as string[],+ owner: [] as string[],+ tag: '',+ });+ const [composer, setComposer] = createSignal<'task' | 'project'>();+ const [adding, setAdding] = createSignal(false);+ let revision = 101;+ const project = () => projects.find((item) => item.id === projectId());+ const task = () => w.data.tasks.find((item) => item.id === w.selected());+ const projectList = () => tab() === 'projects' && !projectId();+ const clear = () => {+ setSearch('');+ setFilters({ status: [], priority: [], owner: [], tag: '' });+ };+ const views = new Map<+ string,+ { layout: 'List' | 'Board'; group: GroupBy; sort: 'Updated' | 'Created' }+ >();+ const scope = () =>+ projectId() ? `project:${projectId()}` : `tasks:${tab()}`;+ const rememberView = () =>+ views.set(scope(), { layout: layout(), group: group(), sort: sort() });+ const restoreView = (defaultGroup: GroupBy) => {+ const saved = views.get(scope());+ setLayout(saved?.layout ?? 'List');+ setGroup(saved?.group ?? defaultGroup);+ setSort(saved?.sort ?? 'Updated');+ };+ const navigate = (next: TasksTab) =>+ batch(() => {+ rememberView();+ setTab(next);+ setProjectId(undefined);+ clear();+ restoreView(next === 'projects' ? 'Status' : 'Priority');+ w.open('tasks');+ });+ const openProject = (id: string, next: 'overview' | 'tasks' = 'overview') =>+ batch(() => {+ rememberView();+ setTab('projects');+ setProjectId(id);+ setSection(next);+ clear();+ restoreView('Status');+ w.open('tasks');+ });+ const openTask = (id: string) => w.open('tasks', id);+ const back = () => w.open('tasks');+ const saveTask = (id: string, patch: Partial<WorkspaceTask>) => {+ w.updateTask(id, patch);+ if (metadata[id]) setMetadata(id, 'updated', ++revision);+ };+ const saveProject = (id: string, patch: Partial<DemoProject>) => {+ setProjects((item) => item.id === id, patch);+ setMetadata(id, 'updated', ++revision);+ };+ const assignProject = (id: string, next: string) => {+ setMetadata(id, {+ projectId: next,+ updated: ++revision,+ created: metadata[id]?.created ?? revision,+ dueDate: metadata[id]?.dueDate,+ });+ };+ const projectName = (id: string) =>+ projects.find((item) => item.id === metadata[id]?.projectId)?.title ??+ 'No project';+ const matches = (item: WorkspaceTask) =>+ `${item.title} ${item.description}`+ .toLowerCase()+ .includes(search().toLowerCase()) &&+ (!filters.status.length || filters.status.includes(item.status)) &&+ (!filters.priority.length || filters.priority.includes(item.priority)) &&+ (!filters.owner.length || filters.owner.includes(item.owner)) &&+ (!filters.tag || item.tags.includes(filters.tag));+ const tasks = createMemo(() =>+ w.data.tasks+ .filter(+ (item) =>+ matches(item) &&+ (!projectId() || metadata[item.id]?.projectId === projectId()) &&+ (tab() !== 'mine' || item.owner === 'jacob') &&+ (tab() !== 'created' || item.creator === 'jacob')+ )+ .slice()+ .sort(+ (a, b) =>+ (metadata[b.id]?.[sort() === 'Updated' ? 'updated' : 'created'] ??+ 0) -+ (metadata[a.id]?.[sort() === 'Updated' ? 'updated' : 'created'] ?? 0)+ )+ );+ const visibleProjects = createMemo(() =>+ projects+ .filter(matches)+ .slice()+ .sort(+ (a, b) =>+ (metadata[b.id]?.[sort() === 'Updated' ? 'updated' : 'created'] ??+ 0) -+ (metadata[a.id]?.[sort() === 'Updated' ? 'updated' : 'created'] ?? 0)+ )+ );+ const groupValue = (item: WorkspaceTask) =>+ group() === 'Status'+ ? item.status+ : group() === 'Priority'+ ? item.priority+ : group() === 'Assignee'+ ? item.owner+ : group() === 'Project'+ ? projectName(item.id)+ : 'All tasks';+ const groups = createMemo(() => {+ const rows: WorkspaceTask[] = projectList() ? visibleProjects() : tasks();+ const keys =+ group() === 'Status'+ ? [...(projectList() ? projectStatuses : taskStatuses)]+ : group() === 'Priority'+ ? [...priorities]+ : [...new Set(rows.map(groupValue))];+ return keys+ .map((key) => ({+ key,+ items: rows.filter((item) => groupValue(item) === key),+ }))+ .filter(+ (entry) =>+ entry.items.length || (layout() === 'Board' && group() === 'Status')+ );+ });+ const toggleFilter = (key: 'status' | 'priority' | 'owner', value: string) =>+ setFilters(key, (values) =>+ values.includes(value)+ ? values.filter((item) => item !== value)+ : [...values, value]+ );+ const create = (draft: WorkspaceTask, dueDate?: string) =>+ batch(() => {+ if (composer() === 'project') {+ const id = crypto.randomUUID();+ setProjects((items) => [+ ...items,+ {+ ...draft,+ id,+ status:+ draft.status === 'Completed'+ ? 'Completed'+ : draft.status === 'In Progress'+ ? 'In Progress'+ : 'Not Started',+ dueDate: dueDate ?? '',+ },+ ]);+ setMetadata(id, {+ projectId: '',+ updated: ++revision,+ created: revision,+ });+ navigate('projects');+ } else {+ const id = w.createTask(+ draft.title,+ draft.description,+ projectId() ?? 'customers'+ );+ saveTask(id, { ...draft, id });+ setMetadata(id, {+ projectId: projectId() ?? '',+ updated: ++revision,+ created: revision,+ dueDate,+ });+ w.open('tasks');+ }+ setComposer(undefined);+ });+ const reset = () => {+ const next = tasksWorkspaceData();+ w.setData('tasks', next.tasks);+ w.setData(+ 'channels',+ next.projects.map((project) => ({+ id: project.id,+ messages: [+ ...next.tasks+ .filter((task) => task.channel === project.id)+ .map((task) => ({+ id: `request-${task.id}`,+ person: task.creator,+ time: 'Yesterday',+ body: task.description,+ taskId: task.id,+ })),+ ...taskChannelHistory(project.id),+ ],+ }))+ );+ w.setChannel('sales');+ next.projects.forEach((project, index) => {+ next.metadata[project.id] = {+ projectId: '',+ updated: 100 - index,+ created: index,+ };+ });+ setProjects(reconcile(next.projects));+ setMetadata(reconcile(next.metadata));+ views.clear();+ setLayout('List');+ setGroup('Priority');+ setSort('Updated');+ setComposer(undefined);+ setAdding(false);+ navigate('all');+ };+ return {+ reset,+ w,+ projects,+ metadata,+ tab,+ projectId,+ project,+ task,+ projectList,+ section,+ setSection,+ search,+ setSearch,+ group,+ setGroup,+ layout,+ setLayout,+ sort,+ setSort,+ filters,+ setFilters,+ composer,+ setComposer,+ adding,+ setAdding,+ navigate,+ openProject,+ openTask,+ back,+ saveTask,+ saveProject,+ assignProject,+ projectName,+ tasks,+ visibleProjects,+ groups,+ toggleFilter,+ clear,+ create,+ };+}+export type TasksWorkspace = ReturnType<typeof createTasksWorkspace>;diff --git a/apps/marketing/src/features/marketing/components/tasks/proposalWorkspace.ts b/apps/marketing/src/features/marketing/components/tasks/proposalWorkspace.tsnew file mode 100644index 0000000000..54954814f4--- /dev/null+++ b/apps/marketing/src/features/marketing/components/tasks/proposalWorkspace.ts@@ -0,0 +1,74 @@+import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';+import { taskChannelHistory } from './taskChannelHistory';++export const PROPOSAL_TASK = 'Prepare the customer proposal';++/** One substantive job with the sources needed to complete it. */+export function createProposalWorkspace() {+ const w = createDummyWorkspace('tasks');+ w.setData('documents', [+ {+ id: 'brief',+ title: 'Customer brief',+ body: '## Scope\n\nUpdate the homepage and pricing page.\n\n## Delivery\n\nShare a first draft next week. Include one round of changes.',+ tags: ['Customers'],+ comments: [],+ },+ ]);+ w.setData('emails', (email) => email.id === 'dana', {+ subject: 'Proposal request',+ sender: 'Customer',+ snippet:+ 'Please send a proposal by Friday, with pricing and a delivery date.',+ body: 'Hi Julia,\n\nPlease send a proposal by Friday for the homepage and pricing page updates. Include the price and when you can deliver the first draft.\n\nThanks!',+ replies: [],+ shared: 'sales',+ });+ w.setData('tasks', [+ {+ id: 'proposal',+ title: PROPOSAL_TASK,+ description: 'Prepare a proposal with pricing and a delivery timeline.',+ status: 'In Progress',+ priority: 'High',+ owner: 'julia',+ creator: 'jacob',+ channel: 'sales',+ tags: ['Customers'],+ relatedDocumentIds: ['brief'],+ steps: [],+ comments: [],+ },+ ]);+ w.setData('channels', [+ {+ id: 'sales',+ messages: [+ {+ id: 'request',+ person: 'jacob',+ time: '9:10 AM',+ body: 'The customer wants the homepage and pricing page updated. Their request is attached.',+ emailId: 'dana',+ documentId: 'brief',+ },+ {+ id: 'owner',+ person: 'julia',+ time: '9:14 AM',+ body: 'I’ll draft the proposal. Can you review the pricing before we send it?',+ taskId: 'proposal',+ },+ ],+ },+ ]);+ w.setData(+ 'channels',+ (channel) => channel.id === 'sales',+ 'messages',+ (messages) => [...messages, ...taskChannelHistory('sales')]+ );+ w.setChannel('sales');+ w.open('tasks', 'proposal');+ return w;+}diff --git a/apps/marketing/src/features/marketing/components/tasks/task-context.css b/apps/marketing/src/features/marketing/components/tasks/task-context.cssnew file mode 100644index 0000000000..9db8b6d3cd--- /dev/null+++ b/apps/marketing/src/features/marketing/components/tasks/task-context.css@@ -0,0 +1,22 @@+.task-context-layout { display:flex;flex:1;min-width:0;min-height:0; }+.task-context-primary { flex:1;min-width:0; }+.task-context-source { flex:1;min-width:0;position:relative;border-left:1px solid var(--color-edge-muted); }+.task-context-close { position:absolute;right:8px;top:54px;z-index:5;background:var(--color-panel); }+.task-context-description { outline:none;margin:6px 0 22px;white-space:pre-wrap;line-height:1.7; }+.task-context-reference { margin:12px 0;line-height:1.8; }+.task-context-mention { display:inline;vertical-align:baseline;max-width:100%;border-radius:4px; }+.task-context-mention:focus-visible { outline:2px solid var(--color-accent);outline-offset:3px; }+.task-context-source .sample-chat-log { padding:24px 16px; }+.task-context-source .mail-thread { min-width:0; }+.task-context-layout[data-narrow=true][data-source-open=true] .task-context-primary { display:none; }+.task-context-layout[data-narrow=true] .task-context-source { border-left:0; }+.task-context-layout[data-source-open=true] { min-height:540px; }+@media(max-width:699px) { .task-context-layout[data-source-open=true] { min-height:560px; } }++.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-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-stories.css b/apps/marketing/src/features/marketing/components/tasks/task-stories.cssindex ba1e776eee..05500a3316 100644--- a/apps/marketing/src/features/marketing/components/tasks/task-stories.css+++ b/apps/marketing/src/features/marketing/components/tasks/task-stories.css@@ -31,3 +31,21 @@.task-checklist-toolbar > button:not([data-convert-tasks]):not(:first-child), .task-checklist-divider { display: none; }}@media (prefers-reduced-motion: reduce) { .task-pr-pill { animation: none; } }++.task-agent-scene { display: flex; flex: 1; flex-direction: column; min-height: 0; min-width: 0; }+.task-agent-scene[data-typing='true'] .demo-mention-editor:not(:empty)::after { content: ''; display: inline-block; height: 1em; margin-left: 1px; border-right: 1px solid currentColor; vertical-align: -0.1em; }++/* Playback uses a stable composer grid instead of switching at 70 characters. */+.task-agent-scene { container:task-agent / inline-size; }+.task-agent-scene .mail-channel-input { min-height:24px; }+@container task-agent (max-width:720px) {+ .task-agent-scene .mail-channel-input { min-height:72px; }+ .task-agent-scene [data-input-layout][data-composer-compact] {+ grid-template-areas:'body body body' 'left . right';+ align-items:center;+ row-gap:3.75px;+ padding:7.5px;+ --input-editor-padding:4.6875px 9.375px;+ }+}+.task-agent-scene .sample-chat-log { overflow-anchor:none; }diff --git a/apps/marketing/src/features/marketing/components/tasks/taskChannelHistory.ts b/apps/marketing/src/features/marketing/components/tasks/taskChannelHistory.tsnew file mode 100644index 0000000000..a49d039e2f--- /dev/null+++ b/apps/marketing/src/features/marketing/components/tasks/taskChannelHistory.ts@@ -0,0 +1,39 @@+import type { WorkspaceComment } from '../../core/dummy-workspace';++/** Everyday discussion around the task requests, with stable local message IDs. */+export function taskChannelHistory(channel: string): WorkspaceComment[] {+ const chats: Record<string, [WorkspaceComment['person'], string][]> = {+ sales: [+ ['julia', 'did they say friday morning or end of day?'],+ ['jacob', 'end of day. i asked twice just to be sure'],+ ['teo', 'nice, that gives me time to check the numbers'],+ ['gabriel', 'i added their question about mobile to the brief'],+ ['julia', 'saw it. keeping that in the scope'],+ ['jacob', 'can someone give the draft a quick read after lunch?'],+ ['teo', 'yep, ping me when it’s ready'],+ ],+ customers: [+ ['gabriel', 'they tried the new invite link and got in this time'],+ ['julia', 'finally. did the rest of their team join too?'],+ ['gabriel', 'two so far. the others are trying it this afternoon'],+ ['jacob', 'i’ll check in tomorrow, no need to chase them today'],+ ['teo', 'left the answers to their setup questions in the task'],+ ['julia', 'thanks, using those for the next call too'],+ ],+ website: [+ ['valentina', 'new screenshots are in the folder'],+ ['gabriel', 'checking them on my phone now'],+ ['gabriel', 'second one is a bit blurry. is that the old export?'],+ ['valentina', 'oops yes. replaced it'],+ ['julia', 'copy is ready too. cut the intro down a lot'],+ ['teo', 'much better. i can actually read it without scrolling forever'],+ ['gabriel', 'mobile looks good now 👍'],+ ],+ };+ return (chats[channel] ?? []).map(([person, body], index) => ({+ id: `${channel}-conversation-${index}`,+ person,+ body,+ time: `10:${String(12 + index * 2).padStart(2, '0')} AM`,+ }));+}diff --git a/apps/marketing/src/features/marketing/components/tasks/taskProject.ts b/apps/marketing/src/features/marketing/components/tasks/taskProject.tsnew file mode 100644index 0000000000..78391e3d5a--- /dev/null+++ b/apps/marketing/src/features/marketing/components/tasks/taskProject.ts@@ -0,0 +1,71 @@+import type { WorkspaceTask, WorkspaceView } from '../../core/dummy-workspace';+import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';+import { taskChannelHistory } from './taskChannelHistory';++export const REQUEST_TASK = 'Prepare the customer proposal';+export const REQUEST_DOCUMENT = 'Customer brief';+export const REQUEST_MESSAGE =+ 'Prepare the customer proposal @[Julia](demo-mention:julia) — ready by Friday.';+export const REQUEST_CONTEXT =+ 'The customer wants the homepage and pricing page updated. They need a proposal by Friday.';++export function proposalTask(): WorkspaceTask {+ return {+ id: 'proposal',+ title: REQUEST_TASK,+ description: 'Prepare the scope, pricing, and a delivery timeline.',+ owner: 'julia',+ creator: 'jacob',+ priority: 'High',+ status: 'In Progress',+ channel: 'sales',+ tags: ['Customers'],+ steps: [],+ comments: [],+ relatedDocumentIds: ['customer-brief'],+ };+}++/** Tasks-page fixtures only; every demonstration owns its own editable copy. */+export function createTaskProject(view: WorkspaceView = 'tasks') {+ const w = createDummyWorkspace(view);+ w.setData('tasks', [proposalTask()]);+ w.setData('documents', [+ {+ id: 'customer-brief',+ title: REQUEST_DOCUMENT,+ body: 'Update the homepage and pricing page. Send a proposal by Friday.',+ comments: [],+ tags: ['Customers'],+ },+ ]);+ w.setData('channels', [+ {+ id: 'sales',+ messages: [+ {+ id: 'context',+ person: 'teo',+ body: REQUEST_CONTEXT,+ time: '9:16 AM',+ },+ {+ id: 'proposal-request',+ person: 'jacob',+ body: REQUEST_MESSAGE,+ time: '9:18 AM',+ taskId: 'proposal',+ },+ ],+ },+ ]);+ w.setData(+ 'channels',+ (channel) => channel.id === 'sales',+ 'messages',+ (messages) => [...messages, ...taskChannelHistory('sales')]+ );+ w.setChannel('sales');+ w.open(view, view === 'tasks' ? 'proposal' : 'sales');+ return w;+}diff --git a/apps/marketing/src/features/marketing/components/tasks/tasks-page.css b/apps/marketing/src/features/marketing/components/tasks/tasks-page.cssnew file mode 100644index 0000000000..101fccd772--- /dev/null+++ b/apps/marketing/src/features/marketing/components/tasks/tasks-page.css@@ -0,0 +1,187 @@+/* Tasks owns the story and geometry; shared feature pages keep their styling. */+.tasks-page .email-desktop-demo {+ --desktop-stage-width: min(1120px, 92vw);+}+.tasks-page .email-desktop-wallpaper {+ padding: 32px;+}+.tasks-page .email-desktop-content {+ height: 540px;+}+.tasks-page .email-desktop-content .product-demo {+ height: 100%;+ border-radius: 0;+ mask-image: none;+ -webkit-mask-image: none;+}+.tasks-page .email-desktop-content .product-demo-stage {+ height: 100%;+}+.tasks-page .email-desktop-content .product-demo-stage::before {+ display: none;+}+.tasks-page .tasks-founder-letter blockquote {+ color: #ccc;+ font-size: 19px;+ line-height: 1.65;+ margin: 0;+}+.tasks-page .tasks-founder-letter footer {+ margin: 12px 0 24px;+}+.tasks-page .tasks-founder-letter p {+ max-width: 760px;+}+.tasks-page .product-prose a {+ color: #ddd;+ text-decoration: underline;+ text-underline-offset: 3px;+}+.tasks-page .homepage-feature-end {+ width: min(872px, 100%);+ margin-inline: auto;+}+.task-project-view {+ position: relative;+ display: flex;+ flex-direction: column;+ flex: 1;+ min-height: 0;+ height: 100%;+ overflow: hidden;+}+.task-source-close {+ position: absolute;+ right: 8px;+ top: 54px;+ z-index: 5;+ background: var(--color-panel);+}+.task-plan-link {+ margin-top: 16px;+}+.task-due-date {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ font-size: 12px;+ border-radius: 999px;+ padding: 3px 8px;+ background: var(--color-surface-2);+ border: 1px solid var(--color-edge-muted);+}+.task-checklist-doc h2:not(:first-child) {+ margin-top: 24px;+}+.task-checklist-doc .task-checklist-after {+ margin-top: 12px;+}+.task-checklist-doc .sample-task-mention {+ max-width: 100%;+}+.tasks-page .task-checklist-toolbar > button:disabled {+ opacity: 0.5;+}+@media (max-width: 699px) {+ .tasks-page .email-desktop-demo {+ --desktop-stage-width: calc(100vw - 24px);+ }+ .tasks-page .email-desktop-wallpaper {+ padding: 16px 10px;+ }+ .tasks-page .email-desktop-content {+ height: 600px;+ }+ .tasks-page .tasks-founder-letter blockquote {+ font-size: 17px;+ }+}+.task-checklist-select { display: block; width: 100%; text-align: left; }+.task-checklist-select-row { display: flex; align-items: center; gap: 10px; min-height: 38px; font-size: 15px; }+.task-checklist-select:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; border-radius: 4px; }+.task-checklist-owner { color: var(--color-accent); white-space: nowrap; }++/* Show the whole Tasks workspace, including its navigation and editable list. */+.tasks-page .email-desktop-demo[data-desktop-canvas=true] {+ --desktop-stage-width: min(1280px, 94vw);+}+.tasks-page .email-desktop-demo[data-desktop-canvas=true] .email-desktop-wallpaper {+ padding: 32px;+}+.tasks-page .tasks-founder-person {+ display: flex;+ align-items: center;+ gap: 14px;+ margin-top: 22px;+}+.tasks-founder-person img { border-radius: 50%; object-fit: cover; flex-shrink: 0; }+.tasks-founder-person strong { display: block; color: #ddd; font-weight: 500; font-size: 14px; }+.tasks-founder-person span { display: block; color: #999; font-size: 13px; }+@media (max-width: 699px) {+ .tasks-page .email-desktop-demo[data-desktop-canvas=true] { --desktop-stage-width: calc(100vw - 24px); }+ .tasks-page .email-desktop-demo[data-desktop-canvas=true] .email-desktop-wallpaper { padding: 16px 10px; }+}++/* Task details grow to fit their discussion. The fade is outside the content,+ not extra space the visitor has to scroll through to reach the composer. */+.tasks-page .feature-page-visual .product-demo:has(.sample-detail-layout) {+ height: auto;+ min-height: calc(var(--product-demo-height) + var(--product-demo-fade-tail));+}+.tasks-page .feature-page-visual .product-demo:has(.sample-detail-layout) > .dummy-main,+.tasks-page .feature-page-visual .product-demo:has(.sample-detail-layout) .task-project-view {+ height: auto;+ flex: 1 0 auto;+}+.tasks-page .feature-page-visual .sample-detail-layout {+ flex: 1 0 auto;+}+.tasks-page .feature-page-visual .sample-detail-content > .dummy-scroll {+ flex: 1 0 auto;+ overflow: visible;+}++++/* One editorial block connects Jacob's quote to his related article. */+.tasks-page .tasks-founder-letter { margin-bottom: 24px; }+.tasks-founder-card {+ display: block;+ overflow: hidden;+ border: 1px solid #ffffff20;+ border-radius: 18px;+ background: linear-gradient(135deg, #181819, #101011);+ text-decoration: none;+ transition: border-color 150ms ease, background-color 150ms ease;+}+.tasks-founder-card:hover { border-color: #ffffff50; }+.tasks-founder-card:focus-visible { outline: 2px solid #bbb; outline-offset: 5px; }+.tasks-founder-card-body { padding: 32px; }+.tasks-founder-card .tasks-founder-person { margin: 24px 0 0; }+.tasks-founder-card-article {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 20px;+ padding: 18px 32px;+ border-top: 1px solid #ffffff15;+ color: #ddd;+ font-size: 14px;+ line-height: 1.5;+}+.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; }+ .tasks-founder-card-article { padding: 16px 24px; gap: 12px; font-size: 13px; }+ .tasks-founder-card .tasks-founder-person { gap: 12px; }+}+@media (prefers-reduced-motion: reduce) { .tasks-founder-card { transition: none; } }++@media (max-width: 699px) {+ .tasks-page .email-page-hero > .email-page-hero-description {+ font-size: clamp(11px, 2.6vw, 14px);+ white-space: nowrap;+ }+}diff --git a/apps/marketing/src/features/marketing/components/tasks/tasks-workspace.css b/apps/marketing/src/features/marketing/components/tasks/tasks-workspace.cssnew file mode 100644index 0000000000..4a8b167e0f--- /dev/null+++ b/apps/marketing/src/features/marketing/components/tasks/tasks-workspace.css@@ -0,0 +1,115 @@+/* Frozen from TasksSidebar, TasksControls, task-list.css and ProjectWorkspace. */+.tasks-native-main { display:flex;flex-direction:column;position:relative;flex:1;min-height:0;min-width:0;overflow:hidden; }+.tasks-native-main > [data-view-shell-top-bar] { gap:8px; }+.tasks-native-breadcrumb { display:flex;align-items:center;gap:6px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }+.tasks-native-breadcrumb:hover { color:var(--color-ink-muted); }+.tasks-native-sidebar-heading { display:flex;align-items:center;justify-content:space-between;padding:0 8px;margin-bottom:7px;color:var(--color-ink-muted);font-size:12px; }+.tasks-native-sidebar-heading > button:first-child { display:flex;align-items:center;gap:8px;flex:1;text-align:left; }+.tasks-native-toolbar { display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;padding:12px;overflow-x:auto; }+.tasks-native-controls { display:flex;align-items:center;gap:8px;flex-shrink:0; }+.tasks-native-controls [data-button] { flex-shrink:0; }+.tasks-native-ai-filter { width:100%;background:transparent;border:0;outline:none;font-size:13px;padding:8px 0; }+.tasks-native-filter-count { position:absolute;right:-2px;top:-2px;min-width:15px;border-radius:10px;font-size:10px;background:var(--color-accent);color:var(--color-surface); }+.tasks-native-list { overflow:auto;flex:1;min-height:0;container:native-task-list / inline-size; }+.tasks-native-grid { display:grid;grid-template-columns:16px minmax(0,1fr) 7.25rem 7rem 9rem 8rem 5rem;gap:8px;align-items:center;padding:0 12px;min-height:40px; }+.tasks-native-grid-header { position:sticky;top:0;z-index:1;background:var(--color-panel);font-size:12px;font-weight:500;color:var(--color-ink-extra-muted); }+.tasks-native-row { margin:0 4px;width:calc(100% - 8px);border-radius:12px;font-size:14px; }+.tasks-native-row:hover,.tasks-native-row:focus-within { background:var(--color-hover); }+.tasks-native-row > input { opacity:0;width:14px;height:14px;accent-color:var(--color-accent); }+.tasks-native-row:hover > input,.tasks-native-row > input:focus,.tasks-native-row > input:checked { opacity:1; }+.tasks-native-name { display:flex;align-items:center;gap:8px;min-width:0;text-align:left;font-weight:500; }+.tasks-native-name > svg { flex-shrink:0; }+.tasks-native-name > span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }+.tasks-native-name:focus-visible,.tasks-native-breadcrumb:focus-visible { outline:2px solid var(--color-accent);outline-offset:3px; }+.tasks-native-updated { text-align:right;color:var(--color-ink-extra-muted);font-size:12px; }+.tasks-native-group-heading { display:flex;align-items:center;gap:10px;width:calc(100% - 8px);margin:2px 4px;padding:7px 8px;border-radius:8px;background:var(--color-surface-2);color:var(--color-ink-muted);font-size:12px;font-weight:600;text-align:left; }+.tasks-native-count { border-radius:12px;padding:0 6px;background:var(--color-hover);color:var(--color-ink-extra-muted); }+.tasks-native-status,.tasks-native-priority,.tasks-native-assignee,.tasks-native-project { min-width:0;font-size:12px; }+.tasks-native-list .sample-list-property { max-width:100%; }+.tasks-native-list .sample-list-property > span { display:inline; }+.tasks-native-list .sample-list-property > svg:last-child:not(:first-child) { display:none; }+.tasks-native-project-cell { display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:4px 6px;font-size:12px;color:var(--color-ink-muted);white-space:nowrap;border-radius:6px; }+.tasks-native-project-cell:hover { background:var(--color-hover); }+.tasks-native-date,.tasks-native-pill { display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:999px;font-size:12px;color:var(--color-ink-muted);background:var(--color-surface-2);white-space:nowrap; }+.tasks-native-overview { padding:48px 24px 32px; }+.tasks-native-overview > div { max-width:768px;margin:auto; }+.tasks-native-overview h1 { font:600 24px/1.4 var(--font-sans);outline:none; }+.tasks-native-properties { display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 24px;align-items:center; }+.tasks-native-description { white-space:pre-wrap;font-size:15px;line-height:1.7;outline:none;min-height:120px; }+.tasks-native-discussion-title { margin:32px 0 16px;font-size:13px;font-weight:500;color:var(--color-ink-muted); }+.tasks-native-overview .sample-message-row { margin:12px 0; }+.tasks-native-selection { display:flex;align-items:center;gap:12px;padding:8px 16px;border-bottom:1px solid var(--color-edge-muted);font-size:13px; }+.tasks-native-empty { text-align:center;color:var(--color-ink-muted);padding:48px 20px;font-size:14px; }+.tasks-native-mobile-tabs { display:none; }+.tasks-native-board { display:flex;align-items:flex-start;gap:12px;padding:12px;height:100%;min-width:max-content; }+.tasks-native-board .tasks-native-task-group { width:336px;max-height:100%;overflow:auto;flex-shrink:0; }+.tasks-native-card { position:relative;display:grid;grid-template-columns:1fr auto;gap:12px;margin:10px 4px;padding:16px;border:1px solid var(--color-edge-muted);border-radius:12px;background:var(--color-surface-2); }+.tasks-native-card .tasks-native-name { grid-column:1 / -1;white-space:normal; }+.tasks-native-card .tasks-native-name > span { white-space:normal; }+.tasks-native-card .tasks-native-updated { display:none; }+.tasks-native-modal { max-width:560px!important;padding:20px;border:1px solid var(--color-edge-muted);border-radius:16px;background:var(--color-menu);color:var(--color-ink);font:14px/1.5 var(--font-sans); }+.tasks-native-modal input:not([type=checkbox]):not([type=date]),.tasks-native-modal textarea { display:block;width:100%;padding:12px 4px;background:transparent;color:var(--color-ink);outline:none; }+.tasks-native-modal input:not([type=checkbox]):not([type=date]) { font-size:20px; }+.tasks-native-modal textarea { min-height:100px;resize:vertical; }+.tasks-native-modal input[type=date] { font-size:12px;background:transparent;color:inherit;max-width:120px; }+.tasks-native-composer-footer { display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:20px; }+.tasks-native-add-list { max-height:280px;overflow:auto; }+.tasks-native-add-list label { display:flex;gap:12px;padding:10px; }+.tasks-native-add-list input { accent-color:var(--color-accent); }+@container native-task-list (max-width:840px) {+ .tasks-native-grid { grid-template-columns:16px minmax(0,1fr) 2rem 2rem 3rem 6rem 5rem; }+ .tasks-native-list .sample-list-property > span { display:none; }+}+@media(max-width:699px) {+ .tasks-native-main > [data-view-shell-top-bar] { display:flex;flex-wrap:wrap;height:auto;min-height:42px;padding:8px; }+ .tasks-native-breadcrumb { max-width:180px;font-size:12px; }+ .tasks-native-mobile-tabs { display:flex;gap:6px;padding:8px;overflow:auto;flex-shrink:0; }+ .tasks-native-mobile-tabs button { font-size:12px;white-space:nowrap;border-radius:20px;padding:5px 9px;background:var(--color-surface-2);color:var(--color-ink-muted); }+ .tasks-native-mobile-tabs button[aria-pressed=true] { color:var(--color-ink);background:var(--color-active); }+ .tasks-native-toolbar { flex-wrap:wrap;padding:8px;gap:6px; }+ .tasks-native-toolbar > div:first-child { min-width:100%; }+ .tasks-native-controls { gap:4px;max-width:100%;overflow:auto; }+ .tasks-native-grid-header { display:none; }+ .tasks-native-row { grid-template-columns:14px minmax(0,1fr) auto;gap:5px;padding:10px 8px; }+ .tasks-native-row > input { grid-column:1;grid-row:1; }+ .tasks-native-name { grid-column:2 / -1;min-height:22px; }+ .tasks-native-row .tasks-native-status { grid-column:2;grid-row:2; }+ .tasks-native-row .tasks-native-priority { grid-column:3;grid-row:2; }+ .tasks-native-row .tasks-native-assignee { grid-column:3;grid-row:3; }+ .tasks-native-row .tasks-native-project { grid-column:2;grid-row:3; }+ .tasks-native-row .tasks-native-updated { display:none; }+ .tasks-native-row .sample-list-property > span { display:inline; }+ .tasks-native-overview { padding:24px 16px; }+ .tasks-native-overview h1 { font-size:22px; }+ .tasks-native-board .tasks-native-task-group { width:260px; }+}+.tasks-native-add-dropdown { width:340px;max-width:calc(100vw - 32px); }+.tasks-native-add-dropdown > input { width:100%;padding:8px 10px;background:transparent;outline:none;font-size:14px; }+.tasks-native-add-dropdown .tasks-native-composer-footer { border-top:1px solid var(--color-edge-muted);padding:8px;margin-top:8px; }+.tasks-native-details { position:absolute;right:12px;top:48px;z-index:5;width:280px;max-width:calc(100% - 24px);padding:18px;border-radius:14px;background:var(--color-panel);border:1px solid var(--color-edge-muted);box-shadow:0 16px 50px #0006; }+.tasks-native-details > p { margin:18px 0 6px; }+/* Board cards use the native leading status and trailing assignee controls. */+.tasks-native-card { grid-template-columns:24px minmax(0,1fr) 28px;gap:10px 6px;padding:14px; }+.tasks-native-card .tasks-native-name { grid-column:2;grid-row:1; }+.tasks-native-card .tasks-native-name > svg { display:none; }+.tasks-native-card .tasks-native-status { grid-column:1;grid-row:1;align-self:start; }+.tasks-native-card .tasks-native-assignee { grid-column:3;grid-row:1;align-self:start; }+.tasks-native-card .tasks-native-priority { grid-column:1;grid-row:2; }+.tasks-native-card .tasks-native-project { grid-column:2 / -1;grid-row:2; }+.tasks-native-card .sample-list-property > span { display:none; }+.tasks-native-board[data-group=Priority] .tasks-native-priority { display:none; }+.tasks-native-board[data-group=Priority] .tasks-native-project { grid-column:1 / -1; }+.tasks-native-board[data-group=Project] .tasks-native-project { display:none; }+.tasks-native-date-input { position:relative; }+.tasks-native-modal .tasks-native-date-input input[type=date] { position:absolute;inset:0;opacity:0;width:100%;max-width:100%; }+.tasks-native-date-input:focus-within { outline:2px solid var(--color-accent);outline-offset:2px; }+.tasks-native-project-search { display:flex;align-items:center;gap:6px;width:224px;flex-shrink:0;height:32px;padding-left:10px;border:1px solid var(--color-edge-muted);border-radius:999px;background:var(--color-surface-2); }+.tasks-native-project-search input { min-width:0;flex:1;outline:none;background:transparent;font-size:12px; }+.tasks-native-toolbar[data-project=true] { height:48px;flex-wrap:nowrap;padding:8px 16px; }+.tasks-native-toolbar[data-project=true] .tasks-native-controls { margin-left:auto; }+@media(max-width:699px) { .tasks-native-toolbar[data-project=true] > .tasks-native-project-search { min-width:224px; } }+@media(max-width:699px) {+ .tasks-native-toolbar:not([data-project=true]) { display:grid;grid-template-columns:minmax(0,1fr); }+ .tasks-native-toolbar:not([data-project=true]) .tasks-native-controls { justify-self:end; }+ .tasks-native-toolbar:not([data-project=true]) [data-search-bar] { max-width:none; }+}diff --git a/apps/marketing/src/features/marketing/components/tasks/tasksWorkspaceData.ts b/apps/marketing/src/features/marketing/components/tasks/tasksWorkspaceData.tsnew file mode 100644index 0000000000..fa523ec417--- /dev/null+++ b/apps/marketing/src/features/marketing/components/tasks/tasksWorkspaceData.ts@@ -0,0 +1,246 @@+import type { WorkspaceTask } from '../../core/dummy-workspace';++export type DemoProject = WorkspaceTask & { dueDate: string };+export type TaskMetadata = {+ projectId: string;+ updated: number;+ created: number;+ dueDate?: string;+};++/** Illustrative company work, using the native task/project properties. */+export function tasksWorkspaceData() {+ const projects: DemoProject[] = [+ {+ id: 'sales',+ title: 'Customer proposal',+ description:+ 'Prepare a proposal for the homepage and pricing page updates.\n\nConfirm the requirements, draft the scope, and review pricing before Friday.',+ status: 'In Progress',+ priority: 'High',+ owner: 'julia',+ creator: 'jacob',+ dueDate: '2026-10-09',+ channel: 'sales',+ tags: [],+ steps: [],+ comments: [+ {+ id: 'sales-note',+ person: 'julia',+ body: 'The customer confirmed the scope. We can draft the proposal.',+ time: 'Yesterday',+ },+ ],+ },+ {+ id: 'customers',+ title: 'Customer follow-ups',+ description:+ 'Close the loop with customers who asked for a proposal or a product walkthrough.\n\nKeep the original request attached to each task. Review outstanding replies together on Friday.',+ status: 'In Progress',+ priority: 'Medium',+ owner: 'jacob',+ creator: 'jacob',+ dueDate: '2026-10-30',+ channel: 'customers',+ tags: [],+ steps: [],+ comments: [+ {+ id: 'customers-note',+ person: 'teo',+ body: 'The proposal is ready for review. I’ve added the customer’s questions.',+ time: 'Today, 9:10 AM',+ },+ ],+ },+ {+ id: 'website',+ title: 'Website updates',+ description:+ 'Update the customer stories and help new visitors find the right plan.\n\nJulia reviews the copy. Gabriel checks the pages on mobile before we publish.',+ status: 'Not Started',+ priority: 'Low',+ owner: 'gabriel',+ creator: 'julia',+ dueDate: '2026-10-23',+ channel: 'website',+ tags: [],+ steps: [],+ comments: [],+ },+ ];+ const rows: [+ string,+ string,+ string,+ WorkspaceTask['status'],+ WorkspaceTask['priority'],+ WorkspaceTask['owner'],+ string,+ string?,+ ][] = [+ [+ 'delivery',+ 'Confirm the requirements',+ 'sales',+ 'In Progress',+ 'High',+ 'jacob',+ 'Confirm which pages the customer wants updated.',+ '2026-10-09',+ ],+ [+ 'training',+ 'Draft the customer proposal',+ 'sales',+ 'In Progress',+ 'High',+ 'teo',+ 'Draft the scope and delivery timeline for the proposal.',+ '2026-10-09',+ ],+ [+ 'pricing',+ 'Review the pricing',+ 'sales',+ 'Not Started',+ 'High',+ 'julia',+ 'Check the price and payment terms before we send the proposal.',+ '2026-10-09',+ ],+ [+ 'access',+ 'Approve the scope',+ 'sales',+ 'In Review',+ 'Medium',+ 'gabriel',+ 'Check the proposal against the customer’s requirements.',+ ],+ [+ 'contacts',+ 'Collect customer feedback',+ 'sales',+ 'Completed',+ 'Medium',+ 'julia',+ 'The customer’s feedback on the current website is attached.',+ ],+ [+ 'proposal',+ 'Review the proposal',+ 'customers',+ 'In Review',+ 'High',+ 'jacob',+ 'Check the scope and pricing before sending the proposal.',+ '2026-10-09',+ ],+ [+ 'questions',+ 'Answer customer questions',+ 'customers',+ 'Not Started',+ 'Medium',+ 'julia',+ 'Reply to the customer’s questions about getting started.',+ ],+ [+ 'walkthrough',+ 'Schedule a product demo',+ 'customers',+ 'Not Started',+ 'Medium',+ 'teo',+ 'Find a time next week to show the product to the customer.',+ ],+ [+ 'notes',+ 'Send follow-up notes',+ 'customers',+ 'Completed',+ 'Low',+ 'jacob',+ 'Sent the decisions and next steps from Tuesday’s customer calls.',+ ],+ [+ 'stories',+ 'Update the customer stories',+ 'website',+ 'Not Started',+ 'Medium',+ 'julia',+ 'Add the latest customer quotes and get permission for the screenshots.',+ ],+ [+ 'mobile',+ 'Review pages on mobile',+ 'website',+ 'Not Started',+ 'Low',+ 'gabriel',+ 'Check navigation, pricing, and the contact form at phone widths.',+ ],+ [+ 'copy',+ 'Approve the homepage copy',+ 'website',+ 'Completed',+ 'Low',+ 'jacob',+ 'The revised headline and product descriptions are approved.',+ ],+ ];+ const metadata: Record<string, TaskMetadata> = {};+ const tasks = rows.map(+ (+ [id, title, projectId, status, priority, owner, description, dueDate],+ index+ ): WorkspaceTask => {+ metadata[id] = {+ projectId,+ updated: 100 - index,+ created: index,+ dueDate,+ };+ return {+ id,+ title,+ description,+ status,+ priority,+ owner,+ creator: index % 3 === 0 ? 'julia' : 'jacob',+ channel: projectId,+ tags: [projectId === 'website' ? 'Website' : 'Customers'],+ relatedDocumentIds: [],+ steps:+ id === 'training'+ ? [+ { id: 'outline', text: 'Confirm the scope', done: true },+ {+ id: 'examples',+ text: 'Add a delivery timeline',+ done: false,+ },+ ]+ : [],+ comments:+ id === 'proposal'+ ? [+ {+ id: 'proposal-comment',+ person: 'teo',+ body: 'They asked for a revised timeline. I’ve included it in the scope.',+ time: 'Today, 9:10 AM',+ },+ ]+ : [],+ };+ }+ );+ return { projects, tasks, metadata };+}diff --git a/apps/marketing/src/features/marketing/components/workspace/ChatSidebar.tsx b/apps/marketing/src/features/marketing/components/workspace/ChatSidebar.tsxnew file mode 100644index 0000000000..e5ea7ffb31--- /dev/null+++ b/apps/marketing/src/features/marketing/components/workspace/ChatSidebar.tsx@@ -0,0 +1,182 @@+import Caret from '@phosphor/caret-right.svg';+import Hash from '@phosphor/hash.svg';+import Search from '@phosphor/magnifying-glass.svg';+import Sidebar from '@phosphor/sidebar-simple.svg';+import { Tabs } from '@ui';+import { createSignal, For, type JSX, Show } from 'solid-js';+import { homepagePeople } from '../../core/homepage-demo-people';+import type { DummyWorkspace } from '../../primitives/createDummyWorkspace';+import { ViewSidebar } from '../DemoViewSidebar';+import { SearchBar } from '../email/frozen/SearchBar';++function ChatGroup(props: { title: string; children: JSX.Element }) {+ const [open, setOpen] = createSignal(true);+ return (+ <section class="chat-sidebar-group" data-open={open()}>+ <button+ class="chat-sidebar-group-heading"+ aria-expanded={open()}+ onClick={() => setOpen(!open())}+ >+ <span>{props.title}</span>+ <Caret class="size-3" classList={{ 'rotate-90': open() }} />+ </button>+ <Show when={open()}>+ <ViewSidebar.Nav>{props.children}</ViewSidebar.Nav>+ </Show>+ </section>+ );+}++/** Local data adapter for the app's ExpandedChannelsRail layout. */+export function ChatSidebar(props: {+ workspace: DummyWorkspace;+ collapse: () => void;+ navigate: (id: string) => void;+}) {+ const w = props.workspace;+ const [tab, setTab] = createSignal('all');+ const [searchOpen, setSearchOpen] = createSignal(false);+ const [query, setQuery] = createSignal('');+ const label = (channel: (typeof w.data.channels)[number]) =>+ channel.person ? homepagePeople[channel.person].name : channel.id;+ const channels = () =>+ w.data.channels.filter((c) =>+ label(c).toLowerCase().includes(query().trim().toLowerCase())+ );+ const open = (id: string, thread?: string) => {+ props.navigate(id);+ w.setChannelThread(thread);+ };+ const rows = (items: ReturnType<typeof channels>) => (+ <For each={items}>+ {(c) => (+ <ViewSidebar.Item+ active={w.channel() === c.id}+ onClick={() => open(c.id)}+ >+ <ViewSidebar.Icon>+ <Show when={c.person} fallback={<Hash />}>+ {(person) => (+ <img+ class="size-5 rounded-full"+ src={homepagePeople[person()].photo}+ alt=""+ />+ )}+ </Show>+ </ViewSidebar.Icon>+ <span class="truncate">{label(c)}</span>+ </ViewSidebar.Item>+ )}+ </For>+ );+ return (+ <ViewSidebar.Root aria-label="Chat navigation" class="chat-sidebar">+ <ViewSidebar.Header>+ <div class="flex min-w-0 items-center gap-1">+ <ViewSidebar.Control+ label="Collapse sidebar"+ onClick={props.collapse}+ >+ <Sidebar />+ </ViewSidebar.Control>+ <ViewSidebar.Title>Chat</ViewSidebar.Title>+ </div>+ </ViewSidebar.Header>+ <ViewSidebar.Primary>+ <ViewSidebar.Toolbar>+ <Tabs+ aria-label="Chat sidebar views"+ list={[+ { value: 'all', label: 'All' },+ { value: 'recent', label: 'Recent' },+ { value: 'threads', label: 'Threads' },+ ]}+ value={tab()}+ onChange={setTab}+ />+ <ViewSidebar.Control+ label={searchOpen() ? 'Close search' : 'Search conversations'}+ aria-pressed={searchOpen()}+ onClick={() => {+ setSearchOpen(!searchOpen());+ setQuery('');+ }}+ >+ <Search class="size-3.5" />+ </ViewSidebar.Control>+ </ViewSidebar.Toolbar>+ </ViewSidebar.Primary>+ <Show when={searchOpen()}>+ <div class="px-4 pt-2">+ <SearchBar+ label="Search channels and direct messages"+ placeholder="Search conversations"+ value={query()}+ onValueChange={setQuery}+ />+ </div>+ </Show>+ <ViewSidebar.Content>+ <Show when={tab() === 'all'}>+ <ChatGroup title="Favorites">+ {rows(+ channels()+ .filter((c) => !c.person)+ .slice(0, 2)+ )}+ </ChatGroup>+ <div class="chat-sidebar-conversations">+ <ChatGroup title="Channels">+ {rows(channels().filter((c) => !c.person))}+ </ChatGroup>+ <ChatGroup title="DMs">+ {rows(channels().filter((c) => c.person))}+ </ChatGroup>+ </div>+ </Show>+ <Show when={tab() === 'recent'}>+ <ViewSidebar.Nav>+ {rows(+ channels()+ .filter((c) => c.messages.length)+ .slice()+ .reverse()+ )}+ </ViewSidebar.Nav>+ </Show>+ <Show when={tab() === 'threads'}>+ <ViewSidebar.Nav>+ <For each={channels()}>+ {(c) => (+ <For+ each={c.messages.filter(+ (m) =>+ !m.replyTo &&+ c.messages.some((reply) => reply.replyTo === m.id)+ )}+ >+ {(m) => (+ <button+ class="chat-sidebar-thread"+ onClick={() => open(c.id, m.id)}+ >+ <span class="text-xs text-ink-muted">{label(c)}</span>+ <span class="line-clamp-2 text-sm text-ink">+ {m.body.replace(/@\[([^\]]+)\]\([^)]+\)/g, '$1')}+ </span>+ </button>+ )}+ </For>+ )}+ </For>+ </ViewSidebar.Nav>+ </Show>+ <Show when={!channels().length}>+ <p class="px-2 text-sm text-ink-muted">No conversations found</p>+ </Show>+ </ViewSidebar.Content>+ </ViewSidebar.Root>+ );+}diff --git a/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.test.tsx b/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.test.tsxindex 2a9185f666..53cdd0c0b3 100644--- a/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.test.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.test.tsx@@ -5,7 +5,13 @@ import {screen,within,} from '@solidjs/testing-library';+import { unwrap } from 'solid-js/store';import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import {+ CHANNEL_DOC,+ CHANNEL_EMAIL,+ createChannelHeroProject,+} from '../channels/channelProject';import DummyWorkspace from './DummyWorkspace';beforeEach(() => {@@ -104,10 +110,88 @@ it('clears a thread reply when switching to another conversation', () => {})[0]);expect(screen.getByRole('textbox', { name: 'Thread reply' })).toBeTruthy();- fireEvent.click(home.getByRole('button', { name: 'Julia Westphal' }));+ fireEvent.click(home.getByRole('button', { name: 'Julia' }));expect(screen.queryByRole('textbox', { name: 'Thread reply' })).toBeNull();expect(screen.getByRole('log', { name: 'Channel dm-julia' })).toBeTruthy();expect(screen.getByRole('textbox', { name: 'Message #dm-julia' })).toBeTruthy();});++it('keeps the populated Chat sidebar while opening documents and email in independent splits', () => {+ vi.spyOn(HTMLElement.prototype, 'clientWidth', 'get').mockReturnValue(1440);+ const view = render(() => {+ const project = createChannelHeroProject();+ return (+ <DummyWorkspace+ embedded+ initialView="messages"+ initialData={unwrap(project.data)}+ initialChannelThread="start"+ chatSplits+ />+ );+ });+ const nav = within(+ view.getByRole('complementary', { name: 'Chat navigation' })+ );+ expect(nav.getByRole('button', { name: 'engineering' })).toBeTruthy();+ expect(nav.getByRole('button', { name: 'Gabriel' })).toBeTruthy();+ expect(nav.getByRole('button', { name: 'Valentina' })).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: CHANNEL_DOC }));+ expect(+ view.getByRole('textbox', { name: 'Document title' }).textContent+ ).toBe(CHANNEL_DOC);+ expect(view.getByRole('log', { name: 'Channel launch' })).toBeTruthy();+ fireEvent.click(view.getByRole('button', { name: CHANNEL_EMAIL }));+ expect(view.container.querySelectorAll('.channel-work-item')).toHaveLength(2);+ expect(+ view.container.querySelector('.channel-work-split')?.getAttribute('style')+ ).toContain('--channel-pane-count: 3');+ const email = view.container.querySelector(+ '[data-pane-view="email"]'+ ) as HTMLElement;+ fireEvent.click(+ within(email).getByRole('button', { name: 'Close shared work' })+ );+ expect(view.container.querySelectorAll('.channel-work-item')).toHaveLength(1);+ fireEvent.click(nav.getByRole('button', { name: 'Valentina' }));+ expect(view.getByRole('log', { name: 'Channel dm-valentina' })).toBeTruthy();+ expect(view.getByText('looks much sharper, thanks')).toBeTruthy();+});++it('supports Chat search, collapsible groups, and opening a thread from the sidebar', () => {+ const view = render(() => {+ const project = createChannelHeroProject();+ return (+ <DummyWorkspace+ embedded+ initialView="messages"+ initialData={unwrap(project.data)}+ />+ );+ });+ const nav = within(+ view.getByRole('complementary', { name: 'Chat navigation' })+ );+ fireEvent.click(nav.getByRole('button', { name: 'Channels' }));+ expect(nav.queryByRole('button', { name: 'engineering' })).toBeNull();+ fireEvent.click(nav.getByRole('button', { name: 'Channels' }));+ fireEvent.click(nav.getByRole('button', { name: 'Search conversations' }));+ fireEvent.input(+ nav.getByRole('searchbox', { name: 'Search channels and direct messages' }),+ { target: { value: 'Gabriel' } }+ );+ expect(nav.getByRole('button', { name: 'Gabriel' })).toBeTruthy();+ expect(nav.queryByRole('button', { name: 'engineering' })).toBeNull();+ fireEvent.click(nav.getByRole('button', { name: 'Close search' }));+ fireEvent.click(nav.getByRole('radio', { name: 'Threads' }));+ fireEvent.click(+ nav.getByRole('button', { name: /morning, doing a last pass on the site/ })+ );+ expect(+ view.container+ .querySelector('[data-thread-id="history-morning"]')+ ?.getAttribute('data-thread-open')+ ).toBe('true');+});diff --git a/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.tsx b/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.tsxindex 72b0e1d84c..7fea7adfa5 100644--- a/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/DummyWorkspace.tsx@@ -32,12 +32,18 @@ import {Switch,} from 'solid-js';import type { EmailTagId } from '../../core/demo-email';-import type { WorkspaceView } from '../../core/dummy-workspace';+import type { DummyData, WorkspaceView } from '../../core/dummy-workspace';import { homepagePeople } from '../../core/homepage-demo-people';import { sampleAgentSessions } from '../../core/workspace-parity-fixtures';import { createDummyWorkspace } from '../../primitives/createDummyWorkspace';+import { AgentFeedbackWorkflow } from '../agents/AgentWorkflowStories';+import { seedAgentWorkflows } from '../agents/workflowData';+import { ChannelWorkSurface } from '../channels/ChannelWorkSurface';import { NavGlyph } from '../DemoNavGlyph';import { EmailSidebar, type MailTab } from '../email/frozen/EmailShell';+import { createTasksWorkspace } from '../tasks/createTasksWorkspace';+import { TasksWorkspaceMain } from '../tasks/TasksWorkspace';+import { TasksWorkspaceSidebar } from '../tasks/TasksWorkspaceSidebar';import { CreatePalette } from './frozen/CreatePalette';import { type SearchOption, SearchPalette } from './frozen/SearchPalette';import { WorkspaceAgents } from './WorkspaceAgents';@@ -66,14 +72,41 @@ const NAV = [export default function DummyWorkspace(props: {initialView?: WorkspaceView;+ initialData?: Partial<DummyData>;+ initialChannelThread?: string;initialTask?: string;initialCompany?: string;initialDocument?: string;initialAgent?: string;+ agentShowcase?: boolean;+ tasksShowcase?: boolean;+ chatSplits?: boolean;embedded?: boolean;}) {let workspaceElement!: HTMLDivElement;- const w = createDummyWorkspace(props.initialView ?? 'home');+ const showcase =+ props.agentShowcase ||+ (!props.embedded &&+ typeof window !== 'undefined' &&+ new URLSearchParams(window.location.search).get('scene') === 'agents');+ const tasksShowcase =+ props.tasksShowcase ||+ (!props.embedded &&+ typeof window !== 'undefined' &&+ new URLSearchParams(window.location.search).get('scene') === 'tasks');+ const w = createDummyWorkspace(+ showcase+ ? 'messages'+ : tasksShowcase+ ? 'tasks'+ : (props.initialView ?? 'home')+ );+ const taskWorkspace = tasksShowcase ? createTasksWorkspace(w) : undefined;+ if (props.initialData) w.setData(structuredClone(props.initialData));+ if (showcase) {+ seedAgentWorkflows(w);+ w.setChannel('product-feedback');+ }if (!props.embedded && typeof window !== 'undefined') {const companyId = window.location.hash.replace(/^#company-/, '');const emailId = window.location.hash.replace(/^#email-/, '');@@ -86,6 +119,8 @@ export default function DummyWorkspace(props: {if (props.initialAgent) w.open('agents', props.initialAgent);if (props.initialTask) w.open('tasks', props.initialTask);if (props.initialCompany) w.open('crm', props.initialCompany);+ if (props.initialChannelThread)+ w.setChannelThread(props.initialChannelThread);const [filter, setFilter] = createSignal<TaskFilter>('all');const [mailTab, setMailTab] = createSignal<MailTab>('important');const [account, setAccount] = createSignal('all');@@ -233,6 +268,8 @@ export default function DummyWorkspace(props: {data-theme="dark"data-embedded={!!props.embedded}data-sidebar-open={mobileOpen()}+ data-tasks-showcase={tasksShowcase}+ data-agents-view={w.view() === 'agents'}><Show when={searching()}><SearchPalette@@ -317,6 +354,13 @@ export default function DummyWorkspace(props: {size="sm"onClick={() => {w.reset();+ taskWorkspace?.reset();+ if (props.initialData)+ w.setData(structuredClone(props.initialData));+ if (showcase) {+ seedAgentWorkflows(w);+ w.setChannel('product-feedback');+ }setSearching(false);setFilter('all');setMailTab('important');@@ -403,7 +447,7 @@ export default function DummyWorkspace(props: {<div class="min-h-0 flex-1" /><imgsrc={homepagePeople.jacob.photo}- alt="Jacob Beckerman"+ alt="Jacob"class="size-8 rounded-full"/></div>@@ -412,15 +456,26 @@ export default function DummyWorkspace(props: {<Showwhen={w.view() === 'email'}fallback={- <WorkspaceSidebar- workspace={w}- title={title()}- collapse={() => setSidebar(false)}- create={create}- navigate={navigate}- taskFilter={filter()}- setTaskFilter={setFilter}- />+ <Show+ when={taskWorkspace && w.view() === 'tasks'}+ fallback={+ <WorkspaceSidebar+ workspace={w}+ title={title()}+ collapse={() => setSidebar(false)}+ create={create}+ navigate={navigate}+ taskFilter={filter()}+ setTaskFilter={setFilter}+ />+ }+ >+ <TasksWorkspaceSidebar+ state={taskWorkspace!}+ collapse={() => setSidebar(false)}+ onNavigate={() => setMobileOpen(false)}+ />+ </Show>}><EmailSidebar@@ -474,7 +529,13 @@ export default function DummyWorkspace(props: {variant="plain"size="icon-sm"label="Create item"- onClick={() => setCreating(true)}+ onClick={() =>+ taskWorkspace && w.view() === 'tasks'+ ? taskWorkspace.setComposer(+ taskWorkspace.projectList() ? 'project' : 'task'+ )+ : setCreating(true)+ }><Plus /></Button>@@ -493,7 +554,12 @@ export default function DummyWorkspace(props: {</Show><Switch><Match when={w.contentView() === 'tasks'}>- <WorkspaceTasks workspace={w} filter={filter()} />+ <Show+ when={taskWorkspace}+ fallback={<WorkspaceTasks workspace={w} filter={filter()} />}+ >+ {(controller) => <TasksWorkspaceMain state={controller()} />}+ </Show></Match><Match when={w.contentView() === 'email'}><WorkspaceEmail@@ -513,7 +579,19 @@ export default function DummyWorkspace(props: {<WorkspaceDocuments workspace={w} /></Match><Match when={w.contentView() === 'messages'}>- <WorkspaceChannel workspace={w} />+ <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} />diff --git a/apps/marketing/src/features/marketing/components/workspace/WorkspaceAgents.tsx b/apps/marketing/src/features/marketing/components/workspace/WorkspaceAgents.tsxindex 00b6c3c5c5..da42735094 100644--- a/apps/marketing/src/features/marketing/components/workspace/WorkspaceAgents.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/WorkspaceAgents.tsx@@ -5,25 +5,22 @@ import GitPull from '@phosphor/git-pull-request.svg';import Plus from '@phosphor/plus.svg';import Terminal from '@phosphor/terminal-window.svg';import { Button } from '@ui';-import { createEffect, createSignal, For, on, Show } from 'solid-js';+import { createEffect, For, on, Show } from 'solid-js';import { DEPLOY_PROMPT, DEPLOY_TRACE } from '../../core/deploy-agent-demo';import { sampleAgentSessions } from '../../core/workspace-parity-fixtures';import type { DummyWorkspace } from '../../primitives/createDummyWorkspace';+import { AgentComposer } from '../agents/AgentComposer';import { AgentAnswer, AgentPrompt, AgentTurn } from '../agents/AgentTranscript';-import { AGENT_MODELS, AGENT_PLACEHOLDER } from '../agents/agentDemoData';import { LaunchConversation } from '../agents/LaunchConversation';+import { NorthwindSession } from '../agents/NorthwindSession';import { AgentMessage } from '../DemoAgentMessage';import { ViewShell } from '../DemoWorkspaceChrome';-import { InputActionButton } from '../email/frozen/ActionButton';-import { ChannelComposer } from '../email/frozen/ChannelComposer';-import { ModelCatalogPicker } from './frozen/model-picker/ModelCatalogPicker';export function WorkspaceAgents(props: {workspace: DummyWorkspace;home?: boolean;}) {const w = props.workspace;- const [model, setModel] = createSignal(AGENT_MODELS[0].id);let log: HTMLDivElement | undefined;// A new reply lands below the cited answer; keep it in view.createEffect(@@ -51,269 +48,288 @@ export function WorkspaceAgents(props: {stop: null,});const composer = () => (- <ChannelComposer- richMentions- agent- label="Message the agent"- placeholder={- conversation()- ? AGENT_PLACEHOLDER- : 'Type @ to mention docs, people, or channels'- }- leadingAction={- <InputActionButton- label="Add workspace context"- onClick={() => w.openItem('documents')}- >- <Plus />- </InputActionButton>- }- accessory={- <ModelCatalogPicker- value={model()}- options={AGENT_MODELS}- onSelect={setModel}- ariaLabel="Model"- placement="top-end"- triggerClass="h-[33.75px] min-w-0 max-w-full gap-[5.625px] rounded-full border-0 bg-transparent hover:bg-hover px-[7.5px] text-base font-normal text-ink-muted [&_svg]:size-[15px]"- />- }+ <AgentComposer+ newConversation={!conversation()}+ mode={w.agentMode()}+ onModeChange={w.setAgentMode}+ onCreateAgent={() => w.openItem('agents', 'catalog')}onSend={(prompt) => {- w.openItem('agents', 'launch-status');+ w.openItem(+ 'agents',+ w.agentMode() === 'code' ? 'deploy' : 'launch-status'+ );w.ask(prompt);}}/>);return (- <>- <ViewShell.TopBar>- <span class="min-w-0 truncate text-sm font-semibold tracking-[-0.03em] text-ink">- {props.home- ? ''- : w.selected() === 'connections'- ? 'Connections'- : w.selected() === 'catalog'- ? 'Agents'- : conversation()- ? session()?.title- : 'New conversation'}- </span>- <Show when={conversation() && session()?.runtime !== 'Macro'}>- <span class="ml-auto flex gap-2 items-center text-xs text-success">- <GitPull class="size-4" />- {pullRequest()}- <span>Open</span>- </span>- </Show>- </ViewShell.TopBar>- <Show- when={- (w.selected() === 'connections' || w.selected() === 'catalog') &&- !props.home- }- fallback={+ <Show+ when={w.selected() === 'northwind'}+ fallback={+ <>+ <ViewShell.TopBar>+ <span class="min-w-0 truncate text-sm font-semibold tracking-[-0.03em] text-ink">+ {props.home+ ? ''+ : w.selected() === 'routines'+ ? 'Routines'+ : w.selected() === 'connections'+ ? 'Connections'+ : w.selected() === 'catalog'+ ? 'Agents'+ : conversation()+ ? session()?.title+ : 'New conversation'}+ </span>+ <Show when={conversation() && session()?.runtime !== 'Macro'}>+ <span class="ml-auto flex gap-2 items-center text-xs text-success">+ <GitPull class="size-4" />+ {pullRequest()}+ <span>Open</span>+ </span>+ </Show>+ </ViewShell.TopBar><Show- when={conversation()}+ when={+ (w.selected() === 'connections' ||+ w.selected() === 'catalog' ||+ w.selected() === 'routines') &&+ !props.home+ }fallback={- <div class="sample-agent-empty">- <div class="sample-agent-start">- <h1>What should we work on?</h1>- {composer()}- <Show when={props.home}>- <div class="sample-home-suggestions">- <For- each={w.data.tasks- .filter((task) => task.status !== 'Completed')- .slice(0, 3)}- >- {(task) => (- <button- type="button"- onClick={() => w.openItem('tasks', task.id)}+ <Show+ when={conversation()}+ fallback={+ <div class="sample-agent-empty">+ <div class="sample-agent-start">+ <h1>+ {w.agentMode() === 'code'+ ? 'What should we build?'+ : 'What should we work on?'}+ </h1>+ {composer()}+ <Show when={props.home}>+ <div class="sample-home-suggestions">+ <For+ each={w.data.tasks+ .filter((task) => task.status !== 'Completed')+ .slice(0, 3)}>- <span class="truncate">{task.title}</span>- <span>Open ↗</span>- </button>+ {(task) => (+ <button+ type="button"+ onClick={() => w.openItem('tasks', task.id)}+ >+ <span class="truncate">{task.title}</span>+ <span>Open ↗</span>+ </button>+ )}+ </For>+ </div>+ </Show>+ </div>+ </div>+ }+ >+ <Show+ when={w.selected() === 'launch-status'}+ fallback={+ <div class="dummy-scroll sample-agent-log">+ <Show when={w.selected() === 'deploy'}>+ <div class="mb-8">+ <AgentMessage+ message={message(DEPLOY_PROMPT, true)}+ />+ </div>+ <AgentMessage message={DEPLOY_TRACE} inFlight={false} />+ </Show>+ <Show when={w.selected() !== 'deploy' && session()}>+ {(current) => (+ <>+ <div class="mb-8">+ <AgentMessage+ message={message(current().prompt, true)}+ />+ </div>+ <AgentMessage+ message={message(current().answer)}+ inFlight={false}+ />+ </>+ )}+ </Show>+ <For each={w.agentReplies()}>+ {(reply) => (+ <div class="mb-8">+ <div class="mb-6">+ <AgentMessage+ message={message(reply.prompt, true)}+ />+ </div>+ <AgentMessage+ message={message(reply.answer)}+ inFlight={false}+ />+ </div>)}</For>+ <Show when={w.busy()}>+ <p class="text-sm magic-chip-shimmer" role="status">+ Working+ </p>+ </Show></div>- </Show>+ }+ >+ <div+ ref={(element) => (log = element)}+ class="dummy-scroll agent-transcript"+ role="log"+ aria-label={session()?.title}+ >+ <LaunchConversation workspace={w} />+ <For each={w.agentReplies()}>+ {(reply) => (+ <>+ <AgentTurn>+ <AgentPrompt text={reply.prompt} />+ </AgentTurn>+ <AgentTurn>+ <AgentAnswer text={reply.answer} mentions={{}} />+ </AgentTurn>+ </>+ )}+ </For>+ <Show when={w.busy()}>+ <AgentTurn>+ <span class="magic-chip-shimmer text-sm" role="status">+ Working+ </span>+ </AgentTurn>+ </Show>+ </div>+ </Show>+ <div class="dummy-composer sample-chat-composer agent-composer">+ {composer()}</div>- </div>+ </Show>}><Show- when={w.selected() === 'launch-status'}+ when={w.selected() === 'catalog'}fallback={- <div class="dummy-scroll sample-agent-log">- <Show when={w.selected() === 'deploy'}>- <div class="mb-8">- <AgentMessage message={message(DEPLOY_PROMPT, true)} />+ <Show+ when={w.selected() !== 'routines'}+ fallback={+ <div class="p-6 text-sm text-ink-muted">+ <h1 class="text-xl text-ink mb-6">Routines</h1>+ <p>No routines yet</p>+ <p class="mt-2">+ Create a routine to run an agent on a schedule or a+ Macro event.+ </p>+ <p class="mt-6 text-xs">+ Scheduling is unavailable in this local sample.+ </p></div>- <AgentMessage message={DEPLOY_TRACE} inFlight={false} />- </Show>- <Show when={w.selected() !== 'deploy' && session()}>- {(current) => (- <>- <div class="mb-8">- <AgentMessage- message={message(current().prompt, true)}- />- </div>- <AgentMessage- message={message(current().answer)}- inFlight={false}- />- </>- )}- </Show>- <For each={w.agentReplies()}>- {(reply) => (- <div class="mb-8">- <div class="mb-6">- <AgentMessage message={message(reply.prompt, true)} />+ }+ >+ <div class="mx-auto max-w-3xl p-8">+ <h1 class="text-2xl font-semibold mb-6">Connections</h1>+ <div class="text-sm text-ink-muted mb-6">+ Connect the tools your team already uses so Macro's agent+ can work in them.+ </div>+ <For each={['Gmail', 'Google Calendar', 'GitHub', 'Slack']}>+ {(name) => (+ <div class="border-b border-edge-muted py-4 flex justify-between gap-12">+ <span>{name}</span></div>- <AgentMessage- message={message(reply.answer)}- inFlight={false}- />- </div>+ )}+ </For>+ </div>+ </Show>+ }+ >+ <div class="dummy-scroll">+ <div class="sample-agent-catalog">+ <h1 class="text-2xl font-semibold mb-2">Agents</h1>+ <div class="text-sm text-ink-muted leading-6 mb-6">+ Agents let you customize your Macro AI experience by+ combining a unique name, specific instructions, default+ model, and harness.+ </div>+ <div class="rounded-xl border border-edge-muted bg-surface-2 p-6 mb-8">+ <div class="mb-5 flex items-center gap-2 text-xs font-medium text-ink-muted">+ <Terminal class="size-4" />+ Bring your own agent+ </div>+ <h2 class="text-xl font-medium tracking-tight mb-3">+ Bring <span class="text-accent">Claude Code</span> to+ Macro.+ </h2>+ <p class="text-sm text-ink-muted leading-relaxed">+ Your agent, on your machine. Connect a runtime with+ macrod, then give your agent instructions and a place in+ your workspace.+ </p>+ </div>+ <h2 class="text-sm font-medium mb-3">Team agents</h2>+ <For+ each={[+ {+ name: 'Customer rollouts',+ detail:+ 'Workspace assistant · Emails, tasks, and documents',+ id: 'customer-summary',+ icon: ChatGptIcon,+ },+ {+ name: 'Cursor',+ detail: 'Coding agent · launch-team/workspace',+ id: 'deploy',+ icon: CursorIcon,+ },+ {+ name: 'Claude Code',+ detail: 'Coding agent · launch-team/workspace',+ id: 'invite-review',+ icon: ClaudeIcon,+ },+ ]}+ >+ {(agent) => (+ <button+ type="button"+ class="flex items-center gap-4 w-full rounded-xl bg-surface-2 hover:bg-hover p-4 text-left mb-3"+ onClick={() => w.openItem('agents', agent.id)}+ >+ <agent.icon class="size-6 shrink-0 text-ink" />+ <span>+ <span class="text-sm font-medium">{agent.name}</span>+ <span class="block text-xs text-ink-muted mt-1">+ {agent.detail}+ </span>+ </span>+ </button>)}</For>- <Show when={w.busy()}>- <p class="text-sm magic-chip-shimmer" role="status">- Working- </p>- </Show>+ <Button+ variant="plain"+ size="sm"+ onClick={() => w.openItem('agents', 'new')}+ >+ <Plus />+ New conversation+ </Button></div>- }- >- <div- ref={(element) => (log = element)}- class="dummy-scroll agent-transcript"- role="log"- aria-label={session()?.title}- >- <LaunchConversation workspace={w} />- <For each={w.agentReplies()}>- {(reply) => (- <>- <AgentTurn>- <AgentPrompt text={reply.prompt} />- </AgentTurn>- <AgentTurn>- <AgentAnswer text={reply.answer} mentions={{}} />- </AgentTurn>- </>- )}- </For>- <Show when={w.busy()}>- <AgentTurn>- <span class="magic-chip-shimmer text-sm" role="status">- Working- </span>- </AgentTurn>- </Show></div></Show>- <div class="dummy-composer sample-chat-composer agent-composer">- {composer()}- </div></Show>- }- >- <Show- when={w.selected() === 'catalog'}- fallback={- <div class="mx-auto max-w-3xl p-8">- <h1 class="text-2xl font-semibold mb-6">Connections</h1>- <div class="text-sm text-ink-muted mb-6">- Connect the tools your team already uses so Macro's agent can- work in them.- </div>- <For each={['Gmail', 'Google Calendar', 'GitHub', 'Slack']}>- {(name) => (- <div class="border-b border-edge-muted py-4 flex justify-between gap-12">- <span>{name}</span>- </div>- )}- </For>- </div>- }- >- <div class="dummy-scroll">- <div class="sample-agent-catalog">- <h1 class="text-2xl font-semibold mb-2">Agents</h1>- <div class="text-sm text-ink-muted leading-6 mb-6">- Agents let you customize your Macro AI experience by combining a- unique name, specific instructions, default model, and harness.- </div>- <div class="rounded-xl border border-edge-muted bg-surface-2 p-6 mb-8">- <div class="mb-5 flex items-center gap-2 text-xs font-medium text-ink-muted">- <Terminal class="size-4" />- Bring your own agent- </div>- <h2 class="text-xl font-medium tracking-tight mb-3">- Bring <span class="text-accent">Claude Code</span> to Macro.- </h2>- <p class="text-sm text-ink-muted leading-relaxed">- Your agent, on your machine. Connect a runtime with macrod,- then give your agent instructions and a place in your- workspace.- </p>- </div>- <h2 class="text-sm font-medium mb-3">Team agents</h2>- <For- each={[- {- name: 'ChatGPT',- detail:- 'Workspace assistant · Emails, tasks, and documents',- id: 'customer-summary',- icon: ChatGptIcon,- },- {- name: 'Cursor',- detail: 'Coding agent · launch-team/workspace',- id: 'deploy',- icon: CursorIcon,- },- {- name: 'Claude Code',- detail: 'Coding agent · launch-team/workspace',- id: 'invite-review',- icon: ClaudeIcon,- },- ]}- >- {(agent) => (- <button- type="button"- class="flex items-center gap-4 w-full rounded-xl bg-surface-2 hover:bg-hover p-4 text-left mb-3"- onClick={() => w.openItem('agents', agent.id)}- >- <agent.icon class="size-6 shrink-0 text-ink" />- <span>- <span class="text-sm font-medium">{agent.name}</span>- <span class="block text-xs text-ink-muted mt-1">- {agent.detail}- </span>- </span>- </button>- )}- </For>- <Button- variant="plain"- size="sm"- onClick={() => w.openItem('agents', 'new')}- >- <Plus />- New conversation- </Button>- </div>- </div>- </Show>- </Show>- </>+ </>+ }+ >+ <NorthwindSession workspace={w} />+ </Show>);}diff --git a/apps/marketing/src/features/marketing/components/workspace/WorkspaceChannel.tsx b/apps/marketing/src/features/marketing/components/workspace/WorkspaceChannel.tsxindex 2f723ae37b..cf72cfdb31 100644--- a/apps/marketing/src/features/marketing/components/workspace/WorkspaceChannel.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/WorkspaceChannel.tsx@@ -1,18 +1,28 @@import CaretRight from '@phosphor/caret-right.svg';-import Envelope from '@phosphor/envelope.svg';-import File from '@phosphor/file.svg';import Hash from '@phosphor/hash.svg';import Phone from '@phosphor/phone.svg';import Plus from '@phosphor/plus.svg';import Sparkle from '@phosphor/sparkle.svg';import { Button } from '@ui';-import { createEffect, createSignal, For, on, Show } from 'solid-js';+import {+ type Accessor,+ createEffect,+ createSignal,+ For,+ type JSX,+ on,+ Show,+} from 'solid-js';import { plainDemoMentions } from '../../core/demo-mentions';import type { WorkspaceComment } from '../../core/dummy-workspace';import { homepagePeople } from '../../core/homepage-demo-people';import type { DummyWorkspace } from '../../primitives/createDummyWorkspace';+import { DemoMention, DemoMentionText } from '../DemoMention';import { ViewShell } from '../DemoWorkspaceChrome';-import { ChannelComposer } from '../email/frozen/ChannelComposer';+import {+ ChannelComposer,+ type ChannelComposerHandle,+} from '../email/frozen/ChannelComposer';import { Segments } from './frozen/DetailPanel';import { MessageRow } from './frozen/MessageRow';import { TaskMention } from './frozen/TaskMention';@@ -24,8 +34,16 @@ export function WorkspaceChannel(props: {workspace: DummyWorkspace;/** A walkthrough can show one message's hover toolbar. */hoveredMessage?: string;+ renderMessageBody?: (message: WorkspaceComment) => JSX.Element;+ renderMessageDetails?: (message: WorkspaceComment) => JSX.Element;/** Replaces the default Task action, e.g. to open the task composer. */onTaskMessage?: (message: WorkspaceComment) => void;+ scriptedReply?: Accessor<string | undefined>;+ stableComposer?: boolean;+ onComposerReady?: (+ handle: ChannelComposerHandle | undefined,+ thread?: string+ ) => void;}) {const w = props.workspace;const channel = () => w.data.channels.find((c) => c.id === w.channel());@@ -74,20 +92,101 @@ export function WorkspaceChannel(props: {setReply(id);setExpanded((ids) => (ids.includes(id) ? ids : [...ids, id]));};- const react = (id: string) =>+ if (props.scriptedReply)+ createEffect(() => {+ const id = props.scriptedReply?.();+ if (id) startReply(id);+ else setReply(undefined);+ });+ const react = (id: string, emoji = '👍') => {w.setData('channels',(c) => c.id === w.channel(),'messages',(m) => m.id === id,- 'reactions',- (r) => (r?.length ? [] : ['jacob'])+ (message) => {+ const reactions =+ message.emojiReactions ??+ (message.reactions?.length+ ? [{ emoji: '👍', users: message.reactions }]+ : []);+ const existing = reactions.find((reaction) => reaction.emoji === emoji);+ const users = existing?.users.includes('jacob')+ ? existing.users.filter((user) => user !== 'jacob')+ : [...(existing?.users ?? []), 'jacob'];+ return {+ ...message,+ emojiReactions: [+ ...reactions.filter((reaction) => reaction.emoji !== emoji),+ ...(users.length ? [{ emoji, users }] : []),+ ],+ };+ });+ };+ const renderReference = (id: string) => {+ // Person names and entity ids can overlap in these local fixtures.+ if (id in homepagePeople) return;+ const doc = () => w.data.documents.find((item) => item.id === id);+ const email = () => w.data.emails.find((item) => item.id === id);+ const task = () => w.data.tasks.find((item) => item.id === id);+ if (doc())+ return (+ <button+ type="button"+ class="sample-inline-reference"+ onClick={() => w.openItem('documents', id)}+ >+ <DemoMention item={{ id, kind: 'document', label: doc()!.title }} />+ </button>+ );+ if (email())+ return (+ <button+ type="button"+ class="sample-inline-reference"+ onClick={() => w.openItem('email', id)}+ >+ <DemoMention item={{ id, kind: 'email', label: email()!.subject }} />+ </button>+ );+ if (task())+ return (+ <TaskMention+ task={task()!}+ inline+ onOpen={() => w.openItem('tasks', id)}+ />+ );+ };const row = (message: WorkspaceComment, rootId = message.id) => (<MessageRowmessage={message}+ bodyContent={+ props.renderMessageBody?.(message) ?? (+ <p class="mt-1 text-base whitespace-pre-wrap break-words">+ <DemoMentionText+ text={message.body}+ renderMention={renderReference}+ />+ <For+ each={[+ message.emailId,+ message.documentId,+ message.taskId,+ ...(message.taskIds ?? []),+ ].filter(+ (id): id is string =>+ !!id && !message.body.includes(`(demo-mention:${id})`)+ )}+ >+ {(id) => <> {renderReference(id)}</>}+ </For>+ </p>+ )+ }hovered={props.hoveredMessage === message.id}- onReact={() => react(message.id)}+ onReact={(emoji) => react(message.id, emoji)}onReply={() => startReply(rootId)}onChat={() => w.openItem('agents')}onTask={@@ -112,49 +211,7 @@ export function WorkspaceChannel(props: {: undefined}>- <Show when={message.emailId}>- {(id) => (- <button- type="button"- class="dummy-entity-link"- onClick={() => w.openItem('email', id())}- >- <Envelope class="size-4" />- {w.data.emails.find((e) => e.id === id())?.subject}- </button>- )}- </Show>- <Show when={message.documentId}>- {(id) => (- <button- type="button"- class="dummy-entity-link"- onClick={() => w.openItem('documents', id())}- >- <File class="size-4 text-note" />- {w.data.documents.find((d) => d.id === id())?.title}- </button>- )}- </Show>- <For- each={[- ...(message.taskId ? [message.taskId] : []),- ...(message.taskIds ?? []),- ]}- >- {(id) => (- <Show when={w.data.tasks.find((t) => t.id === id)}>- {(task) => (- <div>- <TaskMention- task={task()}- onOpen={() => w.openItem('tasks', id)}- />- </div>- )}- </Show>- )}- </For>+ {props.renderMessageDetails?.(message)}</MessageRow>);return (@@ -338,6 +395,10 @@ export function WorkspaceChannel(props: {<ChannelComposerrichMentionslabel="Thread reply"+ compact={props.stableComposer ? true : undefined}+ onReady={(handle) =>+ props.onComposerReady?.(handle, message.id)+ }placeholder="Send a reply"onSend={(body) => {w.post(@@ -371,6 +432,8 @@ export function WorkspaceChannel(props: {<ChannelComposerrichMentionslabel={`Message #${w.channel()}`}+ compact={props.stableComposer ? true : undefined}+ onReady={(handle) => props.onComposerReady?.(handle)}placeholder={`Type @ to share with ${channel()?.person ? homepagePeople[channel()!.person!].shortName : `#${name()}`}`}onSend={(body) => {w.post(body);diff --git a/apps/marketing/src/features/marketing/components/workspace/WorkspaceDocuments.tsx b/apps/marketing/src/features/marketing/components/workspace/WorkspaceDocuments.tsxindex 69d5034f03..6122ed53cf 100644--- a/apps/marketing/src/features/marketing/components/workspace/WorkspaceDocuments.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/WorkspaceDocuments.tsx@@ -20,7 +20,7 @@ import {PanelSection,PanelToggle,} from './frozen/DetailPanel';-import { PersonIcon } from './frozen/TaskProperties';+import { MessageRow } from './frozen/MessageRow';// Retain the subset of Markdown represented by the frozen editor presentation.function markdownFrom(element: HTMLElement): string {@@ -56,6 +56,8 @@ export function WorkspaceDocuments(props: {workspace: DummyWorkspace;relatedContent?: JSX.Element;onShare?: () => void;+ sharingDescription?: string;+ hideCollectionNavigation?: boolean;}) {const w = props.workspace;const [panel, setPanel] = createSignal<boolean>();@@ -171,14 +173,16 @@ export function WorkspaceDocuments(props: {{(doc) => (<><ViewShell.TopBar>- <Button- variant="plain"- size="icon-sm"- label={w.view() === 'home' ? 'Back to Home' : 'Back to files'}- onClick={() => w.backToCollection('documents')}- >- <ArrowLeft />- </Button>+ <Show when={!props.hideCollectionNavigation}>+ <Button+ variant="plain"+ size="icon-sm"+ label={w.view() === 'home' ? 'Back to Home' : 'Back to files'}+ onClick={() => w.backToCollection('documents')}+ >+ <ArrowLeft />+ </Button>+ </Show><Show when={w.view() === 'home'}><buttontype="button"@@ -230,7 +234,7 @@ export function WorkspaceDocuments(props: {</PanelSection><PanelSection title="Details" open><PanelGrid>- <PanelRow label="Owner">Jacob Beckerman</PanelRow>+ <PanelRow label="Owner">Jacob</PanelRow><PanelRow label="Created">Sep 28, 2026</PanelRow><PanelRow label="Last updated">Today</PanelRow></PanelGrid>@@ -242,7 +246,9 @@ export function WorkspaceDocuments(props: {/></PanelSection><PanelSection title="Sharing" open>- <p class="text-xs text-ink-muted">Launch team can edit</p>+ <p class="text-xs text-ink-muted">+ {props.sharingDescription ?? 'Launch team can edit'}+ </p></PanelSection><PanelSection title="References"><button@@ -310,14 +316,11 @@ export function WorkspaceDocuments(props: {</div>{props.relatedContent}<div class="mt-8 mb-3 text-xs text-ink-muted">Discussion</div>- <For each={doc().comments}>- {(comment) => (- <div class="flex items-start gap-2 mb-4 text-sm">- <PersonIcon person={comment.person} />- <p>{comment.body}</p>- </div>- )}- </For>+ <div role="log" aria-label="Document discussion">+ <For each={doc().comments}>+ {(comment) => <MessageRow message={comment} />}+ </For>+ </div><ChannelComposerlabel="Comment on document"placeholder="Leave a comment…"diff --git a/apps/marketing/src/features/marketing/components/workspace/WorkspaceEmail.tsx b/apps/marketing/src/features/marketing/components/workspace/WorkspaceEmail.tsxindex 126dc0e042..41bdf15a6b 100644--- a/apps/marketing/src/features/marketing/components/workspace/WorkspaceEmail.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/WorkspaceEmail.tsx@@ -32,6 +32,8 @@ export function WorkspaceEmail(props: {tag?: EmailTagId;onClearTag?: () => void;navigationOpen?: boolean;+ /** A linked split has no inbox navigation history. */+ hideCollectionNavigation?: boolean;onToggleNavigation?: () => void;}) {const w = props.workspace;@@ -113,7 +115,7 @@ export function WorkspaceEmail(props: {return (<><ViewShell.TopBar>- <Show when={!props.navigationOpen}>+ <Show when={!props.navigationOpen && !props.hideCollectionNavigation}><Buttonsize="icon-sm"variant="plain"@@ -127,15 +129,19 @@ export function WorkspaceEmail(props: {class="flex items-center gap-2 min-w-0 text-sm"aria-label="Email location">- <button- type="button"- class="text-ink-muted"- onClick={() => w.backToCollection('email')}- >- {title()}- </button>+ <Show when={!props.hideCollectionNavigation}>+ <button+ type="button"+ class="text-ink-muted"+ onClick={() => w.backToCollection('email')}+ >+ {title()}+ </button>+ </Show><Show when={selected() || w.selected() === 'new'}>- <CaretRight class="size-3 shrink-0 text-ink-muted" />+ <Show when={!props.hideCollectionNavigation}>+ <CaretRight class="size-3 shrink-0 text-ink-muted" />+ </Show><Envelope class="size-3.5 shrink-0" /><span class="truncate font-medium">{selected()?.subject ?? 'New email'}@@ -177,27 +183,29 @@ export function WorkspaceEmail(props: {><Check /></Button>- <Button- size="icon-sm"- variant="plain"- label="Previous email"- disabled={emails().findIndex((e) => e.id === email().id) <= 0}- onClick={() => adjacent(-1)}- >- <CaretUp />- </Button>- <Button- size="icon-sm"- variant="plain"- label="Next email"- disabled={- emails().findIndex((e) => e.id === email().id) >=- emails().length - 1- }- onClick={() => adjacent(1)}- >- <CaretDown />- </Button>+ <Show when={!props.hideCollectionNavigation}>+ <Button+ size="icon-sm"+ variant="plain"+ label="Previous email"+ disabled={emails().findIndex((e) => e.id === email().id) <= 0}+ onClick={() => adjacent(-1)}+ >+ <CaretUp />+ </Button>+ <Button+ size="icon-sm"+ variant="plain"+ label="Next email"+ disabled={+ emails().findIndex((e) => e.id === email().id) >=+ emails().length - 1+ }+ onClick={() => adjacent(1)}+ >+ <CaretDown />+ </Button>+ </Show><Dropdown modal={false}><Dropdown.Triggersize="sm"@@ -322,7 +330,7 @@ export function WorkspaceEmail(props: {<><PanelSection title="Details" open><p class="mb-2">From {email().sender}</p>- <p class="text-ink-muted text-xs">To Jacob Beckerman</p>+ <p class="text-ink-muted text-xs">To Jacob</p><Buttonsize="sm"class="mt-4"diff --git a/apps/marketing/src/features/marketing/components/workspace/WorkspaceEventDetails.tsx b/apps/marketing/src/features/marketing/components/workspace/WorkspaceEventDetails.tsxindex e8b0e458b5..40363a89da 100644--- a/apps/marketing/src/features/marketing/components/workspace/WorkspaceEventDetails.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/WorkspaceEventDetails.tsx@@ -99,7 +99,7 @@ export function WorkspaceEventDetails(props: {<span class="block text-[10px] text-ink-extra-muted">Organizer</span>- Jacob Beckerman+ Jacob</span></div><div class="sample-event-detail-row mt-6">diff --git a/apps/marketing/src/features/marketing/components/workspace/WorkspaceSidebar.tsx b/apps/marketing/src/features/marketing/components/workspace/WorkspaceSidebar.tsxindex 29a1ae2814..513e500f03 100644--- a/apps/marketing/src/features/marketing/components/workspace/WorkspaceSidebar.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/WorkspaceSidebar.tsx@@ -1,11 +1,13 @@import Calendar from '@phosphor/calendar-blank.svg';+import Caret from '@phosphor/caret-right.svg';import CheckSquare from '@phosphor/check-square.svg';import Clock from '@phosphor/clock.svg';+import Repeat from '@phosphor/clock-clockwise.svg';import File from '@phosphor/file.svg';import Folder from '@phosphor/folder-simple.svg';import GitPull from '@phosphor/git-pull-request.svg';-import Hash from '@phosphor/hash.svg';import ListChecks from '@phosphor/list-checks.svg';+import Search from '@phosphor/magnifying-glass.svg';import Note from '@phosphor/note-pencil.svg';import Plugs from '@phosphor/plugs-connected.svg';import Plus from '@phosphor/plus.svg';@@ -13,15 +15,15 @@ import Sidebar from '@phosphor/sidebar-simple.svg';import Sparkle from '@phosphor/sparkle.svg';import Stack from '@phosphor/stack.svg';import Users from '@phosphor/users-three.svg';+import { Button, Tabs } from '@ui';import { TabsInset } from '@ui/components/TabsInset';import { createSignal, For, type JSX, Match, Show, Switch } from 'solid-js';import type { WorkspaceView } from '../../core/dummy-workspace';-import { homepagePeople } from '../../core/homepage-demo-people';import { sampleAgentSessions } from '../../core/workspace-parity-fixtures';import type { DummyWorkspace } from '../../primitives/createDummyWorkspace';import { ViewSidebar } from '../DemoViewSidebar';-import { Segments } from './frozen/DetailPanel';-import { ModelIcon } from './frozen/model-picker/ProviderIcon';+import { SearchBar } from '../email/frozen/SearchBar';+import { ChatSidebar } from './ChatSidebar';import { MiniCalendar } from './WorkspaceCalendar';import { WorkspaceHomeFeed } from './WorkspaceHomeFeed';import type { TaskFilter } from './WorkspaceTasks';@@ -34,7 +36,7 @@ function Group(props: { title: string; children: JSX.Element }) {</section>);}-export function WorkspaceSidebar(props: {+function WorkspaceSidebarOther(props: {workspace: DummyWorkspace;title: string;collapse: () => void;@@ -44,11 +46,10 @@ export function WorkspaceSidebar(props: {setTaskFilter: (value: TaskFilter) => void;}) {const w = props.workspace;- const [chatList, setChatList] = createSignal<'All' | 'Recent'>('All');- const channel = (id: string) => {- w.setChannel(id);- props.navigate('messages', id);- };+ const [conversationsOpen, setConversationsOpen] = createSignal(true);+ const [searchOpen, setSearchOpen] = createSignal(false);+ const [agentSearch, setAgentSearch] = createSignal('');+ let conversationSearch: HTMLInputElement | undefined;const taskFilter = (id: TaskFilter) => {props.setTaskFilter(id);props.navigate('tasks');@@ -56,10 +57,30 @@ export function WorkspaceSidebar(props: {return (<ViewSidebar.Root aria-label={`${props.title} navigation`}><ViewSidebar.Header>- <ViewSidebar.Title>{props.title}</ViewSidebar.Title>- <ViewSidebar.Control label="Collapse sidebar" onClick={props.collapse}>- <Sidebar />- </ViewSidebar.Control>+ <Show+ when={w.view() === 'agents'}+ fallback={+ <>+ <ViewSidebar.Title>{props.title}</ViewSidebar.Title>+ <ViewSidebar.Control+ label="Collapse sidebar"+ onClick={props.collapse}+ >+ <Sidebar />+ </ViewSidebar.Control>+ </>+ }+ >+ <div class="flex min-w-0 items-center gap-1">+ <ViewSidebar.Control+ label="Collapse sidebar"+ onClick={props.collapse}+ >+ <Sidebar />+ </ViewSidebar.Control>+ <ViewSidebar.Title>{props.title}</ViewSidebar.Title>+ </div>+ </Show></ViewSidebar.Header><Switchfallback={@@ -77,24 +98,41 @@ export function WorkspaceSidebar(props: {</ViewSidebar.Primary>}>- <Match when={w.view() === 'messages'}>- <div class="px-4 pb-4">- <Segments- sidebar- label="Chat lists"- items={['All', 'Recent']}- value={chatList()}- onChange={setChatList}+ <Match when={w.view() === 'agents'}>+ <div class="shrink-0 px-(--sidebar-gutter) pt-1" data-agent-mode-row>+ <Tabs+ aria-label="Agents mode"+ fullWidth+ list={[+ { value: 'work', label: 'Work' },+ { value: 'code', label: 'Code' },+ ]}+ value={w.agentMode()}+ onChange={(value) => {+ w.setAgentMode(value === 'code' ? 'code' : 'work');+ props.navigate('agents', 'new');+ }}/></div>+ <div+ class="shrink-0 px-(--sidebar-gutter) pt-2"+ data-agent-create-row+ >+ <ViewSidebar.Action onClick={() => props.navigate('agents', 'new')}>+ <ViewSidebar.Icon>+ <Plus />+ </ViewSidebar.Icon>+ <span class="truncate">New conversation</span>+ </ViewSidebar.Action>+ </div></Match>- <Match when={w.view() === 'home' || w.view() === 'agents'}>+ <Match when={w.view() === 'home'}><ViewSidebar.Primary><ViewSidebar.Action onClick={() => props.navigate('agents', 'new')}><ViewSidebar.Icon><Plus /></ViewSidebar.Icon>- {w.view() === 'home' ? 'New chat' : 'New conversation'}+ New chat</ViewSidebar.Action></ViewSidebar.Primary></Match>@@ -216,66 +254,7 @@ export function WorkspaceSidebar(props: {</ViewSidebar.Item></Group></Match>- <Match when={w.view() === 'messages'}>- <Show when={chatList() === 'All'}>- <Group title="Favorites">- <For- each={w.data.channels.filter((c) => !c.person).slice(0, 2)}- >- {(c) => (- <ViewSidebar.Item onClick={() => channel(c.id)}>- <ViewSidebar.Icon>- <Hash />- </ViewSidebar.Icon>- {c.id}- </ViewSidebar.Item>- )}- </For>- </Group>- </Show>- <Group- title={chatList() === 'All' ? 'Channels' : 'Recent conversations'}- >- <For- each={w.data.channels.filter(- (c) =>- !c.person &&- (chatList() === 'All' ||- c.id === w.channel() ||- c.id === 'launch')- )}- >- {(c) => (- <ViewSidebar.Item- active={w.channel() === c.id}- onClick={() => channel(c.id)}- >- <ViewSidebar.Icon>- <Hash />- </ViewSidebar.Icon>- {c.id}- </ViewSidebar.Item>- )}- </For>- </Group>- <Group title="DMs">- <For each={w.data.channels.filter((c) => c.person)}>- {(c) => (- <ViewSidebar.Item- active={w.channel() === c.id}- onClick={() => channel(c.id)}- >- <img- class="size-5 rounded-full"- src={homepagePeople[c.person!].photo}- alt=""- />- {homepagePeople[c.person!].name}- </ViewSidebar.Item>- )}- </For>- </Group>- </Match>+<Match when={w.view() === 'home'}><WorkspaceHomeFeed workspace={w} navigate={props.navigate} /></Match>@@ -290,6 +269,15 @@ export function WorkspaceSidebar(props: {</ViewSidebar.Icon>Agents</ViewSidebar.Item>+ <ViewSidebar.Item+ active={w.selected() === 'routines'}+ onClick={() => props.navigate('agents', 'routines')}+ >+ <ViewSidebar.Icon>+ <Repeat />+ </ViewSidebar.Icon>+ Routines+ </ViewSidebar.Item><ViewSidebar.Itemactive={w.selected() === 'connections'}onClick={() => props.navigate('agents', 'connections')}@@ -300,45 +288,99 @@ export function WorkspaceSidebar(props: {Connections</ViewSidebar.Item></ViewSidebar.Nav>- <Group title="Conversations">- <For each={sampleAgentSessions}>- {(session) => (- <ViewSidebar.Item- class="sample-agent-session"- active={w.selected() === session.id}- onClick={() => props.navigate('agents', session.id)}+ <section class="flex min-h-0 flex-col">+ <div class="flex h-8 items-center gap-1 px-2 text-xs text-ink-muted">+ <button+ type="button"+ class="flex min-w-0 flex-1 items-center gap-1 text-left"+ aria-expanded={conversationsOpen()}+ onClick={() => setConversationsOpen(!conversationsOpen())}+ >+ Conversations{' '}+ <Caret+ class={`size-3 ${conversationsOpen() ? 'rotate-90' : ''}`}+ />+ </button>+ <Button+ variant="plain"+ size="icon-sm"+ label="Search conversations"+ aria-pressed={searchOpen()}+ onClick={() => {+ setConversationsOpen(true);+ setSearchOpen(!searchOpen());+ if (!searchOpen()) setAgentSearch('');+ else queueMicrotask(() => conversationSearch?.focus());+ }}+ >+ <Search class="size-3.5" />+ </Button>+ </div>+ <Show when={conversationsOpen()}>+ <Show when={searchOpen()}>+ <SearchBar+ ref={conversationSearch}+ label="Search conversations"+ placeholder="Search conversations"+ value={agentSearch()}+ onValueChange={setAgentSearch}+ onEscape={() => {+ setAgentSearch('');+ setSearchOpen(false);+ }}+ />+ </Show>+ <ViewSidebar.Nav aria-label="Recent conversations">+ <For+ each={sampleAgentSessions.filter((session) =>+ session.title+ .toLowerCase()+ .includes(agentSearch().toLowerCase())+ )}>- <ViewSidebar.Icon>- <ModelIcon- provider={session.provider}- class="size-5 text-ink-muted"- />- </ViewSidebar.Icon>- <span class="min-w-0 flex-1">- <span class="flex items-center gap-2">- <span class="truncate flex-1">{session.title}</span>- <span class="text-[10px] text-ink-extra-muted">- {session.time}- </span>- </span>- <Show when={'branch' in session}>- <span class="mt-1 flex items-center gap-1 text-[10px] text-ink-extra-muted min-w-0">- <GitPull class="size-3 shrink-0 text-success" />- <span class="text-success">- {'pr' in session ? session.pr : ''}- </span>- <span class="truncate">- · launch-team/workspace ·{' '}- {'branch' in session ? session.branch : ''}+ {(session) => (+ <ViewSidebar.Item+ class="sample-agent-session"+ aria-label={session.title}+ data-agent-session-row={session.id}+ data-has-code={'branch' in session}+ active={w.selected() === session.id}+ onClick={() => {+ w.setAgentMode(+ session.runtime === 'Macro' ? 'work' : 'code'+ );+ props.navigate('agents', session.id);+ }}+ >+ <ViewSidebar.Icon />+ <span class="min-w-0 flex-1">+ <span class="flex items-center gap-2">+ <span class="min-w-0 truncate flex-1">+ {session.title}+ </span>+ <span class="shrink-0 text-xs text-ink-extra-muted tabular-nums">+ {session.time}+ </span></span>+ <Show when={'branch' in session}>+ <span class="flex items-center gap-1.5 text-xs leading-4 text-ink-extra-muted min-w-0">+ <GitPull class="size-3 shrink-0 text-success" />+ <span class="text-success">+ {'pr' in session ? session.pr : ''}+ </span>+ <span class="truncate">+ · launch-team/workspace ·{' '}+ {'branch' in session ? session.branch : ''}+ </span>+ </span>+ </Show></span>- </Show>- <span class="sr-only">{session.runtime}</span>- </span>- </ViewSidebar.Item>- )}- </For>- </Group>+ </ViewSidebar.Item>+ )}+ </For>+ </ViewSidebar.Nav>+ </Show>+ </section></Match><Match when={w.view() === 'crm'}><div class="shrink-0 px-1.5">@@ -422,3 +464,23 @@ export function WorkspaceSidebar(props: {</ViewSidebar.Root>);}++export function WorkspaceSidebar(+ props: Parameters<typeof WorkspaceSidebarOther>[0]+) {+ return (+ <Show+ when={props.workspace.view() === 'messages'}+ fallback={<WorkspaceSidebarOther {...props} />}+ >+ <ChatSidebar+ workspace={props.workspace}+ collapse={props.collapse}+ navigate={(id) => {+ props.workspace.setChannel(id);+ props.navigate('messages', id);+ }}+ />+ </Show>+ );+}diff --git a/apps/marketing/src/features/marketing/components/workspace/WorkspaceTasks.tsx b/apps/marketing/src/features/marketing/components/workspace/WorkspaceTasks.tsxindex 0b67f8bbf8..61f12d344f 100644--- a/apps/marketing/src/features/marketing/components/workspace/WorkspaceTasks.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/WorkspaceTasks.tsx@@ -200,13 +200,14 @@ export function WorkspaceTasks(props: {</h2><div class="flex flex-wrap gap-2"><For- each={w.data.documents.filter(- (doc) =>- doc.id === 'plan' ||- doc.id === 'launch-metrics' ||- (task().id === 'deploy'- ? doc.id === 'release-checks'- : doc.id === 'rollout')+ each={w.data.documents.filter((doc) =>+ task().relatedDocumentIds+ ? task().relatedDocumentIds?.includes(doc.id)+ : doc.id === 'plan' ||+ doc.id === 'launch-metrics' ||+ (task().id === 'deploy'+ ? doc.id === 'release-checks'+ : doc.id === 'rollout'))}>{(doc) => (diff --git a/apps/marketing/src/features/marketing/components/workspace/dummy-workspace.css b/apps/marketing/src/features/marketing/components/workspace/dummy-workspace.cssindex af4e47206f..60ae29d4a9 100644--- a/apps/marketing/src/features/marketing/components/workspace/dummy-workspace.css+++ b/apps/marketing/src/features/marketing/components/workspace/dummy-workspace.css@@ -63,7 +63,7 @@.sample-company-list:hover {background:var(--color-hover)}.sample-discussion>summary {font-size:12px;color:var(--color-ink-muted);margin:12px 0}.sample-message-row {position:relative;display:grid;grid-template-columns:32px minmax(0,1fr);gap:8px;padding:8px;border-radius:6px;margin-bottom:12px}-.sample-message-row:hover {background:color-mix(in srgb,var(--color-hover) 45%,transparent)}+.sample-message-row:hover {background:var(--color-hover)}.sample-message-row[data-reply=true] {margin-left:40px;border-left:1px solid var(--color-edge);border-radius:0 0 0 16px;padding-left:16px}/* channel/Message/ActionMenu: a Toolbar straddling the row's top edge, shown on hover or focus. */.sample-message-actions {position:absolute;right:16px;top:0;transform:translateY(-50%);z-index:2;display:none;align-items:center;gap:4px;padding:6px;border-radius:12px;border:1px solid color-mix(in oklch,var(--color-content-0) 8%,transparent);background:var(--color-surface-2);box-shadow:0 4px 14px #0004}@@ -71,7 +71,7 @@.sample-message-actions button:hover {background:var(--color-hover);color:var(--color-ink)}.sample-message-actions-divider {width:1px;height:16px;margin:0 2px;background:var(--color-edge-muted)}.sample-message-row:hover .sample-message-actions,.sample-message-row:focus-within .sample-message-actions,.sample-message-row[data-hovered=true] .sample-message-actions {display:flex}-.sample-message-row[data-hovered=true] {background:color-mix(in srgb,var(--color-hover) 45%,transparent)}+.sample-message-row[data-hovered=true] {background:var(--color-hover)}.sample-agent-badge {display:inline-flex;align-items:center;border-radius:999px;background:var(--color-hover);padding:2px 6px;font-size:11px;font-weight:500;line-height:1;color:var(--color-ink-muted)}.sample-agent-avatar {display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:var(--color-panel);border:1px solid var(--color-edge-muted);color:var(--color-ink)}.sample-agent-avatar[data-agent=claude] {color:#d97757}@@ -116,7 +116,6 @@.sample-inline-input[aria-label="Company name"] {font-size:20px;line-height:28px;font-weight:600}.sample-inline-input[aria-label="Company description"] {font-size:14px;line-height:20px;color:var(--color-ink-muted)}-.sample-message-row p {font-size:16px;line-height:24px}/* Measured against the signed-in app: task-list/ListPropertyValue and TaskGridLayout. */.dummy-task-row .sample-list-property {display:inline-flex;width:100%;max-width:100%;min-width:0;height:auto;min-height:0;align-items:center;justify-content:flex-start;gap:4px;overflow:hidden;border:0;border-radius:999px;padding:6px 8px;background:transparent;color:var(--color-ink);font-size:12px;line-height:15px;font-weight:400}@@ -131,7 +130,7 @@.sample-chat-log {padding:0 12px 24px;overscroll-behavior-y:contain}.sample-chat-log .sample-message-row {padding:10px 8px 0;margin-bottom:0;gap:8px}.sample-chat-log .sample-message-row p {font-size:15px;line-height:24px;margin-top:2px;margin-bottom:2px}-.sample-channel-thread {position:relative;margin-bottom:24px;isolation:isolate}+.sample-channel-thread {position:relative;margin-bottom:12px;isolation:isolate}.sample-channel-thread[data-thread-open=true]:before {content:'';position:absolute;top:46px;bottom:32px;left:24px;width:1px;background:var(--color-edge);z-index:-1}.sample-thread-replies {margin-left:40px;position:relative}.sample-chat-log .sample-thread-replies .sample-message-row {margin-left:0;border:0;border-radius:6px;padding-left:8px;margin-top:8px}@@ -141,7 +140,7 @@.sample-thread-avatars {display:flex}.sample-thread-avatars img {width:18px;height:18px;border-radius:50%;border:1.5px solid var(--color-surface-0);object-fit:cover}.sample-thread-avatars img + img {margin-left:-6px}-.sample-thread-reply-button {display:flex;align-items:center;justify-content:center;margin:16px 0 0 8px;width:32px;height:32px;border:1px solid var(--color-edge);border-radius:50%;color:var(--color-ink-muted)}+.sample-thread-reply-button {position:relative;display:flex;align-items:center;justify-content:center;margin:16px 0 0 8px;width:32px;height:32px;border:1px solid var(--color-edge);border-radius:50%;color:var(--color-ink-muted)}.sample-thread-editor {padding:12px 8px 0}.sample-email-thread .mail-thread-body {max-width:968px;padding:48px 24px}.sample-email-thread h3 {font-size:24px;line-height:32px;margin-bottom:20px}@@ -154,7 +153,7 @@.sample-reply-fields>div,.sample-reply-fields>label {display:flex;align-items:center;gap:8px;min-height:40px}.sample-reply-fields>div>span:first-child,.sample-reply-fields>label>span {width:56px;color:var(--color-ink-extra-muted);flex-shrink:0}.sample-reply-fields input {min-width:0;flex:1;background:transparent;border:0;outline:none;color:var(--color-ink)}-@media(max-width:650px){.sample-email-thread .mail-thread-body{padding:24px 12px}.sample-thread-replies{margin-left:28px}.sample-thread-replies .sample-message-row:before{left:-4px;width:4px}.sample-chat-log .sample-message-row p{font-size:14px}}+@media(max-width:650px){.sample-email-thread .mail-thread-body{padding:24px 12px}.sample-thread-replies{margin-left:28px}.sample-thread-replies .sample-message-row:before{left:-4px;width:4px}}/* Launcher.tsx / CommandMenuPrimitives: the portal inherits website tokens. */.sample-create-palette {background:var(--color-surface-2);color:var(--color-ink);border-radius:24px;overflow:hidden;outline:none}@@ -175,7 +174,9 @@ html:has(.dummy-route[data-embedded=true]), html:has(.dummy-route[data-embedded=.sample-event-rsvp {display:flex;align-items:center;gap:6px;margin:0 -16px;padding:10px 16px;background:var(--color-hover);font-size:12px;color:var(--color-ink-muted)}.sample-event-rsvp button {padding:3px 12px;border-radius:6px;background:var(--color-active)}.sample-event-rsvp button[aria-pressed=true] {color:var(--color-ink);background:var(--color-hover)}-.sample-agent-session {height:auto!important;min-height:44px;padding-top:8px!important;padding-bottom:8px!important}+/* AgentSessionRow: ordinary rows use ViewSidebar's 32px; code metadata gets 48px. */+.sample-agent-session { height:32px; min-height:32px; padding-block:0; color:var(--color-ink); }+.sample-agent-session[data-has-code=true] { height:auto; min-height:48px; align-items:flex-start; padding-block:6px; }.sample-agent-catalog {max-width:660px;margin:48px auto;padding:16px 24px}.sample-file-tag {display:flex;align-items:center;gap:5px;border:1px solid var(--color-edge-muted);border-radius:999px;padding:3px 8px;font-size:11px;color:var(--color-ink-muted)}@@ -195,3 +196,46 @@ html:has(.dummy-route[data-embedded=true]), html:has(.dummy-route[data-embedded=.sample-task-mention {max-width:100%}.sample-task-mention-properties {display:inline-flex;align-items:center;gap:4px;margin-left:2px}.sample-task-mention-properties img, .sample-task-mention-properties svg:last-child:not([class*=size-3]) {width:13px;height:13px}++/* ViewShell collapses its 256px aside below 720px of available view width.+ Measure the embedded workspace, not the surrounding browser viewport. */+.dummy-workspace[data-agents-view=true] .dummy-layout { container: agent-workspace / inline-size; position:relative; }+.dummy-workspace[data-agents-view=true] [data-view-sidebar-content] { gap:8px; padding-top:8px; }+@container agent-workspace (max-width: 776px) {+ .dummy-sidebar { position:absolute; z-index:8; top:42px; bottom:0; left:56px; width:256px; display:none; box-shadow:10px 0 30px #0006; }+ .dummy-workspace[data-sidebar-open=true] .dummy-sidebar { display:block; }+ .dummy-mobile-nav { height:42px; display:flex; align-items:center; justify-content:space-between; padding:0 10px; flex:none; border-bottom:1px solid var(--color-edge-muted); }+}+@media (max-width:650px) {+ @container agent-workspace (max-width:776px) {+ .dummy-sidebar { left:44px; }+ }+}++/* ThreadTerminalRail: continue the parent spine into the reply action's elbow. */+.sample-thread-reply-button::before { content:''; position:absolute; pointer-events:none; left:-25px; top:-17px; width:22px; height:32px; border-left:1px solid var(--color-edge); border-bottom:1px solid var(--color-edge); border-bottom-left-radius:14px; }+@media(max-width:650px) { .sample-thread-reply-button::before { left:-13px; width:10px; } }++.sample-message-row[data-actions-dismissed=true] .sample-message-actions { display: none; }+.sample-reaction[aria-pressed=true] { border-color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 12%, transparent); }++/* References are part of the sentence, matching the editor's inline mentions. */+.workspace-demo .sample-inline-reference, .workspace-demo .sample-task-mention-inline { display: inline; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; }+.workspace-demo .sample-task-mention-inline > svg { display: inline; width: 1em; height: 1em; margin-inline: 4px; vertical-align: -0.125em; }+.workspace-demo .sample-task-mention-inline > .truncate { white-space: normal; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 20%, transparent); text-underline-offset: 2px; }+.workspace-demo .sample-task-mention-inline .sample-task-mention-properties { display: inline-flex; margin-inline: 4px; vertical-align: middle; }+.workspace-demo .sample-inline-reference:focus-visible, .workspace-demo .sample-task-mention-inline:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 2px; }++/* ExpandedChannelsRail: 32px section header, 4px gap before its rows. */+.chat-sidebar-group { display:flex; flex-direction:column; gap:4px; min-width:0; flex-shrink:0; }+.chat-sidebar-group-heading { display:flex; align-items:center; gap:4px; height:32px; padding:4px 8px; border-radius:8px; color:var(--color-ink-muted); font-size:12px; line-height:20px; font-weight:500; text-align:left; }+.chat-sidebar-group-heading:hover { color:var(--color-ink); }+.chat-sidebar-group-heading svg { opacity:0; }+.chat-sidebar-group-heading:hover svg, .chat-sidebar-group-heading[aria-expanded=false] svg { opacity:1; }+.chat-sidebar-thread { display:flex; flex-direction:column; gap:4px; padding:12px 8px; text-align:left; border-bottom:1px solid var(--color-edge-muted); }+.chat-sidebar-thread:hover { background:var(--color-hover); }++.chat-sidebar-conversations { display:flex; flex-direction:column; flex:1; min-height:0; gap:var(--sidebar-section-gap); }+.chat-sidebar-conversations .chat-sidebar-group[data-open=true] { flex:1; min-height:0; }+.chat-sidebar-conversations .chat-sidebar-group nav { min-height:0; flex-shrink:1; overflow:auto; }+.chat-sidebar-group-heading { flex-shrink:0; }diff --git a/apps/marketing/src/features/marketing/components/workspace/frozen/EmailReply.tsx b/apps/marketing/src/features/marketing/components/workspace/frozen/EmailReply.tsxindex dc64be9c8b..5009d1a8de 100644--- a/apps/marketing/src/features/marketing/components/workspace/frozen/EmailReply.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/frozen/EmailReply.tsx@@ -67,7 +67,7 @@ export function EmailReply(props: {class="size-5 rounded-full"src={homepagePeople.jacob.photo}/>- Jacob Beckerman+ Jacob</span><Button size="sm" variant="plain" onClick={() => setCc(!cc())}>Ccdiff --git a/apps/marketing/src/features/marketing/components/workspace/frozen/MessageRow.tsx b/apps/marketing/src/features/marketing/components/workspace/frozen/MessageRow.tsxindex 8a18d1c0e8..40a714c3e8 100644--- a/apps/marketing/src/features/marketing/components/workspace/frozen/MessageRow.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/frozen/MessageRow.tsx@@ -3,9 +3,8 @@ import CursorIcon from '@icon/wide-cursor-ide.svg';import Reply from '@phosphor/arrow-bend-up-left.svg';import LinkIcon from '@phosphor/link.svg';import ListChecks from '@phosphor/list-checks.svg';-import Smiley from '@phosphor/smiley.svg';import Sparkle from '@phosphor/sparkle.svg';-import { For, type JSX, Show } from 'solid-js';+import { createSignal, For, type JSX, Show } from 'solid-js';import type { WorkspaceComment } from '../../../core/dummy-workspace';import { homepagePeople } from '../../../core/homepage-demo-people';import { DemoMentionText } from '../../DemoMention';@@ -18,16 +17,40 @@ const QUICK_REACTIONS = ['❤️', '👍', '😂'] as const;export function MessageRow(props: {message: WorkspaceComment;children?: JSX.Element;+ /** The same message body with interactive, locally resolved mention chips. */+ bodyContent?: JSX.Element;hovered?: boolean;onReply?: () => void;onTask?: () => void;- onReact?: () => void;+ onReact?: (emoji?: string) => void;onChat?: () => void;}) {+ let row!: HTMLElement;+ const [dismissed, setDismissed] = createSignal(false);+ const reactions = () =>+ props.message.emojiReactions ??+ (props.message.reactions?.length+ ? [{ emoji: '👍', users: props.message.reactions }]+ : []);+ const react = (emoji: string, event: MouseEvent) => {+ props.onReact?.(emoji);+ if (event.detail === 0) row.focus({ preventScroll: true });+ else (event.currentTarget as HTMLButtonElement).blur();+ setDismissed(true);+ };const hasActions = () =>!!(props.onReact || props.onTask || props.onReply || props.onChat);return (<article+ ref={row}+ tabIndex={-1}+ data-actions-dismissed={dismissed()}+ onPointerLeave={() => setDismissed(false)}+ onPointerEnter={() => setDismissed(false)}+ onFocusOut={(event) => {+ if (!row.contains(event.relatedTarget as Node | null))+ setDismissed(false);+ }}class="sample-message-row"data-reply={!!props.message.replyTo}data-hovered={props.hovered ? 'true' : undefined}@@ -67,19 +90,36 @@ export function MessageRow(props: {><span class="sample-agent-badge">Agent</span></Show>- <span class="text-xs text-ink-extra-muted tabular-nums">- {props.message.time}- </span>+ <Show when={props.message.time}>+ <span class="text-xs text-ink-extra-muted tabular-nums">+ {props.message.time}+ </span>+ </Show></div>- <p class="mt-1 text-base whitespace-pre-wrap break-words">- <DemoMentionText text={props.message.body} />- </p>- {props.children}- <Show when={props.message.reactions?.length}>- <button class="sample-reaction" type="button" onClick={props.onReact}>- 👍 {props.message.reactions?.length}- </button>+ <Show+ when={props.bodyContent}+ fallback={+ <p class="mt-1 text-base whitespace-pre-wrap break-words">+ <DemoMentionText text={props.message.body} />+ </p>+ }+ >+ {props.bodyContent}</Show>+ {props.children}+ <For each={reactions()}>+ {(reaction) => (+ <button+ class="sample-reaction"+ type="button"+ aria-label={`${reaction.emoji} ${reaction.users.length}`}+ aria-pressed={reaction.users.includes('jacob')}+ onClick={(event) => react(reaction.emoji, event)}+ >+ {reaction.emoji} {reaction.users.length}+ </button>+ )}+ </For></div><Show when={hasActions()}><div class="sample-message-actions" role="toolbar">@@ -89,19 +129,12 @@ export function MessageRow(props: {<buttontype="button"aria-label={`React ${emoji}`}- onClick={props.onReact}+ onClick={(event) => react(emoji, event)}><span class="text-base leading-none">{emoji}</span></button>)}</For>- <button- type="button"- aria-label="More reactions"- onClick={props.onReact}- >- <Smiley class="size-4" />- </button><span class="sample-message-actions-divider" /></Show><Show when={props.onTask}>diff --git a/apps/marketing/src/features/marketing/components/workspace/frozen/TaskComposer.tsx b/apps/marketing/src/features/marketing/components/workspace/frozen/TaskComposer.tsxindex 2d4a3e248a..813e8a1ac7 100644--- a/apps/marketing/src/features/marketing/components/workspace/frozen/TaskComposer.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/frozen/TaskComposer.tsx@@ -23,6 +23,8 @@ export function TaskComposer(props: {draft: WorkspaceTask;/** The channel whose message became this task's description. */sourceChannel?: string;+ /** A selected date in a narrated task-creation walkthrough. */+ dueDateLabel?: string;update: (patch: Partial<WorkspaceTask>) => void;submit: () => void;close: () => void;@@ -101,7 +103,7 @@ export function TaskComposer(props: {/><span class="sample-task-composer-empty"><CalendarBlank class="size-3" />- Due Date+ {props.dueDateLabel ?? 'Due Date'}</span><span class="sample-task-composer-empty"><Tag class="size-3" />diff --git a/apps/marketing/src/features/marketing/components/workspace/frozen/TaskMention.tsx b/apps/marketing/src/features/marketing/components/workspace/frozen/TaskMention.tsxindex a2ff7fdd1f..95fee6192c 100644--- a/apps/marketing/src/features/marketing/components/workspace/frozen/TaskMention.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/frozen/TaskMention.tsx@@ -9,11 +9,16 @@ import { PersonIcon, PRIORITY_IDS, STATUS_IDS } from './TaskProperties';export function TaskMention(props: {task: WorkspaceTask;onOpen?: () => void;+ inline?: boolean;}) {return (<buttontype="button"- class="dummy-entity-link sample-task-mention"+ class={+ props.inline+ ? 'sample-task-mention-inline'+ : 'dummy-entity-link sample-task-mention'+ }onClick={props.onOpen}><ListChecks class="size-4 shrink-0 text-task" />diff --git a/apps/marketing/src/features/marketing/components/workspace/frozen/TaskNotebook.tsx b/apps/marketing/src/features/marketing/components/workspace/frozen/TaskNotebook.tsxindex 04158d9241..c99e93755a 100644--- a/apps/marketing/src/features/marketing/components/workspace/frozen/TaskNotebook.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/frozen/TaskNotebook.tsx@@ -32,6 +32,14 @@ export function TaskNotebook(props: {workspace: DummyWorkspace;task: WorkspaceTask;relatedContent?: JSX.Element;+ /** Frozen rich task descriptions can include native inline mentions. */+ descriptionContent?: JSX.Element;+ navigation?: JSX.Element;+ onShare?: () => void;+ /** A document-created task can reference its source document here. */+ sourceContent?: JSX.Element;+ /** A linked split has no task-list navigation history. */+ hideCollectionNavigation?: boolean;/** Extra pills in the property row, e.g. linked GitHub pull requests. */pills?: JSX.Element;}) {@@ -41,20 +49,25 @@ export function TaskNotebook(props: {return (<><ViewShell.TopBar>- <Button- variant="plain"- size="icon-sm"- label={- props.workspace.view() === 'home' ? 'Back to Home' : 'Back to tasks'- }- onClick={() => props.workspace.backToCollection('tasks')}- >- <ArrowLeft />- </Button>- <span class="text-sm text-ink-muted">- {props.workspace.view() === 'home' ? 'Home' : 'All Tasks'}- </span>- <span class="text-ink-muted mx-1">›</span>+ {props.navigation}+ <Show when={!props.hideCollectionNavigation}>+ <Button+ variant="plain"+ size="icon-sm"+ label={+ props.workspace.view() === 'home'+ ? 'Back to Home'+ : 'Back to tasks'+ }+ onClick={() => props.workspace.backToCollection('tasks')}+ >+ <ArrowLeft />+ </Button>+ <span class="shrink-0 whitespace-nowrap text-sm text-ink-muted">+ {props.workspace.view() === 'home' ? 'Home' : 'All Tasks'}+ </span>+ <span class="text-ink-muted mx-1">›</span>+ </Show><ListChecks class="size-4 text-task" /><span class="truncate text-sm font-medium">{props.task.title}</span><Dropdown modal={false}>@@ -79,6 +92,9 @@ export function TaskNotebook(props: {priority: source.priority,owner: source.owner,tags: [...source.tags],+ relatedDocumentIds: source.relatedDocumentIds+ ? [...source.relatedDocumentIds]+ : undefined,steps: source.steps.map((step) => ({ ...step })),});}}@@ -103,6 +119,10 @@ export function TaskNotebook(props: {size="sm"variant="plain"onClick={() => {+ if (props.onShare) {+ props.onShare();+ return;+ }props.workspace.post(`Shared task: ${props.task.title}`,undefined,@@ -274,30 +294,44 @@ export function TaskNotebook(props: {</Show></div><div class="website-demo-markdown md text-base">- <div- role="textbox"- aria-label="Task description"- contentEditable- class="my-4 first:mt-1.5 last:mb-1.5 md-p text-[1em] whitespace-pre-wrap outline-none"- onBlur={(e) =>- save({ description: e.currentTarget.innerText })+ <Show+ when={props.descriptionContent}+ fallback={+ <div+ role="textbox"+ aria-label="Task description"+ contentEditable+ class="my-4 first:mt-1.5 last:mb-1.5 md-p text-[1em] whitespace-pre-wrap outline-none"+ onBlur={(e) =>+ save({ description: e.currentTarget.innerText })+ }+ >+ {props.task.description}+ </div>}>- {props.task.description}- </div>- <button- type="button"- class="my-4 flex items-center gap-1.5 text-sm text-ink-muted"- onClick={() => {- props.workspace.setChannel(props.task.channel);- props.workspace.openItem('messages');- }}+ {props.descriptionContent}+ </Show>+ <Show+ when={props.sourceContent}+ fallback={+ <button+ type="button"+ class="my-4 flex items-center gap-1.5 text-sm text-ink-muted"+ onClick={() => {+ props.workspace.setChannel(props.task.channel);+ props.workspace.openItem('messages');+ }}+ >+ From <Hash class="size-4" />+ <span class="underline underline-offset-4">+ {props.task.channel}+ </span>+ </button>+ }>- From <Hash class="size-4" />- <span class="underline underline-offset-4">- {props.task.channel}- </span>- </button>+ {props.sourceContent}+ </Show><ul class="my-4 first:mt-1.5 last:mb-1.5 list-none md-list md-check"><For each={props.task.steps}>{(step) => (diff --git a/apps/marketing/src/features/marketing/components/workspace/frozen/TaskProperties.tsx b/apps/marketing/src/features/marketing/components/workspace/frozen/TaskProperties.tsxindex 183e1c3dfe..3e6a01c972 100644--- a/apps/marketing/src/features/marketing/components/workspace/frozen/TaskProperties.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/frozen/TaskProperties.tsx@@ -1,4 +1,3 @@-import CursorIcon from '@icon/wide-cursor-ide.svg';import CaretDown from '@phosphor/caret-down.svg';import { Dropdown } from '@ui';import { badgeTriggerClasses } from '@ui/components/Badge';@@ -12,6 +11,7 @@ import {type HomepagePersonId,homepagePeople,} from '../../../core/homepage-demo-people';+import { ModelIcon } from './model-picker/ProviderIcon';import { PropertyValueIcon } from './PropertyValueIcon';import { PROPERTY_OPTION_IDS } from './property-identifiers';@@ -31,7 +31,7 @@ export const PRIORITY_IDS: Record<TaskPriority, string> = {export function PersonIcon(props: { person: HomepagePersonId }) {return (<Show- when={props.person === 'cursor'}+ when={props.person === 'cursor' || props.person === 'claude'}fallback={<imgsrc={homepagePeople[props.person].photo}@@ -40,7 +40,10 @@ export function PersonIcon(props: { person: HomepagePersonId }) {/>}>- <CursorIcon class="size-4 shrink-0 text-ink" aria-hidden="true" />+ <ModelIcon+ provider={props.person === 'cursor' ? 'cursor' : 'claude'}+ class="size-4 text-ink"+ /></Show>);}diff --git a/apps/marketing/src/features/marketing/components/workspace/frozen/model-picker/ModelCatalogPicker.tsx b/apps/marketing/src/features/marketing/components/workspace/frozen/model-picker/ModelCatalogPicker.tsxindex eff50b56f5..85ad17f2ad 100644--- a/apps/marketing/src/features/marketing/components/workspace/frozen/model-picker/ModelCatalogPicker.tsx+++ b/apps/marketing/src/features/marketing/components/workspace/frozen/model-picker/ModelCatalogPicker.tsx@@ -23,6 +23,7 @@ type ModelCatalogPickerProps = {pending?: boolean;triggerLabel?: JSX.Element;children?: JSX.Element;+ childrenAfter?: boolean;emptyMessage?: string;triggerClass?: string;contentClass?: string;@@ -117,6 +118,7 @@ export function ModelCatalogPicker(props: ModelCatalogPickerProps) {onSelect={props.onSelect}emptyMessage={props.emptyMessage}searchPlaceholder={props.searchPlaceholder}+ childrenAfter={props.childrenAfter}searchRef={(element) => {searchRef = element;}}@@ -138,6 +140,7 @@ export function ModelCatalogMenu(| 'emptyMessage'| 'searchPlaceholder'| 'children'+ | 'childrenAfter'> & {searchRef?: (element: HTMLInputElement) => void;}@@ -188,7 +191,7 @@ export function ModelCatalogMenu(</div></div>- {props.children}+ <Show when={!props.childrenAfter}>{props.children}</Show><Show when={props.options.length === 0}><div class="bg-menu px-3 py-2 text-xs text-ink-muted" role="status">{props.emptyMessage ?? 'No models available.'}@@ -284,6 +287,7 @@ export function ModelCatalogMenu(</Show></Dropdown.Group></Show>+ <Show when={props.childrenAfter}>{props.children}</Show></>);}diff --git a/apps/marketing/src/features/marketing/core/demo-email.ts b/apps/marketing/src/features/marketing/core/demo-email.tsindex 43e72a6614..b64c7c7e28 100644--- a/apps/marketing/src/features/marketing/core/demo-email.ts+++ b/apps/marketing/src/features/marketing/core/demo-email.ts@@ -25,7 +25,7 @@ export const demoEmails: readonly DemoEmail[] = [id: 'dana',tags: ['customers', 'follow-up'],favorite: true,- sender: 'Dana Whitfield',+ sender: 'Dana',subject: 'Next steps for our team',snippet: 'Thursday at 9 works. Could you share the rollout plan?',time: '9:41 AM',@@ -35,7 +35,7 @@ export const demoEmails: readonly DemoEmail[] = [{id: 'julia',tags: ['launch'],- sender: 'Julia Westphal',+ sender: 'Julia',subject: 'Launch announcement',snippet: 'The first draft is ready for your review.',time: '9:32 AM',@@ -45,7 +45,7 @@ export const demoEmails: readonly DemoEmail[] = [{id: 'teo',tags: ['product'],- sender: 'Teo Nys',+ sender: 'Teo',subject: 'Ready for Thursday',snippet: 'The invite flow is ready. Let’s run through the checklist.',time: '9:18 AM',diff --git a/apps/marketing/src/features/marketing/core/demo-mentions.ts b/apps/marketing/src/features/marketing/core/demo-mentions.tsindex 4da1d8bd50..d78b6c9c6d 100644--- a/apps/marketing/src/features/marketing/core/demo-mentions.ts+++ b/apps/marketing/src/features/marketing/core/demo-mentions.ts@@ -3,7 +3,14 @@ import { homepagePeople } from './homepage-demo-people';export type DemoMention = {id: string;label: string;- kind: 'person' | 'document' | 'task' | 'agent' | 'channel' | 'spreadsheet';+ kind:+ | 'person'+ | 'document'+ | 'task'+ | 'agent'+ | 'channel'+ | 'spreadsheet'+ | 'email';photo?: string;shortName?: string;detail?: string;@@ -28,7 +35,7 @@ export const demoMentions: DemoMention[] = [kind: 'task',status: 'In Review',},- { id: 'cursor', label: 'Cursor', kind: 'agent' },+ { id: 'cursor', label: 'Cursor', kind: 'person' },{ id: 'rollout', label: 'Team rollout plan', kind: 'document' },{id: 'checklist',diff --git a/apps/marketing/src/features/marketing/core/dummy-workspace.ts b/apps/marketing/src/features/marketing/core/dummy-workspace.tsindex 25c78733b4..c35be8e29e 100644--- a/apps/marketing/src/features/marketing/core/dummy-workspace.ts+++ b/apps/marketing/src/features/marketing/core/dummy-workspace.ts@@ -39,6 +39,7 @@ export type WorkspaceComment = {documentId?: string;replyTo?: string;reactions?: string[];+ emojiReactions?: { emoji: string; users: string[] }[];};export type WorkspaceTask = {id: string;@@ -50,6 +51,7 @@ export type WorkspaceTask = {creator: HomepagePersonId;tags: string[];channel: string;+ relatedDocumentIds?: string[];steps: { id: string; text: string; done: boolean }[];comments: WorkspaceComment[];};@@ -236,7 +238,7 @@ export function dummyData(): DummyData {...demoEmails,{id: 'feedback',- sender: 'Maya Chen',+ sender: 'Maya',subject: 'Feedback from the pilot team',snippet:'The shared inbox is already saving us a few hours every week.',@@ -246,7 +248,7 @@ export function dummyData(): DummyData {},{id: 'assets',- sender: 'Julia Westphal',+ sender: 'Julia',subject: 'Final launch assets',snippet: 'The new screenshots and product walkthrough are ready.',time: '8:10 AM',@@ -255,7 +257,7 @@ export function dummyData(): DummyData {},{id: 'research',- sender: 'Alex Rivera',+ sender: 'Alex',subject: 'Notes from our customer interviews',snippet:'I pulled together the themes we heard across the five sessions.',@@ -266,7 +268,7 @@ export function dummyData(): DummyData {},{id: 'coffee',- sender: 'Sam Parker',+ sender: 'Sam',subject: 'Coffee next week?',snippet:'Would love to hear how the launch went. Tuesday works for me.',diff --git a/apps/marketing/src/features/marketing/core/feature-comparisons.ts b/apps/marketing/src/features/marketing/core/feature-comparisons.tsnew file mode 100644index 0000000000..0d70793cf9--- /dev/null+++ b/apps/marketing/src/features/marketing/core/feature-comparisons.ts@@ -0,0 +1,259 @@+export type FeatureComparison = {+ id: string;+ question: string;+ competitor: string;+ rows: readonly { feature: string; macro: boolean; competitor: boolean }[];+ article?: { label: string; href: string };+ /** Evidence for maintainers; the public table stays compact. */+ sources: readonly string[];+};++export const emailComparisons: readonly FeatureComparison[] = [+ {+ id: 'superhuman',+ question: 'How does Macro compare with Superhuman Mail?',+ competitor: 'Superhuman Mail',+ rows: [+ {+ feature: 'Use your existing Gmail address',+ macro: true,+ competitor: true,+ },+ { feature: 'Multiple email accounts', macro: true, competitor: true },+ {+ feature: 'Unified inbox across email accounts',+ macro: true,+ competitor: false,+ },+ { feature: 'Keyboard shortcuts', macro: true, competitor: true },+ { feature: 'AI email drafting', macro: true, competitor: true },+ {+ feature: 'Agents that draft and send email',+ macro: true,+ competitor: true,+ },+ {+ feature: 'Share individual live threads without forwarding',+ macro: true,+ competitor: true,+ },+ {+ feature: 'Email, tasks, and chat in one inbox',+ macro: true,+ competitor: false,+ },+ ],+ article: {+ label: 'Macro vs. Superhuman',+ href: '/posts/superhuman-alternative',+ },+ sources: [+ 'https://help.superhuman.com/hc/en-us/articles/46005777934733-Managing-Accounts',+ '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',+ ],+ },+ {+ id: 'gmail',+ question: 'How does Macro compare with Gmail?',+ competitor: 'Gmail',+ rows: [+ {+ feature: 'Use your existing Gmail address',+ macro: true,+ competitor: true,+ },+ { feature: 'Keyboard shortcuts', macro: true, competitor: true },+ { feature: 'AI email drafting', macro: true, competitor: true },+ {+ feature: 'Read email beside your inbox',+ macro: true,+ competitor: true,+ },+ {+ feature: 'Share individual live threads without forwarding',+ macro: true,+ competitor: false,+ },+ {+ feature: 'Email, tasks, and chat in one inbox',+ macro: true,+ competitor: false,+ },+ { feature: 'Open source', macro: true, competitor: false },+ ],+ sources: [+ 'https://support.google.com/mail/answer/6594',+ 'https://support.google.com/mail/answer/14355636',+ 'https://support.google.com/mail/answer/6115187',+ 'https://support.google.com/mail/answer/138350',+ ],+ },+];++export const documentComparisons: readonly FeatureComparison[] = [+ {+ id: 'notion',+ 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',+ macro: true,+ competitor: false,+ },+ {+ feature: 'One set of tags across docs, email, and tasks',+ macro: true,+ competitor: false,+ },+ {+ feature: 'Read live email threads beside a doc',+ macro: true,+ competitor: false,+ },+ {+ feature: 'Share doc access through channel mentions',+ macro: true,+ competitor: false,+ },+ ],+ article: { label: 'Macro vs. Notion', href: '/posts/notion-alternative' },+ sources: [+ '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',+ 'https://www.notion.com/help/create-a-subpage',+ 'https://www.notion.com/help/notion-agent',+ 'https://docs.macro.com/product/docs',+ 'https://docs.macro.com/product/folders',+ 'https://docs.macro.com/concepts/blocks',+ ],+ },+];++export const taskComparisons: readonly FeatureComparison[] = [+ {+ id: 'linear',+ question: 'How does Macro compare with Linear?',+ competitor: 'Linear',+ rows: [+ {+ feature: 'Status, priority, and assignees',+ macro: true,+ competitor: true,+ },+ { feature: 'Create tasks from email', macro: true, competitor: true },+ {+ feature: 'Create tasks from chat messages',+ macro: true,+ competitor: true,+ },+ {+ feature: 'Update task status from GitHub',+ macro: true,+ competitor: true,+ },+ { feature: 'Full email client', macro: true, competitor: false },+ {+ feature: 'Built-in team chat / channels',+ 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/creating-issues',+ 'https://linear.app/docs/slack',+ 'https://linear.app/docs/github',+ ],+ },+ {+ id: 'jira',+ question: 'How does Macro compare with Jira?',+ competitor: 'Jira',+ rows: [+ {+ feature: 'Status, priority, and assignees',+ macro: true,+ competitor: true,+ },+ { feature: 'Task due dates', macro: true, competitor: true },+ { feature: 'Create tasks from email', macro: true, competitor: true },+ {+ feature: 'Update task status from GitHub',+ macro: true,+ competitor: true,+ },+ { feature: 'Full email client', macro: true, competitor: false },+ {+ feature: 'Built-in team chat / channels',+ macro: true,+ competitor: false,+ },+ { feature: 'Open source', macro: true, competitor: false },+ ],+ sources: [+ '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/',+ ],+ },+];++export const chatComparisons: readonly FeatureComparison[] = [+ {+ id: 'slack',+ question: 'How does Macro compare with Slack?',+ competitor: 'Slack',+ rows: [+ {+ feature: 'Channels, threads, and reactions',+ macro: true,+ competitor: true,+ },+ {+ feature: 'Thread replies shown inline by default',+ macro: true,+ competitor: false,+ },+ {+ feature: 'Share docs and tasks with a channel',+ macro: true,+ competitor: true,+ },+ { feature: 'Video calls', macro: true, competitor: true },+ {+ feature: 'Agents that act on workspace content',+ macro: true,+ competitor: true,+ },+ { feature: 'Full email client', macro: true, competitor: false },+ {+ feature: 'Email, tasks, and chat in one inbox',+ macro: true,+ competitor: false,+ },+ ],+ article: { label: 'Macro vs. Slack', href: '/posts/slack-alternative' },+ sources: [+ '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',+ 'https://slack.com/help/articles/202026038-How-to-work-with-Slackbot',+ ],+ },+];diff --git a/apps/marketing/src/features/marketing/core/homepage-demo-people.ts b/apps/marketing/src/features/marketing/core/homepage-demo-people.tsindex 51d856cd92..efcc604660 100644--- a/apps/marketing/src/features/marketing/core/homepage-demo-people.ts+++ b/apps/marketing/src/features/marketing/core/homepage-demo-people.ts@@ -10,19 +10,19 @@ import valentina from '../../../assets/people/valentina.webp';/** Local participants in the homepage's launch example. */export const homepagePeople = {jacob: {- name: 'Jacob Beckerman',+ name: 'Jacob',shortName: 'Jacob',initials: 'JB',photo: jacob,},julia: {- name: 'Julia Westphal',+ name: 'Julia',shortName: 'Julia',initials: 'JW',photo: julia,},gabriel: {- name: 'Gabriel Birman',+ name: 'Gabriel',shortName: 'Gabriel',initials: 'GB',photo: gabriel,diff --git a/apps/marketing/src/features/marketing/core/workspace-fixtures.ts b/apps/marketing/src/features/marketing/core/workspace-fixtures.tsindex bfc08989cd..9ede896f1c 100644--- a/apps/marketing/src/features/marketing/core/workspace-fixtures.ts+++ b/apps/marketing/src/features/marketing/core/workspace-fixtures.ts@@ -191,9 +191,9 @@ export function sampleCompanies(): SampleCompany[] {'18,000'),contacts: [- { name: 'Dana Whitfield', email: '[email protected]' },- { name: 'Alex Chen', email: '[email protected]' },- { name: 'Priya Raman', email: '[email protected]' },+ { name: 'Dana', email: '[email protected]' },+ { name: 'Alex', email: '[email protected]' },+ { name: 'Priya', email: '[email protected]' },],comments: [{@@ -221,7 +221,7 @@ export function sampleCompanies(): SampleCompany[] {emails: [{id: 'meadow-seats',- sender: 'Alex Chen',+ sender: 'Alex',subject: 'Seats for the studio team',snippet: 'We’d start with 12 and add the print shop in November.',time: 'Sep 28',@@ -229,7 +229,7 @@ export function sampleCompanies(): SampleCompany[] {},{id: 'meadow-order',- sender: 'Julia Westphal',+ sender: 'Julia',subject: 'Re: Pricing for 12 seats',snippet: 'Attached is the order form with the annual team rate.',time: 'Sep 27',@@ -237,7 +237,7 @@ export function sampleCompanies(): SampleCompany[] {},{id: 'meadow-invite',- sender: 'Dana Whitfield',+ sender: 'Dana',subject: 'Invitation: The Meadow · Demo',snippet: 'Thursday, October 1 · 9:00 – 10:00 AM',time: 'Sep 26',@@ -245,7 +245,7 @@ export function sampleCompanies(): SampleCompany[] {},{id: 'meadow-security',- sender: 'Priya Raman',+ sender: 'Priya',subject: 'Security questionnaire',snippet: 'Our IT contractor sent over a few questions about SSO.',time: 'Sep 25',@@ -253,7 +253,7 @@ export function sampleCompanies(): SampleCompany[] {},{id: 'meadow-recap',- sender: 'Jacob Beckerman',+ sender: 'Jacob',subject: 'Recap from today',snippet: 'Thanks for the time, Dana. Here’s what we covered.',time: 'Sep 22',@@ -262,7 +262,7 @@ export function sampleCompanies(): SampleCompany[] {},{id: 'meadow-intro',- sender: 'Dana Whitfield',+ sender: 'Dana',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 Whitfield', 'Alex Chen'],+ guests: ['Dana', 'Alex'],},{id: 'meadow-pricing-call',@@ -286,7 +286,7 @@ export function sampleCompanies(): SampleCompany[] {time: 'Sep 25',duration: '12m 4s',people: ['julia'],- guests: ['Dana Whitfield'],+ guests: ['Dana'],},{id: 'meadow-design-review',@@ -294,7 +294,7 @@ export function sampleCompanies(): SampleCompany[] {time: 'Sep 24',duration: '46m 31s',people: ['jacob', 'teo'],- guests: ['Alex Chen', 'Priya Raman'],+ guests: ['Alex', 'Priya'],},{id: 'meadow-intro-call',@@ -302,7 +302,7 @@ export function sampleCompanies(): SampleCompany[] {time: 'Sep 22',duration: '31m 12s',people: ['jacob'],- guests: ['Dana Whitfield'],+ guests: ['Dana'],},],files: [diff --git a/apps/marketing/src/features/marketing/core/workspace-home-feed.ts b/apps/marketing/src/features/marketing/core/workspace-home-feed.tsindex b472684ef3..d2a794d3ee 100644--- a/apps/marketing/src/features/marketing/core/workspace-home-feed.ts+++ b/apps/marketing/src/features/marketing/core/workspace-home-feed.ts@@ -19,7 +19,7 @@ export const sampleHomeFeed: { title: string; items: HomeFeedItem[] }[] = [view: 'messages',id: 'dm-julia',person: 'julia',- title: 'Julia Westphal',+ title: 'Julia',},{view: 'agents',diff --git a/apps/marketing/src/features/marketing/core/workspace-parity-fixtures.ts b/apps/marketing/src/features/marketing/core/workspace-parity-fixtures.tsindex e3c3ecd815..687bda8bd6 100644--- a/apps/marketing/src/features/marketing/core/workspace-parity-fixtures.ts+++ b/apps/marketing/src/features/marketing/core/workspace-parity-fixtures.ts@@ -2,6 +2,16 @@ import type { WorkspaceDocument } from './dummy-workspace';/** Fictional examples, shaped like the mixed files and sessions in Macro. */export const sampleAgentSessions = [+ {+ id: 'northwind',+ title: 'Northwind rollout',+ time: 'Now',+ runtime: 'Macro',+ provider: 'claude',+ prompt: 'What’s putting Northwind’s Friday rollout at risk?',+ answer:+ 'The plan now reflects the phased rollout. Teo owns SSO verification and Julia owns training. The pilot stays gated until access is confirmed.',+ },{id: 'deploy',title: 'Fix the deploy pipeline',diff --git a/apps/marketing/src/features/marketing/primitives/createDummyWorkspace.ts b/apps/marketing/src/features/marketing/primitives/createDummyWorkspace.tsindex 3a0ee8a48b..6f3bd03f58 100644--- a/apps/marketing/src/features/marketing/primitives/createDummyWorkspace.ts+++ b/apps/marketing/src/features/marketing/primitives/createDummyWorkspace.ts@@ -26,6 +26,7 @@ export function createDummyWorkspace(initial: WorkspaceView = 'home') {const [calendarDate, setCalendarDate] = createSignal(sampleToday);const [calendarMode, setCalendarMode] = createSignal<'Week' | 'Day'>('Week');const [showPersonal, setShowPersonal] = createSignal(true);+ const [agentMode, setAgentMode] = createSignal<'work' | 'code'>('work');const [busy, setBusy] = createSignal(false);const [agentReplies, setAgentReplies] = createSignal<{ prompt: string; answer: string }[]@@ -248,6 +249,7 @@ export function createDummyWorkspace(initial: WorkspaceView = 'home') {function reset() {clearTimeout(timer);setBusy(false);+ setAgentMode('work');setChannel('launch');setFileView('My Files');setCompanyFilter('All companies');@@ -260,6 +262,8 @@ export function createDummyWorkspace(initial: WorkspaceView = 'home') {open(initial);}return {+ agentMode,+ setAgentMode,fileView,setFileView,companyLayout,diff --git a/apps/marketing/src/features/marketing/primitives/createEmailWalkthrough.ts b/apps/marketing/src/features/marketing/primitives/createEmailWalkthrough.tsindex 2c3f3fd288..fc4a792b5a 100644--- a/apps/marketing/src/features/marketing/primitives/createEmailWalkthrough.ts+++ b/apps/marketing/src/features/marketing/primitives/createEmailWalkthrough.ts@@ -4,6 +4,8 @@ import { createSignal, onCleanup, onMount } from 'solid-js';export function createEmailWalkthrough(options: {root: () => HTMLElement;steps: number;+ /** Wait until this share of a taller scene is visible before animating. */+ visibilityThreshold?: number;advance: (step: number) => void;reset: () => void;reduced: () => void;@@ -65,10 +67,13 @@ export function createEmailWalkthrough(options: {sync();const observer = new IntersectionObserver(([entry]) => {- visible = entry.isIntersecting;+ visible =+ entry.isIntersecting &&+ (options.visibilityThreshold === undefined ||+ (entry.intersectionRatio ?? 1) >= options.visibilityThreshold);schedule();},- { threshold: 0.25 }+ { threshold: options.visibilityThreshold ?? 0.25 });observer.observe(options.root());media.addEventListener('change', sync);diff --git a/apps/marketing/src/features/marketing/primitives/createProductWalkthrough.ts b/apps/marketing/src/features/marketing/primitives/createProductWalkthrough.tsindex 78aaf6d84c..102e7bd633 100644--- a/apps/marketing/src/features/marketing/primitives/createProductWalkthrough.ts+++ b/apps/marketing/src/features/marketing/primitives/createProductWalkthrough.ts@@ -15,6 +15,9 @@ export function createProductWalkthrough(},});return {+ replayIfUntouched: () => {+ if (!takenOver) playback.replay();+ },pause: () => {takenOver = true;playback.pause();diff --git a/apps/marketing/src/features/marketing/views/ProductAgentsPage.tsx b/apps/marketing/src/features/marketing/views/ProductAgentsPage.tsxindex 66d357f756..9bd12eb4f5 100644--- a/apps/marketing/src/features/marketing/views/ProductAgentsPage.tsx+++ b/apps/marketing/src/features/marketing/views/ProductAgentsPage.tsx@@ -1,235 +1,190 @@-import ChatGPTIcon from '@icon/openai.svg';-import ClaudeIcon from '@icon/wide-claude.svg';-import CursorIcon from '@icon/wide-cursor-ide.svg';-import { For } from 'solid-js';+import ArrowUpRight from '@phosphor/arrow-up-right.svg';+import CaretDown from '@phosphor/caret-down.svg';import { setPageSeo } from '../../../app/utils/utilSeo';-import HermesIcon from '../assets/hermes.svg';-import OpenClawIcon from '../assets/openclaw.svg';+import { AgentMcpSetup } from '../components/agents/AgentStories';import {- AgentMcpDemo,- AgentMemoryDemo,- AgentModelsDemo,- AgentSearchDemo,-} from '../components/agents/AgentStories';+ AgentDeliverableStory,+ AgentMeetingStory,+ AgentTeamworkStory,+} from '../components/agents/AgentWorkflowStories';import { FeaturePageFaq, FeaturePageSection } from '../components/FeaturePage';import { HomepageClosing } from '../components/HomepageClosing';import {ContextGraphic,- DiffGraphic,+ EditingGraphic,LinkedWorkGraphic,ThreadGraphic,} from '../components/product/ProductGraphics';-import {- ProductHero,- ProductPage,- ProductProse,-} from '../components/product/ProductPage';+import { ProductHero, ProductPage } from '../components/product/ProductPage';import { WorkspaceDesktopDemo } from '../components/WorkspaceDesktopDemo';import './agents-page.css';-/** Clients the app's MCP settings and Bring your own agent card name. */-const existingAgents = [- { name: 'Claude', icon: ClaudeIcon },- { name: 'ChatGPT', icon: ChatGPTIcon },- { name: 'Cursor', icon: CursorIcon },- { name: 'Hermes', icon: HermesIcon },- { name: 'OpenClaw', icon: OpenClawIcon },-];-const agentsFaq = [{- q: 'What does Macro’s memory actually remember?',- a: 'Who works on what, what you’ve promised customers, and who knows the most about a topic. We rebuild it every night from your team’s email, channels, docs, tasks, calls, and CRM. When an agent needs the latest details, it searches for them. It only uses what the person asking is allowed to see.',- },- {- q: 'What can agents do in Macro?',- a: 'Most of what you can. They search and read email, chat, docs, tasks, and calls. They write and edit docs, create and assign tasks, update customers in the CRM, post in channels, and draft email. The results land in the same workspace your team already uses.',- },- {- q: 'Which models can I use?',- a: 'The latest from Anthropic, OpenAI, and Google. The model is a dropdown in the composer, and you can switch in the middle of a conversation if you want a second opinion. Memory and tools work the same with every model, so you’re never locked into one lab.',- },- {- q: 'Can an agent see things I can’t?',- a: 'No. An agent runs with the permissions of the person using it. If a doc, channel, or email isn’t shared with you, your agent can’t read it either.',- },- {- q: 'Will an agent send email without asking me?',- a: 'No. The agent drafts the email in the conversation, and it only goes out after you’ve checked the recipients and the wording. Other changes, like doc edits and new tasks, happen right away, the same way a teammate’s would.',+ 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: 'Can I edit what an agent makes?',- a: 'Yes. A doc or task an agent creates is an ordinary Macro doc or task. Edit it, reassign it, or ask another agent to pick it up.',+ 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: 'Does a doc have to be open for an agent to edit it?',- a: 'No. Agents edit through the same sync service your teammates use, so the doc can be closed. If you have it open, you’ll see the edits arrive live and can keep typing alongside them.',+ 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 use Macro from Claude Code, ChatGPT, or Cursor?',- a: (- <>- Yes. Our MCP server gives them the same tools our agents use, with your- permissions. In Claude Code, run{' '}- <code>- claude mcp add --transport http macro https://mcp-server.macro.com/mcp- </code>- . In Claude.ai, add it under Settings → Connectors. ChatGPT needs- Developer mode turned on. Cursor and other IDEs take the JSON config- from the MCP server page in Macro’s settings.- </>- ),+ 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.',},];export function RouteAgents() {+ // The router coalesces a click on the current hash. Still scroll back to it+ // when the visitor has moved elsewhere on this long page.+ const revisitSection = (+ event: MouseEvent & { currentTarget: HTMLAnchorElement }+ ) => {+ if (+ event.metaKey ||+ event.ctrlKey ||+ event.shiftKey ||+ event.altKey ||+ event.button !== 0+ )+ return;+ const hash = event.currentTarget.hash;+ if (hash !== window.location.hash) return;+ event.preventDefault();+ document.getElementById(hash.slice(1))?.scrollIntoView({+ block: 'start',+ behavior: window.matchMedia('(prefers-reduced-motion: reduce)').matches+ ? 'auto'+ : 'smooth',+ });+ };setPageSeo({- title: 'Macro Agents — AI With Your Whole Workspace as Context',+ title: 'Macro Agents | Agents That Know What Your Team Is Doing',description:- 'Agents with memory of your team’s email, chat, docs, tasks, and calls. One search across everything, any model, and an MCP server for the agents you already use.',+ 'Give agents native access to the context and tools behind your work. Use workspace permissions, choose a model, mention agents in chat, or bring your own agent.',path: '/agents',});return (<ProductPage>- <ProductHero- product="Agents"- title={['Agents that know what', 'your team is doing.']}- description={[- 'Macro remembers your email, chat, docs, tasks, and calls.',- 'Use any model, from any device, and pick up where you left off.',- ]}- cta="agents_hero_get_started"- />+ <div class="agents-hero">+ <ProductHero+ product="Agents"+ title={['Agents that know', 'what your team is doing.']}+ description={[+ 'Give agents your company’s context',+ 'to get things done alongside your team.',+ ]}+ cta="agents_hero_get_started"+ />+ </div><WorkspaceDesktopDemo- view="agents"- initialAgent="launch-status"- label="Explore Macro Agents"- caption="A sample workspace. Ask about the launch or open a linked task."+ heroFrame+ view="messages"+ agentShowcase+ desktopWidth={1000}+ label="Delegate work from a team conversation"/><nav class="feature-page-jump-links" aria-label="On this page">- <a href="#agent-memory">- <ThreadGraphic />- <span>Team memory</span>- </a>- <a href="#agent-search">+ <a onClick={revisitSection} href="#agent-sources"><ContextGraphic />- <span>One search</span>+ <span>Your personal agent</span></a>- <a href="#agent-models">- <DiffGraphic />- <span>Any model</span>+ <a onClick={revisitSection} href="#agent-actions">+ <EditingGraphic />+ <span>Tools to act</span>+ </a>+ <a onClick={revisitSection} href="#agent-collaboration">+ <ThreadGraphic />+ <span>Agents on your team</span></a>- <a href="#existing-agents">+ <a onClick={revisitSection} href="#existing-agents"><LinkedWorkGraphic />- <span>Bring your agents</span>+ <span>Bring your own agent</span></a></nav><FeaturePageSection- id="agent-memory"- title="Memory for the whole team."- description={- 'ChatGPT remembers your chats. Macro remembers your company.\nAsk who owns something, what you promised a customer, or who to ask.'- }+ id="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."><div class="feature-page-visual">- <AgentMemoryDemo />+ <AgentMeetingStory /></div>- <ProductProse>- <p>- ChatGPT and Claude build memory from your conversations with them.- Macro builds it from everything your team does: email, channels,- docs, tasks, calls, and the CRM, refreshed every night. It learns- who works on what, so it can assign a task to the right person,- route a customer issue, or tell you who knows the most about- something. It only uses what you’re allowed to see.- </p>- </ProductProse></FeaturePageSection><FeaturePageSection- id="agent-search"- title="One search across everything."- description={- 'Agents search email, chat, docs, tasks, and calls with one tool.\nNo stitching together five integrations that each return half the answer.'- }+ id="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."><div class="feature-page-visual">- <AgentSearchDemo />+ <AgentDeliverableStory /></div>- <ProductProse>- <p>- Plug Claude into Slack, Notion, Linear, and Gmail and it has to- search each one, dedupe the results, and guess what happened in what- order. We built Macro’s tools the way we built the app: one search- across everything, one way to read any item, and links back to the- source. Your agent spends its time on your question instead of on- plumbing.- </p>- </ProductProse></FeaturePageSection><FeaturePageSection- id="agent-models"- title="Any model. Same memory."- description={- 'Switch between the latest models from Anthropic, OpenAI, and Google.\nYour memory and tools come with you.'- }+ id="agent-collaboration"+ title="Bring your agents into team chat."+ description="Ask Macro for a mockup, give feedback, then tag Cursor to build it."><div class="feature-page-visual">- <AgentModelsDemo />+ <AgentTeamworkStory /></div>- <ProductProse>- <p>- Models leapfrog each other every few months, and you shouldn’t have- to move your company’s memory every time they do. In Macro, the- model is a dropdown, and everything the agent knows about your team- works the same whichever one you pick. Agents run in the cloud, too,- so you can start something on your laptop, close it, and check the- result on your phone.- </p>- </ProductProse></FeaturePageSection><FeaturePageSectionid="existing-agents"- title="Bring Claude, ChatGPT, or Cursor."- description={- 'Connect any MCP client and it gets the same tools our agents use.\nOne command for Claude Code, or a connector for Claude.ai and ChatGPT.'- }+ title="Bring your own agent."+ description="Give the agent you already use access to the context and tools in Macro.">- <ul- class="agents-page-providers"- aria-label="Agents that connect to Macro"- >- <For each={existingAgents}>- {(agent) => (- <li data-agent={agent.name}>- <span class="agents-page-provider-icon">- <agent.icon aria-hidden="true" />- </span>- <span>{agent.name}</span>- </li>- )}- </For>- </ul>- <div class="feature-page-visual agents-page-mcp">- <AgentMcpDemo />+ <div class="agents-connections">+ <div class="agents-connection-paths">+ <div class="agents-connection-path">+ <h3>Your agent, inside Macro</h3>+ <p>+ Bring Claude Code, OpenCode, OpenClaw, or Hermes into your+ workspace. Connect through macrod and keep your agent running on+ your machine.+ </p>+ <a+ class="agents-setup-link"+ href="https://docs.macro.com/AI/bring-your-own"+ >+ Connect your agent <ArrowUpRight aria-hidden="true" />+ </a>+ </div>+ <div class="agents-connection-path">+ <h3>Macro, inside your agent</h3>+ <p>+ Use Macro from Claude, ChatGPT, Cursor, or another MCP client.+ Search your workspace and work with its documents and tasks from+ there.+ </p>+ <a+ class="agents-setup-link"+ href="https://docs.macro.com/AI/mcp/overview"+ >+ Connect with MCP <ArrowUpRight aria-hidden="true" />+ </a>+ </div>+ </div>+ <details class="agents-mcp-disclosure">+ <summary>+ MCP connection commands <CaretDown aria-hidden="true" />+ </summary>+ <div+ class="agents-mcp-content workspace-demo portal-scope"+ data-theme="dark"+ >+ <AgentMcpSetup />+ </div>+ </details></div>- <ProductProse>- <p>- Our MCP server gets the same care as the app. Point Claude Code,- Cursor, Claude.ai, or ChatGPT at it and your agent can search the- workspace, read and edit docs, and update tasks and customers, all- with your permissions.- </p>- </ProductProse></FeaturePageSection><FeaturePageFaqid="agents-faq-title"- title="Questions about Macro agents"- introduction={- <p>- Agents in Macro use the same permissions you do. Here are the- details.- </p>- }+ title="Models, permissions, and control."items={agentsFaq}/><HomepageClosing />diff --git a/apps/marketing/src/features/marketing/views/ProductCallsPage.tsx b/apps/marketing/src/features/marketing/views/ProductCallsPage.tsxindex ab355377f3..64c8be9afe 100644--- a/apps/marketing/src/features/marketing/views/ProductCallsPage.tsx+++ b/apps/marketing/src/features/marketing/views/ProductCallsPage.tsx@@ -1,202 +1,142 @@import { setPageSeo } from '../../../app/utils/utilSeo';import {- CallDefaultDemo,CallFollowupDemo,CallHeroDemo,CallStartDemo,- CallTranscriptDemo,} from '../components/calls/CallStories';+import { CallsComparison } from '../components/calls/CallsComparison';+import { CallTeamMemoryDemo } from '../components/calls/CallTeamMemoryDemo';import { FeaturePageFaq, FeaturePageSection } from '../components/FeaturePage';import { HomepageClosing } from '../components/HomepageClosing';import {CallGraphic,ContextGraphic,LinkedWorkGraphic,- ThreadGraphic,} from '../components/product/ProductGraphics';-import {- ProductHero,- ProductPage,- ProductProse,-} from '../components/product/ProductPage';-import { WorkspaceDesktopDemo } from '../components/WorkspaceDesktopDemo';+import { ProductHero, ProductPage } from '../components/product/ProductPage';+import './calls-page.css';const callsFaq = [{- q: 'Are all calls recorded?',- a: 'Yes. Calls in Macro are recorded and transcribed for the organizer and Macro participants, and the recording, transcript, and summary are saved with the call.',- },- {- q: 'Who can see a recording?',- a: 'Members of the channel it started in. Use Share to give anyone else access.',+ 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: 'Do I need to install anything?',- a: 'No. Calls run in the browser on desktop and mobile.',+ q: 'Are calls recorded automatically?',+ a: 'Yes. Macro records, transcribes, and summarizes calls. Participants see a recording and transcription notice.',},{- q: 'Can agents read my calls?',- a: (- <>- Yes, the ones you have access to. Agents read the summary first and the- full transcript when they need detail. More on{' '}- <a href="/agents">agents in Macro</a>.- </>- ),+ 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: 'Can I share a call with my team?',- a: 'Yes. Turn on Share with team and your team can see the chat, transcript, and AI summary once the call ends.',+ 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: 'Is there a free plan?',+ q: 'Are calls included in the free plan?',a: (<>- Yes, for email, chat, docs, and agents. Calls, recording, and- transcription are on the paid plan. See <a href="/pricing">pricing</a>{' '}- for what each plan includes.+ Calls, recording, and transcription are included in the paid plan. See{' '}+ <a href="/pricing">pricing</a> for details.</>),},];export function RouteCalls() {+ // Repeated clicks on the same hash still need to revisit the section.+ const revisitSection = (+ event: MouseEvent & { currentTarget: HTMLAnchorElement }+ ) => {+ if (+ event.metaKey ||+ event.ctrlKey ||+ event.shiftKey ||+ event.altKey ||+ event.button !== 0+ )+ return;+ const hash = event.currentTarget.hash;+ if (hash !== window.location.hash) return;+ event.preventDefault();+ document.getElementById(hash.slice(1))?.scrollIntoView({+ block: 'start',+ behavior: window.matchMedia('(prefers-reduced-motion: reduce)').matches+ ? 'auto'+ : 'smooth',+ });+ };setPageSeo({- title: 'Macro Calls — Recordings, Transcripts, and Agent Tools',+ title: 'Macro Calls — Turn Conversations into Tasks and Updates',description:- 'Start a call from any channel. Macro records, transcribes, and summarizes it by default, so your team and your agents know what was decided.',+ 'Macro records and transcribes your calls so your agents can update tasks and docs from the conversation.',path: '/calls',});return (<ProductPage>- <ProductHero- product="Calls"- title={['Every call, recorded', 'and searchable.']}- description={[- 'Start a call from any channel. It’s transcribed and summarized automatically,',- 'so your team and your agents know what was decided.',- ]}- cta="calls_hero_get_started"- />- <WorkspaceDesktopDemo- view="messages"- label="Explore Macro Calls"- caption="A sample call. Click a transcript line to jump to that moment."- >+ <div class="calls-page">+ <ProductHero+ cta="calls_hero_get_started"+ product="Calls"+ title={['Turn your conversations into', 'tasks and updates.']}+ description={[+ 'Macro records and transcribes your calls.',+ 'Ask your agent to handle the follow-up.',+ ]}+ /><CallHeroDemo />- </WorkspaceDesktopDemo>- <nav class="feature-page-jump-links" aria-label="On this page">- <a href="#call-default">- <ContextGraphic />- <span>On by default</span>- </a>- <a href="#call-transcript">- <ThreadGraphic />- <span>Who said what</span>- </a>- <a href="#call-followup">- <LinkedWorkGraphic />- <span>Summaries for agents</span>- </a>- <a href="#call-start">- <CallGraphic />- <span>Calls in channels</span>- </a>- </nav>- <FeaturePageSection- id="call-default"- title="Recorded by default."- description={- 'No bot to invite and no record button to forget.\nEvery call gets a recording, a transcript, and a summary.'- }- >- <div class="feature-page-visual">- <CallDefaultDemo />- </div>- <ProductProse>- <p>- Granola, meeting bots, and the record button in Zoom all have the- same problem: someone has to remember to use them, and then remember- to share the notes. Usually nobody does, and the decision lives in- three people’s heads. Macro flips it. Calls are recorded and- transcribed by default and saved to the channel they started in. It- feels a little strange at first. Then you stop losing decisions.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageSection- id="call-transcript"- title="Knows who said what."- description={- 'Each person’s audio is transcribed on its own, so every line has the right name on it.\nClick a line to jump to that moment in the recording.'- }- >- <div class="feature-page-visual">- <CallTranscriptDemo />- </div>- <ProductProse>- <p>- When we first rolled out calls to our own team, the transcripts kept- attributing things to the wrong person, and that’s worse than no- transcript at all: your agents end up thinking Eric agreed to- something Seamus said. So Macro transcribes each participant’s audio- separately and keeps different voices apart. The transcript is lined- up with the recording, so you can click any line and hear it.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageSection- id="call-followup"- title="Summaries your agents can use."- description={- 'Every call gets a short summary of what was decided.\nAgents read it first, so they can act on the meeting without rereading an hour of transcript.'- }- >- <div class="feature-page-visual">- <CallFollowupDemo />- </div>- <ProductProse>- <p>- A transcript is a lot of words. The summary is what you and your- agents actually want: what got decided, who owns what, and how it- fits with everything else going on. Ask @Macro to update the task- from this morning’s call and it reads the summary, pulls details- from the transcript when it needs them, and makes the change.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageSection- id="call-start"- title="Start one from any channel."- description={- 'Click Call in a channel or DM, like a Slack huddle.\nIt runs in the browser, so there’s nothing to install.'- }- >- <div class="feature-page-visual">- <CallStartDemo />- </div>- <ProductProse>- <p>- We wanted the ease of a Slack huddle with the reliability of Google- Meet. Click Call in any channel and everyone in it gets a- notification. It works in the browser on any device, so nobody has- to install anything five minutes before the meeting. Afterward, the- recording, transcript, and summary live in the channel’s Calls tab.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageFaq- id="calls-faq-title"- title="Questions about Macro Calls"- introduction={- <p>- Calls are the one place we made a strong default choice. Here’s how- it works.- </p>- }- items={callsFaq}- />- <HomepageClosing />+ <nav class="feature-page-jump-links" aria-label="On this page">+ <a href="#call-start" onClick={revisitSection}>+ <CallGraphic />+ <span>Meet in a click</span>+ </a>+ <a href="#call-followup" onClick={revisitSection}>+ <LinkedWorkGraphic />+ <span>Act on decisions</span>+ </a>+ <a href="#call-default" onClick={revisitSection}>+ <ContextGraphic />+ <span>Catch up afterward</span>+ </a>+ </nav>+ <FeaturePageSection+ id="call-start"+ title="Start a call in one click."+ description={'Click Call in a channel or DM.'}+ >+ <div class="feature-page-visual">+ <CallStartDemo />+ </div>+ </FeaturePageSection>+ <FeaturePageSection+ id="call-followup"+ title="Update tasks from your calls."+ description="Ask an agent to update the owner and next steps from your call."+ >+ <div class="feature-page-visual">+ <CallFollowupDemo />+ </div>+ </FeaturePageSection>+ <FeaturePageSection+ id="call-default"+ title="Your team can catch up without being there."+ description={+ 'Share a call’s recording, transcript, and summary with your team.'+ }+ >+ <div class="feature-page-visual">+ <CallTeamMemoryDemo />+ </div>+ </FeaturePageSection>+ <CallsComparison />+ <FeaturePageFaq+ id="calls-faq-title"+ title="Questions about Macro Calls"+ items={callsFaq}+ />+ <HomepageClosing />+ </div></ProductPage>);}diff --git a/apps/marketing/src/features/marketing/views/ProductChannelsPage.tsx b/apps/marketing/src/features/marketing/views/ProductChannelsPage.tsxindex 6f6a670ab8..ebebd6043d 100644--- a/apps/marketing/src/features/marketing/views/ProductChannelsPage.tsx+++ b/apps/marketing/src/features/marketing/views/ProductChannelsPage.tsx@@ -1,10 +1,12 @@import { setPageSeo } from '../../../app/utils/utilSeo';import {ChannelAgentDemo,+ ChannelHero,+ ChannelPermissionsDemo,ChannelSharedWorkDemo,ChannelThreadDemo,- ChatInboxDemo,} from '../components/channels/ChannelStories';+import { FeatureComparisons } from '../components/comparisons/FeatureComparisons';import { FeaturePageFaq, FeaturePageSection } from '../components/FeaturePage';import { HomepageClosing } from '../components/HomepageClosing';import {@@ -12,19 +14,15 @@ import {LinkedWorkGraphic,ThreadGraphic,} from '../components/product/ProductGraphics';-import {- ProductHero,- ProductPage,- ProductProse,-} from '../components/product/ProductPage';+import { ProductHero, ProductPage } from '../components/product/ProductPage';import { TaskAgentsGraphic } from '../components/tasks/TasksFeatureGraphics';-import { WorkspaceDesktopDemo } from '../components/WorkspaceDesktopDemo';+import { chatComparisons } from '../core/feature-comparisons';export function RouteChannels() {setPageSeo({- title: 'Macro Chat — Team Chat Wired into Everything',+ title: 'Macro Chat: Bring the Work into the Conversation',description:- 'Team chat where @mentioning a doc shares it with the channel, messages wait in a real inbox until you’re done, threads stay readable, and agents can answer in the conversation.',+ 'Share documents, tasks, and email threads in team chat. Channel members get access, work stays linked to its discussion, and follow-ups wait in one inbox.',path: '/channels',});return (@@ -33,144 +31,78 @@ export function RouteChannels() {product="Chat"title={['Team chat, wired into', 'everything else.']}description={[- '@mention a doc, task, or email and the whole channel can open it.',- 'Plus a real inbox, so nothing slips through.',+ '@mention a doc, task, person, or company',+ 'and the whole channel can open it natively.',]}cta="channels_hero_get_started"/>- <WorkspaceDesktopDemo- view="messages"- label="Explore Macro Chat"- caption="A sample workspace. Open a thread, click a linked doc, or send a message."- />+ <ChannelHero /><nav class="feature-page-jump-links" aria-label="On this page"><a href="#shared-work"><LinkedWorkGraphic />- <span>Share by mention</span>+ <span>Open the work</span></a>- <a href="#chat-inbox">+ <a href="#channel-access"><ContextGraphic />- <span>A real inbox</span>- </a>- <a href="#channel-threads">- <ThreadGraphic />- <span>Inline threads</span>+ <span>Channel access</span></a><a href="#channel-agents"><TaskAgentsGraphic />- <span>Agents in channels</span>+ <span>Agents</span>+ </a>+ <a href="#catch-up">+ <ThreadGraphic />+ <span>Catch up</span></a></nav><FeaturePageSectionid="shared-work"- title="@mention it and it’s shared."- description={- 'Mention a doc, task, or email thread and everyone in the channel can open it.\nJoin the channel and you have access. No access requests.'- }+ title="Open docs, tasks, and email straight from chat."+ description="Click a mention to open the work beside the conversation.">- <div class="feature-page-visual">+ <div class="feature-page-visual channel-wide-demo"><ChannelSharedWorkDemo /></div>- <ProductProse>- <p>- Channels are already where your company runs, whether that’s Slack- or a group text. The problem is everything else lives somewhere- else. In Macro, anything you @mention in a channel is shared with- the people in it, so you never spend the afternoon approving access- requests. New hires join #launch and can open everything that’s been- linked there. Links go both ways, too: the doc shows every- conversation it came up in, and any message can become a task with- one click.- </p>- </ProductProse></FeaturePageSection><FeaturePageSection- id="chat-inbox"- title="Chat with an actual inbox."- description={- 'Messages land in Home next to your email and tasks. Press E when you’re done.\nAnything you haven’t dealt with stays put, so you can leave it for later.'- }+ id="channel-access"+ title="Access follows the channel."+ description="Mention a doc, task, or email to give the channel access. New members get access too."><div class="feature-page-visual">- <ChatInboxDemo />+ <ChannelPermissionsDemo /></div>- <ProductProse>- <p>- Slack only knows read and unread. Once you’ve glanced at a message,- it’s gone, and you have to remember to come back to it. Macro treats- chat like email: mentions, threads you’re in, and DMs land in Home- next to your email, tasks, and pull requests. Reading something- doesn’t clear it. Marking it done does. You can answer things when- you’re ready instead of the second they arrive, and without the- low-grade anxiety of a dozen unread badges.- </p>- </ProductProse></FeaturePageSection><FeaturePageSection- id="channel-threads"- title="Threads you can actually follow."- description={- 'The first replies show right under the message.\nNo side panel, and no hunting for the reply someone said they left.'- }+ id="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."><div class="feature-page-visual">- <ChannelThreadDemo />+ <ChannelAgentDemo /></div>- <ProductProse>- <p>- We tried every way of doing threads. Slack’s side panel keeps the- channel tidy but hides the conversation. iMessage and Discord are- fine for banter and painful for anything technical. Reddit-style- nesting turns into a forum. We landed on showing the first few- replies inline, connected to the message they answer, with a pill- for the rest. It’s the happy medium that’s worked best for our own- team.- </p>- </ProductProse></FeaturePageSection><FeaturePageSection- id="channel-agents"- title="Agents are in the channel too."- description={- '@mention Macro, Claude, or Cursor like anyone else.\nThey read the conversation, and their answers stay where the team can see them.'- }+ id="catch-up"+ title="Catch up without opening every thread."+ description="Read replies inline and respond in the same conversation.">+ <span id="channel-threads" />+ <span id="chat-inbox" /><div class="feature-page-visual">- <ChannelAgentDemo />+ <ChannelThreadDemo /></div>- <ProductProse>- <p>- Asking an agent in the channel beats pasting the conversation into- ChatGPT. It already has the thread and everything linked in it, so- you don’t have to explain. Ask @Macro to catch you up, turn a- discussion into tasks, or draft the customer email. Hand a bug to- Claude or Cursor and they come back with a pull request. Either way,- the answer lands in the channel, so the rest of the team knows what- happened.- </p>- </ProductProse></FeaturePageSection>+ <FeatureComparisons comparisons={chatComparisons} /><FeaturePageFaqid="channels-faq-title"- title="Questions about Macro Chat"- introduction={- <p>- If your team lives in Slack, most of this will feel familiar. Here’s- what’s different.- </p>- }+ title="FAQ"items={[{- q: 'How is this different from Slack?',- a: 'Three things. Anything you @mention in a channel is shared with it, so there are no access requests. Messages wait in a real inbox you can clear, instead of a wall of unread badges. And channels are connected to your docs, tasks, email, and calls, so the conversation and the work stay together.',- },- {- q: 'Can I share docs and email in a channel?',+ q: 'What happens when I share an email?',a: (<>- Yes. @mention a doc or task, or share an email thread from your- inbox. Everyone in the channel can open it, and shared email- threads keep updating when new replies come in. See{' '}+ The channel can read the full thread, including new replies. See{' '}<a href="/email">email sharing</a>.</>),@@ -179,8 +111,8 @@ export function RouteChannels() {q: 'Can a message become a task?',a: (<>- Yes. Hover the message and click Task, or ask @Macro to make- tasks for you. See <a href="/tasks">Macro Tasks</a>.+ Yes. Use a message’s Task action, or ask an agent to create one.+ See <a href="/tasks">Macro Tasks</a>.</>),},@@ -192,14 +124,20 @@ export function RouteChannels() {q: 'Which agents can I mention?',a: (<>- Macro’s own agent, plus coding agents like Claude and Cursor.- See <a href="/agents">agents in Macro</a>.+ Macro’s agents, or agents you connect to your workspace. See how+ to <a href="/agents">bring your own agent</a>.</>),},{- q: 'Will these examples post to my account?',- a: 'No. Everything on this page is a local sample. Nothing you type here leaves your browser.',+ q: 'How do we get started?',+ 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>.+ </>+ ),},{q: 'Can I join as a Guest for free?',diff --git a/apps/marketing/src/features/marketing/views/ProductDocumentsPage.tsx b/apps/marketing/src/features/marketing/views/ProductDocumentsPage.tsxindex 9d273d8331..2584609b47 100644--- a/apps/marketing/src/features/marketing/views/ProductDocumentsPage.tsx+++ b/apps/marketing/src/features/marketing/views/ProductDocumentsPage.tsx@@ -1,58 +1,53 @@import { setPageSeo } from '../../../app/utils/utilSeo';+import { FeatureComparisons } from '../components/comparisons/FeatureComparisons';+import { DocumentOrganizationDemo } from '../components/documents/DocumentOrganizationDemo';+import { DocumentProjectDemo } from '../components/documents/DocumentProjectDemo';import {DocumentAgentDemo,DocumentMentionsDemo,- DocumentOfflineDemo,- DocumentSharingDemo,} from '../components/documents/DocumentStories';import { FeaturePageFaq, FeaturePageSection } from '../components/FeaturePage';import { HomepageClosing } from '../components/HomepageClosing';import {- ContextGraphic,EditingGraphic,LinkedWorkGraphic,ThreadGraphic,} from '../components/product/ProductGraphics';-import {- ProductHero,- ProductPage,- ProductProse,-} from '../components/product/ProductPage';+import { ProductHero, ProductPage } from '../components/product/ProductPage';import { WorkspaceDesktopDemo } from '../components/WorkspaceDesktopDemo';+import { documentComparisons } from '../core/feature-comparisons';const documentsFaq = [{- q: 'How is this different from Notion?',- a: 'Notion is a blank canvas: everything is a page or a database, and you build your own CRM or task tracker out of them. We took the opposite approach. Macro has dedicated tools for email, tasks, chat, and CRM, and docs are just docs. They’re also fast, work offline, merge edits without conflicts, and agents can edit them live.',+ 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: 'Can an agent edit my doc directly?',- a: (- <>- Yes. Agents edit native Macro docs in place, with their own cursor, even- when the doc is closed. PDFs and other uploads can be read, but not- edited. See <a href="/agents">agents in Macro</a>.- </>- ),+ 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 edit offline?',- a: 'Yes. Edits save on your device and sync when you reconnect. If someone else changed the doc in the meantime, both sets of edits merge.',+ 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: 'What can I @mention?',- a: 'People, docs, tasks, channels, emails, customers, and dates. Mentions of docs, tasks, and emails link both ways, so the other item lists the doc in its References.',+ 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 see my doc?',- a: 'Anyone you share it with, plus everyone in a channel where it’s been mentioned. You can set edit, comment, or view access per person.',+ 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: 'Does open source make my documents 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 bring my docs in and take them out?',a: (<>- No. Our code is public. Your docs aren’t. See the{' '}- <a href="/privacy">Privacy Policy</a>.+ Import Notion pages or upload files. Export native Macro docs as+ Markdown. See <a href="/migrate">moving to Macro</a>.</>),},@@ -60,141 +55,89 @@ const documentsFaq = [export function RouteDocuments() {setPageSeo({- title: 'Macro Docs — Markdown Documents, Wired Into Everything',+ title: 'Macro Docs | Write With Your Team and Your Agents',description:- 'Markdown docs with live agent edits, offline editing that merges cleanly, and @mentions that link to everything in your company.',+ 'Write in Markdown and collaborate live with people and agents. Link emails and tasks, open them beside your doc, and organize your work with folders and tags.',path: '/documents',});return (<ProductPage>- <ProductHero- product="Docs"- title={['Docs your agents', 'can actually edit.']}- description={[- 'Agents type into the live doc with you, cursor and all.',- 'It’s fast, works offline, and @mentions reach everything in your company.',- ]}- cta="documents_hero_get_started"- />- <WorkspaceDesktopDemo- view="documents"- initialDocument="plan"- label="Explore Macro Docs"- caption="A sample workspace. Edit the launch plan, leave a comment, or share it."- />- <nav class="feature-page-jump-links" aria-label="On this page">- <a href="#document-agents">- <EditingGraphic />- <span>Live agent edits</span>- </a>- <a href="#document-offline">- <ContextGraphic />- <span>Offline editing</span>- </a>- <a href="#document-links">- <LinkedWorkGraphic />- <span>@mention anything</span>- </a>- <a href="#document-sharing">- <ThreadGraphic />- <span>Share by mention</span>- </a>- </nav>- <FeaturePageSection- id="document-agents"- title="Agents with a live cursor."- description={- 'Ask for a rewrite and watch Claude make it, right in the doc you have open.\nKeep typing. Your edits and the agent’s merge as you go.'- }- >- <div class="feature-page-visual">- <DocumentAgentDemo />- </div>- <ProductProse>- <p>- Most AI editors hand you a diff or a new version of the file. That’s- fine for code and annoying for a doc three people are working in. In- Macro, agents join the document like a teammate, with their own- cursor. You can watch the edit happen, keep writing somewhere else- in the doc, and change anything you don’t like. It works when the- doc is closed, too: ask from a channel, and the edit is there when- you open it.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageSection- id="document-offline"- title="Offline? Keep writing."- description={- 'Every doc is one CRDT, so edits from different people merge instead of overwriting.\nLose your connection and keep typing. It syncs when you’re back.'- }- >- <div class="feature-page-visual">- <DocumentOfflineDemo />- </div>- <ProductProse>- <p>- Notion syncs block by block, so when two people edit the same- paragraph, the last save wins. Macro stores the whole document as a- CRDT, a data structure built for merging edits from many people at- once. Changes save on your device first, then sync to your team.- Write the whole draft on a plane and it merges cleanly when you- land.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageSection- id="document-links"- title="@mention anything in your company."- description={- 'People, docs, tasks, channels, emails, and customers.\nMentions link both ways, so the doc knows where it’s referenced too.'- }- >- <div class="feature-page-visual">- <DocumentMentionsDemo />- </div>- <ProductProse>- <p>- Notion lets you mention other Notion pages. Macro lets you mention- the stuff your company actually runs on: the customer email, the- task, the #support thread, the customer record. Mentions of docs,- tasks, and emails show up in their References, so from a task you- can see every doc that cites it. Agents follow the same links, which- is a big part of why they know what you’re talking about.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageSection- id="document-sharing"- title="Share it by mentioning it."- description={- '@mention a doc in a channel and everyone in the channel can open it.\nNo access requests, no link settings to get wrong.'- }- >- <div class="feature-page-visual">- <DocumentSharingDemo />+ <div class="docs-page">+ <ProductHero+ product="Docs"+ title={['Write with your team', 'and your agents.']}+ description={[+ 'Write together using your emails, tasks,',+ 'and conversations already in Macro.',+ ]}+ cta="documents_hero_get_started"+ />+ <WorkspaceDesktopDemo+ heroFrame+ view="documents"+ label="Explore Macro Docs"+ >+ <DocumentProjectDemo />+ </WorkspaceDesktopDemo>+ <nav+ class="feature-page-jump-links docs-jump-links"+ aria-label="On this page"+ >+ <a href="#document-agents">+ <EditingGraphic />+ <span>Write with agents</span>+ </a>+ <a href="#document-links">+ <LinkedWorkGraphic />+ <span>Link your work</span>+ </a>+ <a href="#document-organization">+ <ThreadGraphic />+ <span>Folders and tags</span>+ </a>+ </nav>+ <FeaturePageSection+ id="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."+ >+ <div class="feature-page-visual">+ <DocumentAgentDemo />+ </div>+ </FeaturePageSection>+ <FeaturePageSection+ id="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."+ >+ <div class="feature-page-visual docs-wide-demo">+ <DocumentMentionsDemo />+ </div>+ </FeaturePageSection>+ <FeaturePageSection+ id="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."+ >+ <div class="feature-page-visual">+ <DocumentOrganizationDemo />+ </div>+ </FeaturePageSection>+ <section+ id="documents-comparison"+ aria-label="Compare Macro and Notion"+ >+ <FeatureComparisons comparisons={documentComparisons} />+ </section>+ <div>+ <FeaturePageFaq+ id="documents-faq-title"+ title="Frequently asked questions"+ items={documentsFaq}+ /></div>- <ProductProse>- <p>- When you mention a doc in a channel, the channel gets access,- including people who join later. You can still share with- individuals and pick edit, comment, or view access. Most of the time- you won’t need to.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageFaq- id="documents-faq-title"- title="Questions about Macro Docs"- introduction={- <p>- If you’re coming from Notion or Google Docs, the editor will feel- familiar. Here’s what’s different.- </p>- }- items={documentsFaq}- />- <HomepageClosing />+ <HomepageClosing />+ </div></ProductPage>);}diff --git a/apps/marketing/src/features/marketing/views/ProductReviewsPage.tsx b/apps/marketing/src/features/marketing/views/ProductReviewsPage.tsxindex f6841ce5de..8d11ac05fc 100644--- a/apps/marketing/src/features/marketing/views/ProductReviewsPage.tsx+++ b/apps/marketing/src/features/marketing/views/ProductReviewsPage.tsx@@ -1,6 +1,4 @@-import { lazy } from 'solid-js';import { setPageSeo } from '../../../app/utils/utilSeo';-import { DeferredDemo, DemoPlaceholder } from '../components/DeferredDemo';import { FeaturePageFaq, FeaturePageSection } from '../components/FeaturePage';import { HomepageClosing } from '../components/HomepageClosing';import {@@ -9,52 +7,45 @@ import {LinkedWorkGraphic,ThreadGraphic,} from '../components/product/ProductGraphics';+import { ProductHero, ProductPage } from '../components/product/ProductPage';import {- ProductHero,- ProductPage,- ProductProse,-} from '../components/product/ProductPage';-import {- GithubHomeHero,- PrLinkDemo,- ReviewInboxDemo,-} from '../components/reviews/ReviewStories';-import { TaskGithubDemo } from '../components/tasks/TaskStories';+ GithubConversationDemo,+ GithubPrHero,+ GithubTaskDemo,+} from '../components/reviews/GithubWorkflow';+import { ReviewInboxDemo } from '../components/reviews/ReviewStories';import { WorkspaceDesktopDemo } from '../components/WorkspaceDesktopDemo';-const loadPullRequest = () => import('../components/HomepagePullRequest');-const HomepagePullRequest = lazy(loadPullRequest);-const githubFaq = [{- q: 'Is this a GitHub replacement?',- a: 'No. Your code, reviews, and CI stay on GitHub. Macro brings the parts your team talks about into the workspace: notifications, PR status, and the link between a pull request and its task.',+ q: 'How do I connect GitHub?',+ a: 'Link your GitHub account in Settings under Account.',},{- q: 'What shows up in my inbox?',- a: 'Review requests, comments and reviews on your pull requests, mentions, and status changes on PRs you’re part of.',+ 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: 'How do pull requests link to tasks?',a: (<>- Put the task ID in the branch name, PR title, or PR description. Macro- links them and moves the task as the PR opens, merges, or closes. More- on <a href="/tasks">tasks in Macro</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>.</>),},{- q: 'Can I review code in Macro?',- a: 'You can read the PR description and the review discussion in Macro. For the diff and approvals, Open on GitHub takes you there.',+ 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 work with Macro?',+ q: 'Which coding agents can I use?',a: (<>- You can mention Cursor, Claude Code, and Codex in channels, and connect- any MCP client to your workspace. See{' '}- <a href="/agents">agents in Macro</a>.+ Bring coding agents such as Cursor or Claude Code into your channels.{' '}+ <a href="/agents">See how to connect your agents</a>.</>),},@@ -70,143 +61,90 @@ const githubFaq = [export function RouteGithub() {setPageSeo({- title: 'Macro Reviews — Review PRs in Your Inbox',+ title: 'GitHub in Macro | Pull Requests, Code Changes, and Tasks',description:- 'Review requests and PR comments land in your Macro inbox, GitHub links show live status, and tasks update themselves when pull requests open and merge.',+ 'Open GitHub pull requests from chat, inspect code changes, and keep linked tasks in sync. Work with coding agents and see review requests in your inbox.',path: '/github',});return (<ProductPage>- <ProductHero- product="for GitHub"- title={['GitHub, wired into', 'your workspace.']}- description={[- 'Review requests and PR comments land in your inbox.',- 'Link a PR to a task and it updates itself.',- ]}- cta="github_hero_get_started"- />- <WorkspaceDesktopDemo- view="home"- label="Explore GitHub in Macro"- caption="A sample inbox. Open a review request to read the PR."- >- <GithubHomeHero />- </WorkspaceDesktopDemo>- <nav class="feature-page-jump-links" aria-label="On this page">- <a href="#review-inbox">- <ThreadGraphic />- <span>Reviews in your inbox</span>- </a>- <a href="#pr-links">- <ContextGraphic />- <span>Live PR links</span>- </a>- <a href="#pr-tasks">- <LinkedWorkGraphic />- <span>Linked to tasks</span>- </a>- <a href="#coding-agents">- <EditingGraphic />- <span>Coding agents</span>- </a>- </nav>- <FeaturePageSection- id="review-inbox"- title="Never miss a review."- description={- 'Review requests, comments, and mentions on your pull requests land in Home.\nRight next to your messages, tasks, and email.'- }- >- <div class="feature-page-visual">- <ReviewInboxDemo />- </div>- <ProductProse>- <p>- GitHub notifications are easy to ignore, which is how a PR sits for- two days waiting on a one-line review. Macro puts review requests,- comments on your PRs, and mentions in the same inbox as everything- else, so code review isn’t one more place to check. Press E when- you’re done, same as everything else.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageSection- id="pr-links"- title="Paste a PR, see its status."- description={- 'Pull request links turn into pills in docs and messages.\nHover one to see checks, comments, and the size of the change.'- }- >- <div class="feature-page-visual">- <PrLinkDemo />- </div>- <ProductProse>- <p>- Paste a pull request into a channel or a doc and Macro shows it with- its status: open, merged, or closed. Hover it for the repo, the- title, the line counts, and whether checks passed. No more “is this- merged yet?” in the channel.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageSection- id="pr-tasks"- title="Tasks and PRs, linked both ways."- description={- 'Put the task ID in a branch or PR title and the PR shows up on the task.\nOpening it moves the task to In Review. Merging it marks it done.'- }- >- <div class="feature-page-visual">- <TaskGithubDemo />- </div>- <ProductProse>- <p>- This is the part our engineers like most. The task shows its pull- request, the pull request links back to the task, and nobody updates- status by hand. Opening the PR moves the task to In Review, merging- marks it Completed, and closing it without merging puts it back in- Not Started.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageSection- id="coding-agents"- title="Coding agents in your channels."- description={- 'Hand a bug to Cursor or Claude Code right from the conversation.\nThe agent works on the branch and comes back with a pull request.'- }- >- {/* dummy-workspace opts the homepage demo's controls out of the- site-wide button font, as on the homepage. */}- <div class="feature-page-visual review-agent-demo dummy-workspace">- <DeferredDemo- preload={loadPullRequest}- fallback={<DemoPlaceholder label="Agent session preview" />}- >- <HomepagePullRequest />- </DeferredDemo>- </div>- <ProductProse>- <p>- Most bugs start as a message. In Macro, you can @mention Cursor or- Claude Code in that same thread and hand it off. The agent works on- the branch, reports back in the channel, and the PR shows up linked- to the task, ready for review.- </p>- </ProductProse>- </FeaturePageSection>- <FeaturePageFaq- id="github-faq"- title="Questions about Macro and GitHub"- introduction={- <p>- Your code and CI stay on GitHub. Macro handles the parts your team- talks about.- </p>- }- items={githubFaq}- />+ <div class="github-page">+ <ProductHero+ product="for GitHub"+ title={['Open pull requests', 'right in Macro.']}+ description={[+ 'Read the discussion, inspect code changes,',+ 'and keep linked tasks up to date.',+ ]}+ cta="github_hero_get_started"+ />+ <WorkspaceDesktopDemo+ heroFrame+ view="home"+ label="Explore GitHub in Macro"+ >+ <GithubPrHero />+ </WorkspaceDesktopDemo>+ <nav class="feature-page-jump-links" aria-label="On this page">+ <a href="#pr-links">+ <ContextGraphic />+ <span>Pull requests in chat</span>+ </a>+ <a href="#pr-tasks">+ <LinkedWorkGraphic />+ <span>Linked tasks</span>+ </a>+ <a href="#coding-agents">+ <EditingGraphic />+ <span>Coding agents</span>+ </a>+ <a href="#review-inbox">+ <ThreadGraphic />+ <span>Review requests</span>+ </a>+ </nav>+ <FeaturePageSection+ id="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."+ >+ <div class="feature-page-visual">+ <GithubConversationDemo />+ </div>+ </FeaturePageSection>+ <FeaturePageSection+ id="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."+ >+ <div class="feature-page-visual">+ <GithubTaskDemo />+ </div>+ </FeaturePageSection>+ <FeaturePageSection+ id="coding-agents"+ title="Ask an agent to fix a bug."+ description="Tag @Cursor in the conversation. Open its pull request to see what changed."+ >+ <div class="feature-page-visual">+ <GithubConversationDemo agent />+ </div>+ </FeaturePageSection>+ <FeaturePageSection+ id="review-inbox"+ title="Review requests in your inbox."+ description="See GitHub review requests, comments, and mentions alongside your messages, tasks, and email."+ >+ <div class="feature-page-visual">+ <ReviewInboxDemo />+ </div>+ </FeaturePageSection>+ <FeaturePageFaq+ id="github-faq"+ title="Frequently asked questions"+ items={githubFaq}+ />+ </div><HomepageClosing /></ProductPage>);diff --git a/apps/marketing/src/features/marketing/views/agents-page.css b/apps/marketing/src/features/marketing/views/agents-page.cssindex a43bfbfa47..cbd3bd9c17 100644--- a/apps/marketing/src/features/marketing/views/agents-page.css+++ b/apps/marketing/src/features/marketing/views/agents-page.css@@ -1,50 +1,48 @@-.agents-page-providers {- display: flex;- flex-wrap: wrap;- justify-content: space-between;- gap: 32px 24px;- width: min(872px, calc(100% - 48px));- margin: 40px auto 0;- padding: 36px 0;- list-style: none;- border-block: 1px solid #ffffff14;- color: #b8b8b3;- font: 400 15px/1.5 'Inter Variable', Inter, sans-serif;+.agents-connections {+ width:min(872px, calc(100% - 48px));+ margin:40px auto 0;+ font:400 15px/1.7 'Inter Variable', Inter, sans-serif;}--.agents-page-providers li {- display: flex;- align-items: center;- gap: 12px;-}--.agents-page-provider-icon {- display: grid;- place-items: center;- width: 32px;- height: 36px;+.agents-connection-paths { display:grid; grid-template-columns:1fr 1fr; gap:56px; }+.agents-connection-path { display:flex; flex-direction:column; align-items:flex-start; border-top:1px solid #ffffff24; padding-top:24px; }+.agents-connection-path h3 { margin:0; color:#e0e0de; font:500 20px/1.4 'Inter Variable', Inter, sans-serif; letter-spacing:-.4px; }+.agents-connection-path p { margin:16px 0 24px; color:#a3a3a3; }+.agents-connections .agents-setup-link {+ display:inline-flex;+ align-items:center;+ gap:8px;+ margin-top:auto;+ color:#e0e0de;+ text-decoration:none;}--.agents-page-provider-icon svg {- width: 28px;- height: 28px;+.agents-setup-link svg { width:16px; height:16px; }+.agents-connections .agents-setup-link:hover { text-decoration:underline; text-underline-offset:4px; }+.agents-mcp-disclosure { margin-top:40px; border-block:1px solid #ffffff20; }+.agents-mcp-disclosure > summary {+ display:flex;+ align-items:center;+ justify-content:space-between;+ gap:20px;+ padding:20px 0;+ color:#b8b8b3;+ list-style:none;+ cursor:pointer;}--.agents-page-providers li[data-agent='Hermes'] svg {- width: 18px;- height: 36px;-}--/* The MCP settings window sits under the provider row. */-.agents-page-mcp {- margin-top: 8px;+.agents-mcp-disclosure > summary::-webkit-details-marker { display:none; }+.agents-mcp-disclosure > summary > svg { width:18px; height:18px; flex:none; }+.agents-mcp-disclosure[open] > summary > svg { transform:rotate(180deg); }+.agents-mcp-content { padding-bottom:24px; text-align:left; }+.agents-mcp-content .agent-mcp-cards { margin-top:0; }+@media (max-width:699px) {+ .agents-connections { width:100%; font-size:14px; margin-top:32px; }+ .agents-connection-paths { grid-template-columns:1fr; gap:32px; }+ .agents-connection-path h3 { font-size:18px; }+ .agents-mcp-disclosure { margin-top:32px; }}-@media (max-width: 699px) {- .agents-page-providers {- width: 100%;- justify-content: flex-start;- gap: 24px 32px;- padding-block: 28px;- }+/* Two intentional lines stay below the width of the hero’s second line. */+.agents-hero .email-page-hero-description { white-space: nowrap; }+.agents-hero .email-page-hero-break { display: block; }+@media (max-width:699px) {+ .agents-hero .email-page-hero > .email-page-hero-description { font-size:clamp(10px, 2.9vw, 14px); }}diff --git a/apps/marketing/src/features/marketing/views/calls-page.css b/apps/marketing/src/features/marketing/views/calls-page.cssnew file mode 100644index 0000000000..3391f35d0d--- /dev/null+++ b/apps/marketing/src/features/marketing/views/calls-page.css@@ -0,0 +1,63 @@+/* Calls owns its presentation overrides; the shared product pages stay intact. */+.calls-page .email-page-hero { padding-bottom: 40px; }+.calls-page .email-page-hero > .email-page-hero-description { max-width: 720px; text-wrap: balance; }+.calls-scene-picker { display: flex; justify-content: center; gap: 24px; margin-bottom: 22px; }+.calls-scene-picker button { padding: 8px 0; border-bottom: 1px solid transparent; color: #888; font: 400 14px/1.5 'Inter Variable', Inter, sans-serif; }+.calls-scene-picker button[aria-pressed=true] { color: #eee; border-color: #eee; }+.calls-scene-picker button:focus-visible { outline: 2px solid #aaa; outline-offset: 5px; border-radius: 2px; }+.calls-page .email-desktop-demo { --desktop-stage-width: min(1120px, 92vw); }+.calls-page .email-desktop-wallpaper { padding: 32px; }+.calls-page .email-desktop-content { height: 520px; }+.calls-page .email-desktop-content .product-demo { mask-image: none; -webkit-mask-image: none; }+.calls-page .email-desktop-content .product-demo-stage::before { display: none; }+.calls-page .email-desktop-content .call-record-column { padding-top: 24px; }+.calls-page .email-desktop-content .call-record-column > .flex { gap: 24px; }+.calls-page .product-prose a { color: #ddd; text-decoration: underline; text-underline-offset: 3px; }+.calls-page .call-task-pane .call-record-column { padding: 24px 18px; }+.calls-page .call-task-pane .call-record-column > .flex { gap: 24px; }+.calls-page .call-agent-log { gap: 20px; }+.calls-page .call-agent-composer { margin-top: auto; }+.calls-page .homepage-feature-end { width: min(872px, 100%); margin-inline: auto; }+@media (max-width: 699px) {+ .calls-page .email-desktop-demo { --desktop-stage-width: calc(100vw - 24px); }+ .calls-page .email-desktop-wallpaper { padding: 16px 10px; }+ .calls-page .email-desktop-content { height: 540px; }+ .calls-page .call-agent-composer { display: block; }+ .calls-page .call-task-pane [data-view-shell-top-bar] { display: flex; }+ .calls-page .call-record-column > .flex { gap: 24px; }+}++/* The conversation is the starting point; only explicit links open a split. */+.calls-page .call-split { display: flex; }+.calls-page .call-agent-pane { flex: 1; overflow: hidden; }+.calls-page .call-agent-log { width: 100%; max-width: 680px; margin-inline: auto; flex: 1; min-height: 0; flex-shrink: 1; }+.calls-page .call-agent-composer { width: 100%; max-width: 680px; margin-inline: auto; flex-shrink: 0; }+.calls-page .call-split[data-opened] > .call-pane { flex: 1; }+.calls-page .call-linked-content { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }+.calls-page .call-linked-content > [data-view-shell-top-bar] { display: none; }+.calls-page .call-close-item { display: grid; place-items: center; margin-left: auto; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; }+.calls-page .call-close-item:hover { background: var(--color-hover); }+.calls-page .call-close-item:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }+.calls-page .call-split:not([data-opened]) .call-tool-text { overflow: visible; }+.calls-page .call-split:not([data-opened]) .call-agent-text { max-width: 580px; }+@media (max-width: 699px) {+ .calls-page .call-agent-pane { max-height: none; }+ .calls-page .call-split[data-opened] > .call-agent-pane { display: none; }+ .calls-page .call-task-pane { border: 0; }+}++/* Three sections, with balanced navigation at every width. */+.calls-page .feature-page-jump-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }+.calls-page .feature-page-jump-links .email-feature-graphic { max-width: 100%; }++.calls-page .agent-mention:focus-visible, .calls-page .call-item-preview:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }++/* Let the longer hero taper naturally on phones instead of isolating “Turn your”. */+@media (max-width: 699px) {+ .calls-page .email-page-hero { padding-inline: 0; }+ .calls-page .email-page-hero h1 { width: 100%; font-size: clamp(24px, 7.4vw, 50px); text-wrap: wrap; }+ .calls-page .email-page-hero h1 span { display: inline; }+ .calls-page .email-page-hero h1 span:first-child::after { content: ' '; }+ .calls-page .email-page-hero-break { display: block; }+ .calls-page .email-page-hero > .email-page-hero-description { font-size: clamp(11px, 3.6vw, 14px); text-wrap: nowrap; }+}diff --git a/apps/marketing/src/styles/dark-theme.css b/apps/marketing/src/styles/dark-theme.cssindex 1953f1618a..163f90347e 100644--- a/apps/marketing/src/styles/dark-theme.css+++ b/apps/marketing/src/styles/dark-theme.css@@ -1,17 +1,17 @@-/* Snapshot of the website palette; intentionally independent of the app. */+/* Frozen app dark-theme tokens; no runtime dependency on the app. */:root {- --color-surface-0: oklch(0.17 0.002 250deg);- --color-surface-1: color-mix(in oklch, var(--color-surface-0) 97%, var(--color-content-0));- --color-surface-2: color-mix(in oklch, var(--color-surface-0) 95%, var(--color-content-0));- --color-surface-3: color-mix(in oklch, var(--color-surface-0) 93%, var(--color-content-0));- --color-surface-4: color-mix(in oklch, var(--color-surface-0) 91%, var(--color-content-0));+ --color-surface-0: oklch(0.17 0 0);+ --color-surface-1: oklch(0.1949 0 0);+ --color-surface-2: oklch(0.2115 0 0);+ --color-surface-3: oklch(0.2281 0 0);+ --color-surface-4: oklch(0.2447 0 0);--color-content-0: oklch(1 0 21deg);--color-content-1: oklch(0.83 0 21deg);--color-content-2: oklch(0.75 0 21deg);--color-content-3: oklch(0.63 0 21deg);--color-content-4: oklch(0.55 0 21deg);--color-edge: var(--color-surface-4);- --color-edge-muted: var(--color-surface-2);+ --color-edge-muted: var(--color-surface-3);--color-accent: oklch(0.7 0.12 250deg);--color-red: oklch(0.75 0.2 25.331deg);--color-orange: oklch(0.75 0.2 47.604deg);diff --git a/apps/marketing/vitest.config.ts b/apps/marketing/vitest.config.tsindex 3067457526..e6f2ad9f0e 100644--- a/apps/marketing/vitest.config.ts+++ b/apps/marketing/vitest.config.ts@@ -1,3 +1,4 @@+import { realpathSync } from 'node:fs';import path from 'node:path';import solid from 'vite-plugin-solid';import solidSvg from 'vite-plugin-solid-svg';@@ -7,6 +8,14 @@ import { solidSvgOptions } from './vite.svgo';export default defineConfig({root: import.meta.dirname,+ server: {+ fs: {+ allow: [+ path.resolve(import.meta.dirname, '../..'),+ realpathSync(path.resolve(import.meta.dirname, '../../node_modules')),+ ],+ },+ },plugins: [tsconfigPaths({projects: [path.resolve(import.meta.dirname, 'tsconfig.json')],