feat: entity grid enrichment — member previews, activity stamps, grid polish#877
Open
flipvh wants to merge 3 commits into
Open
feat: entity grid enrichment — member previews, activity stamps, grid polish#877flipvh wants to merge 3 commits into
flipvh wants to merge 3 commits into
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
includeoption for context entity list endpoints: up to 3 member previews for the entity's most-privileged role, fetched in one batchedROW_NUMBERquery per page. Feeds tile-grid avatar stacks; overflow counts come from the existingm:{role}counters.feat(cdc): per-context activity stamps (
last:{type}) in context countersCounters 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 likee:deltas. Merges via max everywhere (JS batch merge +apply_count_deltas), surfaces ascounts.activityon context entity reads, and recalculation recomputes it fromMAX(created_at)of live rows grouped by home context.feat(frontend): entity grid polish
EntityGridBaraccepts asortOptionsprop (exported option type, the hardcoded pair becomes the default), navTabstaticDatagains anorderfield with a stable sort inuseNavTabs(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🤖 Generated with Claude Code