Skip to content

feat(people)!: add Auth-backed people before login and align role views - #136

Open
BIA3IA wants to merge 13 commits into
feat/people-sourcesfrom
feat/people-single-source-docs
Open

BIA3IA wants to merge 13 commits into
feat/people-sourcesfrom
feat/people-single-source-docs

Conversation

@BIA3IA

@BIA3IA BIA3IA commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Align People with PoliNetwork Auth as the source of admin and team roles, and Microsoft 365 as the source of association membership. This follows #132 and requires PoliNetworkOrg/backend#99.

  • Remove Telegram group columns, group join-request actions, and group selections from census answers across Admins, Capo Admin, person records and My area.
  • The Capo Admin page lists assigned active admins, preserving contact links and access restrictions.
  • Update the local backend contract, agent-mode fixtures, authorization and census regression tests, and People documentation. Admin status is no longer derived from bot group assignments.

Validation: pnpm check, pnpm typecheck, pnpm test, and pnpm build passed. 204 tests passed and 3 were skipped; check reports 28 warnings. Browser navigation opened Admins in agent mode, but snapshot and evaluate timed out, so visual verification is incomplete.

BREAKING CHANGE: Requires the matching People backend contract without Telegram group assignments, join-request procedures and census keepGroups. Coordinate deployment with backend#99.

Integration verification

Includes current main, the updated #132 parent and legacy cleanup #135. Conflicts in the Capo page and contract were resolved by retaining the Auth-based admin model: no Telegram group fields or join requests are restored. Check, typecheck, all dashboard tests and build passed for this combined tree. Merge this PR into #132 before merging #132 into main; #135 must reach main before backend#97. Backend#99 and the final People dashboard require coordinated deployment.

People before first login

New manual People creation requires only first and last name, with optional contact details, initial teams and admin status. The person and roles are created in Auth, even before login. Census details are optional on profile editing and are not required for creation; census submission/import validation remains strict.

Auth supplies verified-email/Telegram matches, name-only hints and conflict proposals to Linking. A Master Admin approves the link in Auth before the actual account receives the preliminary person's roles. Stable registration IDs preserve the People record/history across approval and restarts; declared Telegram contacts never cause automatic linking. Existing historical records/imports are not automatically migrated.

Requires the expanded Auth#75 (on Auth#73), including migration 0024, deployed first. No new dependency on the Telegram bot or legacy anonymous access is introduced.

Validation for this addition: check, typecheck, test and build passed; 205 tests passed and 3 were skipped (28 lint warnings). Browser verification created a person using only names plus IT, then checked the preliminary record at desktop and 390px with no horizontal overflow. Agent mode exercises the interface; actual Auth creation/linking was tested separately against disposable PostgreSQL. Design and rollout: docs/people/pre-registration.md.

PoliNetworkOrg/backend#97 drops tg_audit_log.admin_id, after copying it into actor_tg_id, and the anonymous path agent mode relied on. The audit actor now comes from actorTgId only, and the agent-mode docs say the backend refuses its calls.
The backend no longer copies PoliNetwork Auth roles and the Microsoft 365 Soci group into the register: it reads them, and Telegram group admins through the bot, on every operation. Being in the Soci group is being a member, and the register keeps only history and People's own data.
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

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

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
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6eac4fbe-6e9c-4682-a689-363c811e4631

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Remove Telegram group columns, join-request actions and census group selections. Keep the Capo area scoped to assigned active admins and update contracts, fixtures, docs and regression tests.

BREAKING CHANGE: Requires the matching backend People contract without Telegram group assignments and join-request procedures.
@BIA3IA BIA3IA changed the title docs(people): one source of truth for roles, members and group admins fix(people)!: align admin views and census with Auth roles Oct 26, 2026
Require only first and last name, with optional contacts, team memberships and admin status. Show preliminary Auth identities and Master-approved linking reviews; keep profile census fields optional and document the cross-service flow.
@BIA3IA BIA3IA changed the title fix(people)!: align admin views and census with Auth roles feat(people)!: add Auth-backed people before login and align role views Oct 27, 2026
…urce-docs

# Conflicts:
#	src/features/people/people.contract.ts
My area renders the backend's `awaiting-approval` state: the matched record
when the match is verified, otherwise a notice that the sign-in is being
checked, and no "Ask to be added". Agent mode previews it with
`AGENT_PERSON=awaiting:P-…`.
- Linking page resolves `identity-match` reviews (link or decline), the
  matches HR confirms: a record that carries roles, a role holder matched by
  Telegram ID or a non-PoliNetwork address, or a Telegram username.
- `docs/people/linking.md` describes the single matching rule, the outcome
  policy, the decisions taken and what changed; the contract and
  pre-registration docs point to it.
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