Show the locks an administrator's action carries or releases (transfer preview, Delete unread files) #1073

Closed
opened 2026-11-02 12:11:07 +00:00 by Cordy · 7 comments
Owner

Since #1056 (v0.6.386), administrator actions handle locks without showing them first. Under Nikola's decision of 2026-11-01:

  • An owner transfer carries the locks inside the transferred items. The departed person's own locks are released as stale.
  • Delete unread files and a space delete release the locks inside, audited as break-lock by the administrator with a reason=, and each holder gets the lock-broken bell.

The administrator sees none of this before confirming.

Proposal.

  • Transfer preview: one row when locks are involved, "N locked files: the locks move with them".
  • Delete unread files dialog: one row, "N locked files: their locks are removed and the holders are told". Name the holders when there are few.
  • GET /api/v1/admin/owners/estate gains the counts, computed with the same holder check the action will apply.
  • Space delete shows the same row.

Needs a whole-page mockup (both dialogs, EN/DE) and string approval first.

Refs. #1056, research-1056-folderlocks.md §6.2 option (c) and sub-question 10.

Since #1056 (v0.6.386), administrator actions handle locks without showing them first. Under Nikola's decision of 2026-11-01: - An owner transfer carries the locks inside the transferred items. The departed person's own locks are released as stale. - Delete unread files and a space delete release the locks inside, audited as `break-lock` by the administrator with a `reason=`, and each holder gets the `lock-broken` bell. The administrator sees none of this before confirming. **Proposal.** - Transfer preview: one row when locks are involved, "N locked files: the locks move with them". - Delete unread files dialog: one row, "N locked files: their locks are removed and the holders are told". Name the holders when there are few. - `GET /api/v1/admin/owners/estate` gains the counts, computed with the same holder check the action will apply. - Space delete shows the same row. Needs a whole-page mockup (both dialogs, EN/DE) and string approval first. **Refs.** #1056, research-1056-folderlocks.md §6.2 option (c) and sub-question 10.
Author
Owner

Research done (research-1073.md).

Market: I found no product that shows locks before an offboarding or deletion. Dropbox has an admin "Locked files" list with bulk unlock and tells the holder by email. Box's large-transfer warning is the closest precedent.

Traps in today's code

  • Reusing the store's lock count releases stale locks as a side effect, so merely opening the dialog would write audit records.
  • The listing holder check overstates space locks.
  • The estate answer is cached for 5 minutes.

Where locks really show up: mostly in the transfer dialog, and in Groups › Delete group with "Delete the space". That second path is missing from the issue.

Other findings

  • One bell per broken lock, capped at 20 per person, so a deleted space can flood a member's bell.
  • The admin Locks API returns lock tokens.
  • The Locks page swaps the Manual and Office labels.
  • In German, "gesperrte Dateien" already means files on legal hold.

Recommendation

  • A read-only lock census that writes nothing.
  • A locks object in the estate answer and in spaces/{name}/state.
  • One row per dialog that counts only locks still binding someone, names up to 3 holders and calls out open editors.
  • Real counts in the results, and one grouped bell per holder.
  • Fix the token exposure and the swapped labels.
  • 11 mockup frames. Decisions follow.
**Research done** (`research-1073.md`). **Market:** I found no product that shows locks before an offboarding or deletion. Dropbox has an admin "Locked files" list with bulk unlock and tells the holder by email. Box's large-transfer warning is the closest precedent. **Traps in today's code** - Reusing the store's lock count releases stale locks as a side effect, so merely opening the dialog would write audit records. - The listing holder check overstates space locks. - The estate answer is cached for 5 minutes. **Where locks really show up:** mostly in the transfer dialog, and in Groups › Delete group with "Delete the space". That second path is missing from the issue. **Other findings** - One bell per broken lock, capped at 20 per person, so a deleted space can flood a member's bell. - The admin Locks API returns lock tokens. - The Locks page swaps the Manual and Office labels. - In German, "gesperrte Dateien" already means files on legal hold. **Recommendation** - A read-only lock census that writes nothing. - A `locks` object in the estate answer and in `spaces/{name}/state`. - One row per dialog that counts only locks still binding someone, names up to 3 holders and calls out open editors. - Real counts in the results, and one grouped bell per holder. - Fix the token exposure and the swapped labels. - 11 mockup frames. Decisions follow.
Author
Owner

