Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

rc.49: Voters list default columns from realm user-profile annotations (meta#15619) - #4683

Merged
edulix merged 1 commit into
ovcsfrom
fix/15619-voter-columns
Dec 3, 2026
Merged

edulix merged 1 commit into
ovcsfrom
fix/15619-voter-columns

Conversation

@edulix

@edulix edulix commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Refs sequentech/meta#15619 (rc.49 tracker sequentech/meta#15576).

What

On an election event's Voters tab, the default visible columns now come from the realm's user profile instead of being hard-coded:

  • Attributes annotated "annotations": {"voterListColumn": "default"} are shown by default.
  • Plus the fixed columns: Enabled, Username, Area, ID validated? (sequent.read-only.id-card-number-validated), Voted, Actions.
  • Every other attribute and column (Elections, Email, Datafix voted channel / disable comment, support materials, other attributes) stays available through Columns.
  • With COMELEC's annotations the default is exactly: Enabled, First name, Last name, Username, Area, Middle name, Date of birth, ID validated?, Voted, Actions.

Backwards compatible: with no annotated attribute, the table keeps its previous defaults, or the VOTER_COLUMNS_PROFILE setting's profile (meta#15530) if one is set. Users and Roles (no election event) is unchanged.

Operator overrides kept: the annotated set gets its own grid key (..._realm_<hash>), and an operator's explicit column selection is carried over once, as the existing profile mechanism already does (carryVoterColumnSelection).

Changes

  • admin-portal/src/resources/User/voterDefaultColumns.ts: VOTER_LIST_COLUMN_ANNOTATION, isDefaultVoterListColumn, realmVoterColumns() (builds a VoterColumnProfile from the realm's attributes).
  • ListUsers.tsx: realm profile first, then the setting's profile; the grid waits for the user profile before mounting on the Voters tab.
  • janitor/templates/COMELEC/keycloak.hbs: annotates firstName, lastName, middleName, dateOfBirth.
  • The release Sheet's realm (Parameters!E3, inside keycloak_event_realm) carries the same four annotations.

Existing deployments

Either re-import the event realm from the updated Sheet/template, or in the Keycloak admin console: Realm settings → User profile → (attribute) → Annotations → Add key voterListColumn, value default, for First name, Last name, Middle name and Date of birth. Reload the admin portal.

Tests

npx jest src/resources/User/voterDefaultColumns (in docker, node:20): 23 passed, including new cases with annotations (exact shown/hidden sets, unannotated first/last name hidden, annotated Elections kept, per-set grid key + carried selection) and without (no profile, previous defaults unchanged).

🤖 Generated with Claude Code

…#15619)

An election event's Voters tab now takes its default visible columns from
the realm's user profile: attributes annotated
`"voterListColumn": "default"` are shown, plus the fixed Enabled, Username,
Area, ID validated?, Voted and Actions columns; every other column stays
available through Columns. Without any annotation the table keeps its
previous defaults (or the VOTER_COLUMNS_PROFILE setting's). An operator's
own column selection is carried over to the new grid key, as before.

The COMELEC realm template annotates firstName, lastName, middleName and
dateOfBirth.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review: 2

  • release/10.0
  • feat/meta-12767/.*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@edulix
edulix merged commit 335506a into ovcs Dec 3, 2026
30 of 35 checks passed
edulix added a commit that referenced this pull request Dec 3, 2026
Restores code that the squash of #4680 (3a08ae0) reverted on `ovcs`.

**Cause.** #4680 merged ovcs (335506a) into its branch in
feab331. That merge resolution kept the branch's older copies of 49
files, and the squash then applied those older copies to ovcs. The
reverted work:

- **#4563** tenant reset (the administration tenant's reset keeps or
deletes other tenants, Gold, b4 bodies and custom URLs):
`tenant_reset/*`, `reset_tenant.rs`, `delete_tenant.rs`,
`delete_election_event.rs`, `custom_url.rs`, `cloudflare.rs`,
`TenantResetCard*`, translations, devcontainer compose, tests.
- **#4682** Statistical Report, bulk Post vote receipts, audit-log
hash-chain check: `reports/*`, electoral-log adapters and tests, report
templates, Tabs, docs.
- **#4683** Voters list default columns: `voterDefaultColumns*`,
`ListUsers.tsx`, COMELEC `keycloak.hbs` annotations.

#4684–#4687 were not affected; the squash's 3-way merge kept them.

**Fix.**
- The 49 files are restored byte-for-byte from `3a08ae0^` (cfd675a).
None of them carried #4680 changes.
- #4680's own changes (label rules, migration, checks, tests, docs) are
unchanged. The tree equals cfd675a plus #4680's own commits
bac670c and 8af66ee, except the tgz.
- The sequent-core WASM tgz files and yarn.lock are regenerated:
electoral-log, which this PR restores, is one of the package's inputs.
Built with rustc 1.96.0, wasm-bindgen 0.2.128 and wasm-opt 123.

**Checks.**
- `scripts.dev.wasm --check-package` passes.
- `cargo check -p electoral-log -p windmill -p harvest --tests` passes.

meta#15602

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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