chore(contracts): align local DTOs and document mokosh-server drift (MAPPS-138) #125

Merged
David merged 2 commits from chore/mapps-138-contract-drift-local-subset into main 2026-06-13 14:55:24 +02:00
Owner

Closes the server-independent subset of the cross-repo contract-drift audit. These changes are verifiable with just check (wasm check + clippy + fmt) and just test, none requiring the mokosh-server repo or a live server.

Addressed acceptance criteria:

  • time-entry duration_minutes aligned to i32 to match the server TimeEntryResponse (src/pages/tickets.rs).
  • contracts and SLA rust_decimal-as-JSON comments corrected: under the rust_decimal serde feature the server serializes Decimal as a JSON string, not a number; the client enables the same feature so it decodes losslessly (src/modules/contracts/models.rs, src/modules/sla/models.rs).
  • calendar CreateAppointmentRequest now carries optional task_id / site_id so the SPA can link an appointment to a task or site (src/modules/calendar/models.rs, src/pages/calendar.rs).
  • KB recent-articles request drops the no-op sort / sort_dir params the server ignores (src/pages/knowledge_base.rs).
  • KB article author_id recorded as no-fix (serde drops the unknown key; no author display) (src/modules/kb/models.rs).
  • contracts edit/delete + rate-card-item routes documented as intentionally ahead of the UI (src/pages/contracts.rs).
  • mokosh-server /api/v1/auth/* surface confirmed backend-only / not SPA-facing (src/modules/oidc/config.rs).
  • mokosh-server settings surface confirmed hub-only (src/pages/profile.rs).
  • audit DTO recorded as a verified-clean baseline, no change (src/modules/audit/models.rs).

Deliberately out of scope for this local PR (each needs the mokosh-server repo, a live server to verify, or an architecture decision that is the user's call; track as follow-ups):

  • structural source of truth: depend on mokosh-types (forks deleted) vs a CI diff gate. Needs the server crate / both repos in CI plus a design decision; covers the time_tracking / contracts / contacts / tenants / calendar forks and the NotificationPage decode struct.
  • ticket-create priority_id resolution and ticket-list status/priority/q filter forwarding: runtime fixes that must be verified against the live /tickets + /tickets/priorities contracts.
  • portal KB 401: portal-vs-agent auth flow change, needs the live portal auth surface.
  • company company_type and contact company_name sorts: changes live in the mokosh-server repo (src/modules/contacts/service.rs), not this repo.

#MAPPS-138

Closes the server-independent subset of the cross-repo contract-drift audit. These changes are verifiable with `just check` (wasm check + clippy + fmt) and `just test`, none requiring the mokosh-server repo or a live server. Addressed acceptance criteria: - time-entry `duration_minutes` aligned to `i32` to match the server `TimeEntryResponse` (`src/pages/tickets.rs`). - contracts and SLA `rust_decimal`-as-JSON comments corrected: under the `rust_decimal` `serde` feature the server serializes `Decimal` as a JSON string, not a number; the client enables the same feature so it decodes losslessly (`src/modules/contracts/models.rs`, `src/modules/sla/models.rs`). - calendar `CreateAppointmentRequest` now carries optional `task_id` / `site_id` so the SPA can link an appointment to a task or site (`src/modules/calendar/models.rs`, `src/pages/calendar.rs`). - KB recent-articles request drops the no-op `sort` / `sort_dir` params the server ignores (`src/pages/knowledge_base.rs`). - KB article `author_id` recorded as no-fix (serde drops the unknown key; no author display) (`src/modules/kb/models.rs`). - contracts edit/delete + rate-card-item routes documented as intentionally ahead of the UI (`src/pages/contracts.rs`). - mokosh-server `/api/v1/auth/*` surface confirmed backend-only / not SPA-facing (`src/modules/oidc/config.rs`). - mokosh-server settings surface confirmed hub-only (`src/pages/profile.rs`). - audit DTO recorded as a verified-clean baseline, no change (`src/modules/audit/models.rs`). Deliberately out of scope for this local PR (each needs the mokosh-server repo, a live server to verify, or an architecture decision that is the user's call; track as follow-ups): - structural source of truth: depend on `mokosh-types` (forks deleted) vs a CI diff gate. Needs the server crate / both repos in CI plus a design decision; covers the `time_tracking` / `contracts` / `contacts` / `tenants` / `calendar` forks and the `NotificationPage` decode struct. - ticket-create `priority_id` resolution and ticket-list status/priority/`q` filter forwarding: runtime fixes that must be verified against the live `/tickets` + `/tickets/priorities` contracts. - portal KB 401: portal-vs-agent auth flow change, needs the live portal auth surface. - company `company_type` and contact `company_name` sorts: changes live in the mokosh-server repo (`src/modules/contacts/service.rs`), not this repo. #MAPPS-138
chore(contracts): align local DTOs and document mokosh-server drift (MAPPS-138)
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m59s
1260e374ba
Closes the server-independent subset of the cross-repo contract-drift audit. These changes are verifiable with `just check` (wasm check + clippy + fmt) and `just test`, none requiring the mokosh-server repo or a live server.

Addressed acceptance criteria:

- time-entry `duration_minutes` aligned to `i32` to match the server `TimeEntryResponse` (`src/pages/tickets.rs`).
- contracts and SLA `rust_decimal`-as-JSON comments corrected: under the `rust_decimal` `serde` feature the server serializes `Decimal` as a JSON string, not a number; the client enables the same feature so it decodes losslessly (`src/modules/contracts/models.rs`, `src/modules/sla/models.rs`).
- calendar `CreateAppointmentRequest` now carries optional `task_id` / `site_id` so the SPA can link an appointment to a task or site (`src/modules/calendar/models.rs`, `src/pages/calendar.rs`).
- KB recent-articles request drops the no-op `sort` / `sort_dir` params the server ignores (`src/pages/knowledge_base.rs`).
- KB article `author_id` recorded as no-fix (serde drops the unknown key; no author display) (`src/modules/kb/models.rs`).
- contracts edit/delete + rate-card-item routes documented as intentionally ahead of the UI (`src/pages/contracts.rs`).
- mokosh-server `/api/v1/auth/*` surface confirmed backend-only / not SPA-facing (`src/modules/oidc/config.rs`).
- mokosh-server settings surface confirmed hub-only (`src/pages/profile.rs`).
- audit DTO recorded as a verified-clean baseline, no change (`src/modules/audit/models.rs`).

Deliberately out of scope for this local PR (each needs the mokosh-server repo, a live server to verify, or an architecture decision that is the user's call; track as follow-ups):

- structural source of truth: depend on `mokosh-types` (forks deleted) vs a CI diff gate. Needs the server crate / both repos in CI plus a design decision; covers the `time_tracking` / `contracts` / `contacts` / `tenants` / `calendar` forks and the `NotificationPage` decode struct.
- ticket-create `priority_id` resolution and ticket-list status/priority/`q` filter forwarding: runtime fixes that must be verified against the live `/tickets` + `/tickets/priorities` contracts.
- portal KB 401: portal-vs-agent auth flow change, needs the live portal auth surface.
- company `company_type` and contact `company_name` sorts: changes live in the mokosh-server repo (`src/modules/contacts/service.rs`), not this repo.

#MAPPS-138
Merge branch 'main' into chore/mapps-138-contract-drift-local-subset
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 2m32s
6ceab49fc4
David merged commit fc84bc542f into main 2026-06-13 14:55:24 +02:00
David deleted branch chore/mapps-138-contract-drift-local-subset 2026-06-13 14:55:24 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psa-systems/mokosh-apps!125
No description provided.