Skip to content

feat: add per-author tracked change colors#3559

Merged
harbournick merged 4 commits into
mainfrom
nick/it-1112-per-author-tracked-change-colors
Jun 1, 2026
Merged

feat: add per-author tracked change colors#3559
harbournick merged 4 commits into
mainfrom
nick/it-1112-per-author-tracked-change-colors

Conversation

@harbournick
Copy link
Copy Markdown
Collaborator

No description provided.

@harbournick harbournick self-assigned this May 29, 2026
@harbournick harbournick requested a review from a team as a code owner May 29, 2026 00:04
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 29, 2026

IT-1112

SD-3307

@github-actions
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1817c5f6c5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/superdoc/src/public/index.ts
Comment thread packages/layout-engine/painters/dom/src/runs/tracked-changes.ts
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cubic analysis

2 issues found across 30 files

Linked issue analysis

Linked issue: IT-1112: Per-author tracked change colors

Status Acceptance criteria Notes
Expose host config modules.trackChanges.authorColors (enabled/overrides/resolve) so hosts can specify per-author colors Config shape added across public types/docs and composeAuthorColorResolver re-exported for SuperDoc to build the resolver from host config.
Compose a resolver honoring overrides (email first, then name), optional resolve callback, and a deterministic fallback color composeAuthorColorResolver implements overrides → resolve → fallback order; fallbackAuthorColor provides deterministic palette; tests cover override lookup, fallback stability, and host-resolver exceptions.
Stamp a paint-ready color (TrackedChangeMeta.color) on every tracked-change layer during adapter conversion so the painter need not call host callbacks stampTrackedChangeColors is implemented and invoked in the pm-adapter before paint, stamping or clearing meta.color based on the resolver.
Painter applies per-author CSS variable families (--sd-tracked-changes-*) for insert/delete/format layers and derives translucent backgrounds from the base color Dom painter applies CSS variables from meta.color per layer kind and derives alpha variants; tests assert the variables are set.
UI snapshot exposes per-item authorColor and an ordered authors list with resolved colors so review UIs can render a legend consistent with painted colors createSuperDocUI composes the resolver, populates items with authorColor and an authors list, types and tests were updated to expect these fields.
Disabling or omitting the feature clears stale colors from cached blocks and leaves default palette behavior intact stampTrackedChangeColors accepts undefined to clear colors; composeAuthorColorResolver returns undefined when config disabled, and adapter only stamps when resolver provided.

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/docs/editor/built-in-ui/track-changes.mdx Outdated
Comment thread packages/superdoc/src/public/index.ts
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@harbournick harbournick merged commit 83013e4 into main Jun 1, 2026
74 checks passed
@harbournick harbournick deleted the nick/it-1112-per-author-tracked-change-colors branch June 1, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants