Skip to content

Feat/cawg named roles#390

Open
digisumit wants to merge 4 commits into
contentauth:mainfrom
digisumit:feat/cawg-named-roles
Open

Feat/cawg named roles#390
digisumit wants to merge 4 commits into
contentauth:mainfrom
digisumit:feat/cawg-named-roles

Conversation

@digisumit

Copy link
Copy Markdown

Overview

This PR contains the following change(s):

Add support for displaying CAWG named roles in "About this Content Credential"

Screenshot 2026-07-15 at 11 07 41 AM

What

Reads and displays CAWG named roles from C2PA manifests in the verify sidebar's About section, below "Issued on".

Supported roles: Creator, Contributor, Editor, Producer, Publisher, Sponsor, Translator.

How

Roles are extracted from two assertion sources and merged:

  • cawg.metadata — Dublin Core fields (dc:creator, dc:contributor, dc:publisher)
  • cawg.identitysigner_payload.role[] array of cawg.* role strings; the role holder's name is taken from the identity issuer

When the same role appears in both sources, the cawg.metadata name takes precedence. Assertion labels are matched with startsWith to tolerate JUMBF hash suffixes.

Files changed

File Purpose
src/lib/selectors/cawgRoles.ts New selector — selectCawgRoles(manifest): RoleEntry[]
src/lib/selectors/cawgRoles.spec.ts 11 unit tests (Vitest)
src/lib/asset.ts Added cawgRoles: RoleEntry[] to ManifestData; populated from selector
src/routes/.../AboutSection/CAWGRolesSection.svelte New component — renders one subsection per role
src/routes/.../AboutSection/AboutSection.svelte Renders CAWGRolesSection after "Issued on"
locales/en-US.json 7 new role label keys
src/lib/selectors/reviewRatings.ts Replaced as any cast with proper interface
src/lib/selectors/website.ts Replaced as any cast with proper interface

Checklist

  • End-to-end or unit tests (where applicable) have been added that cover this change/bug fix
  • Any UI changes display properly on mobile breakpoints
  • Any user-visible strings have accompanying translation tags
  • Accessibility support has been added
  • Analytics are being sent (where applicable)

Issue link (optional)

Please insert link(s) to any related issue(s) here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant