Skip to content

feat(briefing): share controls on the briefing surfaces - #6563

Draft
tomeredlich wants to merge 3 commits into
snapshot-post-page-variationsfrom
claude/snapshot-briefing-preview
Draft

feat(briefing): share controls on the briefing surfaces#6563
tomeredlich wants to merge 3 commits into
snapshot-post-page-variationsfrom
claude/snapshot-briefing-preview

Conversation

@tomeredlich

@tomeredlich tomeredlich commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Stacked on snapshot-post-page-variations (#6556). Adds share controls to the two briefing surfaces — the list at /briefing and the briefing itself — all behind briefing_share_controls, default false.

Snapshot of the briefing as an object is deliberately out. The premise behind it does not survive a read of the code: a brief is a normal post at /posts/{slug} (BriefListItem.tsx), so a link resolves for the recipient, and useSharePost.copyLink already shortens it and tags it with ReferralCampaignKey.SharePost. The one image that earns its place is the Must know card, whose payload is the bullets rather than the brief.

The briefing header

BriefPostHeaderActions wrapped its cluster in hidden laptop:block, and BriefPostContent is the only caller passing showShareButton — so a working, tracked copy button existed and was invisible at the widths where most briefings are read. The wrapper is gone, a share arrow joins it for the popover on desktop and the native sheet on mobile, and the settings gear moves to Tertiary so the three read at one weight. BriefPostHeader's kicker row gains a shrink guard, since it never had to survive a narrow row while the actions were desktop-only.

The /briefing rows

#6353's pairing: copy and the share arrow in one container after the CardLink with relative z-1, or the full-bleed overlay swallows the clicks. The text column drops w-full — it claimed the whole card and pushed the controls past its border — and rows without controls keep their original DOM.

Inside the briefing

  • The post page's highlight bar, scoped to a body container so a selection in the header or the preferences card never raises it.
  • A copy icon per bullet and paragraph, carrying the text and the brief link. Each is labelled with what it copies.
  • A Snapshot on the Must know heading that captures that section's bullets as one card.
  • A closing band, which is feat(share): flat end-of-conversation band + split copy-link button #6369's ShareBand with the briefing's copy.

The body is a single <Markdown content={contentHtml} />, so none of the three in-body controls can be declared in JSX. briefBodyBlocks.ts reads the blocks back out of the rendered DOM — also the most faithful source, being what the reader sees — and the controls are portalled into them. Hosts are marked with data-brief-control and swept before each run, because Markdown re-renders on its own for hover cards and the image modal.

Notes for review

  • The Must know lookup matches on heading text, so it is English- and format-dependent: if briefs ship other section names, that button stops appearing (the per-block copy icons degrade individually). A backend anchor would be the durable fix.
  • Nothing renders with the flag off, and no existing DOM changes on that path.

🤖 Generated with Claude Code

Copy confirmation

All four copy controls here — the header, the list row and one per body block — confirm on the button that was pressed: the icon swaps to the upvote button's filled avocado arrow and spins through copy-confirm, the same 0.4s curve as its spinAndScale, off under prefers-reduced-motion.

Two of them had no way to know a copy had landed: useSharePost was discarding useCopyPostLink's flag. It now returns isCopying, available to every consumer. CopyStateIcon takes the glyph it rests on, so a link control keeps its link icon rather than switching to a clipboard.

Review links

Preview domain

https://claude-snapshot-briefing-preview.preview.app.daily.dev

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
daily-webapp Ready Ready Preview Sep 3, 2026 1:27pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
storybook Ignored Ignored Sep 3, 2026 1:27pm UTC

Request Review

tomeredlich and others added 3 commits September 3, 2026 16:11
The briefing was not missing a share control, it was hiding one:
BriefPostHeaderActions wraps the cluster in `hidden laptop:block` and
BriefPostContent is its only caller passing `showShareButton`, so a
working copy button existed and was invisible on the widths where most
briefings are read. Dropping the wrapper is the whole change there, with
a share arrow beside it for the popover on desktop and the native sheet
on mobile, and the settings gear moved to Tertiary so the three controls
read at one weight.

On the /briefing rows, #6353's pairing: copy and the arrow in one
container after the CardLink with `relative z-1`, or the full-bleed
overlay swallows the clicks. The text column gives way to them —
`w-full` claimed the whole card and pushed the controls past its border —
and rows without controls keep their original DOM.

The header's kicker row never had to survive a narrow width while the
actions were desktop-only, so it gains a shrink guard.

`briefing_share_controls` gates all of it, default false.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three controls inside the brief itself:

- The post page's highlight bar (#6556), scoped to a body container so a
  selection in the header or the preferences card never raises it.
- A copy icon per bullet and paragraph, carrying the text and the brief
  link, after #6350's copy-summary icon. Each one is labelled with what
  it copies, since a brief carries a column of them.
- A Snapshot on the Must know heading that captures its bullets as one
  card, with the claim before the colon as each line.

None of these can be declared in JSX: the body is a single `<Markdown
content={contentHtml} />`, so briefBodyBlocks reads the blocks back out
of the rendered DOM — which is also the most faithful source, being what
the reader is looking at — and the controls are portalled into them.
Hosts are marked and swept before each run, because Markdown re-renders
on its own for hover cards and the image modal.

The closing band is #6369's ShareBand with the briefing's copy, so it
cannot drift from the end-of-conversation band it was asked to match.

All of it sits behind `briefing_share_controls`, default false.

Mockup-to-eng-pass: 1

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The briefing has four copy controls — the header, the list row, and one
per body block — and all four relied on the toast alone. useSharePost
was discarding useCopyPostLink's flag, so two of them had no way to know
a copy had landed; it now returns isCopying, which any consumer can use.

CopyStateIcon takes the glyph it rests on, so a link control keeps its
link icon and still lands on the upvote arrow.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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