Skip to content

feat(events): Phase 3 — rename gRPC ejendom types to property#805

Merged
renemadsen merged 2 commits into
stablefrom
feat/ejendom-to-property-rename
May 12, 2026
Merged

feat(events): Phase 3 — rename gRPC ejendom types to property#805
renemadsen merged 2 commits into
stablefrom
feat/ejendom-to-property-rename

Conversation

@renemadsen
Copy link
Copy Markdown
Member

Summary

Phase 3 of the opgave→event migration: rename gRPC message types and RPC method names from Ejendom to Property on the plugin side. Mirrors Phase 1 + Phase 2 pattern — wire field names stay so generated C# accessors don't churn.

Base: `stable` (correcting the Phase 2 oversight that targeted `master` and required a follow-up promotion PR #804).

Spec: `docs/superpowers/specs/2026-05-11-opgave-to-event-migration.md` (Phase 3 subsection).

Renamed (gRPC type / RPC method)

  • `rpc ListEjendomme(ListEjendommeRequest) returns (ListEjendommeResponse)` → `rpc ListProperties(ListPropertiesRequest) returns (ListPropertiesResponse)`
  • `message Ejendom` → `message Property`
  • `message ListEjendommeRequest`/`Response` → `ListPropertiesRequest`/`Response`
  • `EventsGrpcService.ListEjendomme(...)` handler → `ListProperties(...)`
  • Top-of-file proto comment trimmed (Phase 2 re-gate pattern)

Stayed Danish (CARVE_WIRE_FIELD)

  • Wire field names: `ejendomme` (response repeated field on `ListPropertiesResponse`), `ejendom_id` (5 sites)
  • 16 generated C# accessors (`request.EjendomId` reads x3, `event.EjendomId = ...` setters x13) untouched
  • `response.Ejendomme.Add(new Property { ... })` kept (generated from carved wire field)

Verification

  • `dotnet clean && dotnet build` from `eFormAPI.Web/` — 0 errors
  • Backend restarted, Kestrel binds `:5000` + `:5001` cleanly, no plugin-load exceptions
  • Embedded copy at `eform-angular-frontend/eFormAPI/Plugins/BackendConfiguration.Pn/` synced
  • Dual-subagent gate green after one fixup round (proto comment trimmed)

Coordinated rollout

  • Flutter Phase 3 PR coming next; will reference this PR's commit
  • This PR targets `stable` so production deploy parity is automatic on merge

🤖 Generated with Claude Code

Mirror of Phase 1/2 pattern for the next noun in the opgave→event
migration. Renames the gRPC message types and RPC method names from
Ejendom to Property. Wire field names stay (`ejendom_id`, `ejendomme`)
so generated C# accessors don't churn.

Proto changes:
- rpc ListEjendomme(ListEjendommeRequest) returns (ListEjendommeResponse)
  → rpc ListProperties(ListPropertiesRequest) returns (ListPropertiesResponse)
- message Ejendom → message Property
- message ListEjendommeRequest/Response → ListPropertiesRequest/Response
- Top-of-file comment trimmed to Phase 2's tightened form (after re-gate).

Handler changes (EventsGrpcService.cs):
- public override Task<ListEjendommeResponse> ListEjendomme(...)
  → Task<ListPropertiesResponse> ListProperties(...)
- new Ejendom { ... } → new Property { ... }
- response.Ejendomme.Add(...) kept (generated from carved wire field)
- 16 generated accessors (request.EjendomId reads, EjendomId = ... setters)
  untouched — driven by carved wire fields.

Build: dotnet clean + build green (0 errors). Backend restarts cleanly
on :5000+:5001. Embedded copy at eform-angular-frontend synced.

Spec: docs/superpowers/specs/2026-05-11-opgave-to-event-migration.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 12, 2026 04:54
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Phase 3 of the opgave→event migration on the plugin side: renames the gRPC “Ejendom” surface to “Property” (message types + RPC method name) while preserving Danish wire field names to avoid generated accessor churn.

Changes:

  • Renamed ListEjendomme RPC → ListProperties and updated the server handler accordingly.
  • Renamed proto message types EjendomProperty and ListEjendomme*ListProperties*, keeping wire fields like ejendomme/ejendom_id unchanged.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/GrpcServices/EventsGrpcService.cs Renames the gRPC handler override to ListProperties and returns Property messages while keeping Danish wire-field-backed accessors.
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Protos/events.proto Renames RPC + message types from Ejendom to Property, preserving wire field names (ejendomme, ejendom_id) per migration strategy.

…handler

EventsGrpcService.cs imports both BackendConfiguration.Pn.Grpc.Events
(Phase 1 namespace, now contains gRPC Property type after Phase 3 rename)
AND Microting.EformBackendConfigurationBase.Infrastructure.Data.Entities
(base SDK, contains an EF entity called Property). CI build failed with
CS0104: ambiguous reference.

Phase 2's analogous rename (Tavle → Board) didn't trip this because the
base package has no Board entity. Phase 3 is the first time a renamed
gRPC type collides with a base-entity class name.

Fix: fully-qualify the single `new Property { ... }` call site with
`new BackendConfiguration.Pn.Grpc.Events.Property { ... }`. Inline
comment explains the carve-out for future readers.

Local build: `dotnet build` from eFormAPI.Web → 0 errors. Embedded copy
re-synced.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@renemadsen renemadsen merged commit b23f637 into stable May 12, 2026
17 checks 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.

2 participants