Web route: /document_storage (protected).
Source: llm-fe/src/llm-fe/pages/DocumentStoragePage/DocumentStoragePage.tsx, utils/drive.ts.
Header shows Documents only when the subscription has RAG (hasRag).
Screenshot
Not attached. Route redirects to Sign in without a session. Capture both states after sign-in: the upgrade card (no RAG) and the document workspace (RAG).
Behavior
While subscription status is loading, show “Loading…”.
No RAG: card “Unlock document storage”. Copy says uploads and cloud drives need a plan with RAG document search. Button “Upgrade in Billing” goes to Account.
RAG: workspace.
Scope tabs company and personal when the user has a company. Users without a company stay on personal.
Table: name, uploaded date, active toggle, processed state. Page size 20. Search debounces 300ms and resets to page 1. Sort toggles created (default -created) and the other sort fields the table exposes.
Upload card: pick a file, then Upload.
Cloud drives (personal): connect Google Drive or OneDrive, pick folders, sync.
Company knowledge sources only for is_company_manager: shared Google Drive or Microsoft 365 site.
After OAuth returns with ?drive_connected=1, show “Drive connected. Choose folders below…” and strip the query param.
Return path on web is /auth/callback/, then /document_storage/?drive_connected=1.
RAG entitlement comes from GET /monetization/subscription/ (same payload Account uses).
Android
New screen, linked from the header only when the plan includes RAG. Drive connect needs a Custom Tab and a return deep link.
Part of #1.
Web route: `/document_storage` (protected).
Source: `llm-fe/src/llm-fe/pages/DocumentStoragePage/DocumentStoragePage.tsx`, `utils/drive.ts`.
Header shows **Documents** only when the subscription has RAG (`hasRag`).
## Screenshot
Not attached. Route redirects to Sign in without a session. Capture both states after sign-in: the upgrade card (no RAG) and the document workspace (RAG).
## Behavior
- While subscription status is loading, show “Loading…”.
- No RAG: card “Unlock document storage”. Copy says uploads and cloud drives need a plan with RAG document search. Button “Upgrade in Billing” goes to Account.
- RAG: workspace.
- Scope tabs **company** and **personal** when the user has a company. Users without a company stay on personal.
- Table: name, uploaded date, active toggle, processed state. Page size 20. Search debounces 300ms and resets to page 1. Sort toggles `created` (default `-created`) and the other sort fields the table exposes.
- Upload card: pick a file, then Upload.
- **Cloud drives** (personal): connect Google Drive or OneDrive, pick folders, sync.
- **Company knowledge sources** only for `is_company_manager`: shared Google Drive or Microsoft 365 site.
- After OAuth returns with `?drive_connected=1`, show “Drive connected. Choose folders below…” and strip the query param.
## API
| Call | Purpose |
| --- | --- |
| `GET /documents/` | Query `workspace` (`company`\|`personal`), `page`, `page_size` (20), `search`, `ordering`. Response `{ count, results[] }` with `id`, `file`, `created`, `active`, `processed`. |
| `POST /documents/` | Multipart field `file`. Query `workspace`. |
| `PATCH documents_details/{id}` | Body `{ active }`. Optimistic toggle; revert on failure. |
| `GET /drive/connections/` | Connected drives. |
| `GET /drive/connections/{id}/resources/` | Folders/sites to select. |
| `POST /drive/connections/{id}/sync/` | Sync the selection into the knowledge base. |
| `DELETE /drive/connections/{id}/` | Disconnect. |
Connect starts a browser OAuth redirect:
- Personal: `{API}/auth/oauth/{google|microsoft}/start/?intent=link_drive`
- Company: same path with `intent=link_company_drive`
Return path on web is `/auth/callback/`, then `/document_storage/?drive_connected=1`.
RAG entitlement comes from `GET /monetization/subscription/` (same payload Account uses).
## Android
New screen, linked from the header only when the plan includes RAG. Drive connect needs a Custom Tab and a return deep link.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #1.
Web route:
/document_storage(protected).Source:
llm-fe/src/llm-fe/pages/DocumentStoragePage/DocumentStoragePage.tsx,utils/drive.ts.Header shows Documents only when the subscription has RAG (
hasRag).Screenshot
Not attached. Route redirects to Sign in without a session. Capture both states after sign-in: the upgrade card (no RAG) and the document workspace (RAG).
Behavior
created(default-created) and the other sort fields the table exposes.is_company_manager: shared Google Drive or Microsoft 365 site.?drive_connected=1, show “Drive connected. Choose folders below…” and strip the query param.API
GET /documents/workspace(company|personal),page,page_size(20),search,ordering. Response{ count, results[] }withid,file,created,active,processed.POST /documents/file. Queryworkspace.PATCH documents_details/{id}{ active }. Optimistic toggle; revert on failure.GET /drive/connections/GET /drive/connections/{id}/resources/POST /drive/connections/{id}/sync/DELETE /drive/connections/{id}/Connect starts a browser OAuth redirect:
{API}/auth/oauth/{google|microsoft}/start/?intent=link_driveintent=link_company_driveReturn path on web is
/auth/callback/, then/document_storage/?drive_connected=1.RAG entitlement comes from
GET /monetization/subscription/(same payload Account uses).Android
New screen, linked from the header only when the plan includes RAG. Drive connect needs a Custom Tab and a return deep link.