Skip to content

✨ Admin Portal: Voter editing quality of life features (#3078) - #3079

Merged
Findeton merged 1 commit into
mainfrom
feat/meta-12901/main
Aug 22, 2026
Merged

✨ Admin Portal: Voter editing quality of life features (#3078)#3079
Findeton merged 1 commit into
mainfrom
feat/meta-12901/main

Conversation

@Findeton

@FindetonFindeton commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Parent issue: https://github.com/sequentech/meta/issues/12901

Summary by CodeRabbit

  • New Features

    • Added user and voter attribute validation for required fields, length limits, trimming, and clearer inline guidance.
    • Select fields now display configured and localized option labels.
    • Hidden attributes are excluded from forms, filters, and lists.
    • Save and review actions are prevented until validation issues are resolved.
  • Bug Fixes

    • Improved error messages for profile validation, password policies, Google Meet generation, and voter creation or editing.
    • Errors now provide clearer field-specific details while avoiding exposed technical response information.
  • Documentation

    • Expanded guidance on attribute labels, visibility, validation, permissions, retention, and voter field errors.

Parent issue: sequentech/meta#12901
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitaiBot commented Aug 22, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8359ac37-b42a-4513-ad84-b225c4116cd8

📥 Commits

Reviewing files that changed from the base of the PR and between ded5be6 and c550e57.

📒 Files selected for processing (25)
  • docs/docusaurus/docs/02-election_managers/01-tutorials/99-admin_portal_tutorials_add-user-attributes-to-keycloak.md
  • docs/docusaurus/docs/02-election_managers/02-reference/02-election-event/05-election_management_election-event_voters.md
  • packages/admin-portal/src/components/election-event/google-meet/GoogleMeetLinkGenerator.tsx
  • packages/admin-portal/src/resources/User/EditPassword.tsx
  • packages/admin-portal/src/resources/User/EditUserForm.tsx
  • packages/admin-portal/src/resources/User/ListUsers.tsx
  • packages/admin-portal/src/resources/User/editPasswordError.test.ts
  • packages/admin-portal/src/resources/User/editPasswordError.ts
  • packages/admin-portal/src/resources/User/saveUserError.test.ts
  • packages/admin-portal/src/resources/User/saveUserError.ts
  • packages/admin-portal/src/services/UserService.test.ts
  • packages/admin-portal/src/services/UserService.ts
  • packages/admin-portal/src/services/graphqlActionError.test.ts
  • packages/admin-portal/src/services/graphqlActionError.ts
  • packages/admin-portal/src/translations/cat.ts
  • packages/admin-portal/src/translations/en.ts
  • packages/admin-portal/src/translations/es.ts
  • packages/admin-portal/src/translations/eu.ts
  • packages/admin-portal/src/translations/fr.ts
  • packages/admin-portal/src/translations/gl.ts
  • packages/admin-portal/src/translations/nl.ts
  • packages/admin-portal/src/translations/tl.ts
  • packages/harvest/src/routes/users.rs
  • packages/harvest/src/types/error_response.rs
  • packages/sequent-core/src/services/keycloak/user.rs

📝 Walkthrough

Walkthrough

The change adds Keycloak user-profile validation parsing, structured Harvest errors, Admin Portal field validation, localized error handling, option-label support, hidden-attribute filtering, and documentation for the new attribute behavior.

Changes

User profile validation flow

Layer / File(s)Summary
Keycloak validation error contract
packages/sequent-core/src/services/keycloak/user.rs, packages/harvest/src/types/error_response.rs
Keycloak validation payloads are parsed into field-level errors. Harvest returns up to ten errors with the total count in structured response extensions.
Structured user write responses
packages/harvest/src/routes/users.rs
User creation and editing convert Keycloak validation and related failures into structured errors. Password-policy handling remains separate.
Shared Admin Portal error and attribute services
packages/admin-portal/src/services/UserService.ts, packages/admin-portal/src/services/graphqlActionError.ts, packages/admin-portal/src/resources/User/editPasswordError.ts, packages/admin-portal/src/resources/User/saveUserError.ts, packages/admin-portal/src/services/*test.ts, packages/admin-portal/src/resources/User/*test.ts
Shared helpers parse attribute options, length bounds, hidden attributes, GraphQL reasons, password-policy errors, and profile-validation errors.
User form validation and submission flow
packages/admin-portal/src/resources/User/EditUserForm.tsx, packages/admin-portal/src/resources/User/ListUsers.tsx, packages/admin-portal/src/components/election-event/google-meet/GoogleMeetLinkGenerator.tsx, packages/admin-portal/src/resources/User/EditPassword.tsx
User forms validate lengths, enforce limits, render option labels, block invalid or duplicate submissions, report task results, and display structured errors. Hidden attributes are excluded from shared user views.
Localized messages and configuration guidance
packages/admin-portal/src/translations/*, docs/docusaurus/docs/02-election_managers/...
Translations include field-level validation, error reasons, and password-setting failures. Documentation covers option labels, hidden attributes, length validation, and voter save behavior.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
participant AdminPortal
participant Harvest
participant SequentCore
participant Keycloak
AdminPortal->>Harvest: Create or edit user
Harvest->>Keycloak: Submit user profile
Keycloak-->>Harvest: Validation response
Harvest->>SequentCore: Parse profile validation errors
SequentCore-->>Harvest: Field errors and parameters
Harvest-->>AdminPortal: Structured validation response
AdminPortal->>AdminPortal: Localize fields and block invalid save
Loading

Suggested reviewers:belsequent, yuvalkom-m, xalsina-sequent

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/meta-12901/main

Comment @coderabbitai help to get the list of available commands.

@Findeton
Findeton merged commit d49cfb3 into mainAug 22, 2026
30 of 31 checks passed
@Findeton
Findeton deleted the feat/meta-12901/main branch August 22, 2026 22:07
@github-actions

github-actionsBot commented Aug 22, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-22 22:10 UTC

Sign up for freeto 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

@Findeton