Skip to content

Add template display (title and logo) to CredentialView#309

Closed
Copilot wants to merge 2 commits intobetafrom
copilot/add-template-title-and-logo-to-credential-view
Closed

Add template display (title and logo) to CredentialView#309
Copilot wants to merge 2 commits intobetafrom
copilot/add-template-title-and-logo-to-credential-view

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

The CredentialView lacked direct access to the template display info (title/name and logo), requiring consumers to dig through credential_configuration.credential_metadata.display[0].

Description of change

Adds a top-level display field to Credential (which serves as CredentialView) populated from the first entry in credential_configuration.credential_metadata.display during the view update. Only view logic is touched — no commands or HTTP request models were modified.

  • credential/aggregate.rs: Added display: Option<CredentialConfigurationsSupportedDisplay> field to Credential
  • credential/openapi.rs: Extracted display_item() helper; added public display_schema() for the new field's OpenAPI schema — the existing display() array schema reuses it
  • credential/views/mod.rs: Populated self.display from credential_configuration.credential_metadata.display in the UnsignedCredentialCreated handler
// Before: consumers had to navigate nested structure
credential.credential_configuration.credential_metadata?.display?[0].name

// After: directly accessible
credential.display?.name
credential.display?.logo

Links to any relevant issues

How the change has been tested

Existing agent_issuance and agent_api_http unit tests pass with the changes. The new display field is populated whenever UnsignedCredentialCreated is processed; SignedCredentialCreated-only credentials leave it None.

Definition of Done checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have successfully tested this change in a docker environment
Original prompt

Add the template title and logo to the CredentialView, so the user knows which template was used to create the credential. Only update the view logic and don't touch any request models.


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Co-authored-by: daniel-mader <45594838+daniel-mader@users.noreply.github.com>
Copilot AI changed the title [WIP] Add template title and logo to CredentialView Add template display (title and logo) to CredentialView Mar 20, 2026
Copilot AI requested a review from daniel-mader March 20, 2026 07:08
@daniel-mader daniel-mader deleted the copilot/add-template-title-and-logo-to-credential-view branch April 9, 2026 13:57
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.

2 participants