Decisions (Nikola, 2026-11-02): all recommendations approved.

  • Lock census: read-only, with no side effects.
  • Where the counts come from: the estate answer and the space-state answer, both computed outside the 5-minute cache.
  • Dialog row:
    • One row per dialog, counting only locks that still bind someone.
    • Up to 3 holder names.
    • Open editors called out in amber.
    • Also shown on Delete group with the space.
  • After the action: real counts in the results, and one grouped bell per holder.
  • Fixes included: no lock tokens in the admin Locks API, and the swapped Manual and Office labels corrected.
  • German wording: "zur Bearbeitung gesperrt".

Next: a mockup with 11 frames.

**Decisions (Nikola, 2026-11-02): all recommendations approved.** - **Lock census:** read-only, with no side effects. - **Where the counts come from:** the estate answer and the space-state answer, both computed outside the 5-minute cache. - **Dialog row:** - One row per dialog, counting only locks that still bind someone. - Up to 3 holder names. - Open editors called out in amber. - Also shown on Delete group with the space. - **After the action:** real counts in the results, and one grouped bell per holder. - **Fixes included:** no lock tokens in the admin Locks API, and the swapped Manual and Office labels corrected. - **German wording:** "zur Bearbeitung gesperrt". Next: a mockup with 11 frames.
Author
Owner

Mockup approved (Nikola, 2026-11-02): 1073-lock-rows-mockup.html. All 16 frames, the strings and the open points are approved:

  1. Amber is used only where an editor closes (the delete dialogs) and for "could not be counted". The transfer row stays neutral.
  2. The four German legal-hold strings change from "gesperrt" to "rechtliche Sperre".
  3. Delete group: the wrong "Files are not touched" text when the space is deleted is fixed, and the German "Bereich" becomes "Space". This needs one new key.
  4. Both outcomes are tested for a lock inside a deactivated space.
  5. The admin Locks API also drops the editor session id.
  6. The grouped bell names the space or folder as the holder saw it, with no link.
  7. The owner-path change after a transfer goes to a follow-up issue.
**Mockup approved** (Nikola, 2026-11-02): `1073-lock-rows-mockup.html`. All 16 frames, the strings and the open points are approved: 1. Amber is used only where an editor closes (the delete dialogs) and for "could not be counted". The transfer row stays neutral. 2. The four German legal-hold strings change from "gesperrt" to "rechtliche Sperre". 3. Delete group: the wrong "Files are not touched" text when the space is deleted is fixed, and the German "Bereich" becomes "Space". This needs one new key. 4. Both outcomes are tested for a lock inside a deactivated space. 5. The admin Locks API also drops the editor session id. 6. The grouped bell names the space or folder as the holder saw it, with no link. 7. The owner-path change after a transfer goes to a follow-up issue.
Author
Owner

