Skip to content

feat(ui+db): counterparts grid, CategoryCorrection table, cat_select widget#140

Merged
drake69 merged 3 commits into
mainfrom
feat/counterparts-grid
Jun 25, 2026
Merged

feat(ui+db): counterparts grid, CategoryCorrection table, cat_select widget#140
drake69 merged 3 commits into
mainfrom
feat/counterparts-grid

Conversation

@drake69

@drake69 drake69 commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • CategoryCorrection table: logga ogni correzione utente (original_category, source, confidence, consistency_at_correction) β€” foundation del live implicit benchmark: accuracy β‰ˆ 1 βˆ’ (corrections / llm_categorizations) per modello, senza dataset etichettato separato (AI-164).
  • Counterparts page: griglia per-vendor con # transazioni, source_mode (πŸ€–/πŸ“/βœ‹/πŸ”€), variabilitΓ  categoria modale, flag human-checked; inline rule creation da riga.
  • cat_select widget: selector categoria/sottocategoria riutilizzabile (build_cat_options, join_cat_sub, split_cat_sub).
  • i18n: chiavi counterparts aggiunte in IT/EN/FR/DE/ES.

Note

  • AI-164 partial: tabella base implementata. Mancano drill-down Ledger su click riga e filtri rapidi (sotto-100%, non-verificate) β€” tracciati come work-in-progress.
  • Dipende da AI-94 (tiered policy) per accuracy corretta della colonna VariabilitΓ .

Test plan

  • Navigare alla pagina Controparti e verificare che la griglia si popoli con i dati esistenti
  • Verificare colonne: controparte, # tx, source mode, variabilitΓ , human-checked
  • Testare inline rule creation da una riga della griglia
  • Verificare i18n su almeno EN + IT
  • Verificare che CategoryCorrection table venga creata alla migrazione (idempotente)

…widget

- CategoryCorrection table: live implicit benchmark β€” logga ogni correzione
  utente con source, confidence e consistency_at_correction per calcolare
  accuracy per modello senza dataset etichettato separato (AI-164)
- counterparts_page.py: griglia per-vendor con # tx, source_mode, variabilitΓ 
  categoria modale, flag human-checked; inline rule creation da riga (AI-164)
- cat_select widget: selector categoria/sottocategoria riutilizzabile
- i18n: chiavi counterparts aggiunte in IT/EN/FR/DE/ES
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

❌ Coupling Report β€” UI ↔ Service layer

Coupling check FAILED β€” new coupling violations detected.

Total violations: 2 | Clean files: 17/19 | Coupling score: 89%

File Violations Compliant Score
βœ… ui/analysis_page.py 0 3 100%
βœ… ui/budget_page.py 0 2 100%
βœ… ui/budget_vs_actual_page.py 0 1 100%
βœ… ui/bulk_edit_page.py 0 4 100%
βœ… ui/chat_page.py 0 1 100%
βœ… ui/checklist_page.py 0 2 100%
βœ… ui/counterparts_page.py 0 3 100%
βœ… ui/history_page.py 0 1 100%
βœ… ui/home_page.py 0 1 100%
❌ ui/llm_models_page.py 1 9 90%
βœ… ui/onboarding_page.py 0 3 100%
βœ… ui/registry_page.py 0 3 100%
βœ… ui/report_page.py 0 2 100%
βœ… ui/review_page.py 0 4 100%
βœ… ui/rules_page.py 0 3 100%
βœ… ui/settings_page.py 0 7 100%
❌ ui/sidebar.py 1 0 0%
βœ… ui/taxonomy_page.py 0 1 100%
βœ… ui/upload_page.py 0 3 100%

Violations to fix

  ❌ ui/llm_models_page.py β€” 1 violazione/i (file non nel baseline: deve avere 0 violazioni)
       L 634  from db import repository
  ❌ ui/sidebar.py β€” 1 violazione/i (file non nel baseline: deve avere 0 violazioni)
       L  82  from core._build_info import BUILD_TIME, BUILD_VERSION

Rule: every new file must have 0 violations.
Known exceptions are listed in tools/coupling_baseline.json.

drake69 added 2 commits June 25, 2026 21:37
… grouping

- store rule pattern verbatim (matching already case-insensitive at compare time)
- case-insensitive upsert dedup for contains/exact rules
- group counterparts case-insensitively, keep first-seen casing for display
- add regression tests

Fixes the 4 failing rule tests on #140.
@drake69 drake69 merged commit ddeee08 into main Jun 25, 2026
7 checks passed
@drake69 drake69 deleted the feat/counterparts-grid branch June 25, 2026 20:10
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