Commit Graph

5 Commits

Author SHA1 Message Date
popovskik 7c2110d8a5 fix(mobile): Ask-MSOS pill yields to cookie/language banners
Deploy to Production on Develop Push / deploy (push) Successful in 19s Details
In in-app browsers (Instagram/Facebook) the floating pill (z-index 9999, same
as the cookie banner) sat on top of the cookie Accept button and the language
banner, so consent could not be tapped. The pill now hides whenever the
cookie-consent (.msos-cc) or language (.lang-suggest) banner is present, via a
MutationObserver on <body>, and reappears once they are dismissed. With the
pill yielding, the language banner is dropped back to the bottom edge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-27 18:03:13 +02:00
popovskik 5e18020066 changes.txt Batch 1: nav, hero, gallery, project CTA, discl. groundwork
- #9.1 Reorder "Who We Are" nav to Our team, Timeline, MSOS Hub (all 225 pages)
- #4  Fix MK "Ask MSOS" label to "Прашај го МСОС"
- #11 Landing hero overlay -> radial blue vignette (lighter centre)
- #3  Gallery cards show the event date under the title (DD.MM.YYYY)
- #1  Membership/support CTA at the end of project pages (memorials excluded)
- #8  "Illustrative image" tag on blog/news photo captions
- #9.3 Mission & Vision: full-width gradient band + more space above title

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-05 15:54:33 +02:00
popovskik 55bc101410 feat(assistant): one-time disclaimer note + GA4 question-report guide
- Add a subtle disclaimer under the greeting (EN/MK/SI): "automated guide,
  can make mistakes — check the linked page for official steps." Shown once,
  not on every message, so it sets expectations without clutter. Persistent
  footer disclaimer stays.
- docs/GA4-ASSISTANT-REPORT.md: step-by-step for registering the custom
  dimensions and building the "top questions" + "unanswered questions"
  explorations in GA4 (dev-only doc, not deployed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-04 01:57:55 +02:00
popovskik 661943bb34 feat(assistant): v2 — query-language detection, analytics, chips, auto-index
Addresses real gaps found in testing (a Macedonian question on an English
page returned nothing):

- Detect the language of the QUESTION (Cyrillic -> MK; Slovene markers -> SI;
  else the page language) and load that language's index + curated answers.
  Fixes cross-language questions.
- Expand curated multilingual intents (now incl. enrolment/eVŠ, deadlines,
  health, "what is MSOS", etc.) with stem keywords for better paraphrase
  matching. MK/SI answers machine-drafted — proofread before launch.
- Suggested-question chips on open (localized) to guide users.
- Privacy-safe analytics: fire a GA4 'assistant_query' event ONLY after the
  visitor accepts cookies (q text, result type, question vs page language) so
  the team can see real FAQs and unanswered questions.
- Move the widget to bottom-left on pages with the floating "Become a member"
  CTA so they never overlap. Design polish (chips, typing dots, launcher pulse).
- CI: rebuild the search index on every deploy (setup-python + build script)
  so the assistant stays in sync with content automatically. Build script is
  now path-portable (no hardcoded path).

Verified in a headless browser: MK-on-EN now answers correctly, chips work,
analytics event fires only with consent, become-a-member offset applies,
zero console errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-04 01:48:39 +02:00
popovskik f7f297bd65 feat: offline in-browser "Ask MSOS" assistant (no API, zero cost)
A privacy-friendly help widget that answers visitor questions from the
site's own content and links to the full page — runs 100% in the browser,
no API, no server, no per-token cost.

- tools/build_search_index.py: parses every EN/MK/SI page into ~720
  heading-level chunks per language -> assistant/index-<lang>.json
  (lazy-loaded only when the chat is opened; gzips to ~80 KB).
- assistant.js: dependency-free BM25 search + multilingual stopword
  filtering + a curated short-answer layer for common questions, plus an
  accessible chat widget (role=dialog, keyboard, aria). CSP-safe (self only).
- assistant.css: scoped .msa-* styles in the site's teal palette;
  responsive (full-screen panel on mobile).
- Injected on 208 pages (blog WIP excluded; picks it up when that lands).

Verified in a headless browser across EN/MK/SI: curated answers, search
fallback with correct ranking (rare terms win), correct deep links,
Cyrillic + Slovene diacritics, and zero console errors. Curated MK/SI
answers are machine-drafted — proofread before launch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-04 01:29:22 +02:00