Research on the 7 unsettled spec choices (research-1073-unsettled.md; code read at si1070 934b479a).

  1. locks=1 opt-in flag: confirmed. Opt-in for a costly part of an answer is the norm (Stripe expand; our own fresh=1). The Departed users list and the space menu fetch these answers without needing locks. Add a web test that all four dialogs send the flag; otherwise a missing flag silently shows no row.
  2. Zero is absent: changed. Our answers and audit notes write zeros everywhere (grants, linksPaused, held=0, links=0), and federated counts are present whenever federation is on. The exact-match tests the spec protects run without a lock store (&Handler{Owners: o}). Recommendation: write locksCarried / locksBroken / locksReleased and the note parts whenever a lock store is wired, 0 included. Audit then tells "none" from "not recorded", and today's test bytes stay. No done-line sentence and no bell at 0.
  3. locksCarried counts every carried record: confirmed. The audit records what moved; the gap to the row is only ever the admin's own lock. Optional: add locksReleased= to the transfer note too.
  4. Grouped bell name: changed (small). The backend fallback can name a folder of the departed person's home that the holder never saw. Recommendation: compute the common folder over the holder's own views. If a lock has no view, use the departed person's name.
  5. German values: confirmed, and extend. The style guide mandates "Space" and "rechtliche Sperre". The same collision exists in Italian, and it is worse there: file locks are "bloccato", yet dduRHeld, dduRHomeStays, dduRHomeStaysHeld, duHomeFilesHeld, depEstHeldChip and audDelUnreadHeld* say "bloccati" for holds. Two more DE keys on the same pages (depEstHeldChip, audDelUnreadHeld*) say "gesperrt" for holds. Drafts are in the file.
  6. kdLockRows: confirmed. In the same edit, also drop its long-dash fallback for a missing owner.
  7. Failed-tombstone residual: changed (narrowed). trashSpace already ends editors only after the tombstone succeeds. Recommendation: flush the "deleted" bells there too. On undo, send today's per-lock "removed your lock" bell instead, which is then true.

New open point: a grantee's WebDAV lock carried by a transfer becomes unusable for their client, because the URL changes from /shared/anna/... to /shared/eva/.... It still blocks others at the new path for up to 1 h (RFC 4918 6.1 item 8 would end it). Recommendation: add it to the grantee-path follow-up issue and to the handbook, with no change in this batch.

**Research on the 7 unsettled spec choices** (`research-1073-unsettled.md`; code read at si1070 934b479a). 1. **`locks=1` opt-in flag: confirmed.** Opt-in for a costly part of an answer is the norm (Stripe `expand`; our own `fresh=1`). The Departed users list and the space menu fetch these answers without needing locks. Add a web test that all four dialogs send the flag; otherwise a missing flag silently shows no row. 2. **Zero is absent: changed.** Our answers and audit notes write zeros everywhere (`grants`, `linksPaused`, `held=0`, `links=0`), and federated counts are present whenever federation is on. The exact-match tests the spec protects run without a lock store (`&Handler{Owners: o}`). Recommendation: write `locksCarried` / `locksBroken` / `locksReleased` and the note parts whenever a lock store is wired, 0 included. Audit then tells "none" from "not recorded", and today's test bytes stay. No done-line sentence and no bell at 0. 3. **`locksCarried` counts every carried record: confirmed.** The audit records what moved; the gap to the row is only ever the admin's own lock. Optional: add `locksReleased=` to the transfer note too. 4. **Grouped bell name: changed (small).** The backend fallback can name a folder of the departed person's home that the holder never saw. Recommendation: compute the common folder over the holder's own views. If a lock has no view, use the departed person's name. 5. **German values: confirmed, and extend.** The style guide mandates "Space" and "rechtliche Sperre". The same collision exists in **Italian**, and it is worse there: file locks are "bloccato", yet `dduRHeld`, `dduRHomeStays`, `dduRHomeStaysHeld`, `duHomeFilesHeld`, `depEstHeldChip` and `audDelUnreadHeld*` say "bloccati" for holds. Two more DE keys on the same pages (`depEstHeldChip`, `audDelUnreadHeld*`) say "gesperrt" for holds. Drafts are in the file. 6. **`kdLockRows`: confirmed.** In the same edit, also drop its long-dash fallback for a missing owner. 7. **Failed-tombstone residual: changed (narrowed).** `trashSpace` already ends editors only after the tombstone succeeds. Recommendation: flush the "deleted" bells there too. On undo, send today's per-lock "removed your lock" bell instead, which is then true. **New open point:** a grantee's WebDAV lock carried by a transfer becomes unusable for their client, because the URL changes from `/shared/anna/...` to `/shared/eva/...`. It still blocks others at the new path for up to 1 h (RFC 4918 6.1 item 8 would end it). Recommendation: add it to the grantee-path follow-up issue and to the handbook, with no change in this batch.
Author
Owner

