Skip to content

fix(ui): restore quant status after cache deletion - #59

Merged
bashrusakh merged 2 commits into
mainfrom
fix/ui-restore-quant-status
Jul 6, 2026
Merged

fix(ui): restore quant status after cache deletion#59
bashrusakh merged 2 commits into
mainfrom
fix/ui-restore-quant-status

Conversation

@bashrusakh

@bashrusakh bashrusakh commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes stale download markers in the analysis view, including upstream mmproj rows, when the downloaded files are deleted from disk.

What changed

  • Reconciles quantization row status against the current cache contents.
  • Removes stale done markers when the files are no longer present.
  • Keeps active queued / running job states intact.
  • Tracks upstream mmproj downloads under the visible analysis repo, not just the source repo.
  • Cleans up empty localStorage state when nothing is tracked anymore.

Why

After a model file was deleted manually, the UI could keep showing a green checkmark because the status was cached client-side. That was especially confusing for mmproj/upstream downloads, where the visible row and the download source repo differ.

Validation

node --check internal/assets/static/js/app.js
go test ./...
  • OCR review completed on the diff.
  • Manual browser smoke test was not run in this session.

Risk

Low. The change is limited to client-side analysis status reconciliation and does not affect download mechanics or backend contracts.

Summary by CodeRabbit

  • Bug Fixes
    • Improved download status syncing so completed, queued, and running items are tracked more accurately.
    • Fixed cases where status indicators could be cleared too aggressively or left behind after cache changes.
    • Download progress now stays aligned with the correct repository status, especially for local or alternate repo sources.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0447ff24-6afc-4bc3-a73e-53e5d13e49bb

📥 Commits

Reviewing files that changed from the base of the PR and between 8bd3540 and 6b856f1.

📒 Files selected for processing (1)
  • internal/assets/static/js/app.js

📝 Walkthrough

Walkthrough

app.js now reconciles cache-backed selectable-item status by comparing expected files to cached names and updating localStorage accordingly. It also distinguishes the repo used for download status tracking from the download target when refreshing live jobs and recording queued state.

Changes

Local Cache Status Reconciliation

Layer / File(s) Summary
Cache status reconciliation
internal/assets/static/js/app.js
Fetches /api/cache/:repo, handles 404 responses by clearing only done selectable-item entries, compares expected files against cached file names for other responses, and persists or removes dlStatus:<repo> based on the resulting map.

Download Status Routing

Layer / File(s) Summary
Live and queued status repo selection
internal/assets/static/js/app.js
Uses `j.localRepo

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main UI fix for restoring quant status after cache deletion.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ui-restore-quant-status

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bashrusakh

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@bashrusakh
bashrusakh merged commit 0c18669 into main Jul 6, 2026
7 checks passed
@bashrusakh
bashrusakh deleted the fix/ui-restore-quant-status branch July 6, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant