Skip to content

feat(mp): open a politician's public profile from the nation drill-in - #753

Merged
Egg3901 merged 5 commits into
mainfrom
feat/mp-politician-detail
Nov 3, 2026
Merged

Egg3901 merged 5 commits into
mainfrom
feat/mp-politician-detail

Conversation

@Egg3901

@Egg3901 Egg3901 commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #752.

The reference has a politician page; the multiplayer nation drill-in listed politicians without letting a player open one.

  • Add the audited public read GET /api/politician/{id} (public, no auth). The id is a 24-hex character or NPP id, checked in the adapter and again by the Rust bridge, and it travels in its own bridge slot.
  • The politicians in the nation drill-in are now entries: opening one shows the profile the server reports - type, office, party, home region, political and national influence, favorability, policies and bio - and Back returns to the nation.
  • Extend the slot guards to the new read: the Rust detail-slot invariant, the transport allowlist check, and the two TypeScript slot tests.

Evidence: src/ui/MpPolitician510.test.tsx (the profile opens from the nation drill-in and Back returns), src/mp/nations.test.ts (the profile projection and the invalid-id refusal), src/mp/bridgeSlots.test.ts and src/mp/adapterSlots.test.ts (the id lands in the politician slot), and the Rust tests politician_profile_read_pins_the_id and every_pinned_read_passes_the_transport_allowlist. The MP unit suite (22 files, 307 tests) and the MP UI suite (15 files, 92 tests) pass; cargo fmt --check and cargo clippy --all-targets -- -D warnings are clean.

Partial: #510. No physical-iPhone evidence is claimed (#363/#436 stay open).

@Egg3901
Egg3901 force-pushed the feat/mp-politician-detail branch from fef1890 to f87dbf9 Compare October 22, 2026 00:19
The reference has a politician page; the multiplayer nation drill-in listed
politicians without letting a player open one.

- Add the audited public read GET /api/politician/{id}. The id is a 24-hex
  character or NPP id, checked in the adapter and again by the Rust bridge,
  and it travels in its own bridge slot.
- The politicians in the nation drill-in are now entries: opening one shows
  the profile the server reports - type, office, party, home region,
  political and national influence, favorability, policies and bio - and
  Back returns to the nation.
- Extend the slot guards to the new read: the Rust detail-slot invariant,
  the transport allowlist check, and the two TypeScript slot tests.
@Egg3901
Egg3901 force-pushed the feat/mp-politician-detail branch from 70785df to 33ce432 Compare October 22, 2026 01:30
@Egg3901
Egg3901 merged commit ff5c7cb into main Nov 3, 2026
1 check passed
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