+ “{thread.selectedText}” +
+ ) : null} + +{children}
, +})); + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +(globalThis as any).IS_REACT_ACT_ENVIRONMENT = true; + +async function act(callback: () => void | Promise{message}
+⌘⇧M to comment from a selection
++ “{thread.selectedText}” +
+ ) : null} + +{children}
, +})); + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +(globalThis as any).IS_REACT_ACT_ENVIRONMENT = true; + +async function act(callback: () => void | Promise+ Suggested by {author.name} + {author.role === "agent" ? " · agent" : null} · {relativeTime(suggestion.createdAt)} + {suggestion.originalRevisionNumber ? ` · rev ${suggestion.originalRevisionNumber}` : null} +
+ ++ Rejected: {rejectionReason(suggestion)} +
+ ) : null} + + {suggestion.comments.length > 0 ? ( ++ Discussion ({suggestion.comments.length}) +
+ {suggestion.comments.map((comment) => { + const commentAuthor = resolveReviewAuthor(comment, authorMaps ?? {}); + return ( ++ Insert {insertionPosition ? `${insertionPosition} ` : ""}selection +
+near “{selectedText}”
+ ) : null} +Delete
+Source
+Proposed
++ + {children} +
+ ); +} diff --git a/ui/src/index.css b/ui/src/index.css index 340fff5c398..02f9353bc76 100644 --- a/ui/src/index.css +++ b/ui/src/index.css @@ -93,6 +93,12 @@ --paperclip-doc-annotation-highlight-focused: #fde047; --paperclip-doc-annotation-highlight-stale: #fef08a; --paperclip-doc-annotation-highlight-resolved: #fef9c3; + /* Suggested-edit (CriticMarkup-style) treatments — see PAP-10520 ux-spec §5.4. */ + --paperclip-doc-suggestion-insert-bg: oklch(0.93 0.08 145); + --paperclip-doc-suggestion-insert-fg: oklch(0.3 0.12 145); + --paperclip-doc-suggestion-delete-bg: oklch(0.93 0.08 27); + --paperclip-doc-suggestion-delete-fg: oklch(0.3 0.2 27); + --paperclip-doc-annotation-stale-underline: oklch(0.55 0.18 50); } .dark { @@ -144,6 +150,12 @@ --paperclip-doc-annotation-highlight-focused: #ca8a04; --paperclip-doc-annotation-highlight-stale: #854d0e; --paperclip-doc-annotation-highlight-resolved: #713f12; + /* Dark-mode suggestion treatments: drop L to ~0.30, keep chroma. */ + --paperclip-doc-suggestion-insert-bg: oklch(0.3 0.08 145); + --paperclip-doc-suggestion-insert-fg: oklch(0.9 0.1 145); + --paperclip-doc-suggestion-delete-bg: oklch(0.3 0.09 27); + --paperclip-doc-suggestion-delete-fg: oklch(0.9 0.12 27); + --paperclip-doc-annotation-stale-underline: oklch(0.7 0.16 50); } ::highlight(paperclip-doc-annotation-open) { diff --git a/ui/src/lib/document-review-authors.ts b/ui/src/lib/document-review-authors.ts new file mode 100644 index 00000000000..bb07b1155e7 --- /dev/null +++ b/ui/src/lib/document-review-authors.ts @@ -0,0 +1,41 @@ +import type { Agent, IssueCommentAuthorType } from "@paperclipai/shared"; +import type { CompanyUserProfile } from "@/lib/company-members"; + +export interface ReviewAuthorMaps { + agentMap?: ReadonlyMap