feat: name the task a comment belongs to so mentions reach its feed - #4036
Closed
puemos wants to merge 1 commit into
Closed
feat: name the task a comment belongs to so mentions reach its feed#4036puemos wants to merge 1 commit into
puemos wants to merge 1 commit into
Conversation
A comment on an artifact or canvas points at an id that lives in a run's JSON, not in a table the server can join against, so nothing on the backend could work out which task the comment belonged to. Mentions on those comments therefore reached people by email and by the web inbox but never by this app's Activity page — the one surface where the comment is actually readable. The task id now rides along in item_context, which is the only piece the server was missing. It is client-supplied, so the backend checks it against the team before acting on it, and re-checks visibility when the feed is read. Needs the matching PostHog/posthog change to have any effect; harmless before it lands, since item_context is a free-form JSON field. Generated-By: PostHog Code Task-Id: ec8afa68-0d3b-417a-b9aa-4804b7429d76
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
Author
|
Folding this into #3970 — it belongs with the rest of the artifact-comments work, no reason for a separate PR. |
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.
Why
A comment on an artifact or canvas points at an id that lives in a run's JSON, not in a table the server can join against, so the backend had no way to work out which task the comment belonged to. Mentions on those comments reached people by email and the web inbox but never by this app's Activity page — the one surface where the comment is actually readable.
Changes
The task id now rides along in
item_context(declared oncommentContextSchema, which strips unknown keys, so it has to be part of the schema to survive a round-trip).useCreateCommenttakes the task id and merges it in at the single choke point all three call sites go through, so the optimistic row and the request agree.It is client-supplied, so the backend checks it against the team before acting on it and re-checks visibility when the feed is read.
Stacked on
feat/artifact-comments(#3970). Pairs with PostHog/posthog#75910, which consumes it — this is inert until that lands, sinceitem_contextis free-form JSON.Testing
TaskCommentsListandArtifactPreviewsuites pass (39 tests), typecheck and lint clean on@posthog/uiand@posthog/core. No manual testing — no running app in this environment. The behaviour this enables is only observable once the backend side is deployed.Created with PostHog Code