Commit Graph

1054 Commits

Author SHA1 Message Date
f8bb0be16b fix: handle empty class list in logo image scanner
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
img.get('class') can return an empty list [], causing IndexError
when accessing [0]. Added `or ['']` fallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:05:32 +01:00
44d8ab932b fix: use ceidg_api_service in arm_company.py instead of manual API call
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
The script was calling /firma?nip=X (wrong endpoint) instead of using
fetch_ceidg_by_nip() which does two-phase /firmy?nip=X then /firma/{id}.
Now uses the same service and field mapping as the admin panel button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 17:08:26 +01:00
c86d9cf368 fix: save social media audit results in arm_company.py script
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
The script was calling auditor.audit_company() but not auditor.save_audit_result(),
causing profiles to be found but never persisted to the database.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 17:01:43 +01:00
4daf43f9f7 fix: GBP audit result is dataclass not dict, fix social count
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
- GBP: access .completeness_score attribute + call save_audit()
- Social: count saved DB records instead of parsing audit result dict

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 16:38:18 +01:00
0e04a17785 fix: correct service API calls in arm_company.py
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
- KRS: search_by_nip() returns dict, not just KRS number
- SEO: SEOAuditor(database_url) + audit_company(company_dict)
- Social: SocialMediaAuditor() + audit_company(company_dict)
- GBP: GBPAuditService(db) + audit_company(company_id)
- Support multiple company IDs in one invocation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 16:36:24 +01:00
1967fe8695 feat: add CLI script for company enrichment (arm_company.py)
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
Allows running the same enrichment workflow as the "Uzbrój firmę" button
directly from the command line, without needing browser/admin login.

Usage: python3 scripts/arm_company.py <company_id> [--force]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 16:34:35 +01:00
a0cc22a29d feat: add "Zaktualizuj dane" button to re-run all enrichment steps
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
Two buttons side by side: "Uzbrój firmę" runs only missing steps,
"Zaktualizuj dane" forces re-run of all steps regardless of status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:16:29 +01:00
fb29b41720 fix: use actual logo file extension in company detail path
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
The logo path was hardcoded to .webp even when the actual file was .svg,
causing broken image display for SVG logos like Orlex Design.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:09:58 +01:00
0ea4f7458a fix: check both webp and svg for logo existence in company detail
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
Logo check only looked for .webp files, missing SVG logos like
Orlex Design. Now checks both extensions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:04:42 +01:00
c867962138 fix: auto-select recommended logo in master workflow
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
When "Uzbrój firmę" runs automatically, logo step now picks the
recommended candidate instead of showing the gallery (which would
be overwritten by page reload). Manual "Szukaj logo" still shows
the gallery for admin selection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:52:37 +01:00
6a623d2b3b improve: reorder workflow steps, add logo candidate gallery
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
Move logo selection to step 5 (last), reorder: registry, SEO, social,
GBP, logo. After clicking "Szukaj logo", admin sees thumbnail gallery
of candidates and can pick the best one or cancel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:45:22 +01:00
461d361f8c improve: add step numbers to company enrichment workflow cards
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
Each workflow action card now shows a numbered badge (1-5) indicating
the recommended execution order for administrators.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:41:17 +01:00
6d6542c4c4 feat: create CompanyPKD records for CEIDG companies
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
CEIDG enrichment now creates individual CompanyPKD records from the PKD
list, matching the pattern used by KRS enrichment for consistency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:02:26 +01:00
ffd9e26d2e fix: handle KRS financial report period format variants
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
KRS API returns two date formats for za_okres field:
"01.01.2011 - 31.12.2011" (older) and "OD 01.01.2013 DO 31.12.2013" (newer).
Use regex to extract all date patterns instead of splitting on ' - '.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:00:54 +01:00
cbe3cd3f6e feat: complete KRS data import with all available fields
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
Map remaining KRS API fields: registration date, company agreement date,
duration, capital currency, OPP status, representation rules, shareholders
(wspólnicy), and financial reports (sprawozdania finansowe).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:58:35 +01:00
b5458b69fc fix: map KRS contact data (website, email) during enrichment
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
KRS API returns kontakt_krs with www and email fields. These were not
being mapped to Company.website and Company.email. Now enrichment
extracts these and normalizes the URL (adds https:// prefix, lowercase).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:41:57 +01:00
4b325cc483 fix: complete KRS enrichment mapping (REGON, address, PKD, NIP)
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
The KRS enrichment function was only mapping forma_prawna, legal_name
and capital. Now maps REGON, address (ulica + nr_domu), city, postal,
primary PKD code on Company model, and NIP if missing. Fixed field
name mismatches: nr_domu (not numer), opis (not nazwa), glowna (not
glowny). City names are title-cased from KRS uppercase format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:38:34 +01:00
e92accc1ed fix: auto-reload page after enrichment action completes
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
Individual action buttons now reload the page after 1.5s to reflect
updated data and status indicators. The master "Uzbrój firmę" workflow
skips per-step reload and only reloads once after all steps complete.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:34:05 +01:00
ff35ef6b43 feat: add admin company detail page with enrichment workflow
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
New admin page at /admin/companies/{id}/detail showing company data,
completeness score, and action buttons for registry data (CEIDG/KRS),
logo fetch, SEO audit, social media audit, and GBP audit.
Includes "Uzbrój firmę" master button for sequential execution.
Company list now links to detail page with "NOWA" badge for recent entries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:29:00 +01:00
0e96dd80fa simplify: show Open button only for PDF, remove DOCX conversion
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
PDF files: "Otwórz" (inline in browser) + "Pobierz" (download)
DOCX files: "Pobierz" only (browsers can't display DOCX inline)

Removes LibreOffice on-the-fly conversion - simpler and more reliable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:53:03 +01:00
da3e88cef1 fix: use absolute path for libreoffice and handle errors gracefully
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
- Use /usr/bin/libreoffice (Gunicorn has limited PATH)
- Set HOME=/tmp (LibreOffice needs writable home dir)
- Handle FileNotFoundError with user-friendly message
- Improve error flash messages in Polish

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:50:18 +01:00
52eb79f87d feat: convert DOCX to PDF on-the-fly for inline viewing
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
DOCX/DOC documents are now converted to PDF using LibreOffice headless
when the user clicks "Otwórz". The converted PDF is cached next to the
original file so subsequent views are instant.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:46:41 +01:00
8893e01d1c feat: enable open button for all document types (not just PDF)
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
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:41:52 +01:00
6b72b91712 feat: add inline PDF viewer button for board documents
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
PDF documents now have an "Otwórz" button that opens
the file in the browser's built-in PDF viewer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:38:35 +01:00
a77db328f0 fix: use upload date (not meeting date) for board document storage path
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
DocumentUploadService.get_file_path() resolves paths using uploaded_at,
so import scripts must store files in directories matching that date.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:29:57 +01:00
a8f2178b7e feat: activate board document upload/download with meeting 2/2026 import
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 document management routes (upload, download, soft-delete) to board blueprint,
link BoardDocument to BoardMeeting via meeting_id FK, add documents section to
meeting view template, and include import scripts for meeting 2/2026 data and PDFs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:04:44 +01:00
0b82419753 docs: add WYSIWYG Editor to deployed features in ROADMAP
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
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:24:04 +01:00
35c86cc78b feat: add golden star highlights to 12 standout features in release notes
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
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:14:56 +01:00
53607b30cc docs: add release notes v1.33-v1.36 (Feb 17-20 changes)
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
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:03:30 +01:00
5c93bfa635 feat: collapsible sections, reorder layout (charts > app posts > FB posts)
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
Sections now have collapsible headers with localStorage persistence.
Layout order: FB page stats > Analityka (charts) > Top 5 > App posts > FB posts.
Each section can be independently expanded/collapsed by clicking the header.
Collapse state persists across page loads via localStorage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:49:42 +01:00
c42643b07c fix: 0 is falsy in JS - \"Wszystkie\" dropdown now works correctly
Some checks are pending
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
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
perPage=0 (show all) was being overridden to 10 by || operator.
Changed to explicit key-in-object check to preserve 0 value.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:39:12 +01:00
b97338f1af fix: preserve perPage setting when AJAX updates post data
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
renderFbPosts no longer unconditionally resets page to 1.
Only resets when dataset size changes (new data loaded).
Preserves user's dropdown selection during auto-load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:37:23 +01:00
78c5458386 ux: show pagination bar both above and below posts list
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
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:36:02 +01:00
8172847cc7 feat: add client-side pagination with per-page dropdown for FB posts
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
Default 10 posts per page with dropdown (10/20/50/100/Wszystkie).
"Pokaż więcej" button loads next page incrementally.
Pagination bar shows count and controls at bottom of posts list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:34:29 +01:00
60837e07fa ux: constrain doughnut chart height to match other charts in row
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
Added 200px fixed height container and maintainAspectRatio:false
to "Typy postów" doughnut chart so second row matches first row height.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:30:37 +01:00
a9a23f363a i18n: fix Polish diacritics across social publisher template
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
Replaced ASCII Polish strings with proper diacritics: postow→postów,
Odswiez→Odśwież, Sredni→Średni, Blad→Błąd, Ladowanie→Ładowanie,
Nastepna→Następna, Usun→Usuń, Utworz→Utwórz, and ~30 more.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:28:32 +01:00
d82427136b ux: simplify to 2 buttons, remove Analityka
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
Removed redundant Analityka button since charts auto-load on page load.
"Odswiez wszystkie" now also renders charts after fetching.
Two buttons remain: "Najnowsze 10" (quick preview) and "Odswiez wszystkie"
(full fetch + cache + charts).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:23:15 +01:00
a8a434e99d feat: auto-load charts from DB cache on page load, show cache date
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
Charts now render automatically on page load via AJAX from DB cache
(no click needed). Info bar above charts shows post count, cache date,
and hint to refresh. GET cache endpoint now returns cached_at date.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:18:54 +01:00
c324658f47 fix: prevent infinite FB API pagination loop with dedup and cursor cycle detection
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
Facebook Graph API can return cycling cursors causing infinite fetch loops.
Added: post ID deduplication, seen-cursor detection, max 100 pages limit.
Applied to both loadAllFbPosts and refreshAllFbPosts functions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:13:39 +01:00
19b5c76664 ux: move cache guidance message above posts list
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
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:09:26 +01:00
0b78070113 ux: always show guidance message for cached posts on page load
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
Shows clear instructions: if cache has more posts than displayed,
guide to Analityka. If cache is small (10 posts), guide to
"Odswiez wszystkie" first, then Analityka.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:07:58 +01:00
73d7b8f8ee fix: prevent 10-post refresh from overwriting full cache, add refresh-all button
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
"Najnowsze 10" no longer saves to DB cache.
New "Odswiez wszystkie" button fetches all posts via FB API pagination
and saves to cache. "Analityka" uses cache for instant charts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:05:28 +01:00
a6e0ce3c39 perf: limit inline FB cache to 10 posts, add AJAX cache endpoint
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
Fixes slow page load for non-admin users (919KB inline JSON).
Route now sends max 10 posts inline with total_count metadata.
New GET endpoint serves full cache via AJAX for Analityka button.
loadAllFbPosts tries DB cache first (instant), falls back to FB API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 08:59:55 +01:00
8f71b040ad fix: load cached FB posts for admin users (user_company_ids=None)
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
Admin's _get_user_company_ids returns None meaning all companies,
but iterating over None gave empty list. Now falls back to fb_stats keys.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 08:52:12 +01:00
38b2372f7e rename: button labels to Odswiez + Analityka for clarity
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
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 08:44:11 +01:00
c440456678 feat: make Top 5 posts chart bars clickable to open Facebook post
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
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 08:41:42 +01:00
bd553be0d4 fix: compact Top 5 posts chart - half bar height, 2-line labels, fixed 200px
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
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 08:39:59 +01:00
63ee509e1e feat: persist Facebook posts in DB for instant page load
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
- Migration 071: Add cached_posts (JSONB) and posts_cached_at to social_media_config
- Service: get_cached_posts() and save_all_posts_to_cache() methods
- Route: New POST endpoint to save posts cache, pass cached data to template
- Template: Render cached posts+charts instantly on page load from DB,
  save to DB after "Load all" or "Refresh", remove AJAX auto-load

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 08:35:25 +01:00
0d3c925338 feat: auto-load first page of Facebook posts on page load
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
Posts now appear immediately when visiting Social Media Dashboard
instead of requiring manual button click.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 08:31:40 +01:00
e60f545b11 feat: rename Social Media to Social with beta badge, move between Forum and Aktualnosci
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
Shortened nav label to fit single line, added rotated gradient beta badge.
Moved nav position from after Edukacja to between Forum and Aktualnosci.
Updated admin sidebar label to Social Dashboard with beta badge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 08:30:07 +01:00