Commit Graph
276 Commits
Author SHA1 Message Date
LeoVasanko 72b3c0d8ce feat(frontend): add text editor flow and create-file UX
- replace textarea editor with CodeMirror and syntax highlighting\n- integrate editor mode header (save button, hide unused controls)\n- fix breadcrumb/editor navigation behavior and transitions\n- add Create File action with ghost-rename flow and auto-open in editor\n- refine create-file icon shape and plus cutout alignment
v1.9.0
2026-05-06 02:17:17 +00:00
LeoVasanko 07daf372e8 Rudimentary text file editing support. 2026-05-06 00:20:19 +00:00
LeoVasanko e979d679b2 feat(frontend): add simultaneous slide transitions on directory navigation
- Detect navigation direction (forward/backward) via router beforeEach guard
- Store transition direction in Pinia for cross-component access
- Wrap ExplorerView content in a CSS grid transition wrapper so old and new
  views overlap in the same grid cell during animation
- Add slide-forward/slide-backward transition classes with translate3d
  for GPU-accelerated, simultaneous enter/leave without gaps
- Keep fixed-position search loader outside the transition
2026-05-05 16:07:07 +00:00
LeoVasanko eea66c0013 Rename selection clear button label 2026-05-05 03:00:10 +00:00
LeoVasanko 9220c457c0 Use link icon for the share link button. 2026-05-05 02:58:43 +00:00
LeoVasanko d5b77932ea Allow anonymous share links in public mode 2026-05-05 02:47:18 +00:00
LeoVasanko 9b9d3e1cc1 Adjust gallery checkbox size and spacing 2026-05-05 02:38:25 +00:00
LeoVasanko 536efc4ce1 Regression: inotify optional on unsupported platforms 2026-05-05 02:32:47 +00:00
LeoVasanko 1b2267587f Fix empty root shown as missing folder 2026-05-05 02:26:41 +00:00
LeoVasanko 2864e9f041 Hide tiny Other slice in disk space chart 2026-05-05 02:20:55 +00:00
LeoVasanko b5a94b5eee Frontend upload batch space check with 512 MiB margin
- Verify single queue: uploads append to upqueue and are processed
  sequentially by one worker (parallel only within a single file).
- Before accepting a new batch, calculate total size minus existing
  files that will be overwritten.
- Reject the whole batch if free space < net need + 512 MiB margin.
- Show a toast with human-readable needed vs available space.
2026-05-05 02:13:18 +00:00
LeoVasanko d4be755d46 Enforce 128 MiB minimum free space on uploads
- Add cista/util/diskspace.py with MIN_FREE_BYTES limit and cached
  check_free_space() helper.
- Check available space in File.write() before ftruncate/write.
- Catch ENOSPC in File.write and re-raise as InsufficientStorageError.
- upload_file_chunk catches both proactive and ENOSPC errors and
  returns HTTP 507 Insufficient Storage.
