# Application Activity: Edit History Diff

Document version history with a selectable edit list on the left and an inline before and after diff panel on the right using theme token opacity.

- Page: https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/edit-history-diff
- Collection: [Application](https://www.shadcn-ui-blocks.com/blocks/application-pro), Standard tier
- Group: [Activity](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity)
- Created: 2026-06-15
- Preview image: https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/edit-history-diff.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/application-pro-activity-edit-history-diff
```

Needs an API key from a Pro or Team plan: add `@shadcn-ui-blocks` to the registries in components.json with the key as an `Authorization: Bearer` header. Setup: https://www.shadcn-ui-blocks.com/docs/shadcn-cli. The MCP server installs it without the setup: https://www.shadcn-ui-blocks.com/docs/mcp.

## Depends on

- shadcn/ui components: avatars
- Installs to: `@/components/blocks/application-pro/activity/edit-history-diff`

## About this block

Edit History Diff is the change-review surface: a two-panel
layout where the left column lists five versions of the
Pricing page (Maya Chen rewording the CTA, Priya Nair
clarifying the pricing section, Avery Stone adding the
feature comparison table, down to Noah Park initial draft)
and the right panel shows the selected edit as an inline
diff. Added runs get bg-foreground/10 and font-medium;
removed runs get bg-foreground/5 and line-through. A
legend below the diff names Added and Removed with color
swatches. The footer says the history is read-only and
cannot be deleted, which is the audit guarantee.

Edits are one typed array with a selected flag; diffLines
is a separate typed array of segment arrays. Theme-token
opacity replaces literal green and red so the diff reads
on dark and light themes without special-casing.

## When to use

Reach for this block on a document detail page or a
settings audit panel, wired to your document version
history API. The selected edit state should be driven by
the URL or click state in the real implementation.

A natural flow around it on an Application Pro page:

**Before**

- [App shell](https://www.shadcn-ui-blocks.com/blocks/application-pro/app-shells)
- [Activity feed](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity)

**After**

- [Activity feed](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity)
- [Settings page](https://www.shadcn-ui-blocks.com/blocks/application-pro/settings-pages)

## What you can display

One strong use is the document version diff for a content
or copy workflow. Other diff surfaces:

- **Config diff.** Diff lines become JSON or YAML property
  changes for settings or feature-flag history.
- **Code review snippet.** The right panel shows a code
  hunk with the same token-opacity diff style.
- **Form field audit.** Each edit entry is a field change
  on a record, useful in CRM or admin tools.

> Tip: the read-only footer is the one place in a product
> where admitting a constraint builds more trust than
> hiding it; keep it.

## More in Application Activity

- [Activity Calendar](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/activity-calendar)
- [Activity Heatmap](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/activity-heatmap)
- [Approvals Queue](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/approvals-queue)
- [Audit Export Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/audit-export-card)
- [Audit Trail Timeline](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/audit-trail-timeline)
- [Automation Run Log](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/automation-run-log)
- [Catch Up Digest](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/catch-up-digest)
- [Changelog Feed](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/changelog-feed)
- [Comment Mentions List](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/comment-mentions-list)
- [Comment Thread Panel](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/comment-thread-panel)
- [Deploy Activity Feed](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/deploy-activity-feed)
- [Filtered Activity Log](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/filtered-activity-log)
- [Inactivity Watch Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/inactivity-watch-card)
- [Live Presence Bar](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/live-presence-bar)
- [Member Activity Panel](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/member-activity-panel)
- [Mention Feed](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/mention-feed)
- [Pinned Updates Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/pinned-updates-card)
- [Project Activity Breakdown](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/project-activity-breakdown)
- [Reaction Activity Feed](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/reaction-activity-feed)
- [Sign In Activity List](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/sign-in-activity-list)
- [Status Change Log](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/status-change-log)
- [Team Activity Feed](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/team-activity-feed)
- [Team Pulse Card](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/team-pulse-card)
- [Version History List](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/version-history-list)
- [Who Did What Table](https://www.shadcn-ui-blocks.com/blocks/application-pro/activity/who-did-what-table)
