feat: add comments to task artifacts - #4067
Draft
puemos wants to merge 2 commits into
Draft
Conversation
Google Docs/Figma-style commenting on task artifact tabs: inline text comments on Markdown/HTML, circular comment pins on images, document-level comments, and a sidebar of threads with replies, mentions, Open/Resolved filtering, resolve/reopen, and anchor navigation, plus comment counts in artifact rows. Reuses the generic Django Comment API (scope=task_artifact), the generated OpenAPI client, Thread's mention composer, and Quill primitives; anchors are a small Zod-validated union stored in item_context. HTML artifacts render in an opaque-origin iframe with a selection/highlight bridge exchanged over postMessage; images gain an optional overlay on the existing ZoomableImage primitive. Migrated from #3970 (feat/artifact-comments) onto current main and squashed for the signed-commit workflow. Generated-By: PostHog Code Task-Id: 0331ac58-0a1c-4b4e-b884-2ff7d8e71986
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found 9 issues in 2 files · 9 warnings. 9 warnings
Reviewed by React Doctor for commit |
Three blocking react-doctor findings in the PR's own files: - ActivityPanel and TaskCommentsList adjusted state inside an effect on a prop/store change (no-adjust-state-on-prop-change); moved both to render-time adjustment with the existing prev-value refs, so no stale tab/filter commits before the switch. - The comment-focus pulse created a setTimeout in an effect without returning cleanup (effect-needs-cleanup); the timer now lives in its own effect keyed on pulseThreadId and is cleared on the next pulse or unmount, dropping the stray ref. Behavior unchanged; ActivityPanel and TaskCommentsList suites pass. Generated-By: PostHog Code Task-Id: 0331ac58-0a1c-4b4e-b884-2ff7d8e71986
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.
Summary
Adds Google Docs/Figma-style commenting to task artifact tabs:
Resolved threads remain available under the Resolved filter but are not rendered on the artifact: no text highlight, click target, or image pin.
Architecture
CommentAPI withscope=task_artifact; no new persistence model.MentionComposer/MentionTextand the API's existingmentionsfield.{ anchor, threadState? }initem_context; artifact identity remains the existingitem_id./completeaction rejects PAT access.HTML artifacts
Inspired by Peek's open-source annotation bridge:
postMessageallow-same-origindisabledImages
The existing
ZoomableImageprimitive now accepts an optional overlay. Pins and placement transform with the image automatically, without geometry polling or format-specific zoom logic.Validation
Created with PostHog Code