Spaces:
Sleeping
Sleeping
Commit History
-
Fix SQLite disk I/O error on HF Spaces startup
- mkdir parents before connect so knowledge_base/ dir always exists - Wrap WAL pragma in try/except — some HF filesystems don't support WAL Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>5978771 -
Seed RF invite with fixed token on startup
Token rf_soci_rooting_future_2025 is re-created automatically if missing, so the invite link survives HF Space rebuilds without paid persistent storage. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>aa3d0ab -
Fix admin panel: deleteUser onclick, renderPlans null crash, credits PATCH route
- Add onclick=deleteUser() and adjustUserCredits() JS functions (were missing) - Fix u.name → u.full_name in deleteUser template literal - Guard emptyState null in renderPlans (element missing from DOM) - Add PATCH /api/admin/users/<id>/credits backend route Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>dbfe927 -
fix(rf-invite): role manager + 5 starter credits for soci RF
- RF multi-use invite now creates manager accounts (not viewer) - On registration via multi_use link: 5 credits added automatically - Admin panel popup text updated Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>0a23eea -
fix(security): ownership checks + password not in URL
- Add _assert_plan_owner() helper: plan tasks, guest-tokens, export routes now verify plan belongs to current_user (super_admin bypasses) - POST /api/export/<plan_id>: add missing @login_required - Password share: POST /public/<token>/verify stores result in session, view_public_plan reads session instead of query string Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>9024475 -
feat(invite): multi-use RF invite link for soci/collaboratori
- manager_invites: add multi_use + use_count columns (safe ALTER TABLE migration) - use_manager_invite(): if multi_use=1 only increments use_count, token stays valid - /register/<token>: skip 'already used' check for multi_use tokens - POST /api/admin/rf-invite: creates permanent multi-use viewer invite - Admin panel: 'Soci RF' button with generateRFInvite() JS Nardoni invite stays single-use manager. RF soci get one permanent link. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1d44024 -
fix(category): correct profile matching + guard empty category on Club Hub generation
- club_hub route: match profile by club_slug (not profiles[0]) to get correct categoria for multi-club setups - Club Hub JS: if CLUB_CATEGORY empty, prompt user before generation instead of silently defaulting to 'Eccellenza' - Backend generate-from-questionnaires already does correct profile lookup Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>7c85c58 -
fix(club-hub): SSE timeout — unify progress sources
SSE route now reads project_progress as fallback when session_manager returns None (generate-from-questionnaires uses project_progress, not session_manager). Waits up to 5 ticks before declaring session missing. Poll fallback: MAX 120→200 @ 1s→3s = ~10min timeout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>3db2a09 -
feat(step5): tasks summary API + dashboard widget
- /api/tasks/summary: aggregated task counts + overdue list per owner - Dashboard: tasks card shows counts by status + overdue items with scadenza - Badge overdue in red, auto-hides if no tasks exist Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>3b3c40d -
fix(admin): mobile responsive header, KPI grid, tabs
- Header buttons wrap on mobile, labels hidden on small screens - KPI grid: 2 cols mobile → 3 cols sm → 5 cols md - Tabs: scrollable, smaller text on mobile, whitespace-nowrap Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>7f9f237
-
Fix admin: add openNewUserModal JS + POST /api/admin/users + fix access log LEFT JOIN + track logins
26cc05b -
Add missing /api/admin/users and /api/admin/plans routes (admin panel showed 0 everywhere)
21d6e33 -
Fix guest view 500: pass plan= alias, create error.html, strip block chars in PDF/DOCX via export_core
eeead3f -
Fix executive/onepager: STW key fallbacks, sources count, questionnaire count, roadmap labels, line clamp
e51a7de -
Fix Club Hub nav: always visible from QUESTIONNAIRE_DATA_DIR, not conditioned on plans
22bbcb8 -
Fix admin panel: make standalone (was extending base with no block content)
79caf7a -
Wire gear icon to /admin panel
7c17315 -
Fix /admin: pass stats to dashboard_simple base template
cf165a2 -
Add /admin route for admin panel (was missing)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>2ec506f -
Add team invite + access log buttons to admin panel
- "Link Collaboratori" → chiede etichetta, chiama /api/admin/team-invite, mostra link + copia negli appunti automaticamente - "Access Log" → apre /admin/guest-log in nuova tab Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>9c9b0f7 -
Add team invite system: collaboratori accedono al sistema senza login
- GET /join/<token> → log accesso + sessione guest → redirect guest_dashboard - GET /guest-dashboard → lista piani in read-only (no login) - GET /view-public/<plan_id> → accetta anche team token da sessione - POST /api/admin/team-invite → genera link invito (solo super_admin) - Template guest_dashboard.html con lista piani navigabile - Fix plan_viewer.js: rimuovi codice rotto revokeShare, pulisci submit handler - Aggiunto campo "Nome collaboratore" nel modale condivisione piano Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>4ce8d6e -
Add guest token system + fix ▌ block chars in onepager/executive
Guest tokens: - knowledge_store: tables guest_tokens + guest_access_log, 6 CRUD methods - app.py: POST/GET/DELETE /api/plans/<id>/guest-tokens - app.py: GET /preview/<token> → log accesso + redirect viewer pubblico - app.py: GET /view-public/<plan_id>?token=... (no login_required) - app.py: GET /admin/guest-log + GET /api/admin/guest-access-log (super_admin only) - app.py: add import sqlite3 Fix ▌ chars in exported docs: - export_onepager.py: strip U+2580–U+259F from exec_summary before extraction - executive_report.py: strip block chars in _clean_text() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>83a3dd6 -
Fix generation_success: OnePager/Executive always ready via on-demand routes
Replace polling+timeout approach with direct links to /api/export/<plan_id>/onepager and /api/export/<plan_id>/executive. These routes generate on-demand when clicked, so "Non disponibile" can never happen. Remove all polling JS and spinner markup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>3e684f1 -
Fix DOCX 404, black emoji icons, block chars in synthesis
- app.py: add GET /api/export/<plan_id>/docx route (same pattern as PDF) - stw_matrix.py: replace emoji in get_category_icon() with 3-letter text abbreviations (SPO/STR/MKT/SOC/ORG/REL) — emoji render as black rectangles in WeasyPrint on HuggingFace Spaces (no color emoji font) Adjust CSS font-size: 20pt→10pt (overview) and 14pt→8pt (header icon) - post_production_editor.py: strip U+2580–U+259F block characters (▌ etc) that appear as streaming cursor artifacts in AI-generated content Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>eeae1d2
-
feat: Step 5 Piano d'Azione + bug fixes
- Add plan_tasks table with CRUD + overdue count (knowledge_store.py) - Add /api/plans/<id>/tasks CRUD routes with auto-seed from plan HTML - Add /api/tasks/overdue-count for nav badge - Add Piano d'Azione section in strategic_plan_viewer (task table, modal, inline status) - Add missing GET /api/export/<plan_id>/pdf route (was 404 everywhere) - Fix hardcoded category Eccellenza in generate-from-questionnaires - Fix generation_success.html ATTENDERE spinner loops forever (30s timeout) - Fix club category passed from hub JS to generation API Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>f79add2
-
Fix plan viewer: STW key fallbacks + duplicate section + double emoji
- strategic_plan_viewer.html: each section now checks STW key as fallback (stw_sportivi, stw_strutturali, stw_marketing, stw_sociali, stw_struttura_org, stw_relazioni_ist) so questionnaire-generated plans show content instead of 'Sezione non disponibile' - Sintesi Strategica section hidden if identical to Executive Summary - post_production_editor.py: strip duplicate consecutive emoji (⚽ ⚽ → ⚽) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>38e11e9 -
Fix Jinja2 TemplateSyntaxError: replace url_for with hardcoded /plans in JS string
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>7f4e9f6 -
Fix SSE fallback: poll /api/project-status when EventSource drops on HF
- Add GET /api/project-status/<project_id> reading from project_progress dict - club_hub.html: on SSE onerror, switch to 1s polling instead of showing error - Polling stops when status=completed (redirects to plan) or failed/timeout (2min) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>11aa976 -
Italianize terminology: board → direttivo across all display labels
Labels only — stored values (role='board', URL params, JS vars) unchanged to preserve existing questionnaire data. Changes: - questionnaire_index.html: title, subtitle, ruolo option label - club_hub.html: meta, invite section, completion gauge - dashboard_hybrid.html: hero text, card headers - questionnaire_schema.py: docstring Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>393c8e2
-
Fix: club_hub uses project_id not session_id for generate-from-questionnaires SSE
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>cc445f8 -
Fix Jinja2 TemplateSyntaxError: remove invalid 'from module import' in dashboard
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>2897133 -
Dashboard redesign + fix hf_spaces_mode + recent_plans + q_filled_count
Fixes: - hf_spaces_mode was never passed to template → always showed "Sistema Non Attivato" on HF Spaces. Now uses IS_HF_SPACES from config (detects /data or SPACE_ID env) - license_valid/hwid now passed correctly; on HF always treated as valid (Cloud Mode) - recent_plans was hardcoded [] (TODO); now fetches real plans via list_plans() - q_filled_count: counts compiled questionnaire JSON files across all clubs/members Redesign dashboard_hybrid.html: - Hero CTA block: Club Hub entry with questionnaire status badges - Stats row: Piani Generati / In Bozza / Questionari Compilati / Credibilità Media - 2-col grid: questionnaire overview + recent plans - Health strip: compact system status row (no giant license card on HF) - License card only shown in local mode when not activated - Word upload collapsed in <details> (legacy) - Tighter, cleaner layout with consistent spacing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>54ff705 -
Add Club Hub: /club/<slug> page + questionnaire completion matrix + generate flow
- New route GET /club/<club_slug> -> club_hub.html with: - Questionnaire completion matrix per board member (done/partial/none) - Completion gauge (% board coverage) - Generate plan button with SSE progress (reuses existing /api/generate-from-questionnaires) - Board invite link (/questionnaires?club=<slug>) with copy button - Recent plans list for the club - Multi-club ready: generic slug-based routing - New route POST /api/questionnaire-complete-hook: fire-and-forget completion event - questionnaire_form.html: saveAndFinish() calls hook before redirect - dashboard_hybrid.html: Club Hub + Questionari as primary entry, Word upload collapsed in <details> (legacy) - questionnaire_index.html: Dashboard + Profilo Club nav links Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>9fba70b -
Add Questionari + Profilo Club links to main dashboard navbar
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>f3c8965 -
Add NIM fallback to club_researcher + fix config.py Unicode on Windows
- club_researcher: Gemini → NIM (gemma-3-27b-it) fallback on 429 - config.py: replace Unicode checkmark/cross with ASCII for Windows cp1252 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>2e9b072 -
Add Profilo Club link to all navbars
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b838816 -
Add Step 4: Club Profile with AI-mediated research + human review
- knowledge_store: add club_profiles table + save/get methods - club_researcher.py: Gemini agent that researches public club data, returns structured JSON with per-field source types (official/web/estimate) - app.py: 3 routes (GET /club/profile, POST /research, POST /save) + inject confirmed profile fields into plan generation enriched_data - templates/club_profile.html: review form with editable fields, source badges, confirm checkboxes, live credibility score bar Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>243710d
-
Remove ExecutiveReport HTML from ZIP pack (accessible via button)
ZIP now contains 3 files: PDF + DOCX + OnePager. Executive Report is already available via the dedicated button in plan detail. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>2b97a5f -
Fix PDF section overflow: remove 2-column layout from section-body
- First .section-body rule had column-count: 2 which conflicted with second rule (which correctly had no columns per intent comment). CSS merge left column-count: 2 active → executive_summary h3 headings with page-break-after:avoid caused content to overflow page boundaries. - Set column-count: 1 on first rule to match documented intent - Add break-after: avoid to h2/h3/h4 (modern syntax alongside page-break) - Add h3 + p/ul/ol break-before: avoid to keep headings with content Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>de4fb36 -
Fix markdown rendering in plan detail (server-side, no CDN)
- Add Jinja2 `md` filter in app.py: converts markdown to HTML server-side using existing `markdown` lib, also strips (fonte: ...) annotations - Update plan_detail.html content-preview / content-full to use `|md|safe` instead of raw `|safe` (was showing ## headers as plain text) - Remove client-side marked.js block (CDN unreliable on HF Spaces) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>e0e088a -
Fix 6→8 sections in plan detail + ZIP export error
- post_production_editor: add stw_struttura_org + stw_relazioni_ist to section_titles allowlist so they're no longer skipped by create_review_from_plan - app.py: remove unsupported `sources` kwarg from render_executive_html call (was causing ZIP export to fail with TypeError) - agents.py: run supplementary agents (struttura_org, relazioni_ist) sequentially after parallel core agents to avoid Gemini 429 quota burst - plan_detail.html: simplify export buttons (drop Pitch Mode/Completo/HTML); add marked.js client-side markdown render + fonte annotation strip Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>15c0ba0 -
fix: render markdown in plan section preview using marked.js, strip fonte annotations
fc0285f -
feat: add STW Struttura Organizzativa and Relazioni Istituzionali agents (6 areas per Nardoni spec)
3fd4656 -
fix: extract priorities from bullet MACRO list format in coordinator summary
cafa9b9 -
feat: import board questionnaires for all 5 members
012bfb9 -
fix: vision word-boundary truncation + skip internal MACRO labels in priorities
e2a9418 -
fix: strip code fences, fonte annotations, and insert missing table separators
- _normalize_markdown: strip ``` code fences AI wraps data in - _normalize_markdown: strip (fonte: ...) annotations before rendering - _normalize_markdown: auto-insert |---|---| separator row when missing (markdown lib requires separator row to render pipe tables as HTML) - export_onepager: strip (fonte: ...) and backticks from vision quote Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>692bb9e
-
Fix: pass result[plan] not result to create_review_from_plan in questionnaire generation
99e2e65 -
Fix generate-from-questionnaires: build PlanRecord correctly in run_generation
2d1eea7 -
Add Cesarini questionnaire data
c0d7d31