- Add tests for low-disk rejection and ENOSPC handling.
2026-05-05 01:46:30 +00:00
LeoVasanko 07089aa9a7 frontend: add About dialog and unify global dialog backdrop v1.8.6 2026-05-03 23:40:54 +00:00
LeoVasanko c3146744b7 PageUp/PgDn/Home/End navigation; fix rename API path; immediate local rename update 2026-05-03 22:58:51 +00:00
LeoVasanko 48d7435d0b Allow portrait documents to render somewhat taller because gaps were being left between them depending on window width. 2026-05-03 18:36:14 +00:00
LeoVasanko 3e80325053 Smoother scrolling in gallery when using keyboard navigation. 2026-05-03 18:33:19 +00:00
LeoVasanko 31fc02ddbf Keep the file extension always visible but discreetly as part of the filename. Fix Escape in rename field. 2026-05-03 18:22:03 +00:00
LeoVasanko 2406ea87b0 Gallery mode file extension and filename display improvements. 2026-05-03 17:26:25 +00:00
LeoVasanko 3a1dd2b7da Show document icon when no preview is available or has failed. While loading, pulse the icon. v1.8.5 2026-05-02 19:54:38 +00:00
LeoVasanko 3df6b079c9 Better logging of ffmpeg errors 2026-05-02 19:49:06 +00:00
LeoVasanko af804e2c9f Less noisy preview timeout logging v1.8.4 2026-05-02 19:30:16 +00:00
LeoVasanko 1dc0c4441a Fixes on server startup and shutdown with Sanic internals. Parallel shutdown tasks as non-blocking async tasks to avoid blocking the event loop and causing a warning of that. 2026-05-02 19:22:23 +00:00
LeoVasanko c7ba0d5a04 Dynamically adjusting layout to maximize screen space used for document previews. Row width changes with aspect ratio of items on that row. Server side tracking of size as part of the main listing. 2026-05-02 18:45:44 +00:00
LeoVasanko 0071058b29 Avoid gallery layout collapse while previews are still loading. Maintain the boxes fixed size regardless. 2026-05-02 16:19:42 +00:00
LeoVasanko 338c74de69 Avoid noisy output on normal WebSocket closing. 2026-05-02 16:12:42 +00:00
LeoVasanko b13f08eab2 Avoid InvalidStateError on conversion tasks trying to set their result after preview cancelled. 2026-05-02 16:04:21 +00:00
LeoVasanko 5d566d6deb Restore CISTA_HOME internal environment passing of config dir removed in commit 31e0197, that was not being passed across processes. v1.8.3 2026-05-02 05:47:24 +00:00
LeoVasanko 5c4965a86b Skip removal of PLR2004. v1.8.2 2026-05-02 05:33:32 +00:00
LeoVasanko bd7291e9ef Lint: unused arguments 2026-05-02 05:26:47 +00:00
LeoVasanko 2fa52229cc Exception nazi and other suppression removals. Added tests on auth flows that were simplified to linter requirements. 2026-05-02 05:22:56 +00:00
LeoVasanko 2dea459d8f Update fastapi-vue-setup 1.3.1 to avoid ruff errors. Fixed devserver script on platforms where Sanic needs AppServer. 2026-05-02 05:03:43 +00:00
LeoVasanko 922069c603 Imports to top of file (ruff rule now). Refactor a couple of import cycles by implementing clear hierarchy of modules. 2026-05-02 04:46:34 +00:00
LeoVasanko 5c7c7343ad Fix logging regressions from unrelated changes and ruff changing emoji into i. Simplified custom logger. 2026-05-02 04:16:38 +00:00
LeoVasanko 593d16d8c5 Use tracerite for human-readable tracebacks. 2026-05-02 03:50:20 +00:00
LeoVasanko 20d8d317fa Ruff linting. 2026-05-02 03:31:51 +00:00
LeoVasanko 8d89c397a4 frontend: format store typing layout 2026-05-02 03:12:50 +00:00
LeoVasanko 1bec73f4cd onlyoffice previews much faster and more robust, added --oosetup helper, improved error/log handling 2026-05-02 03:10:17 +00:00
LeoVasanko 4dd1d4c7e6 Fix AVIF preview encoding for yuvj video frames 2026-05-02 00:37:53 +00:00
LeoVasanko 84ef91a360 preview: move OnlyOffice unavailable from warning log to access log extra 2026-05-01 23:20:01 +00:00
LeoVasanko 421d90e9c5 frontend: trim document formats, simplify type getters, use FILE_TYPES consistently
- Trim document extension list to common office formats only
  (doc/docx/xls/xlsx/ppt/pptx/odt/ods/odp/rtf), removing txt/md/csv/html/xml/etc.
- Simplify Doc getters: merge guard clauses into single returns
  (img, previewable, previewurl, ext).
- Simplify MediaPreview.preview() into single boolean expression.
- Use global FILE_TYPES instead of inline extension lists.
2026-05-01 23:17:40 +00:00
LeoVasanko 8b4e622aef preview: remove ffprobe fallback and unused json import
_get_image_dimensions now relies solely on pyvips header reading.
If pyvips cannot read the header the function returns None and the
caller encodes at full resolution rather than falling back to ffprobe.
Remove unused stdlib json import.
2026-05-01 22:51:58 +00:00
LeoVasanko 13f32c57ab preview: ffmpeg CLI fallback for HEIC/HDR, worker pool fixes, logging improvements
- Use ffmpeg CLI directly for HEIC/HEIF previews (bypassing pyvips which
  cannot encode >8-bit AVIF on current system). ffmpeg handles tile
  assembly, EXIF rotation, HDR metadata and ICC profiles automatically.
