Commit Graph

889 Commits

Author SHA1 Message Date
72ba8e05f1 feat(calendar): Show 3 upcoming events on homepage + WhatsApp data 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
- Display up to 3 next events with RSVP status instead of just one
- Add import script for WhatsApp Norda group data (Feb 2026):
  events, company updates, Alter Energy, Croatia announcement

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 16:29:07 +01:00
963f9ec5c8 feat(company): Add Fiume Studio logo
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-12 16:10:55 +01:00
9a91fe3224 fix: sync user↔company in user_companies + fix calendar field names
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 065: backfill user_companies from legacy User.company_id
- Auth register: create UserCompany record on registration
- Admin assign company: sync user_companies when assigning via admin panel
- Fix NordaEvent field names: start_time→time_start, end_time→time_end,
  max_participants→max_attendees, remove non-existent fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 16:06:49 +01:00
193ad2b3aa feat(company): Show manager contacts modal for employees instead of edit form
Some checks failed
NordaBiz Tests / Unit & Integration Tests (push) Has been cancelled
NordaBiz Tests / E2E Tests (Playwright) (push) Has been cancelled
NordaBiz Tests / Smoke Tests (Production) (push) Has been cancelled
NordaBiz Tests / Send Failure Notification (push) Has been cancelled
Employees clicking "Edytuj profil" now see a modal with their company's
management team contacts instead of being sent to an edit form they can't use.
Managers and admins continue to access the edit form directly. Direct URL
access to /firma/edytuj is also guarded with redirect + flash message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 20:24:53 +01:00
3fb1a23546 fix(zopk): Use GeminiService instead of raw genai for AI roadmap analysis
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 analyze_roadmap_with_ai() was using google.generativeai directly
which bypasses API key configuration. Switch to GeminiService which
has the key pre-configured via init_gemini_service().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 17:13:21 +01:00
99dd628d4a feat(zopk): Add AI-powered roadmap analysis with status updates and gap 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
New analyze_roadmap_with_ai() function sends existing milestones and recent
knowledge facts to Gemini for comprehensive analysis. Returns new milestone
suggestions, status update recommendations, and identified roadmap gaps.
Adds PATCH endpoint for milestone status updates and tabbed UI modal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 17:10:28 +01:00
0b8abe8bc3 fix(zopk): Fix broken API URLs in timeline admin template
Some checks are pending
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
The JS was fetching from /api/zopk/milestones (non-existent) instead of
/admin/zopk-api/milestones (actual endpoint). This caused "Unexpected
token '<'" errors as the 404 HTML page was parsed as JSON.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 17:00:31 +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
df8736297d fix(zopk): Update embedding model from text-embedding-004 to gemini-embedding-001
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
Google deprecated text-embedding-004 on v1beta API (returns 404 NOT_FOUND).
Migrated to gemini-embedding-001 with output_dimensionality=768 to maintain
compatibility with 412 existing embeddings in the database.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 16:10:46 +01:00
8f393fbe4a fix(zopk): Improve scraper content extraction with domain selectors and empty-match fix
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
Critical bug: CSS selector pipeline stopped at first match even if element
had 0-94 chars of text (empty <article> tags on wnp.pl, polskieradio24.pl,
portalkomunalny.pl, weekendfm.pl). Now skips elements with <200 chars text.

Added domain-specific selectors for: radiogdansk.pl (Elementor),
nadmorski24.pl (Joomla), portalkomunalny.pl, weekendfm.pl, globenergia.pl,
polskieradio24.pl.

Added 9 domains to SKIP_DOMAINS: wnp.pl (paywall), tvp.pl/tvp.info (JS SPA),
gp24.pl/strefaobrony.pl/dziennikbaltycki.pl (Cloudflare), pap.pl,
obserwatorfinansowy.pl, cire.pl (block bots).

Moved 'article' lower in default selectors to avoid matching empty tags first.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 15:58:05 +01:00
18f9f98f5d fix(zopk): Raise minimum scraped content threshold from 100 to 500 chars
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
Articles with only 100-458 chars were passing validation but contained
metadata/teasers instead of full article text, causing all knowledge
extraction to fail ("Treść za krótka do ekstrakcji"). The 500-char
minimum better aligns with the 200-token chunking requirement (~800 chars).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 15:50:21 +01:00
3c1f920675 fix(zopk): Translate remaining English messages and unify skip status
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
- Remaining scraper messages: Domain/Not HTML/Extraction error → Polish
- Embedding failures shown as skipped (yellow) instead of failed (red)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 15:44:34 +01:00
1c02d109d7 fix(zopk): Add heartbeat to knowledge extraction SSE stream
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
Long-running Gemini extractions (30-120s per article) caused SSE
connection timeout. Now runs extraction in a thread and sends
heartbeat updates every 10s to keep the connection alive.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 15:42:18 +01:00
3b3bb7bdd7 fix(zopk): Polish error messages and show failures as skipped, not errors
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 was confused by red "Błędy: 2" when scraping/extraction had
expected issues (403, content too short). Changes:
- All scraper/extractor messages translated to Polish
- HTTP 403/404/429 get specific descriptive messages
- Expected failures shown as yellow "Pominięte" instead of red "Błędy"
- "No chunks created" → "Treść za krótka do ekstrakcji"
- Summary label "Błędy" → "Pominięte"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 15:36:00 +01:00
a174ca3103 fix(zopk): Align scrape SSE stream format with frontend expectations
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 scrape stream used 'type' field and lacked 'percent', 'message',
'details' - format incompatible with the shared SSE modal handler.
Aligned to match knowledge stream format: status/percent/message/details.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 15:29:33 +01:00
4f5575dbcc fix(zopk): Use scrape_status instead of non-existent content_scraped
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 SSE scrape stream was filtering on ZOPKNews.content_scraped which
doesn't exist in the model. The correct field is scrape_status with
values 'pending', 'failed', 'scraped', 'skipped'.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 15:27:06 +01:00
841fe0df67 fix(zopk): Capture current_user.id before SSE scrape generator
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
Flask-Login's current_user proxy loses context inside generator
functions. Same fix as applied to search stream endpoint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 15:24:59 +01:00
a1cf9519f0 feat(zopk): Add workflow navigation banners and enhanced stepper
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
Adds visual guidance through the 4-step ZOPK news pipeline:
- Enhanced stepper with green checkmarks (done), orange pulsing badges
  (needs attention), and gray (inactive) states
- Status banners under each step heading with contextual messages
- Transition banners between steps with action buttons

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 15:14:58 +01:00
c4c113aa6f fix(zopk): Add Brave API rate limit handling and heartbeat limit fix
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
Brave free tier was returning 429 for ~50% of queries due to back-to-back
requests. Added 1.1s delay between queries and retry with exponential
backoff (1.5s, 3s). Heartbeat endpoint exempted from Flask-Limiter and
interval increased from 30s to 60s to reduce log noise.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:43:34 +01:00
c7a42c3766 fix(zopk): Thread-safe DB session and connection pool for gthread workers
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
Create separate SessionLocal() in run_search() thread instead of sharing
main thread's session (SQLAlchemy sessions are not thread-safe). Increase
connection pool_size to 10 with pool_pre_ping for gthread worker support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:26:11 +01:00
fae7bfa0b2 fix(zopk): Capture current_user.id before SSE generator
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
Flask-Login's current_user proxy loses context inside generator
functions, causing 'NoneType' has no attribute 'id' error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:13:55 +01:00
683df8f43d feat(zopk): Add SSE streaming for real-time search progress
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
Replace simulated progress animation with Server-Sent Events streaming
that shows actual backend progress in real-time during ZOPK news search.
Prevents timeout errors by keeping the connection alive with heartbeat
events. Old POST endpoint preserved as automatic fallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:10:55 +01:00
2b0acbc35f feat(zopk): Reorganize dashboard into 4-step workflow pipeline
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
Reorder sections to follow natural admin workflow:
1. Search articles → 2. AI evaluation → 3. Moderation → 4. Knowledge base

Add visual stepper navigation, step headings with descriptions,
and collapsible reference data section (stats, projects, history).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:55:07 +01:00
094379d95e fix(templates): Add blueprint prefix to url_for calls across admin templates
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
After refactoring to blueprints, templates still used bare endpoint names
(e.g., url_for('admin_zopk')) instead of prefixed names (e.g.,
url_for('admin.admin_zopk')). While most worked via backward-compat aliases,
api_zopk_search_news was missing from the alias list causing 500 on /admin/zopk.

Fixed 19 template files and added missing alias for api_zopk_search_news.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:44:50 +01:00
9884ac4b5a fix(ui): Fix Category object rendering on dashboard + simplify nav for regular users
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
- Fix uc.company.category → uc.company.category.name on dashboard
- Replace "Więcej" dropdown with direct "Kaszubia" link for non-owner users
- Owner (Maciej) keeps full "Więcej" dropdown with all items

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:37:08 +01:00
e94f8eb38d feat(auth): Restrict Integracje page to platform owner only
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
- Hide Integracje link in user menu for non-owner users
- Add server-side access check on /konto/integracje route
- Add owner-only visual indicator on the link

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:35:34 +01:00
06c2619af4 feat(ui): Add owner-only visibility indicators and simplify More menu
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
- Rename "ZOP Kaszubia" to "Kaszubia" in More dropdown
- Hide Kontakty, Raporty, Mapa Powiązań from non-owner users
- Add orange dot indicator (.owner-only) for owner-restricted items
- Apply indicator to 5 audit links in admin panel

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:32:14 +01:00
725cf5dbad feat(ux): Add branded maintenance page with Norda Biznes logo
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
Shown by nginx during gunicorn restart (502/503/504). Auto-refreshes
after 8 seconds. Replaces generic NPM error page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:05:15 +01:00
08228d8f12 fix(auth): Fix DetachedInstanceError on dashboard for users with company associations
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
user_loader was closing the SQLAlchemy session after loading User,
causing lazy-load of company_associations to fail when dashboard template
calls can_edit_company(). Eagerly load associations in user_loader.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 13:00:19 +01:00
650e2a983c feat(admin): Add direct password setting, instant tooltips, and last login column
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 can now set passwords directly via modal with generator (crypto.getRandomValues),
replacing the confirm-dialog flow with a tabbed modal (set password / reset link).
Custom CSS tooltips replace native title="" for instant hover display.
New "Ostatnie logowanie" column shows last_login timestamps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:55:22 +01:00
b630186920 feat(admin): Enhance access overview with full permissions matrix and collapsible grouping
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
Comprehensive rewrite of access control dashboard: role hierarchy table,
full function-by-role access matrix (7 columns incl. unauthenticated users),
Rada Izby members section, and all active accounts with Excel-like
collapsible grouping by role. Expand/collapse all controls included.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:40:20 +01:00
7f77d7ebcd feat(security): Restrict audit access to single designated user
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
Audits (SEO, IT, GBP, Social Media) are now visible only to the
designated audit owner (maciej.pienczyn@inpi.pl). All other users,
including admins, see 404 for audit routes and no audit links in
navigation. KRS Audit and Digital Maturity remain unchanged.

Adds /admin/access-overview panel showing the access matrix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:31:10 +01:00
e8b7f2214f feat(api): Expand Google API coverage to ~100% (GBP Performance + GSC extensions)
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 GBP Performance API integration for visibility metrics (Maps/Search
impressions, call/website clicks, direction requests, search keywords).
Extend Search Console with URL Inspection, Sitemaps, device/country/type
breakdowns, and period-over-period trend comparison. Change OAuth scope
from webmasters.readonly to webmasters for URL Inspection support.

Migration 064 adds 24 new columns to company_website_analysis.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:05:08 +01:00
7802dcd5e1 fix(i18n): Fix Polish diacritics in audit templates and scraper encoding
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
- Fix ~190 hardcoded Polish strings missing diacritical characters
  across seo_audit.html, gbp_audit.html, social_audit.html
- Fix encoding issue in SEO scraper: requests defaults to ISO-8859-1
  when server omits charset, causing mojibake for UTF-8 pages.
  Now uses apparent_encoding detection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 09:44:59 +01:00
97e6c73c3f fix(ux): Move audit buttons to separate row on company profile
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
Audit links (GBP, SEO, Social, IT) now appear on their own line below
contact info and social media buttons for better visual separation.
Also added 'Mój pulpit' back-link for logged-in users.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 09:27:27 +01:00
ceaaf92e47 feat(ux): Add 'Mój pulpit' back-link on company detail page
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
Logged-in users now see both "Powrót do katalogu" and "Mój pulpit"
links at the top of the company profile page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 09:26:18 +01:00
d4101e30d2 fix(ux): Make company profile section more prominent on user dashboard
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 compact single-line company listing with prominent cards featuring
left border accent, larger text, icon buttons, and category display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 09:23:54 +01:00
fd04349c04 fix(oauth): Auto-refresh expired tokens on integrations 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
Previously, the integrations page only read token status from DB without
attempting refresh, causing "Token wygasł" after 1h of inactivity despite
valid refresh_token. Now get_connected_services() auto-refreshes expired
tokens on page load, matching the behavior already present in audit flows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 09:15:30 +01:00
30ef2f554b feat(seo): Add progress stepper and findings summary to SEO audit dashboard
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
Replace simple spinner with 9-step progress stepper showing audit stages
(page fetch, on-page SEO, technical SEO, PageSpeed, local SEO, citations,
content freshness, GSC, score calculation) with simulated timing and
real data enrichment from API response.

Add deterministic "Znalezione problemy" section generated from audit data
with 3 priority levels (critical/important/improvement) covering 24 rules
for SSL, meta tags, sitemap, performance, security headers, and more.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 22:23:51 +01:00
8715b949cc fix(ux): Replace browser confirm() with styled modal for OAuth disconnect
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-08 19:23:53 +01:00
8fd81e3a16 fix(gsc): Support domain property format (sc-domain:) in Search Console
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 site was added as a domain property in GSC, not URL prefix.
_normalize_site_url() now tries sc-domain:example.com variant.
Also added ctr/position to top_queries for template display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 19:08:21 +01:00
53e4352c40 feat(seo): Add GSC setup instructions when token exists but no 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
- SEO dashboard: show step-by-step guide when GSC connected but site
  not found in Search Console (instead of generic "connect" CTA)
- Integrations page: add info note about GSC site verification

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 19:03:58 +01:00
ac984b50a6 fix(seo): Collect GSC data during SEO audit trigger, not only AI audit
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 SEO audit from admin panel uses seo_audit.py (SEOAuditor), not
audit_ai_service.py. Added GSC OAuth enrichment step after audit save.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:08 +01:00
bc2bc4f556 feat(seo): Display Google Search Console data on SEO audit dashboard
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 GSC columns to DB, persist OAuth data during audits, and render
clicks/impressions/CTR/position with top queries table on the dashboard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:38:17 +01:00
14bd4f600d chore: Clean up CLAUDE.md files and remove old downloaded files
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
Remove auto-generated comments from blueprint CLAUDE.md files.
Delete superseded downloaded files (renamed versions exist).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:02:35 +01:00
467a81a03d feat(ui): Add Integracje link to user menu and account sidebar
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
Users with a company can now access /konto/integracje from the user
dropdown menu and from the account settings sidebar navigation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 17:25:47 +01:00
5616ae8561 fix(oauth): Move OAuth flow to user-facing /konto/integracje route
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
Company users should connect their own Google/Meta accounts, not admins.
- Add /konto/integracje route for company users (auth blueprint)
- OAuth callbacks now redirect to /konto/integracje
- Template breadcrumb adapts to user vs admin view
- Admin route /admin/companies/<id>/settings kept for admin access

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 16:25:52 +01:00
70e40d133b feat(oauth): Add OAuth integration UI, API clients, and audit enrichment (Phase 3)
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
- Company settings page with 4 OAuth cards (GBP, Search Console, Facebook, Instagram)
- 3 API service clients: GBP Management, Search Console, Facebook Graph
- OAuth enrichment in GBP audit (owner responses, posts), social media (FB/IG Graph API),
  and SEO prompt (Search Console data)
- Fix OAuth callback redirects to point to company settings page
- All integrations have graceful fallback when no OAuth credentials configured

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