Skip to content

feat: track new LA click types via data-feature-name#152

Open
yodem wants to merge 1 commit into
waiting-sourcefrom
feature/sc-44684/collect-data-in-la-for-new-types-of-clicks
Open

feat: track new LA click types via data-feature-name#152
yodem wants to merge 1 commit into
waiting-sourcefrom
feature/sc-44684/collect-data-in-la-for-new-types-of-clicks

Conversation

@yodem

@yodem yodem commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

⛔ DO NOT MERGE until initial_location_link is wired to the context chip

Three of the four labels from sc-44684 are implemented here. The fourth,
initial_location_link (pin-in-location), attaches to the context chip,
which does not exist on waiting-source. The tracking mechanism is already in
place, so wiring it is a one-line data-feature-name="initial_location_link"
once the chip lands. Merging before then ships an incomplete story.

Implements sc-44684 (3 of 4 labels).

New assistant_click feature_names via a dedicated data-feature-name
attribute, read by the host click tracker before the generic link/aria-label
logic (so anchors report clean labels without degrading accessibility):

  • appetizer topics → related_topics_link
  • thinking toggle → thinking_steps_toggle
  • thinking ref link → thinking_steps_text_link
  • deferred: initial_location_link (context chip — not on this base)

Validation: needs to be verified in cauldron before deploy (per story).

🤖 Generated with Claude Code

Report new assistant_click feature_names via a dedicated data-feature-name
attribute, read by the host click tracker before the generic link/aria-label
logic so anchors report clean labels without degrading accessibility:

- appetizer topics  -> related_topics_link (drop stopPropagation so the click
                       reaches the host tracker; keep preventDefault)
- thinking toggle   -> thinking_steps_toggle
- thinking ref link -> thinking_steps_text_link

initial_location_link (pin-in-location / context chip) is deferred: that
element is not present on this base and is wired in one line once it lands.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gitvelocity-reviewer

Copy link
Copy Markdown

📊 Code Quality Score: 6/100

22 × 0.25 = 5.5, rounded to 6

Category Score Factors
🔭 Scope 5/20 3 files, single analytics subsystem, no new APIs or endpoints
🏗️ Architecture 4/20 Introduces data-feature-name convention for analytics priority; minor but deliberate architectural pattern
⚙️ Implementation 4/20 Simple DOM path traversal, attribute lookup, guard clause; removal of stopPropagation is a meaningful behavioral change
⚠️ Risk 5/20 Removing stopPropagation changes event propagation behavior; analytics changes are low-risk but propagation change could affect other handlers
✅ Quality 3/15 Good inline comments explaining intent and design decisions; no tests added for behavioral change
🔒 Perf / Security 1/5 Defensive typeof window.gtag guard is good practice

Was this score accurate? 👍 Yes · 👎 No

Scored by GitVelocity · How are scores calculated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant