Commit Graph

543 Commits

Author SHA1 Message Date
Edouard Vanbelle badf35f08f chore: remove all executable attributes on non bash files 2026-04-01 23:14:42 +02:00
Dionisio Pozo 7c5f34c8e5 Merge pull request #245 from iltumio/feat/utoipa-openapi 2026-04-01 18:15:12 +02:00
iltumio 9c009aecd1 chore: remove generated openapi.json from tracking, add test and docs
- Remove resources/gen/openapi.json from git (served dynamically at /api/openapi.json)
- Add resources/gen/ to .gitignore
- Add OpenAPI spec validation test (paths, schemas, serialization)
- Restore removed doc-comment on get_version
- Fix cargo fmt violation in mod.rs import
- Update CLAUDE.md: test count (~208), generate-openapi command, justfile reference
2026-04-01 12:25:10 +02:00
iltumio bf7e030cd6 feat: add OpenAPI spec generation with utoipa and justfile
- Add utoipa v5 dependency with ToSchema derives on all REST API DTOs
- Annotate free-function handlers with #[utoipa::path] (trash, share, favorites, recent)
- Create ApiDoc struct with OpenApi derive registering 37 schemas across 7 tags
- Add generate-openapi binary outputting resources/gen/openapi.json
- Serve OpenAPI spec at GET /api/openapi.json (public, no auth)
- Add justfile with common dev commands (build, test, lint, check, openapi, db)
2026-03-29 18:49:10 +02:00
Diocrafts dd5328175e chore: bump version to 0.5.3 and add release notes 2026-03-28 20:42:31 +01:00
Dionisio Pozo fd77bac8c0 Merge pull request #242 from DioCrafts/claude/resolve-thumbnail-conflict-CEQgq
Add timeout protection for thumbnail generation operations
2026-03-28 19:43:13 +01:00
Claude dacb8f388e fix(thumbnail): add timeout protection for large image processing
Resolves conflict between main and PR #229 by applying timeout support
on top of main's drop(data) memory optimization. Changes:
- Add thumbnail_generation_ms to TimeoutConfig (default 30s)
- Add generation_timeout field to ThumbnailService
- Wrap spawn_blocking in tokio::time::timeout to prevent hanging
- Update DI to pass timeout from config
- Update tests to provide timeout parameter

https://claude.ai/code/session_015FD62aAoMYx1XBZbzPvUu8
2026-03-28 18:40:34 +00:00
Dionisio Pozo 6612c19252 Merge pull request #240 from EdouardVanbelle/style/format+clippy 2026-03-28 19:05:16 +01:00
Edouard Vanbelle d78b279ec9 style: apply rust format + fix clippy warning 2026-03-26 10:05:44 +01:00
Dionisio Pozo 2357186f91 Merge pull request #238 from EdouardVanbelle/feat/drag-n-drop-in-breadcrumb
feat: drag 'n drop into the breadcrumb
2026-03-25 18:18:57 +01:00
Dionisio Pozo 69555d1cd2 Merge pull request #236 from EdouardVanbelle/chore/no-cache-in-dev
chore: static: if PROFILE=dev assets are directly /static without any…
2026-03-25 18:18:03 +01:00
Dionisio Pozo b3cb4b8daf Merge pull request #235 from EdouardVanbelle/fix/icon-home
fix: add missing home icon in breadcrumb
2026-03-25 18:16:10 +01:00
Edouard Vanbelle db4535ed6a feat: capability to move a card into a breadcrumb's folder 2026-03-25 17:55:33 +01:00
Edouard Vanbelle 276b9ff04c refactor: remove duplicate code to handle home folder in bread crumb 2026-03-25 17:49:00 +01:00
Edouard Vanbelle 8194b01299 chore: static: if PROFILE=dev assets are directly /static without any cache 2026-03-25 16:33:04 +01:00
Edouard Vanbelle 2a0a2e9c0c icons: add missing home icon (source: https://fontawesome.com/icons/house?f=classic&s=solid) 2026-03-25 16:28:06 +01:00
Dionisio Pozo 0282804323 Merge pull request #234 from BillionClaw/clawoss/fix/wopi-public-base-url 2026-03-24 00:09:39 +01:00
BillionClaw 7c76b1f04d fix(wopi): support OXICLOUD_WOPI_PUBLIC_BASE_URL env var for Docker deployments
The WOPI integration was not loading documents because the code only read
OXICLOUD_WOPI_BASE_URL, but the documentation and docker-compose examples
used OXICLOUD_WOPI_PUBLIC_BASE_URL. When only WOPI_PUBLIC_BASE_URL was set,
the wopi_base_url defaulted to config.base_url() which resolved to the
internal Docker hostname instead of the public URL.

Fixes #230.
2026-03-24 06:43:43 +08:00
Dionisio Pozo 628707e884 Merge pull request #228 from BillionClaw/clawoss/fix/thumbnail-memory-optimization
fix(thumbnails): drop encoded image data after decoding to reduce memory
2026-03-18 09:39:20 +01:00
Dionisio Pozo 2c51859040 Merge pull request #227 from BillionClaw/clawoss/fix/download-progress-2gb
fix(inline-viewer): add download progress bar for files >2GB
2026-03-18 09:38:36 +01:00
Dionisio Pozo 798fc1624a Merge pull request #226 from BillionClaw/clawoss/fix/admin-quota-disk-space
fix: cap admin initial quota to available disk space
2026-03-18 09:38:08 +01:00
BillionClaw 9794bba975 fix(thumbnails): drop encoded image data after decoding to reduce memory usage
Explicitly drop the encoded image buffer after decoding and extracting
EXIF orientation data. This reduces peak memory consumption during
thumbnail generation by the size of the original file.

The encoded data is no longer needed once the image is decoded into
a DynamicImage, but it was being held in memory until the end of the
spawn_blocking scope.

Fixes excessive memory consumption in thumbnail generation.
2026-03-18 11:51:39 +08:00
BillionClaw 5eb7b31740 fix(inline-viewer): add download progress bar for files >2GB
Add download progress tracking to createBlobUrlViewer to fix incorrect
progress display for large files. Changes:

- Add xhr.onprogress handler to track download bytes
- Use 64-bit float division to avoid 32-bit integer overflow
- Show progress bar UI for files >10MB with percentage
- Add CSS styles with dark theme support

The progress calculation now correctly handles files larger than 2GB
by using JavaScript's native double-precision floats instead of
operations that might truncate to 32-bit integers.

Fixes #82
2026-03-18 11:37:42 +08:00
BillionClaw 5cf0266d24 fix(auth): cap admin initial quota to available disk space
The admin_create_user method was using hardcoded quota values (100GB for
admin, 1GB for user) instead of the capped_quota method that checks
available disk space. This could result in setting a quota higher than
the actual available disk space.

Fixes #92
2026-03-18 11:06:39 +08:00
Dionisio Pozo 4b62499b8f Merge pull request #225 from BillionClaw/clawoss/fix/copy-error-messages
fix: improve error messages for file/folder already exists
2026-03-17 10:07:41 +01:00
BillionClaw aebd51788b fix: improve error messages for file/folder already exists 2026-03-17 17:05:52 +08:00
Dionisio Pozo 775abab8e1 Merge pull request #224 from BillionClaw/clawoss/fix/file-move-folder-ownership
fix(file): verify target folder ownership on move
2026-03-17 09:57:28 +01:00
BillionClaw 30d6e53fca fix(file): verify target folder ownership on move
When moving a file to a folder, verify that the caller owns the target
folder. Without this check, a file could be moved to another user's
folder, causing the file to "disappear" from the original user's view
since file listings filter by user_id.

- Add folder_repo to FileManagementService
- Add verify_target_folder_owner() method
- Call it in move_file_owned() before moving
2026-03-17 16:53:55 +08:00
Dionisio Pozo 79902bf727 Merge pull request #223 from BillionClaw/clawoss/fix/shared-link-404
fix(share): correct shared link URL to include /api prefix
2026-03-17 09:50:15 +01:00
Dionisio Pozo 41a3a1ce5e Merge pull request #222 from BillionClaw/clawoss/fix/webdav-rename-status-code
fix(webdav): preserve correct status codes for file rename/move failures
2026-03-17 09:49:34 +01:00
BillionClaw 852db02cd0 fix(share): correct shared link URL to include /api prefix
The shared link URL was generated as {base_url}/s/{token} but the
API endpoint is actually at /api/s/{token}. This caused 404 errors
when users accessed shared links.

Fixes #101
2026-03-17 16:48:11 +08:00
BillionClaw 3c48aa1e6f fix(webdav): preserve correct status codes for file rename/move failures
When file or folder rename/move operations failed in WebDAV handlers,
all errors were incorrectly converted to HTTP 500 Internal Server Error
using AppError::internal_error(). This masked specific error types:

- AlreadyExists errors should return 409 CONFLICT
- NotFound errors should return 404 NOT FOUND
- AccessDenied errors should return 403 FORBIDDEN

Changed error handling to use AppError::from() which preserves the
original DomainError type and maps to appropriate HTTP status codes.

Fixes handling of incorrect status code for file rename failure.
2026-03-17 16:29:21 +08:00
Dionisio Pozo d1699357d8 Merge pull request #221 from BillionClaw/clawoss/fix/trash-view-rendering
fix(trash): add missing display fields to TrashedItemDto
2026-03-17 09:12:28 +01:00
BillionClaw 32c5630a5f fix(trash): add missing display fields to TrashedItemDto
Add category, icon_class, and icon_special_class fields to TrashedItemDto
to fix trash view rendering issues. The frontend expects these fields to
properly display file type information, icons, and deletion dates.

- category: Human-readable file category (e.g., "Image", "Document")
- icon_class: FontAwesome icon class for the file type
- icon_special_class: Special CSS class for icon styling

Fixes #107
2026-03-17 16:08:12 +08:00
Dionisio Pozo 1b91c0e285 Merge pull request #220 from BillionClaw/clawoss/fix/webdav-storage-quota-104
fix(webdav): enforce storage quota on WebDAV PUT uploads
2026-03-17 09:06:11 +01:00
BillionClaw ec09136836 fix(webdav): enforce storage quota on WebDAV PUT uploads
Adds storage quota checking to the WebDAV PUT handler, which was missing
while present in other upload handlers (regular upload and chunked upload).

The quota check happens after the file is spooled to a temp file (so we
know the exact size) but before it's moved to permanent storage. If the
quota is exceeded, the temp file is cleaned up and a 507 Insufficient
Storage error is returned.

Fixes #104
2026-03-17 16:04:20 +08:00
Dionisio Pozo d75917433f Merge pull request #219 from BillionClaw/fix/size-column-alignment
fix(css): align size values in table view
2026-03-17 08:58:01 +01:00
BillionClaw b363ca3a88 fix(css): align size values in table view using tabular-nums
Adds font-variant-numeric: tabular-nums to size-cell class to ensure
file size values align properly in the list view. Numeric characters
now use equal-width glyphs, preventing misalignment of values like
"1 B", "2.5 KB", and "100 MB".

Fixes #101
2026-03-17 15:55:48 +08:00
Dionisio Pozo 5279e0c266 Merge pull request #218 from BillionClaw/clawoss/fix/dark-mode-and-search 2026-03-17 07:59:02 +01:00
Dionisio Pozo b2b37d763f Merge pull request #217 from BillionClaw/fix/upload-notification-i18n 2026-03-17 07:58:21 +01:00
BillionClaw 91e907bef6 fix(ui): resolve dark mode toggle and file search errors
- Fix dark mode toggle not responding by deriving theme state from
  localStorage instead of UI pill state. Added syncThemePill() to ensure
  UI and document theme stay synchronized.

- Fix file search error when folder_id is empty by validating the
  currentPath before setting it in search options. Empty folder_id
  now correctly triggers global search instead of causing a backend
  error with invalid UUID.

Fixes #102
2026-03-17 14:19:09 +08:00
BillionClaw 0c812d9390 fix(i18n): use translation keys for upload notification titles
Replace hardcoded English/Spanish strings with proper i18n translations
for upload notification titles and file count labels.

- Add upload.files translation key to all locale files
- Update notifications.js to use window.i18n.t() for:
  - upload.uploading title
  - upload.files file count label
  - upload.complete completion message

Fixes #108
2026-03-17 14:17:39 +08:00
Dionisio Pozo b7e3fb13f5 Merge pull request #216 from BillionClaw/clawoss/fix/batch-folder-deletion 2026-03-17 04:34:21 +01:00
Dionisio Pozo f2ad601a75 Merge pull request #215 from BillionClaw/clawoss/fix/i18n-share-folder-translation 2026-03-17 04:33:30 +01:00
Dionisio Pozo 07bc7e564d Merge pull request #214 from BillionClaw/clawoss/fix/docker-publish-postgres 2026-03-17 04:32:42 +01:00
BillionClaw 665220dd0b fix(files): batch folder deletion fails
Add debug logging to diagnose batch trash failures for folders.
When batch trash operations fail, the specific error was not being
logged, making it difficult to diagnose issues like #124.

- Add tracing::debug! logs for failed file and folder trash operations
  in batch_operations.rs
- Add unit tests for batch operation result handling to verify
  correct success/failure counting

Fixes #124
2026-03-17 11:21:16 +08:00
BillionClaw 2288daedec fix(i18n): add missing dialogs.share_folder translation key
The share dialog for folders was failing because dialogs.share_folder
key was missing from all locale files. The contextMenus.js code
references this key when opening the share dialog for folders:

  window.i18n.t('dialogs.share_folder')

Added the missing key to all 14 locale files with appropriate
translations for each language.

Fixes #189
2026-03-17 10:51:10 +08:00
BillionClaw 3569c5fa5a fix(ci): add PostgreSQL service to Docker publish workflow
The Docker Hub Release workflow's test job was missing the PostgreSQL
service required by the test suite. This caused the workflow to fail
before building and pushing the Docker image, resulting in missing
container images (e.g., v0.5.2).

Add the PostgreSQL service configuration matching ci.yml:
- PostgreSQL 16-alpine service container
- Health check configuration
- DATABASE_URL environment variable
- Database initialization step

Fixes #193
2026-03-17 10:49:02 +08:00
Dionisio Pozo f6a2985dbc Merge pull request #213 from BillionClaw/clawoss/docs/fix-incorrect-branch-path 2026-03-17 02:16:01 +01:00
BillionClaw 282626cce7 docs: fix incorrect path in development guide 2026-03-17 08:19:13 +08:00