feat(web): activity section in the entity side panel - #5589
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Every entity-property mutation now captures the pre-write value in the same statement (CTE snapshot on the upsert/option queries; the bulk path reuses its FOR UPDATE read) and publishes it as previous_value on entity_property.updated (serde-default, so old events and consumers are unaffected). The activity mapping fills PropertyChange.from with it, which lights up the 'changed Status from In Progress to Completed' transitions the feed already renders. Relationship and tag-remap writes don't capture it (from is omitted).
Renders the entity's recent activity (actor, verb, relative time) from the GraphQL activity edge, in the side panel for documents/tasks, email threads, chats, projects, and calls. Gated behind the new enable-entity-activity-section PostHog flag (dev-on): the section component owns the gate, so the EntityActivity query is never issued while off. Reuses the properties query's exact-single-entity Soup input builder, so supported entity types match properties exactly. Unknown actions render their humanized raw tag instead of hiding.
urql's default preferGetMethod ('within-url-limit') sends documents
that fit in a URL as GET — but GET on the DSS GraphQL path serves the
GraphiQL IDE, so the client gets HTML and errors. Every pre-activity
document was too large to trigger this; the compact activity queries
are the first to fit. Pin both clients to POST, matching the
backend's contract.
'changed Status to Completed' / 'cleared Due Date' instead of 'changed a property': the definition name comes from the shared definitions query and select-option ids resolve through the definition's options. Unlabelable values fall back word by word, and 'from' renders automatically once producers start carrying the previous value.
Actors render as 'You' / display name (local-part fallback, never the full email) / 'Automation'. Property changes use the property system's own visuals: select values as option pills with the system option icons and tag color dots. Entity references get a real document mention (EntityMention: the editor's mention decorator via StaticMarkdown, with hover preview, access states, click-to-open; non-block entity kinds fall back to an icon + name chip).
text-text-secondary wasn't a real token (muted text rendered unstyled) — replaced with ink-muted/ink-extra-muted. Side-panel rows follow the section convention (text-xs, compact rows) and option pills size to text-xs like row pills elsewhere.
1bb2dc0 to
81f4f53
Compare
|
Recreating with base synoet/property-transitions (stack reordering; GitHub stacks pin the base) |
No description provided.