Skip to content

Restore original Scarf tracking alongside namethathost - #1250

Merged
tannerlinsley merged 1 commit into
mainfrom
taren/restore-scarf-comparison
Sep 11, 2026
Merged

tannerlinsley merged 1 commit into
mainfrom
taren/restore-scarf-comparison

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Restores the original Scarf component, all ten library pixel IDs, library route integration, and the existing ID validation test exactly as they were before removal. Scarf runs alongside namethathost so company attribution can be compared.

Validation: restored files match the pre-removal commit byte for byte. pnpm test passed (501 passed, one skipped), and pnpm build passed. The privacy policy and namethathost integration are unchanged.

Summary by CodeRabbit

  • New Features

    • Added lightweight analytics tracking across supported library pages.
    • Tracking updates automatically as visitors navigate between pages.
  • Tests

    • Added validation to ensure analytics identifiers use the expected UUID format.

@tannerlinsley
tannerlinsley merged commit 86ac25f into main Sep 11, 2026
5 of 7 checks passed
@tannerlinsley
tannerlinsley deleted the taren/restore-scarf-comparison branch September 11, 2026 15:42
@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 69e3fb73-fc9e-400f-8282-c103f28b9bee

📥 Commits

Reviewing files that changed from the base of the PR and between ccd35ee and 9f53a57.

📒 Files selected for processing (5)
  • src/components/Scarf.tsx
  • src/libraries/libraries.ts
  • src/libraries/types.ts
  • src/routes/_library/$libraryId/route.tsx
  • tests/static-data-contracts.test.ts

📝 Walkthrough

Walkthrough

The change adds optional Scarf identifiers to library metadata, validates their UUID format, introduces a mounted tracking image, and renders it for library routes that define an identifier.

Changes

Scarf analytics tracking

Layer / File(s) Summary
Library identifier contract
src/libraries/types.ts, src/libraries/libraries.ts, tests/static-data-contracts.test.ts
LibrarySlim now supports scarfId. Ten libraries define UUID values, and tests validate their format.
Scarf tracking image
src/components/Scarf.tsx
Scarf renders a transparent, keyed image after mount. The request includes the library identifier and router location key.
Library route integration
src/routes/_library/$libraryId/route.tsx
The route renders Scarf beside the outlet when the resolved library has a scarfId.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant RouteForm
  participant Scarf
  participant RouterState
  participant ScarfEndpoint
  RouteForm->>Scarf: Render with scarfId
  Scarf->>RouterState: Read locationKey
  Scarf->>ScarfEndpoint: Request tracking image
Loading

Suggested reviewers: alemtuzlak

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch taren/restore-scarf-comparison

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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