You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: edit and delete mocks while the session has no calls
Most-requested feature (issues #299, #266, #303). Mocks stay append-only once the
session's history references them (a history entry is tied to the mock that
answered it), so edition/deletion is allowed only while the session history is
still empty — the maintainers' stated position on #231.
- Backend: additive PUT /mocks/:id and DELETE /mocks/:id. UpdateMock keeps the
mock's identity (ID + creation date) and replaces its definition; both refuse
with 409 once the session has received calls (types.MockEditForbidden). No
change to the mock format, its serialization, or the existing routes.
- Frontend: Edit/Delete controls on each mock, shown only once the history query
resolves empty. Edit reuses the creation drawer (form/YAML) pre-filled and PUTs;
Delete confirms via Popconfirm.
Tests: Go service tests (update/delete happy path, edit-forbidden-after-call,
not-found) and a Playwright TNR covering the edit+delete flow plus the gate
(no controls on the seeded session, which has a call).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments