Skip to content

Comments

added a new collection called documents that contains only letters, files and documents #22

Open
Ajay-AJ7899 wants to merge 1 commit intoRhysSullivan:mainfrom
Ajay-AJ7899:feat/documents-index
Open

added a new collection called documents that contains only letters, files and documents #22
Ajay-AJ7899 wants to merge 1 commit intoRhysSullivan:mainfrom
Ajay-AJ7899:feat/documents-index

Conversation

@Ajay-AJ7899
Copy link

In this PR, the backend and UI were extended to support a new “documents” mode alongside the existing people‑based browsing. The shared FileItem type in cache.ts now includes an optional type field so items can be labelled as documents, or other file kinds. In the worker index.ts, helper constants and functions were introduced to recognize document‑like objects (by extension or name keywords), and the /api/all-files and /api/files responses were updated to propagate this type and classify each file accordingly. A new POST endpoint, /api/build-documents-index, was added to scan the R2 bucket for document‑type files and write a dedicated indexes/documents-index.json containing only those entries. On the frontend, celebrity-combobox.tsx was generalized with placeholder and allLabel props plus adaptive empty‑state text so it can be reused for documents as well as people. Finally, file-browser.tsx gained a searchMode (People/Documents), a mode selector, a virtual “Documents” collection in the dropdown, a derived documentsList wired into the combobox, and updated collection filtering logic that treats "documents" as a virtual collection showing only items where type === "document".

…les where type === document like the letters and written documents also updated
@vercel
Copy link

vercel bot commented Dec 22, 2025

@Ajay-AJ7899 is attempting to deploy a commit to the Rhys's Projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant