Skip to content

feat: entity grid enrichment — member previews, activity stamps, grid polish#877

Open
flipvh wants to merge 3 commits into
mainfrom
feat/entity-grid-enrichment
Open

feat: entity grid enrichment — member previews, activity stamps, grid polish#877
flipvh wants to merge 3 commits into
mainfrom
feat/entity-grid-enrichment

Conversation

@flipvh

@flipvh flipvh commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Three additions that together power richer context-entity grids (tile views with member avatars and activity recency), each independently usable:

feat(backend): member preview avatars on context entity lists (include=members)

A third include option for context entity list endpoints: up to 3 member previews for the entity's most-privileged role, fetched in one batched ROW_NUMBER query per page. Feeds tile-grid avatar stacks; overflow counts come from the existing m:{role} counters.

feat(cdc): per-context activity stamps (last:{type}) in context counters

Counters JSONB gains last:<productType> keys: epoch ms of the latest live row created in the context's own stream, stamped at the home context only (deepest non-null ancestor) — not fanned out to ancestors like e: deltas. Merges via max everywhere (JS batch merge + apply_count_deltas), surfaces as counts.activity on context entity reads, and recalculation recomputes it from MAX(created_at) of live rows grouped by home context.

feat(frontend): entity grid polish

EntityGridBar accepts a sortOptions prop (exported option type, the hardcoded pair becomes the default), navTab staticData gains an order field with a stable sort in useNavTabs (default 0, lower first, ties keep route order), and the grid tile drops its Organization coupling for a structural type so any context entity with included counts fits without casts.

Tests

  • pnpm check (sdk gen, typecheck all packages, lens check, biome) — clean
  • backend: 399 passed, cdc: 147 passed, frontend: 625 passed

🤖 Generated with Claude Code

flipvh and others added 3 commits July 12, 2026 12:27
…e=members)

Add a third include option 'members' for context entity list endpoints:
up to 3 member previews for the entity's most-privileged role, fetched in
one batched ROW_NUMBER query per page. Feeds tile-grid avatar stacks;
overflow counts come from the existing m:{role} counters.

Co-Authored-By: Claude Fable 5 <[email protected]>
Counters JSONB gains last:<productType> keys: epoch ms of the latest live
row created in the context's own stream, stamped at the home context only
(deepest non-null ancestor) — not fanned out to ancestors like e: deltas.
Merges via max everywhere (JS batch merge + apply_count_deltas), surfaces
as counts.activity on context entity reads, and recalculation recomputes
it from MAX(created_at) of live rows grouped by home context.

Co-Authored-By: Claude Fable 5 <[email protected]>
… generic tile typing

EntityGridBar accepts a sortOptions prop (exported option type, hardcoded
pair becomes the default), navTab staticData gains an order field with a
stable sort in useNavTabs (default 0, lower first, ties keep route order),
and the grid tile drops its Organization coupling for a structural type
so any context entity with included counts fits without casts.

Co-Authored-By: Claude Fable 5 <[email protected]>
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