ui/phase-14: rename planet end-to-end + order read-back
Wires the first end-to-end command through the full pipeline:
inspector rename action → local order draft → user.games.order
submit → optimistic overlay on map / inspector → server hydration
on cache miss via the new user.games.order.get message type.
Backend: GET /api/v1/user/games/{id}/orders forwards to engine
GET /api/v1/order. Gateway parses the engine PUT response into the
extended UserGamesOrderResponse FBS envelope and adds
executeUserGamesOrderGet for the read-back path. Frontend ports
ValidateTypeName to TS, lands the inline rename editor + Submit
button, and exposes a renderedReport context so consumers see the
overlay-applied snapshot.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+45
-1
@@ -1023,7 +1023,11 @@ paths:
|
||||
$ref: "#/components/schemas/EngineOrder"
|
||||
responses:
|
||||
"200":
|
||||
description: Engine order validation result passed through.
|
||||
description: |
|
||||
Engine order validation result passed through. Body is the
|
||||
engine's `UserGamesOrder` shape — game_id, updatedAt, and
|
||||
the per-command `cmd[]` list with `cmdApplied` /
|
||||
`cmdErrorCode` populated by the engine.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
@@ -1036,6 +1040,46 @@ paths:
|
||||
$ref: "#/components/responses/NotImplementedError"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
get:
|
||||
tags: [User]
|
||||
operationId: userGamesGetOrders
|
||||
summary: Read the player's stored order for a turn
|
||||
description: |
|
||||
Forwards `GET /api/v1/order` against the engine container.
|
||||
The caller always knows the current turn from the lobby
|
||||
record at game boot, so `turn` is required.
|
||||
security:
|
||||
- UserHeader: []
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/XUserID"
|
||||
- $ref: "#/components/parameters/GameID"
|
||||
- name: turn
|
||||
in: query
|
||||
required: true
|
||||
description: Turn number whose stored order to fetch. Non-negative.
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
minimum: 0
|
||||
responses:
|
||||
"200":
|
||||
description: |
|
||||
Engine returned the stored order for this player + turn.
|
||||
Body is the engine's `UserGamesOrder` shape.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/PassthroughObject"
|
||||
"204":
|
||||
description: No order has been stored for this player on this turn.
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequestError"
|
||||
"404":
|
||||
$ref: "#/components/responses/NotFoundError"
|
||||
"501":
|
||||
$ref: "#/components/responses/NotImplementedError"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
/api/v1/user/games/{game_id}/reports/{turn}:
|
||||
get:
|
||||
tags: [User]
|
||||
|
||||
Reference in New Issue
Block a user