In ui/src/org/OrgAccessPage.vue, the New policy button (:111) only sets editing = true. It does not reset draft, so with policy X open the form still holds X, and Save overwrites X. Choosing Edit on another row (:73-76) drops unsaved edits without asking.
The policy id stays editable while editing (:139-159), so changing it writes a new policy and leaves the original in place.
Done when: New policy opens a blank draft, the id is read-only when editing an existing policy, and leaving a dirty draft asks first.
In `ui/src/org/OrgAccessPage.vue`, the New policy button (`:111`) only sets `editing = true`. It does not reset `draft`, so with policy X open the form still holds X, and Save overwrites X. Choosing Edit on another row (`:73-76`) drops unsaved edits without asking.
The policy id stays editable while editing (`:139-159`), so changing it writes a new policy and leaves the original in place.
Done when: New policy opens a blank draft, the id is read-only when editing an existing policy, and leaving a dirty draft asks first.
Fixed in a2c63415 and pushed. New policy calls newPolicy(), which resets draft+snapshot and opens a blank form — it no longer reuses the open policy's draft, so Save can't overwrite it. The id Input is :readonly="editingExisting", so editing an existing policy can't write a second one on rename. edit()/newPolicy()/cancel() all go through openForm(): when the draft differs from its snapshot (dirty computed), a Discard-unsaved-changes AlertDialog asks first; confirming runs the pending action. Verified: task check exited 0 on the committed tree (vue-tsc typecheck, pnpm test, vite build, go gate).
Fixed in a2c63415 and pushed. New policy calls newPolicy(), which resets draft+snapshot and opens a blank form — it no longer reuses the open policy's draft, so Save can't overwrite it. The id Input is :readonly="editingExisting", so editing an existing policy can't write a second one on rename. edit()/newPolicy()/cancel() all go through openForm(): when the draft differs from its snapshot (dirty computed), a Discard-unsaved-changes AlertDialog asks first; confirming runs the pending action. Verified: task check exited 0 on the committed tree (vue-tsc typecheck, pnpm test, vite build, go gate).
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.
In
ui/src/org/OrgAccessPage.vue, the New policy button (:111) only setsediting = true. It does not resetdraft, so with policy X open the form still holds X, and Save overwrites X. Choosing Edit on another row (:73-76) drops unsaved edits without asking.The policy id stays editable while editing (
:139-159), so changing it writes a new policy and leaves the original in place.Done when: New policy opens a blank draft, the id is read-only when editing an existing policy, and leaving a dirty draft asks first.
Fixed in
a2c63415and pushed. New policy calls newPolicy(), which resets draft+snapshot and opens a blank form — it no longer reuses the open policy's draft, so Save can't overwrite it. The id Input is :readonly="editingExisting", so editing an existing policy can't write a second one on rename. edit()/newPolicy()/cancel() all go through openForm(): when the draft differs from its snapshot (dirty computed), a Discard-unsaved-changes AlertDialog asks first; confirming runs the pending action. Verified: task check exited 0 on the committed tree (vue-tsc typecheck, pnpm test, vite build, go gate).Fixed in
a2c63415and pushed to main. Gate: task check exited 0 on the committed tree.