Decisions on the spec's open choices (2026-11-02)

Nikola's decisions on section 9 of the lk1073 spec, based on the research in research-1073-unsettled.md (code read at si1070 934b479a). The spec (new section 9 "Decisions (2026-11-02)"), the plan and followup-issues.md are updated.

  1. locks=1 stays. New web test: all four dialogs (Transfer, Delete unread files, Delete space, Delete group with the space) send locks=1. The Departed users list and the space menu do not.
  2. Changed: zeros are written. locksCarried, locksBroken, locksReleased and the audit note parts are written whenever a lock store is wired, 0 included. They are left out only when there is no lock store. At 0 there is still no status-line sentence and no bell. The rigs of the exact-match tests have no lock store (transfer835_test.go:74, departed654_test.go:123), so their bytes stay. Every space-delete line now has a note.
  3. locksCarried still counts every carried record. New: locksReleased= in the owner-transfer note (... locks=<n> locksReleased=<m>).
  4. Changed: name in the grouped Delete unread files bell. It is the deepest common folder of the holder's own views of the locks. If any lock has no view for the holder, it is the departed person's name. It is never a backend folder the holder never saw.
  5. Wording fixes confirmed and extended (B). Italian legal-hold strings say "blocco legale" instead of "bloccati": dduRHeld, dduRHomeStays, dduRHomeStaysHeld, duHomeFilesHeld, depEstHeldChip, audDelUnreadHeld1, audDelUnreadHeld. These are drafts for approval. German depEstHeldChip and audDelUnreadHeld* say "rechtliche Sperre".
  6. kdLockRows uses lkKindLabel (confirmed). For a lock without an owner it now prints - instead of U+2014.
  7. Changed: bells after a failed space delete. The grouped "deleted" bells go out only after the tombstone write succeeds. If that write fails and the folder is put back, each holder gets today's per-lock "removed your lock" bell instead. Residual: the locks stay gone after the undo.
  • A: Grantees' WebDAV locks are carried to a path their client does not know. This goes into the grantee-path follow-up (RFC 4918 section 6.1 item 8), and the handbook gets one sentence on it.
  • C: covered by 1.
  • Smaller findings go to findings.md lines in the docs task. They are: German "Bereich" in about 20 values, German "Legal Hold" in 4 values, the three German words for owner, the audit page summaries not showing lock counts, and the mockup F4 icon. For the F4 icon the spec wins: the lock row uses the warning icon.
