Commit Graph

1018 Commits

Author SHA1 Message Date
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
392071db3a rename: Social Studio → Social Media, Social Media Publisher → Social Media 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
Updated across all templates: nav menu, page titles, headings, and empty states.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 08:26:40 +01:00
eeda194f97 fix: move charts section above posts list in Social Publisher
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-19 21:28:03 +01:00
439fb9ffb2 feat: add 4 analytics charts and replace likes with engagement score
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 charts: post types (doughnut), best day of week (bar with dual axis),
best hour (bar with dual axis), top 5 posts (stacked horizontal bar).
Replace redundant likes metric with weighted engagement score per post.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 21:24:38 +01:00
779f0b0b73 feat: add cursor-based pagination to Facebook posts API
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 get_page_posts returned a flat list with no pagination support.
Now returns dict with posts and next_cursor, enabling infinite scrolling
through all Facebook page posts via the after query parameter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:51:31 +01:00
9444c3484e feat: add "Load all + charts" button with Chart.js analytics to Social Publisher
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 auto-pagination that fetches all Facebook posts and renders 3 Chart.js
visualizations: engagement per post (line), publication activity per month (bar),
and average engagement trend per month (line with fill).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:35:35 +01:00
f8a8e345ea feat: add Facebook page posts with metrics to Social Publisher
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 last 10 posts from connected Facebook page with engagement
data (likes, comments, shares, reactions). On-demand insights button
loads impressions, reach, engaged users, and clicks per post.
In-memory cache with 5-min TTL prevents API rate limit issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:19:01 +01:00
74203e8ef3 fix: correct endpoint name auth.konto_integracje (not account_integrations)
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-19 16:08:25 +01:00
f8891d6f28 feat: add Facebook connection troubleshooting info in UI
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
- Expandable help section on Integracje page explaining when connection
  may stop working (password change, app removal, role loss)
