Q121: a file id keeps the bytes it was recorded with; rewrites get new ids

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-08 19:34:44 -04:00
1 parent 04c8cce0c4
commit 8f192eabe7
11 files changed
+143 -19

No files matched your search

+2 -1
View File
@@ -24,7 +24,8 @@ export function FilesPage({ snapshot, actions }: PageProps) {
const orgId = activeOrgId(snapshot);
const employees = snapshot.employees.filter((employee) => employee.orgId === orgId);
const agents = snapshot.agents.filter((agent) => agent.orgId === orgId);
const files = useMemo(() => snapshot.files.filter((file) => file.orgId === orgId), [snapshot.files, orgId]);
// Older contents of a rewritten file stay attachable by id but are not listed.
const files = useMemo(() => snapshot.files.filter((file) => file.orgId === orgId && !file.supersededAt), [snapshot.files, orgId]);
const fileAccessGrants = useMemo(
() => snapshot.fileAccessGrants.filter((grant) => grant.orgId === orgId),
[snapshot.fileAccessGrants, orgId],