Codegen Add WT Entity
Table of Contents
When to use this skill
When you need to add a Wt web UI for a new entity in ores.wt.service.
Prerequisites: the domain type must exist (domain-type-creator) and the
service layer for the entity must be implemented. See Entity lifecycle
for the full layer ordering.
How to use this skill
- Gather requirements: entity name, service class, display fields, editable fields, primary key.
- Phase 1 — list widget (PR:
[wt] Add {Entity} list widget): create{entity}_rowstruct and{entity}_list_widgetclass with toolbar, table, and signals. - Phase 2 — detail dialog (PR:
[wt] Add {Entity} dialog): create{entity}_dialogwith form editors andsave_requestedsignal. - Phase 3 — application integration (PR:
[wt] Integrate {Entity} into application): add page/controller, connect signals, register in navigation.
Use feature-branch-manager between phases and pr-manager to open each PR.
Build after every step: cmake --build --preset linux-clang-debug-ninja --target ores.wt.service.lib.
Recipes
- How do I create Wt widgets for a new entity? — phase-by-phase walkthrough.
Reference
- Wt entity patterns — list widget layout, dialog layout, signal conventions, file locations.
- Entity lifecycle — layer ordering overview.
- domain-type-creator — prerequisite first layer.
Codegen gap
❌ No codegen profile exists for ores.wt.service. Do not hand-code
this layer. When entity-creator reaches this layer:
- Raise a sprint story: "Implement codegen profile for Wt UI."
- Reference Entity lifecycle§"Codegen gaps" for what the profile must cover.
- Link the story to the entity task before marking this layer done.
- Once the profile is merged, regenerate and discard any hand-written code.
Until the gap is resolved, this layer is incomplete.