1A command to run, with the platforms it differs across.
2
3## Align moves the row, not the field
4
5The field fills its container and stays exactly where it is in both
6alignments. `align` governs the platform row beneath it and nothing
7else.
8
9That is what the comps show — the same field in the same place, with the
10row left or centred — and it is why centring the block as a whole
11belongs to whatever is holding it. The centred hero does that; the
12command does not do it to itself.
13
14## One line, always
15
16A long command scrolls rather than wraps. Wrapping grows the box and
17shoves the platform row around as you switch between commands of
18different lengths, which is the kind of movement that makes a page feel
19unstable for no benefit. The scrollbar is hidden; the copy button means
20reading the tail is rarely the point.
21
22The command is left-aligned inside the field regardless of what the
23block around it is doing. A centred hero sets `text-align: center` on
24everything beneath it, which floated the command into the middle and
25left the `$` stranded at the edge.
26
27## Switching platform clears the confirmation
28
29Otherwise the tick sits there claiming you copied a command that is no
30longer on screen.
31
32## Platform order is data
33
34The Agent CLI lists Mac, Linux, Windows using `src/lib/agent-cli.ts`.
35The Terminal lists Mac, Windows and a Linux download destination in its
36page composition. It has no canonical Linux one-liner: the Linux action
37links to the package picker rather than inventing a command.
38
39## Existing attribution is additive
40
41A platform's optional `copyTrackingEvent` attaches an existing registry
42event to the copy button for delegated click tracking, independent of the
43clipboard result. Terminal uses the frozen Homebrew/winget header events;
44the download footer uses the corresponding footer events without properties.
45These preserve `src/components/elements/install-command.tsx`.
46
47`extraTrackingEvent` independently reports an install interaction.
48`copyTrackingTiming` defaults to `success` for unrelated shared consumers;
49public Terminal and Agent CLI explicitly choose `attempt` to preserve
50`src/components/elements/install-command-tabs.tsx`:
51
52- Terminal copies emit `download in hero clicked` with `{os}` even when
53 clipboard access fails. Its delegated `brew install in header clicked `
54 or `winget install in header clicked ` fires first, with no custom
55 properties. The trailing spaces are part of those frozen names.
56- Agent CLI emits
57 `marketing_site_tracks.agent_cli.cta_install_command_in_hero.copy` with
58 `{os}` on the attempt. Despite its name, it is not a success-only metric.
59- Download footer commands emit `brew install in footer clicked` or
60 `winget install in footer clicked` through `copyTrackingEvent`, with no
61 custom properties and no additional programmatic event.
62- Timing applies only to copies. Terminal's Linux link retains
63 `{os: 'linux', href: '/download'}` and its mobile email-sheet opening
64 retains `{surface: 'mobile'}` on the existing hero event. Opening the
65 sheet is not a submitted email. Platform selection alone is untracked.
66
67Only a completed clipboard write creates new “Copied” feedback. An
68analytics failure cannot block the write; a stale completion cannot confirm
69a different command after switching platforms. Repeated activations count
70as separate attempts; resolving a write never repeats its attempt event.
71Do not use both tracking fields for the same event.
72
73`TerminalPageInteractions.test.tsx` covers exact SDK ordering, pending/
74failed/missing clipboard APIs, repeated attempts and unavailable analytics.
75`AgentCliPageInteractions.test.tsx` verifies page-level opt-in and keeps the
76Home/download-card CLI pickers intentionally untracked.
77`DownloadPage.test.tsx` owns property-free footer attempt coverage.