Skip to content

feat: Folder triage UI - dashboard stats, library badges, settings toggle (#110)#206

Merged
deucebucket merged 1 commit intodevelopfrom
feature/issue-110-folder-triage
Apr 7, 2026
Merged

feat: Folder triage UI - dashboard stats, library badges, settings toggle (#110)#206
deucebucket merged 1 commit intodevelopfrom
feature/issue-110-folder-triage

Conversation

@deucebucket
Copy link
Copy Markdown
Owner

Summary

  • Dashboard now shows info banner with messy/garbage folder counts (similar to validation_failed banner)
  • Library view displays triage badges on affected books: yellow "Messy" and red "Garbage" indicators with tooltips
  • Added Settings toggle to enable/disable folder triage (under File Validation section)
  • Triage data (folder_triage) now included in "all" library view API responses
  • Split push corrections feature to [FEATURE] Push corrections from Skaldleita to opted-in users #205 (blocked on Skaldleita backend)
  • Added hint entries for folder triage tooltips

Note: 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

  • Run a scan on a library with messy/garbage folder names
  • Verify dashboard shows triage info banner with counts
  • Verify library view shows Messy/Garbage badges on affected books
  • Toggle "Folder Triage" off in Settings, re-scan, verify all folders classify as clean
  • Verify queue view still shows triage badges (was already working)

Closes #110

…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).
Copy link
Copy Markdown

@bucket-agent bucket-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 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:7321 uses 'key' in request.form for 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-2 with badge) is replicated exactly
  • Database schema: folder_triage column confirmed in database.py:130-133 with DEFAULT '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.

@deucebucket deucebucket merged commit 1bd11bf into develop Apr 7, 2026
3 checks passed
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