Approval withdrawal: warning + edit-event-instead path #83
Open
opened 2026-05-25 11:23:38 +00:00 by mAi
·
1 comment
No Branch/Tag Specified
main
mai/knuth/narrow-assess-to-the
mai/knuth/editor-four-part-fix
mai/knuth/editor-first-real-edit
mai/knuth/wire-build-patentstyle
mai/ritchie/build-patentstyle-unguarded
mai/knuth/rescue-cited-design
mai/ritchie/vendor-guard-first-catch
mai/knuth/stale-branch-triage
mai/ritchie/stale-negative-claims
mai/knuth/reset-form-language-and-email
mai/knuth/adopt-mauth-module
mai/knuth/reset-link-scanner-safe
mai/knuth/registry-coherence-139-postscript
mai/ritchie/db-test-packages-sh-and
mai/knuth/gen-skeleton-submission
mai/knuth/retire-skeleton-generator-tier5
mai/jason/seed-orphan-drafts-guard
mai/knuth/ci-lane-no-dsn
mai/jason/seed-script-prod-guard
mai/knuth/skeleton-doccomment-completeness
mai/brunel/harness-findings-postscript
mai/hades/dead-surface-sweep
mai/brunel/views-eventkind-flake
mai/jason/issue-158-service-address
mai/knuth/issue-139-letterhead-vars
mai/cronus/issue-148-trigger-picker
mai/hades/issue-155-followup
mai/hades/issue-155-naming
mai/brunel/escalation-visibility-flag
mai/jason/alles-overrides-horizon
mai/knuth/m-paliad-150-part-b-m
mai/hades/issue-161-zustandigkeit
mai/cronus/m-paliad-160-per-user
mai/jason/issue-163-parties-role
mai/ares/issue-162-one-convention
mai/brunel/m-paliad-115-the-sweep-s
mai/goodall/for-every-check-in-this
mai/knuth/land-darwin-s-follow-up
mai/diesel/guard-report-lib
mai/diesel/issue-139-slice-b
mai/diesel/issue-139-letterhead-vars
mai/darwin/148-crossparty-ui
mai/diesel/m-paliad-158-a-stale
mai/darwin/vacation-doc-warnings
mai/darwin/upc-vacation-findings
mai/darwin/rop-citation-fix
mai/darwin/issue-150-holidays
mai/ritchie/build-the-block-editor
mai/darwin/swallowed-cleanup-errors
mai/darwin/formalities-refusal-schema4
mai/darwin/drift-caveat-shape
mai/darwin/http-smoke-enforcing
mai/darwin/s6-round-3
mai/darwin/loops-acting-user
mai/darwin/s6-rehearsal-round-2
mai/darwin/close-the-s6-blockers
mai/darwin/rehearse-the-s6-flip
mai/knuth/drilling-the-scheduled
mai/brunel/21-test-files-under-pkg
mai/atlas/design-hlc-com-as
mai/hopper3/a-hand-run-can-advance
mai/grace4/re-vendor-mai
mai/grace3/vendor-the-nine-german
mai/head/slug-rule-contract
mai/head/vendor-contract-note
mai/grace2/wiki-generator-language
mai/marco/verify-the-outlook-add
mai/pike2/an-explicit-begin-commit
mai/noether5/remove-the-paris-p3-and
mai/lexy2/r2-backfill-procedural
mai/kepler/issue-502-hl-to-hlc
mai/hertz2/r4-litigationplanner
mai/shannon2/docker-compose-yml-never
mai/linus2/r3-finish-the-b-5
mai/zeus2/guard-no-live-sql-string
mai/galileo2/the-embedded-upc-planner
mai/kepler2/slice-b-procedural
mai/diesel2/mig044-erwiderung-repair
mai/diesel2/fresh-db-replay-past-mig
mai/head/gen-upc-snapshot-dead-table
mai/noether4/offices-export-regen-201
mai/noether4/base-p1-genericize-m
mai/hopper/finish-the-half-built
mai/pike/dead-migration-tests
mai/linus/audit-comment-fix
mai/linus/fristensuche-82-search
mai/linus/b7-checklists
mai/linus/b8-frontend-pure-logic
mai/pike/b5-auth-path-coverage
mai/diesel/rule-test-resync
mai/diesel/regression-m-confirmed
mai/patton/b1-make-the-dormant-test
mai/athena/test-gap-audit-map
mai/diesel/kostenrechner-bug-upc
mai/hopper/patentsstyle-styleguide
mai/pike/re-render-patentsstyle
mai/linus/firm-footer-officelanguag
mai/carmack/re-render-deploy
mai/diesel/fresh-db-bootstrap
mai/pike/follow-up-gen-template
mai/turing/docforge-flip
mai/cronus/bighand-delimiter-constant
mai/ritchie/composer-delete-all
mai/atlas/inventor-followup-rules
mai/knuth/coder-conditional-rule
mai/cronus/inventor-ci-cd-pre
mai/demeter/gitster-submission
mai/atlas/inventor-per-event-card
mai/cronus/inventor-procedural
mai/cronus/inventor-backup-mode
mai/icarus/inventor-inbox-overhaul
mai/atlas/inventor-symmetric-date
mai/gauss/inventorcoder-team-admin
mai/kepler/inventorcoder-project
mai/darwin/roadmap-ccr-en
mai/euler/coder-small-ux-polish
mai/darwin/fristenrechner-cleanup
mai/darwin/fixercoder-priority-bug
mai/leibniz/inventor-caldav-multi
mai/hertz/inventor-unified-modal
mai/archimedes/inventor-excel-data
mai/boltzmann/inventor-gap-tolerant
mai/copernicus/submission-slice-1
mai/fermi/interactive-session
mai/hertz/inventor-suggest-changes
mai/copernicus/inventor-submission
mai/mendel/test-strategy-slice-1
mai/ampere/custom-views-improvements
mai/planck/paliadin-per-user-rls
mai/ritchie/phase-h-ai-deadline
No results found.
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: m/paliad#83
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
m's report (2026-05-25 13:08)
Scope
Currently: withdrawing an approval request silently deletes the underlying event. m wants:
What to do
frontend/src/client/approvals.tsor similarinternal/handlers/approvals.goapproval-withdrawn-via-editvsapproval-withdrawn-and-deleted.Files most likely touched
frontend/src/client/approvals.tsfrontend/src/client/i18n.ts— confirm dialog copyinternal/handlers/approvals.go— split the destructive path from the edit-instead path; audit-log distinctioninternal/services/approval_service.go(if exists)Hard rules
go build ./... && go test ./internal/... && cd frontend && bun run buildclean.mai/<worker>/approval-withdraw-warning.Out of scope
Reporting
mai report completedwith branch + SHAs + the UX path: trigger withdraw → see modal → pick "Edit event" → event editor opens → save → confirm approval request is alive with new state; alternative: pick destructive → confirm event + request deleted; cancel: nothing changes.Done — branch
mai/artemis/gitster-approval-withdrawCommit:
72b6414New shared modal, new backend endpoint, both deadline + appointment detail pages wired. No schema migration needed — re-uses the existing counter-allowlist (
buildCounterSetClauses) fromSuggestChanges(t-paliad-216).UX paths
Trigger. Click "Genehmigungsanfrage zurückziehen" on a pending deadline / appointment you authored.
Modal copy (adapts to lifecycle):
"Wenn Sie die Anfrage zurückziehen, wird die Frist/der Termin gelöscht.""Ihre vorgeschlagenen Änderungen werden verworfen — der Eintrag kehrt in den Zustand vor Ihrer Bearbeitung zurück.""Wenn Sie die Löschanfrage zurückziehen, bleibt der Eintrag bestehen."Three paths:
POST /api/approval-requests/{id}/edit-entitywith the new field payload. The approval request stays pending; the entity row +approval_request.payloadare synced to the new values. Audit row:<entity>_approval_edited_by_requester(new event type, distinct from the original*_requestedrow)./revokeendpoint runs unchanged. For CREATE that hard-deletes the entity (the surprise m flagged); for UPDATE/COMPLETE it reverts topre_image; for DELETE it cancels the delete request. Audit row:<entity>_approval_revoked.Audit distinction (per spec)
Two paths emit different
project_events.event_typerows so the Verlauf reads correctly:<entity>_approval_edited_by_requester(new)<entity>_approval_revoked(existing)applyRevert(= DELETE for CREATE)Backend
ApprovalService.EditPendingEntity(ctx, requestID, callerID, fields)— new service method.requested_byAND status MUST bepending. ReturnsErrNotApprover/ErrRequestNotPendingotherwise.buildCounterSetClauses(the wider counter-allowlist fromSuggestChanges) — every editable field on the entity, not just the date-bearing approval triggers. Unknown keys silently dropped. Empty-fields / title-cleared →ErrSuggestionRequiresChange.applyEntityUpdate(incl.event_type_idsjunction rewrite for deadlines).approval_requests.payloadmerged with new fields (jsonb deep-merge usingmaps.Copy).project_eventsrow inserted with new*_approval_edited_by_requesterevent type + metadata{edited_fields: [...]}.POST /api/approval-requests/{id}/edit-entity— new handler ininternal/handlers/approvals.go.{"fields": {<entity-shape>}}mapApprovalError: 400suggestion_requires_change, 403not_authorized, 404, 409request_not_pending.Frontend
frontend/src/client/components/withdraw-warning-modal.ts— new shared modal built onopenModal()primitive (t-paliad-217 Slice A). Adapts copy by lifecycle, exposes 3 paths via destructive-button-in-body + primary CTA in footer.frontend/src/client/deadlines-detail.ts—initWithdrawrewrite; Save handler branches onpendingEditModeto the new endpoint.frontend/src/client/appointments-detail.ts— same pattern; appointment edit form already lives inline (always visible, frozen during pending) sopendingEditModeunfreezes it.approvals.withdraw.*..withdraw-warning-body+.withdraw-warning-{intro,sub,destructive-row,destructive-btn}.Build hygiene
go build ./...cleango vet ./...cleango test ./internal/...clean (no new tests — the new path uses the SQL infrastructure that already has live-DB coverage viaSuggestChanges)bun run buildclean (2807 keys, +14 new, scan clean)Out of scope (intentionally, per spec)
Ready for maria's review + merge. Awaiting head merge gate.