feat(serve-ui): integrate cache, flat, and flat-structured storage modes in the Web UI#82
Open
Jellypowered wants to merge 3 commits into
Open
feat(serve-ui): integrate cache, flat, and flat-structured storage modes in the Web UI#82Jellypowered wants to merge 3 commits into
Jellypowered wants to merge 3 commits into
Conversation
…des with unified cache management Integrate storage mode support into serve and Web UI with seamless compatibility for existing cache workflows. What this adds - Adds three storage modes for Web UI downloads: - cache (default, HuggingFace-compatible layout) - flat (plain files at cache root) - flat-structured (plain files under owner/repo) - Adds storage mode and cache directory controls in Settings with persisted defaults. - Ensures Analyze, Download, and Plan flows all follow the selected storage mode. - Updates Analyze command preview to reflect active storage mode flags. Cache management integration - Extends Cache page and API discovery across all supported layouts: - HuggingFace hub cache layout - flat-structured owner/repo layout - flat indexed layout - Supports list, info, and delete operations across these layouts from one interface. Safety and reliability - Retains strict path validation and repository input safeguards. - Includes manifest/index tracking for non-cache layouts so cache operations remain deterministic. - Handles interrupted multipart artifacts in cache cleanup paths. - Resolves symlinked cache/destination paths to real filesystem paths before file operations. UI and usability - Improves Settings card sizing/scroll behavior so content is no longer clipped in the original layout. - Applies updated storage mode behavior in UI workflows without requiring manual refresh. Compatibility - Preserves default upstream cache-mode workflow and Python ecosystem compatibility. - Integrates new modes without changing the default user path unless explicitly selected. Validation - Thoroughly tested across cache, flat, and flat-structured workflows for analyze, download, listing, and deletion scenarios. - Verified symlinked destination handling in flat-structured mode, including large multipart model artifacts (imatrix and mmproj-* files), with successful completion beyond prior ~95% stall point. Implements: bodaay#77
19399ba to
e55d1c9
Compare
…output roots Resolve symlinks on cfg.OutputDir (root) instead of destinationBase(job,cfg). This preserves correct flat-structured layout (owner/repo exactly once) while keeping symlink-safe file operations for multipart rename/resume paths.
… Add size-first skip path for local/flat downloads\n- Prevent long pre-skip SHA256 hashing on existing GGUF files\n- Keeps behavior consistent with verify=size expectations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Implements #77
What this PR does
Adds storage mode support to
serve+ Web UI, with one consistent flow across Analyze, Download, Plan, Settings, and Cache management.Storage modes
Web UI downloads can now run in:
cache(default): HF-compatible cache layout (hub/...+ friendly view)flat: plain files directly in cache rootflat-structured: plain files in<cacheRoot>/<owner>/<repo>/Settings / UX
Cache page + API coverage
Cache discovery/management now works across all supported layouts:
Includes list/info/delete support for each, with fallback resolution across roots.
Flat mode details
.part,.part-*).gitattributesREADME.md-><repo>.README.mdmmproj*/imatrix*names are prefixed by repo nameSafety / guards
Compatibility
cachemodeTesting
Manually validated across:
cache,flat, andflat-structuredDISCLAIMER: I absolutely DID use AI to help prepare the documentation and PR message. I'm LAZY, not stupid ;) Hope this helps!