feat: color pending proposal blocks by author (Claude blue/purple)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
BenStullsBets
2026-06-26 14:17:40 -07:00
parent 44ef0a21db
commit 2955e8d929
3 changed files with 13 additions and 2 deletions
+5 -2
View File
@@ -837,6 +837,8 @@ export interface ProposalView {
replacement: string;
/** F12/#64 (INV-48): the pre-apply original, set after optimistic apply. */
original?: string;
/** Who made the proposal — colors the del/ins. Defaults to "claude". */
author?: AuthorKind;
}
function proposalBlockHtml(p: ProposalView, render: (src: string) => string): string {
@@ -848,8 +850,9 @@ function proposalBlockHtml(p: ProposalView, render: (src: string) => string): st
}
};
const unanchored = p.anchorStart === null ? " cw-proposal-unanchored" : "";
const before = p.replaced ? `<del class="cw-del">${safe(p.replaced)}</del>` : "";
const after = `<ins class="cw-add">${safe(p.replacement)}</ins>`;
const who = p.author ?? "claude";
const before = p.replaced ? `<del class="cw-del-${who}">${safe(p.replaced)}</del>` : "";
const after = `<ins class="cw-ins-${who}">${safe(p.replacement)}</ins>`;
const actions =
`<span class="cw-actions">` +
`<span class="cw-btngroup">` +