feat: mock edit/delete, session & mock management UX, hardened CI#321
Merged
Conversation
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>
Builds on the edit/delete feature with a round of UX work: - Edit/delete mocks: success/error toasts, and when a mock is read-only the disabled controls carry a reason-aware tooltip + a notice explaining why (not the latest session, or the session has calls in its history) with an actionable "switch to latest" / "clear history" button. - Delete a session from the sidebar's edit popover, backed by a new additive DELETE /sessions/:id endpoint (mock format and existing API unchanged). - Clear the session history from a button on the History page. - Sidebar: sort sessions by date (newest first by default) via a toggle, and dim non-latest (read-only) sessions; sidebar widens with the viewport. - Filter mocks and history with a search box; search and pagination live in the URL query so a filtered/paginated view is shareable. - View any mock as read-only raw YAML via a per-mock toggle. - Harmonize every interactive tooltip/title on antd Tooltip with imperative wording; surface import errors instead of leaving the uploader spinning. - Harden the Playwright TNR to 35 tests and add DeleteSession service coverage. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Least-privilege permissions (contents: read by default; deploy elevates). - Cancel superseded pull-request runs via a concurrency group. - Pin every action to a commit SHA (version in a comment) and add a Dependabot config (github-actions, weekly, grouped) to keep them fresh. - Replace the deprecated sonarcloud-github-action@master with a pinned SonarSource/sonarqube-scan-action. - Use go-version-file: go.mod for a reproducible toolchain. - Set persist-credentials: false on every checkout (no job pushes with git). - Add a security job: npm audit (shipped deps, high+) and govulncheck, and gate deploy on it. - Support draft / preview releases that never override "Latest": the release flavor is derived from the tag suffix (-draft -> draft, -<any> -> prerelease, bare semver -> latest) and wired into softprops/action-gh-release. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds mock edit/delete plus a round of session & mock management UX, and brings the
CI to 2026 best practices. The mock format, its serialization, and the existing HTTP/CLI
API are unchanged — the only backend addition is one additive endpoint (
DELETE /sessions/:id).Mocks
reason-aware tooltip + a notice ("not the latest session" or "has calls in history")
with a "switch to latest" / "clear history" action.
Sessions
DELETE /sessions/:id).Shareable views
CI (2026 SOTA)
govulncheck+npm auditsecurity gate;go-version-file: go.mod.Test plan
make test+make test-integration(venom),npm test(Vitest, 64), golden serialization tests.tsc,oxlint,golangci-lint(0 issues),govulncheck(0 reachable),npm audit(0 high+).Closes #299
Closes #266
Closes #303
🤖 Generated with Claude Code