Skip to content

feat(relationships): explain the community's identifier default on the request form (#241 follow-up) - #338

Merged
stormer78 merged 3 commits into
mainfrom
worktree-followup-toggle-hint
Sep 18, 2026
Merged

stormer78 merged 3 commits into
mainfrom
worktree-followup-toggle-hint

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

Follow-up to #241 / #335.

#335 made a new relationship's mint default follow the working community's declared relationshipIdentifierDefault, but the form's identifier toggle was still static — Pairwise R-DID (recommended) / Your persona DID. So when a community declares attributed, the toggle silently started on the persona DID while pairwise still read "(recommended)", with no explanation.

This carries the declaration into the NewRequest form state and surfaces it:

  • the toggle labels the persona-DID option "(your community's default)" and drops "(recommended)" from pairwise when the community prefers attributed (pairwise then reads "(more private)");
  • a line under the toggle explains where the default came from — "Your community publishes relationships under members' persona DIDs, so this defaults there" or "Your community recommends a pairwise DID (the default)" — and nothing extra when no community declared one.

The lookup that seeded the default is refactored to return the declaration itself (working_community_relationship_default) rather than a bare bool, so the form gets both the default and the reason from one place. No behaviour change when no community declares a preference.

Tests

  • the_form_explains_a_community_relationship_default — the form shows the right label + reason for attributed / pairwise, and nothing extra for none.
  • The feat(relationships): honor a community's relationshipIdentifierDefault (#241) #335 default test updated to the new lookup and to assert the form mode it produces.
  • cargo fmt, clippy --all-targets --all-features, RUSTDOCFLAGS="-D warnings" cargo doc, full cargo test all pass.

…e request form (#241 follow-up)

#335 made a new relationship's mint default follow the working community's
declared `relationshipIdentifierDefault`, but the form's identifier toggle was
static ("Pairwise R-DID (recommended)" / "Your persona DID") — so when a
community declares `attributed`, the toggle silently started on the persona DID
while still labelling pairwise "(recommended)", with no reason given.

Carry the declaration into the `NewRequest` form state (`community_default`) and
surface it:
- the toggle labels the persona-DID option "(your community's default)" and drops
  "(recommended)" from pairwise when the community prefers attributed (pairwise is
  then shown as "(more private)");
- a line under the toggle says why the default is where it is — "Your community
  publishes relationships under members' persona DIDs, so this defaults there" or
  "Your community recommends a pairwise DID (the default)" — and nothing extra
  when no community declared one.

The lookup that seeded the default is refactored to return the declaration itself
(`working_community_relationship_default`) rather than a bare bool, so the form
gets both the default and the reason from one place. Behaviour is unchanged when
no community declares a preference.

Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
@stormer78
stormer78 requested a review from a team as a code owner September 18, 2026 06:04
@stormer78
stormer78 merged commit 2c1ef41 into main Sep 18, 2026
15 checks passed
@stormer78
stormer78 deleted the worktree-followup-toggle-hint branch September 18, 2026 06:50
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