- pyvips remains primary for other image formats; ffmpeg is fallback.
- Simplify _get_image_dimensions() to use pyvips header read for all
  formats including HEIC, with ffprobe as fallback.
- Move all imports to top of preview.py; remove lazy OnlyOffice import.
- Worker pool: add readiness handshake (\x01 byte), bounded idle wait
  with PREVIEW_TIMEOUT, eager module import before signalling.
- Fix dispatch data check bug (was 'if data is not None' -> 'if data').
- Add logger.exception for unhandled preview/dispatch errors.
- EmojiFormatter now includes tracebacks for exception logs.
- Return 503 on preview timeouts instead of 504.
2026-05-01 22:48:30 +00:00
LeoVasanko 25a2a5f20c Separate OnlyOffice async handling, add office_previews WS flag, framed worker protocol
- Move OnlyOffice conversion out of worker subprocesses into async event loop
  using httpx.AsyncClient with shared client and clean shutdown hook
- Add OOConversionManager with in-flight deduplication (asyncio.Future) and
  configurable concurrency limit (OO_MAX_CONCURRENT=2)
- Add 10s total timeout for office previews via asyncio.wait_for
- Return 503 when OnlyOffice is unavailable, 504 on timeout
- Remove office handling from worker dispatch(); workers now only do
  images, video, and PDFs
- Replace PNG tempfile bridge with framed binary input protocol on worker
  stdin: (json_size)(data_size)(json)(raw_data)
- Add process_image_buffer() for in-memory AVIF conversion via pyvips
- Add office_previews to WS server message, cached every 30s from OO
  availability check
- Frontend gates only office document previews on office_previews flag;
  images, video, PDFs remain unconditional
- Change default OnlyOffice port from 8080 to 8988
2026-05-01 03:42:03 +00:00
LeoVasanko 041090cce9 preview: increase timeout to 10s, add priority queue scheduling (images > video > pdf > office) v1.8.1 2026-04-27 04:51:41 +00:00
LeoVasanko ec6db7b53f Add sort-order keycap hints next to search bar
Show 'Order [1] [2] [3]' keycaps to the right of the search bar
when the viewport is at least 800px wide. These visual hints
match the existing '/' search keycap style and correspond to
the existing keyboard shortcuts for sorting:
  1 = name (alphabetical)
  2 = modified (newest first)
  3 = size (largest first)

Hints are hidden on narrow viewports and when text input fields are focused.
v1.8.0
2026-04-26 08:02:40 +00:00
LeoVasanko 575df1214b session: rename cookie to 'cista', add __Host- prefix on HTTPS 2026-04-27 03:56:07 +00:00
LeoVasanko 1927c24053 Revert an accidental change of functionality that was breaking file listings, originally done for linting purposes in commit 3767fb0. 2026-04-26 07:47:27 +00:00
LeoVasanko 6242c76be8 Add share token support with virtual filesystem and selection toolbar button 2026-04-26 07:46:14 +00:00
LeoVasanko 87a92838c2 Add benchmark script for OnlyOffice output formats
Benchmarks three preview pipelines across all sample documents:
- BMP → AVIF (via pyvips)
- PNG → AVIF (via pyvips) — selected for production
- PNG only (no compression)

Results confirm PNG → AVIF as the optimal path:
- ~30 ms AVIF encode overhead
- 2.1× size reduction vs raw PNG
- Slightly faster than BMP → AVIF
2026-04-26 07:28:52 +00:00
LeoVasanko 8c93a4f2b5 Add OnlyOffice-based preview for office documents
Replace Aspose.Words with OnlyOffice Document Server for generating
bitmap previews of office documents (Word, Excel, PowerPoint, etc.).

Backend:
- Add cista/onlyoffice.py conversion client
- Convert office docs directly to PNG via OnlyOffice, then AVIF via pyvips
- Make office previews optional based on OnlyOffice availability
- Remove Aspose.Words dependency and all related code
- Add spreadsheet and presentation format support

Frontend:
- Mark office files as previewable in Document.ts
- Add office extensions to MediaPreview.vue preview list
- Fix pre-existing @ts-ignore in HeaderMain.vue

Tests:
- Fix test_lrucache.py parameter name (open -> opener)

Also run ruff format across the codebase to satisfy linter checks.
2026-04-26 06:59:01 +00:00