Skip to content

refactor(ui): rebuild activity UI on @datum-cloud/datum-ui#194

Merged
mattdjenkinson merged 1 commit intomainfrom
feat/activity-ui-refactor
May 1, 2026
Merged

refactor(ui): rebuild activity UI on @datum-cloud/datum-ui#194
mattdjenkinson merged 1 commit intomainfrom
feat/activity-ui-refactor

Conversation

@mattdjenkinson
Copy link
Copy Markdown
Contributor

@mattdjenkinson mattdjenkinson commented May 1, 2026

Summary

Rebuilds the activity UI to consume @datum-cloud/datum-ui as a peer dependency and converts the activity feed, events, and audit views to table + timeline layouts with manual pagination. This is the UI half of the work previously bundled in #192; the matching backend display-name enrichment ships in #193.

What changes

Design system migration

  • Promote @datum-cloud/datum-ui to a peer dependency
  • Replace local shadcn primitives with datum-ui exports where possible
  • Drop Tailwind/PostCSS configs and unused local components
  • Externalize peer deps in rollup.config.mjs
  • Update Dockerfile to drop postcss/tailwind copies

Layout refactor

  • Convert ActivityFeed, EventsFeed, AuditLogQueryComponent to table/timeline views
  • Manual "Load more" pagination (replaces auto-scroll observer that was misfiring on tab switches)
  • Add Timestamp component using Intl.DateTimeFormat for timezone-aware rendering with a single tooltip
  • Add reusable details-panel primitives in components/details.tsx; apply across activity/audit/event expanded views
  • Truncation with tooltips on summary/notes columns
  • Tooltip shim renders Radix Tooltip directly (mirroring datum-ui styles) so flex truncation actually engages
  • Normalize toolbar styling, filter chips, and details-panel padding across feeds
  • Remove "unsaved changes" badge

Display name support

  • Mirror displayName / email (both optional) on Actor and ActivityLink TS types
  • Render actor.displayName ?? actor.name with email/UID hover; user-typed link markers swap in displayName as visible text
  • Falls back cleanly when backend hasn't populated the new fields, so this PR can land independently of feat(activity): enrich activities with iam User display names #193

Tooltip / truncation notes

datum-ui's Tooltip wraps the trigger in a relative inline-flex span which broke parent flex truncation. To keep datum-ui's visual styling, the local Tooltip in ui/tooltip.tsx re-implements Radix Tooltip directly with the same class tokens — same look, no flex-chain breakage.

Screenshot 2026-05-01 at 16 27 29 Screenshot 2026-05-01 at 13 55 32 Screenshot 2026-05-01 at 13 55 40 Screenshot 2026-05-01 at 13 55 54 Screenshot 2026-05-01 at 13 56 07 Screenshot 2026-05-01 at 14 09 47

Rebuild the activity UI to consume @datum-cloud/datum-ui as a peer
dependency, replacing local shadcn primitives with the shared design
system and converting the activity feed/events/audit views into
table + timeline layouts with manual pagination.

Key changes:
- Promote @datum-cloud/datum-ui to peer dep; remove local copies of
  primitives in favor of datum-ui exports
- Convert ActivityFeed, EventsFeed, AuditLogQueryComponent to
  table/timeline views with manual "Load more" pagination
- Add Timestamp component using Intl.DateTimeFormat for timezone-aware
  rendering with single tooltip
- Add details panel primitives in components/details.tsx and apply to
  expanded views (activity, audit, event)
- Add tooltip shim that renders Radix Tooltip directly with mirrored
  datum-ui styles to keep truncation working
- Mirror DisplayName/Email enrichment fields on Actor and ActivityLink
  TS types so the UI can render display names + email/UID hover when
  the backend populates them
- Normalize toolbar styling, filter chip layout, and details-panel
  padding across feeds; remove "unsaved changes" badge
- Drop tailwind/postcss configs and unused local UI components;
  externalize peers in rollup config
- Update Dockerfile to drop postcss/tailwind copies
@mattdjenkinson mattdjenkinson merged commit fb57c06 into main May 1, 2026
7 checks passed
@mattdjenkinson mattdjenkinson deleted the feat/activity-ui-refactor branch May 1, 2026 16:37
scotwells added a commit that referenced this pull request May 4, 2026
The activity-ui example app (served as the activity-ui pod) is crashing
in staging with CrashLoopBackOff (272+ restarts) because the Docker image
is missing the @datum-cloud/datum-ui package at runtime:

  Error: Cannot find package '@datum-cloud/datum-ui' imported from
  /app/build/server/index.js

The Dockerfile uses `pnpm deploy --filter activity-ui-example --prod`
which only copies `dependencies` into the production image. When PR #194
promoted @datum-cloud/datum-ui to a peer dependency of the activity-ui
library, it was never added to the example app's own `dependencies`, so
pnpm deploy excluded it from the container.

Fix: add @datum-cloud/datum-ui ^0.8.0 to dependencies in
ui/example/package.json so it is included in the production image build.
scotwells added a commit that referenced this pull request May 4, 2026
## Problem

The `activity-ui` pod in staging is in CrashLoopBackOff (272+ restarts)
with the following error:

```
Error: Cannot find package '@datum-cloud/datum-ui' imported from /app/build/server/index.js
```

## Root Cause

PR #194 promoted `@datum-cloud/datum-ui` to a **peer dependency** of the
`@datum-cloud/activity-ui` library (`ui/package.json`) — which is
correct for the published package. However, the example app
(`ui/example/package.json`) was never updated to include
`@datum-cloud/datum-ui` in its own `dependencies`.

The Dockerfile builds the image using `pnpm deploy --filter
activity-ui-example --prod`, which only copies `dependencies` (not
`devDependencies` or peer dependencies of workspace siblings) into the
production image at `/deploy/node_modules`. As a result,
`@datum-cloud/datum-ui` is absent from the container, and the Remix
server bundle can't resolve it at runtime.

## Fix

Add `@datum-cloud/datum-ui: ^0.8.0` to `dependencies` in
`ui/example/package.json`. This ensures `pnpm deploy --prod` includes
the package in the production image.

## Test Plan

- [ ] Verify Docker image builds successfully with the fix
- [ ] Confirm the `activity-ui` pod starts without the `Cannot find
package` error in staging
- [ ] Verify activity UI renders correctly end-to-end
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.

2 participants