File list: Tags column + Status (lock) column, live lock state (#695 item 6a) #743

Closed
opened 2026-09-25 14:29:42 +00:00 by Cordy · 1 comment
Owner

Triage decision from the #695 one-by-one pass (mockup approved in chat).

Tags column (between Name and Size): display-and-navigate chips reusing the details-pane tagchip look. Click runs the existing tag:x search; overflow folds into "+n" which opens the details pane. Editing stays in the details pane. Hides first on narrow widths (~<1100px).

Status column (34px, icon-only): an amber lock glyph when the file is locked — the mechanic exists (internal/storage/filelock, fed by WebDAV LOCK/UNLOCK in internal/dav and Collabora/WOPI locks via internal/api/locks.go) but was never surfaced. Hover title says who and via what: "Locked — {user} is editing in Collabora" / "Locked via WebDAV — {user}, expires in {m} min". Empty when unlocked. Survives to the narrowest list; tiles get the glyph in the thumb corner. Shared chips are untouched — Status is only about locks. Locked rows are not blocked in the UI; the server already arbitrates writes.

Server: GET /api/v1/files items gain tags: [] (from tags.Get, gated with the tags feature) and lock: {by, kind, expires} (from the same filelock.Covering source keydrain consults; kind dav|office). Search results and Shared with me carry the same fields (decided: free win). New GET /api/v1/locks?path= returns the lock map for a directory's children so the client can refresh lock state without re-listing.

Freshness (decided): the client arms one timer for the earliest expires among visible locked rows; when it fires it re-fetches /api/v1/locks for the open folder and patches the Status cells in place (no full re-render, selection preserved), then re-arms. Locks appearing show on navigation/reload; the details pane re-checks when opened.

Part of the v0.7 extended deep dive; mobile sizing of the new cells rides #389.

Triage decision from the #695 one-by-one pass (mockup approved in chat). **Tags column** (between Name and Size): display-and-navigate chips reusing the details-pane `tagchip` look. Click runs the existing `tag:x` search; overflow folds into "+n" which opens the details pane. Editing stays in the details pane. Hides first on narrow widths (~<1100px). **Status column** (34px, icon-only): an amber lock glyph when the file is locked — the mechanic exists (`internal/storage/filelock`, fed by WebDAV LOCK/UNLOCK in `internal/dav` and Collabora/WOPI locks via `internal/api/locks.go`) but was never surfaced. Hover title says who and via what: "Locked — {user} is editing in Collabora" / "Locked via WebDAV — {user}, expires in {m} min". Empty when unlocked. Survives to the narrowest list; tiles get the glyph in the thumb corner. Shared chips are untouched — Status is only about locks. Locked rows are not blocked in the UI; the server already arbitrates writes. **Server:** `GET /api/v1/files` items gain `tags: []` (from `tags.Get`, gated with the tags feature) and `lock: {by, kind, expires}` (from the same `filelock.Covering` source keydrain consults; kind dav|office). Search results and Shared with me carry the same fields (decided: free win). New `GET /api/v1/locks?path=` returns the lock map for a directory's children so the client can refresh lock state without re-listing. **Freshness (decided):** the client arms one timer for the earliest `expires` among visible locked rows; when it fires it re-fetches `/api/v1/locks` for the open folder and patches the Status cells in place (no full re-render, selection preserved), then re-arms. Locks *appearing* show on navigation/reload; the details pane re-checks when opened. Part of the v0.7 extended deep dive; mobile sizing of the new cells rides #389.
Author
Owner

Scope corrected after code archaeology + final triage decisions:

Already built by #315: shared filelock.Store (owner/type/token/expires), real WebDAV LOCK→dav records, fillLocks on listings, a "Locked" name-cell chip. What was actually missing, now decided:

  1. Collabora sessions become visible: wopi.go implements the WOPI Lock/GetLock/RefreshLock/Unlock operations, writing office-type records (30-min TTL, refreshed by Collabora) into the same store. Conflict → 409 + X-WOPI-Lock per spec.
  2. Status column (34px, icon-only) replaces the name-cell "Locked" chip: amber lock glyph, tooltip "Locked by {name}" — no kind/expiry wording in the UI (everyday users don't care how it's locked). Type stays on the record for the admin Locks page and audit. Shared/Public/On-hold chips are untouched.
  3. Tags column as mocked (chips, click = tag:x search, "+n" opens details pane; editing stays in the pane). Hides first on narrow widths; Status survives to the narrowest list; tiles get the lock glyph in the thumb corner.
  4. Search results go through the same enrichment (enrichItems + fillLocks + tags) — search rows gain shared/hold chips, the Status lock and the Tags column for free.
  5. Shared with me rows carry locked/lockOwner and show the glyph.
  6. Freshness: fillLocks also forwards lockExpires; the client arms one timer for the earliest expiry among visible locks, re-fetches the new GET /api/v1/locks?path= for the open folder, patches Status cells in place, re-arms. Locks appearing show on navigation; details pane re-checks on open.
**Scope corrected after code archaeology + final triage decisions:** Already built by #315: shared `filelock.Store` (owner/type/token/expires), real WebDAV LOCK→`dav` records, `fillLocks` on listings, a "Locked" name-cell chip. What was actually missing, now decided: 1. **Collabora sessions become visible**: `wopi.go` implements the WOPI Lock/GetLock/RefreshLock/Unlock operations, writing `office`-type records (30-min TTL, refreshed by Collabora) into the same store. Conflict → 409 + `X-WOPI-Lock` per spec. 2. **Status column** (34px, icon-only) replaces the name-cell "Locked" chip: amber lock glyph, tooltip **"Locked by {name}"** — no kind/expiry wording in the UI (everyday users don't care how it's locked). `Type` stays on the record for the admin Locks page and audit. Shared/Public/On-hold chips are untouched. 3. **Tags column** as mocked (chips, click = `tag:x` search, "+n" opens details pane; editing stays in the pane). Hides first on narrow widths; Status survives to the narrowest list; tiles get the lock glyph in the thumb corner. 4. **Search results go through the same enrichment** (`enrichItems` + `fillLocks` + tags) — search rows gain shared/hold chips, the Status lock and the Tags column for free. 5. **Shared with me** rows carry `locked/lockOwner` and show the glyph. 6. **Freshness**: `fillLocks` also forwards `lockExpires`; the client arms one timer for the earliest expiry among visible locks, re-fetches the new `GET /api/v1/locks?path=` for the open folder, patches Status cells in place, re-arms. Locks appearing show on navigation; details pane re-checks on open.
Cordy closed this issue 2026-09-25 15:29:34 +00:00
Sign in to join this conversation.
No labels
No milestone
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#743
No description provided.