Skip to content

Report Following v2 new posts pill impressions, presses and hides - #11959

Draft
mozzius wants to merge 5 commits into
samuel/app-3158-following-metricsfrom
samuel/app-3101-following-pill-events
Draft

mozzius wants to merge 5 commits into
samuel/app-3158-following-metricsfrom
samuel/app-3101-following-pill-events

Conversation

@mozzius

@mozzius mozzius commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Fixes APP-3101. Stacked on #11957.

What it does

  • Impressions. The first time the new posts pill shows an offer, it reports:

    • what put the pill up, a restore or a significant return. This comes from the staged page it was offered with, and stays the same as later pages join.
    • how many posts it offered;
    • whether it showed a facepile or a count.

    An offer counts once, however many later posts join it. It only counts while Home Following is on screen, so a pill that comes down unseen reports nothing.

  • Presses report the same, plus how long the pill had been showing. A press is reported as the pill comes down, so it can't be counted twice.

  • Hides report why the pill came down, and the count it last showed and how long it was up. The reasons:

    • the reader reached the top;
    • they pressed it;
    • its pages left the feed, for example on a refresh (replaced);
    • its pages are still there but none of their posts render (gone).
  • The pill reports for itself. It keeps what put it up and why it came down in its own state. pillMetrics.ts only turns that into events.

  • Gated. Only Home Following on iOS and Android with Following v2 on reports anything. Volume is low, at most one of each event per offer, and nothing about the posts or their authors is reported.

Known issues

  • An offer still up when the view unmounts reports no hide.

Test plan

  • pnpm test src/features/followingV2 src/lib/appState (305 tests), pnpm typecheck, pnpm lint.
  • Unit tests:
    • what put the pill up and why it came down (usePrependPill);
    • one impression per offer;
    • a press reported as the pill comes down;
    • unseen offers, and reporting disabled (pillMetrics).
  • Through the renderHome harness:
    • a warm-open impression, then a hide at the top;
    • later checks joining without a second impression;
    • the press payload;
    • a refresh replacing the feed;
    • a restore's impression only once it's on screen.
  • Device:
    • one impression per offer, on a cold restore and on a significant return;
    • press and hide reasons in the debug metrics log;
    • nothing on hops, with the flag off, or on web.

🤖 Generated with Claude Code

@mozzius
mozzius added this pull request to stack #11943 October 12, 2026 18:09
@linear-code

linear-code Bot commented Oct 12, 2026

Copy link
Copy Markdown

APP-3101

@mozzius mozzius changed the title samuel/app 3101 following pill events Report Following v2 new posts pill impressions, presses and hides Oct 12, 2026
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor
Size Old size New size Diff
Uncompressed 9.67 MB 9.68 MB +7.92 KB (0.08%)
Gzip 2.84 MB 2.84 MB +2.83 KB (0.10%)

@mozzius
mozzius force-pushed the samuel/app-3101-following-pill-events branch from a6f2bd4 to c222eb3 Compare October 13, 2026 11:55
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

The OTA deployment for this PR was successful! You may now apply it by either scanning the QR code or opening the deep link below in your browser:

QR code for the PR OTA deployment

bluesky://intent/apply-ota?channel=pull-request-11959&releaseVersion=1.138.0&iosBuildNumber=2263&androidBuildNumber=1704

@mozzius
mozzius force-pushed the samuel/app-3101-following-pill-events branch from c222eb3 to 07d5eb0 Compare October 14, 2026 08:04
@mozzius
mozzius force-pushed the samuel/app-3101-following-pill-events branch from 07d5eb0 to 242e696 Compare November 3, 2026 15:01
@mozzius
mozzius force-pushed the samuel/app-3101-following-pill-events branch from 242e696 to 8c2ecb2 Compare November 5, 2026 15:16
mozzius and others added 5 commits November 9, 2026 20:05
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…came down

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mozzius
mozzius force-pushed the samuel/app-3101-following-pill-events branch from 8c2ecb2 to 7cb5ffa Compare November 9, 2026 18:11

This branch has not been deployed

No deployments
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