Commit Graph

254 Commits

Author SHA1 Message Date
dc06d296a3 test(backend): test catalog HTTP error cases
Add tests for:
- moveItemsToDirectory (success, same-parent precondition, conflicts)
- createDirectory errors (parent not found, not a directory, duplicate)
- bulk delete type validation (files vs directories)- listDirectory
pagination (limit, cursor, invalid inputs)

Also fix test setup to use httperr.ErrorHandler so HTTPErrorstatus codes
are properly returned.

Co-authored-by: Ona <no-reply@ona.com>
2026-01-05 00:45:38 +00:00
d0c2a21ffd fix: add ResolveRenameOp to handle directory renames
RenameNode was calling Resolve() which generated blob keys for
directories that don't have blobs, causing 'key not found' errors.

Added ResolveRenameOp to BlobKeyResolver interface:
- FlatKeyResolver returns nil (UUIDs don't change on rename)
- HierarchicalKeyResolver returns move op for files and directories

This allows directory renames to work correctly with flat storage,
and leverages os.Rename for atomic directory moves with hierarchical.

Co-authored-by: Ona <no-reply@ona.com>
2026-01-04 23:58:43 +00:00
b8e1671248 test: add HTTP integration tests for catalog endpoints
Tests cover directory and file operations:
- List, fetch, create directories
- Fetch, download, rename files
- Trash and permanent delete (single and bulk)
- 404 for non-existent resources
- Verification that permanent deletes return 404

Directory rename test skipped due to VFS bug with blob
key resolution for directories.

Co-authored-by: Ona <no-reply@ona.com>
2026-01-04 23:54:30 +00:00
2fbfe534f9 dev: add gitpod automation task to setup nvim
Co-authored-by: Ona <no-reply@ona.com>
2026-01-04 23:13:06 +00:00
b178ad1781 dev: remove codex mount and add lazygit 2026-01-04 22:54:02 +00:00
4cbebdbba1 dev: configure GPG for non-interactive signing
Co-authored-by: Ona <no-reply@ona.com>
2026-01-04 18:57:36 +00:00
b9acedf35e dev: add setup-git.sh to postCreateCommand
Co-authored-by: Ona <no-reply@ona.com>
2026-01-04 18:57:32 +00:00
0b273ba01c dev: remove nvim mount
Co-authored-by: Ona <no-reply@ona.com>
2026-01-04 18:57:25 +00:00
e9114d8937 dev: fix Go version to 1.25
Co-authored-by: Ona <no-reply@ona.com>
2026-01-04 18:57:17 +00:00
921c9dd001 dev: remove codex global install from Dockerfile
Co-authored-by: Ona <no-reply@ona.com>
2026-01-04 18:57:06 +00:00
0c02929019 feat(fronend): wip org prefixed routing 2026-01-04 17:54:58 +00:00
86e90af5c2 feat(backend): hide drive uuid and return root dir 2026-01-04 17:48:51 +00:00
21a751c10b test(backend): add http test for organization pkg 2026-01-03 18:47:12 +00:00
55143bbbd6 test(backend): add http test for auth 2026-01-03 18:21:23 +00:00
8421e3acd1 dev: add nvim setup script 2026-01-03 16:19:03 +00:00
04698bcbf9 test(backend): add http test for registration 2026-01-03 16:18:42 +00:00
5dae8b0f17 dev: add ripgrep to devcontainer 2026-01-03 16:07:48 +00:00
0002affaff test(backend): move tests to *_test pkg 2026-01-03 16:07:38 +00:00
ceb4c9f23c feat(backend): return "my" slug for personal org 2026-01-02 23:16:00 +00:00
37056db77f feat(backend): add individual org query endpoint 2026-01-02 19:31:25 +00:00
efd93f099e feat(backend): add list orgs endpoint 2026-01-02 16:57:20 +00:00
b40a80e4b6 feat(backend): return list of orgs in login resp 2026-01-02 15:57:35 +00:00
4688ba49c1 chore: add .codex to .gitignore 2026-01-02 02:37:47 +00:00
674a914435 dev: update devcontainer 2026-01-02 00:22:29 +00:00
490699e113 feat(backend): introduce org namespaced api routes 2026-01-02 00:22:08 +00:00
ebcdcf2cea feat(backend): add organization slugs 2026-01-01 23:21:35 +00:00
3953fa8232 test(backend): sharing service tests 2026-01-01 22:34:17 +00:00
488168969d test(backend): registration service tests 2026-01-01 19:14:35 +00:00
51d70ceca4 test(backend): drive service tests 2026-01-01 19:14:23 +00:00
30d1e1e40d test(backend): user service tests 2026-01-01 19:00:06 +00:00
4ca8aec7d6 test(backend): organization service tests 2026-01-01 18:59:57 +00:00
6366cf985a test(backend): account service tests 2026-01-01 18:59:44 +00:00
12ed13b2d6 fix: wrong sql query for drive listing 2026-01-01 18:35:59 +00:00
88492dd876 refactor: account model overhaul 2026-01-01 18:29:52 +00:00
ad7d7c6a1b chore: add backend config.yaml to .gitignore 2025-12-29 01:03:40 +00:00
294fadfe4c fix(backend): optional auth ret 401 if token invalid 2025-12-29 01:01:28 +00:00
a956481215 fix(backend): move node wrong conflict filtering 2025-12-29 00:36:27 +00:00
c3a173de66 fix(backend): remove unused secure cookie config 2025-12-29 00:36:08 +00:00
f4620dff3a fix(backend): optional auth for share routes
Add auth.NewOptionalAuthMiddleware to run auth only when credentials are
present (Authorization header or auth cookies). Use it on share
consumption routes so public shares remain accessible unauthenticated,
while authenticated callers can resolve account-scoped shares. This
prevents a panic in share middleware when accountId was provided but the
request wasn’t authenticated (nil reqctx.AuthenticatedUser type
assertion).
2025-12-29 00:07:44 +00:00
51f1add4f0 fix(backend): Complete completed upload should clear pending 2025-12-28 23:52:22 +00:00
0933c19c5e fix(backend): HKR rets wrong deletion keys 2025-12-28 23:48:20 +00:00
fdfad036f8 fix(backend): CreateShare wrong common parent check 2025-12-28 23:43:17 +00:00
399b513e55 fix(drive-web): add share link item loading state 2025-12-28 23:00:35 +00:00
0198a29fbe feat(drive-web): also display expired share links 2025-12-28 22:53:43 +00:00
3efa1c313b dev: add codex cli to devcontainer 2025-12-28 22:14:30 +00:00
b60d18d365 feat(drive-web): item share expiry config ui 2025-12-28 22:14:10 +00:00
19a870a4e7 feat(backend): includesExpired for file/dir shares
add includesExpired query param for file/dir shares query
2025-12-28 22:12:55 +00:00
0e8c616489 docs(backend): document PATCH share endpoint 2025-12-28 19:06:51 +00:00
e3d78497e8 feat(backend): impl share expiry update 2025-12-28 19:01:53 +00:00
67320f8090 chore: remove outdated todo comment 2025-12-27 20:26:09 +00:00