## Decisions on the spec's open choices (2026-11-02) Nikola's decisions on section 9 of the lk1073 spec, based on the research in `research-1073-unsettled.md` (code read at si1070 `934b479a`). The spec (new section 9 "Decisions (2026-11-02)"), the plan and `followup-issues.md` are updated. 1. **`locks=1` stays.** New web test: all four dialogs (Transfer, Delete unread files, Delete space, Delete group with the space) send `locks=1`. The Departed users list and the space menu do not. 2. **Changed: zeros are written.** `locksCarried`, `locksBroken`, `locksReleased` and the audit note parts are written whenever a lock store is wired, 0 included. They are left out only when there is no lock store. At 0 there is still no status-line sentence and no bell. The rigs of the exact-match tests have no lock store (`transfer835_test.go:74`, `departed654_test.go:123`), so their bytes stay. Every `space-delete` line now has a note. 3. **`locksCarried` still counts every carried record.** New: `locksReleased=` in the `owner-transfer` note (`... locks=<n> locksReleased=<m>`). 4. **Changed: name in the grouped Delete unread files bell.** It is the deepest common folder of the holder's own views of the locks. If any lock has no view for the holder, it is the departed person's name. It is never a backend folder the holder never saw. 5. **Wording fixes confirmed and extended (B).** Italian legal-hold strings say "blocco legale" instead of "bloccati": `dduRHeld`, `dduRHomeStays`, `dduRHomeStaysHeld`, `duHomeFilesHeld`, `depEstHeldChip`, `audDelUnreadHeld1`, `audDelUnreadHeld`. These are drafts for approval. German `depEstHeldChip` and `audDelUnreadHeld*` say "rechtliche Sperre". 6. **`kdLockRows` uses `lkKindLabel` (confirmed).** For a lock without an owner it now prints `-` instead of U+2014. 7. **Changed: bells after a failed space delete.** The grouped "deleted" bells go out only after the tombstone write succeeds. If that write fails and the folder is put back, each holder gets today's per-lock "removed your lock" bell instead. Residual: the locks stay gone after the undo. - **A:** Grantees' WebDAV locks are carried to a path their client does not know. This goes into the grantee-path follow-up (RFC 4918 section 6.1 item 8), and the handbook gets one sentence on it. - **C:** covered by 1. - **Smaller findings** go to `findings.md` lines in the docs task. They are: German "Bereich" in about 20 values, German "Legal Hold" in 4 values, the three German words for owner, the audit page summaries not showing lock counts, and the mockup F4 icon. For the F4 icon the spec wins: the lock row uses the warning icon.
Cordy closed this issue 2026-11-03 04:51:50 +00:00
Author
Owner

Strings approved (Nikola, 2026-11-03): the new and changed keys of v0.6.391 in DE/FR/IT as shipped. These are the lock-row keys (lk*, xferDoneLocks*, dduDoneLocks*), nLockGone1/nLockGoneN, the kind labels, lkNote, guDelCalmSpace, the German "Space" values and the Italian "blocco legale" values.

**Strings approved (Nikola, 2026-11-03):** the new and changed keys of v0.6.391 in DE/FR/IT as shipped. These are the lock-row keys (`lk*`, `xferDoneLocks*`, `dduDoneLocks*`), `nLockGone1`/`nLockGoneN`, the kind labels, `lkNote`, `guDelCalmSpace`, the German "Space" values and the Italian "blocco legale" values.
Author
Owner

Shipped in v0.6.391 (PR #1081, tag v0.6.391). Both dogfoods run it: pods ready, no restarts, no new WARN/ERROR lines.

What shipped:

  • Lock rows: Transfer, Delete unread files, Delete space and Delete group with the space now count the files locked for editing, name their holders and say what happens to the locks.
  • Counts after the action: in the answers, the status lines and the audit notes.
  • One grouped bell per holder: with a padlock.
  • Administration › Locks: no token or session in the answer, correct kind labels, and Break works by stored path (DELETE /api/v1/admin/locks?path=).
  • Administration › Spaces › Delete: now opens the Delete space dialog.
  • Wording: "rechtliche Sperre" and "blocco legale" for legal holds; "Space" in German.

Follow-up: #1084 (grantees are not told where a transferred item now appears; covers WebDAV locks too). Live checks are on #1005.

Shipped in **v0.6.391** (PR #1081, tag v0.6.391). Both dogfoods run it: pods ready, no restarts, no new WARN/ERROR lines. **What shipped:** - **Lock rows:** Transfer, Delete unread files, Delete space and Delete group with the space now count the files locked for editing, name their holders and say what happens to the locks. - **Counts after the action:** in the answers, the status lines and the audit notes. - **One grouped bell per holder:** with a padlock. - **Administration › Locks:** no token or session in the answer, correct kind labels, and Break works by stored path (`DELETE /api/v1/admin/locks?path=`). - **Administration › Spaces › Delete:** now opens the Delete space dialog. - **Wording:** "rechtliche Sperre" and "blocco legale" for legal holds; "Space" in German. **Follow-up:** #1084 (grantees are not told where a transferred item now appears; covers WebDAV locks too). Live checks are on #1005.
Sign in to join this conversation.
No labels
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: Cordy/Cairn#1073
No description provided.