feat: Folder triage UI - dashboard stats, library badges, settings toggle (#110)#206
Merged
deucebucket merged 1 commit intodevelopfrom Apr 7, 2026
Merged
Conversation
…ttings toggle Backend folder triage (clean/messy/garbage classification) was already implemented but invisible in the UI. Now surfaces triage data: - Dashboard info banner showing messy/garbage folder counts - Library view badges on affected books (Messy/Garbage indicators) - Settings toggle to enable/disable folder triage - Triage data in "all" library API responses Split push corrections to #205 (blocked on Skaldleita backend).
There was a problem hiding this comment.
🔍 Vibe Check Review
Context
Adds folder triage UI elements: dashboard info banner with messy/garbage counts, library view badges, settings toggle, and a config-driven enable/disable for the triage system during scans.
Codebase Patterns I Verified
- Config toggles: Existing pattern at
app.py:7321uses'key' in request.formfor checkbox booleans — this PR follows the same pattern at line 7324 - Dashboard queries: Existing queries (lines 7032-7034) use parameterized SQL — this PR matches at line 7037
- Library API items: Existing item dicts (queue view, line 9548-9559) already include
folder_triage— this PR adds it consistently to the 'all' view - Settings template: Existing toggle pattern (
form-check form-switch mb-2with badge) is replicated exactly - Database schema:
folder_triagecolumn confirmed indatabase.py:130-133withDEFAULT 'clean'
✅ Good
- Clean toggle implementation:
triage_enabled = config.get('enable_folder_triage', True)with ternary at each triage call site — minimal, correct - Smart default: Enabled by default, Jinja template handles undefined config gracefully with
config.enable_folder_triage is not defined or config.enable_folder_triage - Dashboard query only fetches non-clean:
WHERE folder_triage != 'clean'avoids counting the majority of books unnecessarily - Scope split: Correctly separates UI work from the push corrections feature (#205) and documents it in CHANGELOG
- Consistent badge design: Warning for messy, danger for garbage matches the existing badge severity conventions in library.html
🚨 Issues Found
No issues found.
📋 Scope Verification
| Issue | Problem | Addressed? | Notes |
|---|---|---|---|
| #110 | Folder triage system UI | This PR adds the UI layer (dashboard stats, library badges, settings toggle). The core triage logic, scan integration, and pipeline hints were already merged in prior PRs. This is the UI completion piece. | |
| #205 | Push corrections from Skaldleita | ✅ N/A | Correctly split out — CHANGELOG notes it's blocked on Skaldleita infrastructure |
Scope Status: SCOPE_OK — This PR delivers the UI surface for folder triage. The backend was already in place.
📝 Documentation Check
- CHANGELOG.md: ✅ Updated (v0.9.0-beta.146, clear description of what shipped and what was split to #205)
- README.md: ✅ Version badge updated
🎯 Verdict
APPROVE
Clean, focused UI addition. Follows existing patterns exactly. No security, error handling, or logic issues.
5 tasks
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.
Summary
folder_triage) now included in "all" library view API responsesNote: The backend triage logic (
folder_triage.py) and scan integration were already implemented. This PR surfaces that data in the UI and adds the settings toggle.Test plan
Closes #110