- Troubleshooting link on Social Publisher stats panel
- Actionable error message on failed posts pointing to Integracje

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:07:05 +01:00
8f689dd4b9 fix: store PAGE token in SocialMediaConfig for reliable publishing
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
- select-page now saves page token to SocialMediaConfig.access_token
- _get_publish_token prefers config page token over OAuthToken
- Prevents breakage when OAuth reconnect overwrites OAuthToken with USER token

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:02:48 +01:00
6d1dfd2d4d fix: allow retry of failed Facebook posts and fix token type
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 'failed' to allowed statuses in publish_post() and update_post()
- Show "Spróbuj ponownie" button for failed posts in form template
- Root cause: select-page endpoint stored USER token instead of PAGE token

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 15:56:35 +01:00
3a2aa6f33a feat: show FB API stats on Social Studio + sync button on Integracje
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
Social Publisher: blue gradient panel with followers, engagement,
completeness, contact pills, and refresh button.
Integracje: "Synchronizuj dane" button next to Disconnect for Facebook.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:21:31 +01:00
94b3e90daf feat: show attendee count next to upcoming events on 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
Batch-query confirmed attendee counts per event and display as
subtle cyan number with people icon in event meta line.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:17:02 +01:00
846adf665d fix: use company_id instead of slug for company_detail URL on 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
Route expects company_id parameter, not slug. Fixes 500 error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:14:46 +01:00
be04cc0348 feat: make "Twoja firma" card clickable on 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
Single company: links directly to company profile.
Multiple companies: opens picker modal with company list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:13:22 +01:00
b5211c63d6 fix: don't overwrite vanity Facebook URL with numeric page ID link
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
Graph API returns link as facebook.com/123456 even when a vanity URL
exists. Skip API link when it contains only digits after facebook.com/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:06:55 +01:00
0ddde6af22 feat: display FB category, phone, website, address from API on profile card
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
Store extra Graph API fields in content_types JSONB. Show category tag,
contact pills with icons, and description in styled quote block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:06:04 +01:00
553c48b054 fix: preserve existing FB URL when API lacks link field, show more profile 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
- Don't overwrite vanity URL with numeric page_id fallback
- Display profile description and completeness bar on Facebook card

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 14:03:08 +01:00
592ceff30d feat: sync Facebook OAuth stats to company social media profiles
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 connecting a FB page via OAuth, automatically fetch page stats
(followers, engagement, bio) from Graph API and persist to
CompanySocialMedia table. Adds manual refresh endpoint and UI badge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 13:54:57 +01:00
1cbbb6fc80 fix: use user token in select-page endpoint for page listing
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
Same bug as discover-pages: select-page was using page token to call
me/accounts, which returns empty. Now uses user_access_token from
metadata_json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 12:22:27 +01:00
21b2be1ead feat: unlock Integracje page for MANAGER+ instead of single email
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
OAuth integrations page was hardcoded to maciej.pienczyn@inpi.pl.
Now accessible to any user with MANAGER role or higher.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 12:19:38 +01:00
ed60643ec6 fix: preserve user token for FB page discovery after page selection
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 selecting a FB page, the user token was overwritten with page
token. me/accounts requires user token to list pages, so page discovery
returned empty. Now stores user_access_token in oauth metadata_json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 11:51:44 +01:00
3d13f41878 feat: rename Social Publisher to Social Studio in all UI labels
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
Rebranded user-facing labels only (menu, titles, headings).
Internal endpoint names and file names remain unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 11:46:39 +01:00
7257732686 fix: show flow diagram expanded by default
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-19 11:04:14 +01:00
2b4e9d78a5 feat: add collapsible post lifecycle diagram to Social Publisher form
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
Visual flow chart showing draft -> debug -> live states with color-coded
nodes, arrows, and return path explanation. Collapsible to avoid clutter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 10:55:24 +01:00
6aa4ec9cd1 feat: add informational panel about FB visibility limits and style withdraw 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
Adds warning box explaining that Facebook doesn't allow unpublishing,
contextual status badges, and dark red withdraw button to clearly
indicate destructive/irreversible action.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 10:53:56 +01:00
af745cfb60 fix: replace unpublish with withdraw (FB API doesn't support unpublishing)
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 returns error 100 when setting is_published=false on
already-published posts. Replaced "Zmień na debug" with "Usuń z Facebooka"
which deletes the post from FB and resets status to draft for re-publishing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 10:50:10 +01:00
adceaaec60 fix: move toggle visibility forms outside postForm to fix nested form issue
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
Nested HTML forms are invalid - browsers ignore inner form tags, so
submit() on toggleVisibilityForm did nothing. Moved toggle section
after </form> closure of postForm.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 10:43:35 +01:00
50d764d48c feat: replace native confirm() with styled modal in Social Publisher
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
Custom confirmation modal matching portal UX with icon, title, message
and styled action buttons. Replaces all browser confirm() dialogs for
toggle visibility, publish live, and delete actions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 10:40:02 +01:00
f26341d8cc feat: add toggle visibility for published Facebook posts (debug ↔ live)
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 bidirectional visibility control: published posts can be switched
between public (live) and draft (debug/admin-only) mode via Facebook
Graph API. Includes is_live column, status indicator, and toggle buttons.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 10:36:14 +01:00
5950a55416 feat: add "Publish Live" button to bypass debug mode per 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
- New force_live parameter in publish_post() overrides config.debug_mode
- Red "Publikuj na żywo" button with confirmation dialog
- Visible when company has debug_mode enabled
- Works for new posts, drafts, and re-publishing debug-published posts
- "Publikuj teraz" shows "(debug)" label when in debug mode

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 10:28:22 +01:00
5a1f35a668 feat: include company social media links in AI-generated 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
Query company_social_media table for valid profiles (Facebook, Instagram,
LinkedIn, YouTube, etc.) and pass them as context to AI prompts.
Member spotlight posts now include social media links at the end.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 10:00:26 +01:00
0fa2ea9e14 feat: add AI cost tracking for social publisher content and hashtag generation
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
Pass user_id, company_id, and feature name to generate_text() calls:
- 'social_publisher_content' for post content generation
- 'social_publisher_hashtags' for hashtag generation
All costs logged to AIUsageLog and AIAPICostLog with user/company context.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:58:29 +01:00
95adbd8896 feat: redesign AI tone options with authentic, storytelling-focused voices
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 6 generic tones with 10 research-backed options optimized for
chamber of commerce Facebook content. New default: "Opowieść" (Storytelling).
New tones: Duma i wspólnota, Rozmowa, Świętowanie, Za kulisami,
Z przymrużeniem oka. Based on Buffer/Hootsuite/Jasper best practices
and 2026 social media trends favoring authenticity over polish.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:54:30 +01:00
9dfcf1f63c fix: add missing ai_models context to all render_template calls
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 render_template calls were missing ai_models/default_ai_model
causing UndefinedError on template render (500 error).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:51:15 +01:00
ce8bb1109f feat: add AI model selector for social publisher content generation
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
3 models available: Gemini 3 Flash (default, cheap), Gemini 3 Pro
(best quality, 4x cost), Gemini 2.5 Flash (stable previous gen).
Model selection applies to both content and hashtag generation.
Shows which model was used after generation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:46:52 +01:00
b73fcb59d1 fix: separate hashtags from content in AI generation
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 hashtag instructions from AI prompts (content-only generation)
- Add _split_hashtags() to extract any hashtags AI still includes
- generate_content() now returns (content, hashtags, model) tuple
- Prevents duplicate hashtags when publishing (content + hashtags field)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 09:43:18 +01:00