feat(drive): move UI to {created,updated}_by

This commit is contained in:
Edouard Vanbelle
2026-07-03 00:31:36 +02:00
parent 206a780494
commit 29bcf48eb7
13 changed files with 59 additions and 6 deletions
+6 -2
View File
@@ -42,7 +42,11 @@
const entries = $derived(
raw.map((it): ResourceEntry => {
const isFile = it.resource_type === 'file';
const ownerId = it.resource.owner_id ?? null;
// §14 provenance — Recent's mental model is "who touched
// this recently", so `updated_by` (the last mutator) is
// preferred over `created_by` (who put it in). Fall back
// to `owner_id` for pre-D7 rows with no provenance.
const ownerId = it.resource.updated_by ?? it.resource.owner_id ?? null;
return {
id: it.resource.id,
name: it.resource.name,
@@ -118,7 +122,7 @@
});
raw = reset ? page.items : [...raw, ...page.items];
cursor = page.next_cursor;
void owners.resolve(page.items.map((i) => i.resource.owner_id));
void owners.resolve(page.items.map((i) => i.resource.updated_by ?? i.resource.owner_id));
} catch (e) {
console.error('recent: load error', e);
error = t('errors_loadFailed', 'Failed to load items');