Commit Graph

11 Commits

Author SHA1 Message Date
5ffeb80959 fix: improve ZOPK news image loading with no-referrer policy
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- Add referrerpolicy="no-referrer" to img tags to bypass hotlink
  protection on source servers
- Replace Google Favicons fallback (blocked) with inline domain
  initial letter in green placeholder
- Consistent styling across index and news_list templates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 09:03:32 +01:00
55088f0ccb fix: ZOPK knowledge base image display and data quality issues
Some checks are pending
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- Fix broken news thumbnails by adding og:image extraction during content
  scraping (replaces Brave proxy URLs that block hotlinking)
- Add image onerror fallback in templates showing domain favicon when
  original image fails to load
- Decode Brave proxy image URLs to original source URLs before saving
- Enforce English-only entity types in AI extraction prompt to prevent
  mixed Polish/English type names
- Add migration 083 to normalize 14 existing Polish entity types and
  clean up 5 stale fetch jobs stuck in 'running' status
- Add backfill script for existing articles with broken image URLs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 08:57:41 +01:00
18d69b5e7d feat(zopk): Add admin manage buttons to all /zopk page sections
Some checks are pending
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
Adds "Zarządzaj" edit links next to each section header, visible only
to admin users. Links point to the corresponding admin panels (knowledge,
timeline, news, dashboard). Also adds a "Panel ZOPK" button in the hero.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:45:57 +01:00
c681cbbea2 fix(zopk): Use is_admin instead of role=='admin' for admin gating
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Role field stores uppercase 'ADMIN' (from SystemRole enum). Use
is_admin boolean property which is synced by set_role() for reliable checks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:33:14 +01:00
30bb960a03 feat(zopk): Add admin-only knowledge display on homepage and /zopk
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
4 new features visible only to admin (role=='admin'):
- Homepage: "Czy wiesz, że?" widget with 3 random high-confidence facts
- /zopk: Knowledge stats, top entities, key numeric facts, fact type distribution
- /zopk: Dated facts timeline (CSS-only vertical timeline)
- /zopk: D3.js entity co-occurrence graph with slider control

No migrations needed - read-only SELECT queries only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:30:34 +01:00
cebe52f303 refactor: Rebranding i aktualizacja modelu AI
- Zmiana nazwy: "Norda Biznes Hub" → "Norda Biznes Partner"
- Aktualizacja modelu AI: Gemini 2.0 Flash → Gemini 3 Flash
- Zachowano historyczne odniesienia w timeline i dokumentacji

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:08:39 +01:00
d0dda10bd7 feat(zopk): Panel admina bazy wiedzy, poprawa odpowiedzi AI, timeline
Priorytet 1 - Panel admina bazy wiedzy ZOPK:
- /admin/zopk/knowledge - dashboard ze statystykami
- /admin/zopk/knowledge/chunks - lista chunks z filtrowaniem
- /admin/zopk/knowledge/facts - lista faktów z typami
- /admin/zopk/knowledge/entities - lista encji z mentions
- CRUD operacje: weryfikacja, usuwanie

Priorytet 2 - Poprawa jakości odpowiedzi NordaGPT:
- Linki markdown do źródeł w kontekście ZOPK
- Ulepszone formatowanie (bold, listy, nagłówki)
- Sekcja "Źródła" na końcu odpowiedzi
- Instrukcje w system prompt dla lepszej prezentacji

Priorytet 3 - Timeline ZOPK:
- Model ZOPKMilestone w database.py
- Migracja 016_zopk_milestones.sql z sample data
- Sekcja "Roadmapa ZOPK" na stronie /zopk
- Pionowa oś czasu z markerami lat
- Statusy: completed, in_progress, planned, delayed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 08:56:55 +01:00
82d4c870a0 style(zopk): Ujednolicenie stylu kart newsów z /zopk/aktualnosci
- Obrazki newsów (lub zielony placeholder z ikoną)
- Większy padding i promień zaokrąglenia kart
- Dłuższe opisy (250 znaków zamiast 200)
- Data w formacie DD.MM.YYYY w jednej linii ze źródłem
- Hover z efektem podniesienia (translateY)
- Responsive: obrazki na pełną szerokość na mobile

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 06:00:10 +01:00
819192bdad feat(zopk): Rozszerzony widok aktualności ze statystykami czasowymi
- Dodano pasek statystyk newsów (łącznie, dzień, tydzień, miesiąc)
- Zwiększono limit wyświetlanych newsów z 10 do 25
- Usunięto przycisk "Zobacz wszystkie" - pełny widok od razu
- Przycisk "Starsze aktualności" pojawia się gdy jest więcej niż 25

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 05:56:00 +01:00
b21b3739d7 fix: Strip HTML tags from news description display
Use Jinja2 striptags filter to remove HTML from news.description
before displaying in ZOPK news cards. Prevents raw HTML like
<a href="..."> from showing as text.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 09:39:08 +01:00
d51637a226 feat: Add ZOPK (Zielony Okręg Przemysłowy Kaszubia) knowledge base
- Add database models for ZOPK projects, stakeholders, news, resources
- Add migration with initial data (5 projects, 7 stakeholders)
- Implement admin dashboard with news moderation workflow
- Add Brave Search API integration for automated news discovery
- Create public knowledge base pages (index, project detail, news list)
- Add navigation links in main menu and admin bar

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 06:32:27 +01:00