Commit Graph

485 Commits

Author SHA1 Message Date
sdarbinyan
59855b0fab fix(storefront): create missing footer payment-icon assets
bootstrap.json's footer.paymentIcons referenced /assets/images/
mir-logo.svg, visa-logo.svg, mastercard-logo.svg - none of that
directory's files existed until the RC-02 placeholder fix, and these
three were still missing. Site-wide broken-image icons in every page
footer. Added neutral labeled-badge SVGs (not reproductions of the
actual trademarked logo artwork) at the exact referenced paths, plus
an onerror fallback on the footer <img> for defense in depth.
2026-07-26 12:01:26 +04:00
sdarbinyan
53343fa711 docs: create AUTHENTICATION.md
Full auth contract: Telegram/QR session login (live), Ed25519
challenge/response admin auth (wired client-side, dormant -
authInterceptor not registered, ed25519AuthGuard unused by any route),
JWT structure, refresh, expiration, rotation, logout, session
invalidation, role hierarchy, tenant isolation, permission model.
4 Mermaid sequence diagrams.

Flags 9 Requires-backend-decision items and the pre-existing
duplicate AdminRole definition (core/auth vs admin/users models).
2026-07-26 08:53:09 +04:00
sdarbinyan
fd7ffc8668 docs: full frontend backend-surface audit (BACKEND-AUDIT.md)
Exhaustive inventory of every HTTP call, gateway (interface + mock +
real impl), facade, and model/DTO the frontend defines or expects,
grouped by domain. Primary input for the remaining Backend
Finalization Sprint docs.

Key findings:
- Only AdminCategoriesGateway and AdminDashboardMetricsGateway are
  DI-token-bound; every other admin domain (orders, products, users,
  transactions, monitoring, moderation) injects its *LocalGateway
  class directly - a real backend swap needs a token added first, not
  just a rebind.
- Only one real admin API impl exists (AdminCategoriesApiGateway);
  everything else admin is in-memory/localStorage mock.
- Content-management/project-editor have no save/publish HTTP call at
  all - builder writes are in-memory + localStorage draft only.
- No literal /admin|/builder|/backoffice CRUD paths exist in source;
  concrete admin paths are proposals, not verified literals.
2026-07-26 01:05:26 +04:00
sdarbinyan
fc35830846 docs: RC-02 final release report 2026-07-26 00:20:57 +04:00
sdarbinyan
ca343c493f fix(backoffice): merchant-friendly wording in Monitoring
Analytics, Reports, and Diagnostics were already clean (no raw
HTTP/queue-worker strings found on audit). Monitoring had three spots
speaking developer language by default:

- Background queue names ("order-notifications") -> friendly labels
  ("Order notifications").
- Webhook event keys ("order.created") -> friendly labels ("New order
  placed").
- Activity log's "api" category showed the raw HTTP line
  ("GET /api/products responded 200 in 84ms") as the primary message.
  Now shows a plain-language summary by default ("Product data
  refreshed successfully"), with the raw string moved to a collapsed
  "Technical details" <details> per event (api/error/warning rows).
2026-07-26 00:17:14 +04:00
sdarbinyan
3e54e88db7 fix(storefront): add missing placeholder image asset and onerror fallback
getMainImage() referenced /assets/images/placeholder.svg as the no-image
fallback, but src/assets/images/ never existed - any item with zero
photos rendered a browser broken-image icon instead of a placeholder.
Added the asset.

Also added an (error) handler (onImageError) on every dynamic <img> that
renders a user/admin-supplied URL (product card, cart line item, cart
payment QR code, product gallery main + thumbnails) so a 404'd/broken
image URL swaps to the shared placeholder instead of shipping broken.
2026-07-26 00:12:43 +04:00
sdarbinyan
6c6fa00ccf fix(ui): replace native confirm()/alert() with shared dialogs and toasts
New app-confirm-dialog (wraps existing app-dialog + app-button) replaces
every native confirm() across media library bulk-delete, static pages
editor (delete/bulk-delete), builder save-bar (publish/reset-draft),
project-editor-page (reset-section), homepage/languages/widgets sections
(remove block/language/widget), and cart (clear-cart).

Cart's native alert() calls (delivery/terms validation, email send
success/failure) now route through the existing UserNotificationService
toast pipeline instead.

No native confirm()/alert()/prompt() remain in production UI.
2026-07-26 00:08:00 +04:00
sdarbinyan
a670ca994f chore(cleanup): delete unrouted legacy pages, update docs
pages/category, pages/search, pages/item-detail, pages/info/**,
pages/legal/** (40+ files) were entirely unrouted dead code:
- category/:id, category/:id/items, search all redirect/route to
  CatalogContainerComponent
- product/:id routes to ProductDetailsContainerComponent, not item-detail
- cmsContentRoutes (meant to route info/legal) is a literal empty array;
  static/legal content is served by the CMS-driven :staticPath ->
  StaticPageComponent route instead

dynamic-renderer/ is unrelated and stays - confirmed active, it's the
live homepage rendering pipeline (HomeComponent -> WebsiteRuntimeFacade
-> PageRendererService/PageResolverService -> DynamicPageLayoutComponent).

Updated docs/TODO.md, docs/KNOWN-ISSUES.md, docs/FRONTEND-ROADMAP.md,
docs/PROJECT_INDEX.md to reflect the resolution.
2026-07-25 23:56:13 +04:00
sdarbinyan
1163bfd88a fix(storefront): replace hardcoded strings with i18n, neutral empty-state wording
- Route aria-label/alt/title strings (rating, discount, carousel arrows,
  hero slides, dialog close, toast dismiss, QR code, bank payment iframe,
  guest checkout fallback) through the translate pipe/service instead of
  literal English.
- Drop the "Oops!"/"Упс!" apology framing from category/subcategory empty
  states (en/ru/hy) - zero results is not an error.
2026-07-25 23:54:08 +04:00
sdarbinyan
0982397d6b docs: sync TODO.md with RC-01 findings
Builder static-page editor marked done (Phase 6). Added 4 new items
found during RC-01 Phase 12 final walkthrough, not fixed this pass:
hardcoded 'Featured Products' heading, dashboard false-Problem status
on empty stores, Monitoring's raw developer text, category image 404s.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 23:35:52 +04:00
sdarbinyan
e153a67ec0 fix(backoffice): add error+retry states to Users, Monitoring, Analytics, Reports
Phase 8 (RC-01): these 4 list/dashboard pages had no error-state handling
on their primary data-load subscriptions — on a gateway error, `loading`
was either never reset (Users, Monitoring, Analytics: genuine infinite-
spinner risk, nested subscribe chain in Analytics never resolved on
failure) or there was no loading/empty/error handling at all (Reports
queue: raw table with zero skeleton or fallback).

- admin-users.facade.ts, admin-monitoring.facade.ts: add `error` signal,
  error callback on the primary load subscribe so `loading` always
  resolves.
- admin-analytics.facade.ts: add `error` signal; every level of the
  4-deep nested gateway subscribe chain (orders -> products ->
  categories -> reviews) now has an error handler that resolves loading
  instead of leaving it stuck true.
- admin-moderation.facade.ts: add `reportsLoading`/`reportsError` signals
  (reports list had none previously).
- Templates: reuse existing `app-skeleton`/`app-empty-state`/`app-button`
  primitives for the new error branch, `common.retry` label, two new
  generic `common.errorTitle`/`common.errorDescription` i18n keys added
  to en/ru/hy (reused across all 4 fixes instead of one-off per-page
  copy).

Verified: tsc --noEmit clean, `npm run build` green (pre-existing bundle-
budget warning only, unrelated). Live-checked Home (375px) and Backoffice
Products (1024px) — no console errors, tables/cards render without
overflow.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 21:31:30 +04:00
sdarbinyan
b909a195f7 fix(backoffice): wording quality pass across orders, moderation, transactions, users, customers
- Replaced hardcoded English audit/timeline text (order status changes,
  review moderation events, user role/status changes) with proper
  adminXxx.timelineEvent.*/adminUsers.audit.* i18n keys, so Recent
  Activity/Timeline/Audit panels no longer mix English into ru/hy UI.
- Translated raw internal codes rendered directly to users: transaction
  payment method ('card'/'qr'/'cash_on_delivery' -> adminTransactions.methodValue.*)
  and user roles/permissions ('products.manage' etc -> adminUsers.roleValue.*/
  adminUsers.permission.*), replacing developer-facing enum leakage with
  real copy.
- Fixed wrong-noun list-footer counts: Orders/Transactions/Moderation
  list pages all reused adminProducts.items ("N товаров"/"N products")
  regardless of what was actually listed; each now has its own itemsCount
  key ("N заказов", "N транзакций", "N отзывов").
- Fixed customer detail page's "Back" button reusing adminOrders.back
  ("Back to orders") instead of a customers-specific label.
- Added translation keys to en/ru/hy + translations.ts interface for all
  of the above.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 21:20:37 +04:00
sdarbinyan
72846b44b1 fix(builder): un-hide and relabel static-page content editor, warn on publish/remove-language
- KNOWN-ISSUES item 11: the WYSIWYG page content editor was buried inside
  a collapsed Advanced <details>, labeled 'Raw HTML (advanced)'. Moved it
  to the top of the Content tab, unwrapped, relabeled 'Page Content' /
  'Содержимое страницы' / 'Эջի բովանդակություն' with a plain-language
  description. Advanced tab keeps genuinely technical fields (id, slug,
  route, custom template).
- Publish (save-bar) and Remove language (languages-section) had no
  confirmation despite being destructive/high-impact — added
  window.confirm guards using the existing builder.confirm* i18n pattern
  (matches resetDraft/resetSection/dirty-guard precedent), all 3 locales.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 20:43:43 +04:00
sdarbinyan
38253f7e83 fix(storefront): home carousel overflow, static-page content, compare colour swatch
- product-carousel-widget: implicit CSS grid track had no min-width:0,
  so the flex scroller's intrinsic content width (fixed 220px product
  cards) overflowed the grid item and pushed body width to ~2187px on
  a 1440px viewport, squeezing the entire homepage into a ~340px column.
  Added min-width:0 to the track and scroller (standard grid/flex
  overflow fix).
- bootstrap.json mock fixture: about-us/privacy-policy/terms-of-service
  static pages (the real CMS pages served via bootstrap.staticPages,
  per docs/PROJECT_INDEX.md) used a 'content' field, but
  content-page.service.ts's normalizePage() only reads 'html' -
  ContentPageBootstrapInput has no 'content' field. Title rendered,
  body was always empty. Renamed the 3 fixture entries' field from
  content to html to match the schema; content now renders.
- compare-table: colour row rendered raw hex/name values as plain text
  (e.g. '#fCfCfC') with no swatch, inconsistent with variant-selector's
  established colour-swatch pattern used on the product page. Added a
  small circular swatch (reusing the same border-radius:50% pattern)
  next to the value.

Verified live via ng serve: overflow gone (body/viewport width match
at 1440/1280/375), static pages render real content, compare swatch
displays. tsc --noEmit and ng build both clean (pre-existing bundle-
budget warning only, already tracked in KNOWN-ISSUES item 12).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 20:34:17 +04:00
sdarbinyan
3a0b1a3746 fix(search): app-skeleton/app-empty-state for live /search results, icon-only close buttons
/search routes to CatalogContainerComponent + CatalogSearchResultsComponent
(app.routes.ts:45-47) - confirmed the live search surface (pages/search/* is
unrouted dead code per KNOWN-ISSUES.md item 13, not touched here).

- search-results.component: hand-rolled `.skeleton-card` shimmer (hardcoded
  hex gradient colors, duplicate keyframes) replaced with the shared
  app-skeleton primitive the dead pages/search copy already used, but the
  live component never got. Bare `<div class="empty-state"><h3>/<p></div>`
  replaced with app-empty-state + app-icon, matching CatalogEmptyStateComponent's
  established pattern elsewhere in the same feature.
- Added distinct empty-state messaging: a too-short query (<3 chars, mirrors
  the existing minSearchLength/isQueryTooShort convention from the dead
  pages/search/search.component.ts) now shows "Enter at least N characters"
  instead of being indistinguishable from a genuine no-results-for-X state,
  which now shows the query and a retry hint (search.noResults/noResultsFor/
  noResultsHint/minLength i18n keys already existed, just unused on this path).
- catalog-container.component.html: icon-only close/remove buttons (filter
  drawer, sort sheet, grid sheet, saved-search chip) rendered a literal "x"
  text character with no app-icon - now use app-icon name="x".

Debounce (220ms, search.facade.ts), URL query-param sync, keyboard
arrow-key suggestion navigation (role=combobox/aria-activedescendant), and
filter/sort discoverability were all verified already correct on this path,
no changes needed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 20:16:09 +04:00
sdarbinyan
6d663eb238 fix(icons): replace broken Material-icon-ligature text with app-icon in search suggestions
Search suggestions/popular-searches (search-autocomplete.service.ts,
search.facade.ts) set icon values like 'inventory_2', 'category', 'sell',
'auto_awesome', 'trending_up' - Material Symbols ligature names rendered as
raw {{ item.icon }} text in search-bar.component.html. No Material Icons
font is loaded anywhere in this Lucide/app-icon-based app, so these
rendered as literal garbled text ("inventory_2", etc.) instead of icons.

- SearchSuggestion.icon retyped from string to AppIconName (search.model.ts)
- Suggestion icon values mapped to registered app-icon names: product->package,
  category->folder, brand->tag, ai->zap, popular/trending->trendingUp (new
  registry entry, LucideTrendingUp)
- search-bar.component now renders <app-icon [name]="item.icon" /> instead of
  the raw ligature string, and its icon-only clear ("x") button now renders
  app-icon name="x" instead of a bare literal "x" character glyph

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 20:15:47 +04:00
sdarbinyan
5b3f969dfd docs: mark Phase 1 mechanical fixes done in TODO.md
canDeactivate guard, primeng/primeicons+barry-cache cleanup checked
off. HeaderConfig.showProfile corrected - was already fixed
previously, TODO.md was stale on that one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 20:05:41 +04:00
sdarbinyan
7b639cabf8 fix(admin): products canDeactivate guard, unblock npm, drop dead deps
RC-01 Phase 1 mechanical fixes (verified against current repo state,
not blindly reapplied from TODO.md):

- admin/products create/edit/duplicate now protected by an unsaved-
  changes guard (adminProductDirtyGuard), mirroring the existing
  categories pattern. AdminProductsFacade had zero dirty-tracking
  before this - added a dirty signal, set true on updateDraft(),
  cleared on load/create/successful save. Added confirmLeaveUnsaved
  to the adminProducts i18n section (en/ru/hy) - categories already
  had its own copy of this key, products didn't.
- barry-cache bumped ^0.1.0 -> ^0.9.3 (the pinned range no longer
  resolved on the registry - ETARGET - which had been silently
  blocking every npm install/uninstall all cycle).
- Removed primeng/primeicons (npm uninstall, now unblocked) - the
  only consumer (items-carousel) was already deleted in RC PERF-01.
- Removed core/search/services/search-history.service.ts, a dead
  1-line re-export with zero importers (verified: the real
  implementation is features/search/services/search-history.service.ts,
  used by search.facade.ts). Left core/search/models/* alone - those
  ARE live, imported by catalog components.

Verified before touching: HeaderConfig.showProfile toggle is already
removed from the header-section editor template (TODO.md was stale on
this one) - no change needed, will correct the tracking doc separately.

tsc --noEmit clean, npm run build green (bundle unchanged, primeng
was already tree-shaken out, this just removes the dead dependency
declaration itself).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 20:04:51 +04:00
sdarbinyan
46c7358dde docs: add TODO.md checklist, delete archived reports
- docs/TODO.md: checklist of every open item from KNOWN-ISSUES.md/
  FRONTEND-ROADMAP.md/BACKEND_API_REMAINING_WORK.md/ANGULAR22_PLAN.md,
  re-verified against current repo state (git ahead count, package.json,
  app.routes.ts) rather than copied blind. Backend items kept but
  marked skipped per user request (doing together separately).
- Deleted docs/archive/ (19 files) now that every open finding was
  confirmed already merged into KNOWN-ISSUES.md/FRONTEND-ROADMAP.md.
  Full original text recoverable via git history
  (git log --diff-filter=D -- docs/archive).
- Fixed the resulting dangling docs/archive/* references in
  PROJECT_INDEX.md/KNOWN-ISSUES.md/FRONTEND-ROADMAP.md.

Verification: tsc --noEmit clean, npm run build green, 0 broken
markdown links across 49 files (checked programmatically). No
application code touched.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 19:24:29 +04:00
sdarbinyan
5374401257 docs: consolidate documentation and archive temporary reports
Step 1-2 (audit + plan): classified 35 project markdown files into
Core/Architecture/ADR/Temporary-audit/Sprint-report/Generated-review/
Duplicate/Obsolete/Historical. Agent-tooling files (.agents/skills/**,
.superpowers/**, docs/context/**, CLAUDE.md/GEMINI.md/AGENTS.md/
.github/copilot-instructions.md) explicitly out of scope — intentional
per-tool duplication, not documentation debt.

Step 3 (merge, no information lost):
- docs/PROJECT.md -> docs/PROJECT_INDEX.md, rewritten as the single
  entry point: system overview, living-doc index, archive pointer,
  current status, and a critical-finding callout up top.
- docs/backend/BACKEND-INTEGRATION.md -> docs/BACKEND_API.md,
  docs/backend/REMAINING-BACKEND-WORK.md ->
  docs/BACKEND_API_REMAINING_WORK.md (also folded in a legitimate
  uncommitted status update that had been sitting unstaged all
  session: categories marked DONE, order-creation endpoint noted done).
- RELEASE-NOTES.md merged into CHANGELOG.md (was a near-duplicate of
  the same release content in friendlier prose), then deleted.
- KNOWN-ISSUES.md: added item 13 (see below) and item 14 (missing
  canDeactivate on admin/products edit, from the archived PROJECT-STATE
  audit, re-verified still true); added a correction note to Fixed
  item 7.
- All cross-references to renamed/moved files fixed across every
  kept doc (grep+sed pass, then verified with a link-existence check
  across all 58 in-scope markdown files -> 0 broken links).

Step 4 (archive, nothing deleted without merging first): created
docs/archive/, moved 19 files there (3 root sprint reports, 1 platform
report, SPRINT-PLAN.md, and 14 one-off audit/review/report docs).
Added correction headers to the 3 archived docs whose conclusions were
affected by the finding below, rather than silently leaving them
misleading.

Step 5: docs/PROJECT_INDEX.md rewritten per the mission brief -
someone opening the repo should understand the whole system from it.

IMPORTANT FINDING (surfaced during this audit, not the mission's
primary goal but too significant to bury): pages/category/*,
pages/search/*, pages/item-detail/*, pages/info/**, pages/legal/**
(40+ files) are entirely unrouted dead code - app.routes.ts's
cmsContentRoutes is a literal empty array, and category/search/product
routes redirect to CatalogContainerComponent/
ProductDetailsContainerComponent, not these files. Confirmed against
app.routes.ts directly and cross-checked against FRONTEND.md's own
routing description. This means several fixes from earlier this cycle
(RC-Premium-01, RC STORE-01) and the dead-code cleanup sprint's
conclusion that these files were live were all wrong - documented as
KNOWN-ISSUES.md item 13, flagged at the top of PROJECT_INDEX.md, and
noted on the 3 archived docs whose conclusions it affects. No
application code was changed to fix this (out of scope per this
session's 'documentation only' constraint) - it needs a wire-it-up-or-
delete-it decision first.

Verification: tsc --noEmit clean, npm run build green, all markdown
links across 58 in-scope files resolve (checked programmatically).
No application/Angular/backend code modified.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 19:10:49 +04:00
sdarbinyan
5707755576 docs: add ANGULAR22_PLAN.md — upgrade feasibility (research only)
No upgrade performed, per mission ('do NOT upgrade automatically').
Verdict: safe, ~2-3.5 days effort. Repo is actually already on Angular
21.1.5 (not 18 as docs implied) — one major behind, not several.

Key findings:
- 2 concrete blockers before any upgrade attempt: barry-cache@^0.1.0
  no longer resolves (ETARGET, root cause of the primeng-removal
  blocker already tracked in KNOWN-ISSUES item 12), and this dev
  environment's Node (v22.16.0) doesn't satisfy Angular 22 CLI's
  requirement (^22.22.3 | ^24.15.0 | >=26.0.0).
- Zero usage of any Angular 22-removed API (ComponentFactoryResolver,
  provideRoutes, CanMatchFn) found in src/app/**.
- One real behavioral risk: route param inheritance default changes
  emptyOnly -> always; app has no explicit override, needs a manual
  route-by-route audit, not just a green build.
- App's existing standalone/signals/OnPush posture (190/191 OnPush)
  means most of the v22 migration cost is already paid.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 18:43:48 +04:00
sdarbinyan
d7f69b272a docs: add CLEANUP_REPORT.md for dead-code sweep
Documents the confirmed-dead deletions from e0bcf9d, plus an important
process note: the first attempt at this task was interrupted mid-run
and left an unverified, incorrect mass-deletion staged (117 files
including live routed pages/category, pages/search, pages/info/**,
pages/legal/**) which was reverted before commit. Root cause: knip has
a confirmed false-positive blind spot on this codebase's locale-nested
component pattern under pages/**. Flagged for future cleanup passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 18:39:49 +04:00
sdarbinyan
e0bcf9dfb8 chore: remove confirmed dead code
Dead code sweep verified manually against app.routes.ts, DI registries, and
cross-repo grep for every candidate (per prior false-positive incident with
knip on pages/**). Deleted only what has zero reachable reference:

Auth (unregistered, comment-only mention):
- core/auth/guards/ed25519-auth.guard.ts - ed25519AuthGuard never imported;
  only mentioned inside a doc-comment in admin-login-page.component.ts.
- core/auth/guards/permission.guard.ts - permissionGuard never imported.
- core/auth/interceptors/auth.interceptor.ts - authInterceptor not present
  in app.config.ts's withInterceptors([...]) list; not imported elsewhere.

Search feature:
- features/search/services/search-analytics.service.ts - SearchAnalyticsService
  never imported outside its own file.
- features/search/components/empty-results/* - app-search-empty-results
  selector never used in any template; search-bar.component.html implements
  its own inline @if (noResults) empty state instead.

Content management:
- features/content-management/pages/content-management-page.component.ts -
  thin wrapper around StaticPagesEditorComponent with zero route pointing at
  it in app.routes.ts. The rest of features/content-management/* (facade,
  static-pages-editor, page-editor, etc.) remains: it is used by
  project-editor and stays.

Backoffice CRUD scaffolding (re-verified the UI-COMPOSITION-REVIEW.md claim
independently): app.routes.ts backoffice section only loads
features/admin/{dashboard,products,categories,transactions,orders,customers,
moderation,users,monitoring,analytics} and features/backoffice/media. Grepped
every other backoffice/* folder for cross-references - none found.
- features/backoffice/{categories,customers,inventory,orders,products,settings}
  - each contained only a placeholder .gitkeep from the original scaffold
  commit (b957112); no real components were ever added, so this is not the
  "duplicate implementation" the prior doc described, just unused scaffold
  dirs. Removing corrects that doc's premise.
- features/backoffice/shared/backoffice-coming-soon-page.component.* - only
  consumer would have been those scaffold dirs; unreferenced elsewhere.
- assets/mock/backoffice/{customers,orders}/list.json - mock data with no
  corresponding fetch call; BackofficeDataProvider only exposes
  loadProducts()/loadCategories(), backed by the products/categories mock
  files, which are kept.

Dead shared barrels/models (no importer anywhere in src/app):
- shared/index.ts, shared/models/index.ts, shared/types/index.ts - unused
  re-export barrels.
- shared/models/domain/index.ts + user-preferences.model.ts (whole domain/
  subfolder) - UserPreferences interface has zero consumers.

Storefront pages (pages/public/platform-home.component.ts) - PlatformHomeComponent
has no route in app.routes.ts and is not imported anywhere; distinct from the
pages/category, pages/search, pages/info/**, pages/legal/**, pages/item-detail
components which ARE routed and were correctly left untouched.

Verification: npx tsc --noEmit -p tsconfig.app.json clean after each batch;
npm run build succeeded (pre-existing initial-bundle-budget warning only,
unrelated to this change).
2026-07-25 18:36:45 +04:00
sdarbinyan
e4c1c6e2a0 docs: sync documentation after perf/a11y/release-candidate work
- PROJECT.md: Current Status updated (perf/a11y/RC walkthrough all
  done, new report docs added to index).
- FRONTEND-ROADMAP.md: RC PERF-01, RC A11Y-01, and Release Candidate
  walkthrough entries added; known-open-items list updated (2 new
  flags from RC walkthrough, primeng removal blocker, large chunks,
  backend-ready sprint explicitly deferred pending a real API contract).
- KNOWN-ISSUES.md: corrected item 6 (payment modal focus-trap
  assumption was wrong, now actually fixed); added items 9-12 (brand
  contrast failures, Contacts content gap, WYSIWYG editor mislabeled,
  primeng removal blocker); added 2 Fixed entries for this cycle's
  P0s (query-param routing, Categories CRUD).
- Graphify graph regenerated (graphify-out/, cache only, not tracked).
- Obsidian: skipped, no running Obsidian instance in this session.
- No architecture change this cycle (perf/a11y/bug fixes only) — no
  new ADR.
- No application code touched.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 10:51:05 +04:00
sdarbinyan
d4eb25dd4b docs: add RELEASE_REPORT.md for release-candidate walkthrough
Consolidates 3 live browser walkthrough commits (storefront, builder,
backoffice): 2 P0s found and fixed (app-wide query-param routing bug,
Categories CRUD completely broken end-to-end), 6 P1s, remaining items
flagged for a content/design decision rather than fixed unilaterally.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 10:47:09 +04:00
sdarbinyan
907ac2cfe0 fix(backoffice): release-candidate walkthrough fixes
- Admin Categories CRUD (create/edit/delete/reorder) silently failed
  end-to-end in local dev: ADMIN_CATEGORIES_GATEWAY resolved
  strategy.getBackofficeProviderMode(), which (unlike
  getBootstrapProviderMode()) has no localhost fallback, so it always
  picked AdminCategoriesApiGateway (real HTTP, 404s here) over the
  purpose-built AdminCategoriesLocalGateway mock. saveDraft()'s
  subscribe() has no error branch, so a create/publish click gave zero
  feedback: the category never saved, dirty stayed true forever, and
  the unsaved-changes guard then blocked navigation with no
  explanation. Live-verified end-to-end: created 3 categories, edited,
  reordered via the keyboard move-up/move-down buttons - all persist
  correctly now. Fixed by wiring the token to the category-specific
  strategy.getCategoryProviderMode() (was already defined, just never
  called) and giving it the same isLocalhost() mock fallback
  getBootstrapProviderMode() already uses. Production behavior
  (non-localhost) is unchanged - still resolves to the real API
  gateway.
- Categories list (tree/table/grid views) mislabeled its Edit button
  'Edit product' (adminProducts.edit) instead of 'Edit category' -
  copy-pasted the wrong existing i18n key; adminCategories.edit
  already exists with the correct translation in en/ru/hy. Not part
  of the tracked ~178-key missing-translation gap (docs/KNOWN-ISSUES.md) -
  this key exists and is simply wrong, not missing.

Verified live via browser walkthrough of every Backoffice route
(dashboard, products list/create/edit, categories list/create/edit/
reorder, orders list/detail, transactions list/detail+audit dialog,
customers list/detail, moderation list+reports queue, users, monitoring,
analytics, media library) at desktop and mobile widths. Console/network
noise from the mock backoffice API 404ing locally is pre-existing and
already documented (docs/ADMIN.md's prior bug-hunt audit pass) - not
re-reported. Product create/edit CRUD already worked end-to-end
(AdminProductsFacade injects its local gateway unconditionally, no
swappable-provider mistake there).

npx tsc --noEmit and npm run build both green (only the pre-existing
700kB initial-bundle budget warning, already tracked as out of scope).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 10:46:04 +04:00
sdarbinyan
2cbb62a9cc fix(builder): release-candidate walkthrough fixes
- Legacy no-lang-prefix URLs with a query string (e.g. the dev
  ?devBypassAdmin=true bypass itself, or any bookmarked/shared deep link
  into the Builder) got their query string percent-encoded into the path
  instead of preserved (language.guard.ts) - router.createUrlTree([...])
  treats a single array element as a literal path segment, so
  `/edit/branding?devBypassAdmin=true` became
  `/ru/edit/branding%3FdevBypassAdmin%3Dtrue`, a 0-result route. Switched
  to router.parseUrl() on the full redirect string so path, query params,
  and fragment are parsed and preserved correctly. This guard runs on
  every top-level route in the app (not just Builder), so this was
  silently breaking any legacy URL with a query string app-wide.
- "Reset draft" (Sbrosit' chernovik) left the save-bar showing "unsaved
  changes" immediately after the reset, even though the reset already
  discarded everything and cleared the persisted localStorage draft
  (project-editor.facade.ts resetDraft()) - it updated the in-memory
  bootstrap and cleared the draft but never resynced lastSavedBootstrap,
  which the dirty computed diffs against. Now resetDraft() also resets
  lastSavedBootstrap to match, so the status bar correctly reads as clean
  right after a full discard.

Verified live via browser walkthrough of every Builder section (General,
Branding, Theme, Header, Footer, Homepage, Widgets, Static Pages,
Languages, Features, Navigation, Preview) plus save/publish/undo/redo/
reset-section/reset-draft/draft-restore flows, the media picker dialog,
and the Homepage block / Footer column keyboard-fallback reorder buttons
(WCAG 2.1.1 fallback added in the prior a11y pass) - all functioned
correctly end-to-end, no console errors, no untranslated i18n keys, no
unexpected 4xx/5xx, no layout overflow at desktop or mobile widths.

Investigated and flagged, not fixed (needs a design decision, not a bug
fix): the static page's actual body content editor
(app-marketplace-html-editor, per-locale) is not on the page editor's
"Content" tab at all - it only has title/hero-image/thumbnail fields.
The real WYSIWYG/HTML editor is nested inside a collapsed <details>
disclosure under the "Advanced" tab, labeled "Source HTML (advanced)" as
if it were a raw-HTML power-user fallback, when it is in fact the only
way to edit a static page's body content. Functions correctly once
found/expanded; the placement/labeling just doesn't match the "Content"
tab a merchant would expect it under, and moving it is a navigation
change beyond this pass's fix-what's-broken scope.

npx tsc --noEmit and npm run build both green.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 10:12:14 +04:00
sdarbinyan
0a1acbd610 fix(storefront): release-candidate walkthrough fixes
- Cart item description showed a stray literal "..." when the item had no
  description text (cart.component.html) — now only renders the trailing
  ellipsis when a description is present.
- Compare table showed raw internal stock enum values ("high"/"low"/etc.)
  instead of localized labels (compare-table.component.ts) — now reuses the
  same stock-label mapping used by product cards.
- Search with zero results incorrectly showed the empty-category messaging
  ("browse categories" / "go to parent category") stacked on top of the
  search's own "nothing found" message (catalog-container.component.ts) —
  isEmptyCategoryState now excludes active search queries so only the
  search-appropriate empty state renders.
- Footer "About" link pointed to /about, which 404s; the actual CMS page
  route is /about-us (bootstrap.json mock nav data) — corrected the route.
- Added missing public/assets/images/placeholder.svg, the fallback image
  referenced by getMainImage() for items without photos (previously 404s
  if that fallback path is ever hit).

Investigated and left as-is (not code bugs): /images/*.webp 404s on
product cards are references to a real backend/CDN not present in local
dev (confirmed via mock-data.interceptor.ts and api.service.ts image-URL
resolution) — expected dev-only gap. Footer "Contacts" link (/contacts)
has no corresponding static page content at all in mock data; flagging
for a content decision rather than fabricating copy.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 09:46:51 +04:00
sdarbinyan
f5f431620e docs: add ACCESSIBILITY_REPORT.md for RC A11Y-01
Consolidates the 3 WCAG 2.1 AA audit commits (storefront, builder,
backoffice): skip links, keyboard-operable DnD fallbacks, dialog
focus-trap fixes, contrast fixes, form labeling, live-region
announcements, combobox/tablist ARIA. Flags remaining brand-color
contrast failures needing theme-owner sign-off, not fixed unilaterally.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 09:19:18 +04:00
sdarbinyan
565fd9b3a8 fix(backoffice): WCAG 2.1 AA accessibility fixes
RC A11Y-01 audit pass, Backoffice (admin/*) area. Builds on 712a7b4/63c9cee's
composition pass (scope="col", skeletons, empty-states) without redoing that
work.

- Sidebar nav landmark: admin-layout's <nav aria-label> reused the
  "Dashboard" nav-item translation key as its landmark label, misleadingly
  announcing the whole sidebar as "Dashboard" - added a dedicated
  adminShell.sidebarLabel key ("Admin sidebar navigation") in en/ru/hy.
  Skip link, #admin-content main landmark, Escape handling, and mobile-drawer
  focus management were already correct - verified, not touched.

- Categories tree drag-and-drop keyboard fallback (WCAG 2.1.1): the category
  tree's native HTML5 DnD (draggable/dragstart/drop) reorders siblings with
  no keyboard equivalent - existing arrow-key tree navigation only expands/
  collapses/selects, never reorders. Added per-row move-up/move-down icon
  buttons (disabled at sibling boundaries), reusing the existing `reorder`
  output so the facade's reorder logic is untouched; new
  adminCategories.moveUp/moveDown keys in en/ru/hy.

- Screen-reader loading announcements: skeleton-row loading states across
  Products, Categories, Customers, Orders, Transactions, Users, Reviews,
  Monitoring (webhooks/events), and Analytics (summary cards + top products)
  were purely visual (app-skeleton is aria-hidden by design) with no
  accessible "loading" text, unlike the storefront/product-details pattern -
  added role="status"/aria-live="polite"/aria-busy + sr-only text using the
  existing common.loading key.

- Table row headers: added scope="row" to the primary identifying cell
  (product/category/customer name, order number, transaction order number,
  user name, review customer, report target, top-products/low-stock product
  name, webhook endpoint) on 9 tables that only had scope="col". Added
  matching `tbody th[scope='row'] { font-weight/color/text-align/
  vertical-align }` + last-row border resets in each component's own scss so
  the semantic change doesn't alter visuals (the shared app-table stylesheet
  styles all <th> as bold/muted by default).

Verified via `git show --stat` of fb1afb7/a03260e and `docs/UI-COMPOSITION-
REVIEW.md`'s Backoffice sections first, per instructions - confirmed
scope="col" coverage already complete, all admin modals already route
through the shared app-dialog (focus-trap/Escape/return-focus already
correct, nothing to fix), and the bare-<select> filters still carry
aria-label per the accepted Sprint 28 decision (not re-migrated to
app-select).

Flagged, not fixed:
- No toast/notification system exists anywhere in this codebase (product/
  category save and delete call the gateway with no success/error UI at
  all, not even a subscribe error handler) - there is nothing to wire
  aria-live onto without adding a new UI mechanism, which is out of scope
  for an a11y-only pass. A prerequisite feature-level fix, not an a11y
  regression.
- Dashboard's per-card metric/status-row/timeline skeletons (dashboard-
  metric, dashboard-status-row, dashboard-timeline) were left without
  aria-live wiring - wrapping each of the ~10 simultaneous mini-widgets in
  its own live region would fire a burst of redundant announcements; needs
  a single page-level "loading dashboard" region instead, a larger change
  than this surgical pass.
- Monitoring's events table and the notifications dropdown (role="menu"
  with a static empty-state message, aria-haspopup="true") were left as-is -
  matches the same partial-widget-pattern precedent already accepted for
  locale-tabs/product-tabs in the storefront and builder passes.
- Analytics `lowStockProducts` table's missing loading-skeleton branch
  (already flagged, not fixed, in the RC-Visual-02 pass) - untouched again
  here for the same reason.

Verified: npx tsc --noEmit clean; npm run build green (only the pre-existing
768.57 kB vs 700 kB initial-bundle budget warning, unrelated to this pass).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 09:18:09 +04:00
sdarbinyan
a03260eccf fix(builder): WCAG 2.1 AA accessibility fixes
RC A11Y-01 audit pass, Builder (project-editor) + content-management static
pages editor. Builds on 4ebc15f's composition pass without redoing it.

- Skip link: Builder's /edit and /edit/:section routes render outside the
  storefront app-shell (isAdminRoute() branch has no skip link/landmark, only
  a bare router-outlet, unlike the storefront's app.html) - added a
  "skip to content" link targeting a new #builder-main-content landmark on
  project-editor-page.component, reusing the existing adminShell.skipToContent
  key and global .skip-link style. Nav landmark already had aria-label
  (builder.appName) from the prior pass, verified correct.
- Save bar: added role="status"/aria-live="polite" to the save/publish status
  block and role="status" to the draft-restored notice so save/publish state
  changes and draft recovery are announced to screen readers (previously
  silent DOM updates).
- Media picker (shared, used by both Builder and static-pages editor): upload
  error message had no aria-live wiring - added role="alert".
- HTML editor (marketplace-html-editor): the contenteditable rich-text surface
  had no accessible role/name - added role="textbox", aria-multiline="true",
  aria-label.
- Drag-and-drop keyboard fallback (WCAG 2.1.1): homepage-section's block list
  and footer-section's column list + per-column link list use Angular CDK
  drag-drop (cdkDrag/cdkDropList), which has no built-in keyboard reordering.
  Added move-up/move-down icon buttons (disabled at the first/last boundary),
  matching the existing pattern already used by widgets-section and
  navigation-section.
- Color picker: the swatch <input type="color"> had no accessible name (only
  the paired text input was labelled via app-form-field) - added explicit
  ariaLabel bindings to all 8 color-picker instances in theme-section.
- Languages: the new-locale code input relied on a placeholder ("de") as its
  only accessible name - added ariaLabel + new builder.newLanguageLabel i18n
  key (en/ru/hy).
- Undefined CSS var --color-primary (never defined anywhere, silently used its
  hardcoded hex fallback and never responded to tenant theming - same
  recurring bug class as 4ebc15f) - remapped to the real --primary-color token
  in marketplace-html-editor, homepage-section, and section.shared (7 usages).
- role="alert" added to all 11 validation-error <p class="editor-error">
  occurrences across footer/homepage/languages/navigation/preview/widgets
  sections and the static-pages editor, so field/section validation messages
  are announced.
- scope="col" added to preview-section's change-summary table headers.

Flagged, not fixed (design-system decisions, matching the storefront pass's
precedent):
- Save bar's --warning-color/--error-color/--info-color text fail WCAG AA
  4.5:1 in some themes - same genuine brand semantic colors flagged (not
  fixed) in fb1afb7's storefront pass; needs a deliberate token decision,
  not a Builder-specific issue.
- locale-tabs (app-locale-tabs, shared) has role="tablist"/"tab" and
  aria-selected but no roving-tabindex/arrow-key navigation - matches the
  same partial-tablist pattern already accepted for product-tabs in the
  storefront pass; all tabs remain natively Tab-focusable, so this meets
  4.1.2/2.1.1 without the full ARIA authoring-practice pattern.

Verified: npx tsc --noEmit clean; npm run build green (only the pre-existing
bundle-budget warning, unrelated to this pass).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 09:01:38 +04:00
sdarbinyan
fb1afb72d4 fix(storefront): WCAG 2.1 AA accessibility fixes
RC A11Y-01 audit pass, storefront + shared app-shell chrome only. Builds
on RC-Visual-02/RC-Premium-01/RC STORE-01 without redoing that work.

- Skip link: added first-focusable "skip to main content" link (app.html,
  styles.scss .skip-link/.sr-only), targeting new #main-content landmark.
  New app.skipToContent i18n key in en/ru/hy.
- Header: mobile menu items stayed keyboard-focusable and screen-reader
  reachable while visually collapsed (max-height:0 with no visibility
  toggle) - fixed with visibility:hidden + matched transition-delay.
  Desktop search input (readonly, click-to-navigate) had no keyboard
  activation - added aria-label + (keydown.enter).
- Cart payment/bank-payment modals: custom (non-app-dialog) UI had no
  focus trap, no Escape handling, and never returned focus to the
  triggering element - ported app-dialog's confirmed-correct
  focus-trap/Escape/return-focus pattern directly onto cart.component.ts.
  Added role="dialog"/aria-modal/aria-label to both panels and
  role="status"|"alert"/aria-live to every payment-status screen so
  screen readers announce state changes (creating/waiting/success/
  error/timeout).
- Search combobox: suggestion listbox had no role="combobox" wiring on
  the input and suggestion buttons weren't role="option" - added
  aria-autocomplete, aria-controls, aria-activedescendant, aria-selected
  so the existing arrow-key navigation is announced to screen readers.
- Product tabs: tablist/tab pattern was incomplete (no role="tablist",
  no tabpanel) - added role="tablist" + ids to product-tabs.component,
  role="tabpanel"/aria-labelledby to the content panel in
  product-details-container.
- Review form: rating/text validation errors weren't associated with
  their controls (no aria-describedby, no role="alert") - fixed; added
  aria-required to the review textarea.
- delivery-selector: added aria-required to the delivery <select> when
  a selection is mandatory.
- Shared app-icon component: doc comment claimed "decorative by default
  (aria-hidden)" but no aria-hidden was ever applied - fixed to actually
  set aria-hidden="true" when undecorated, and role="img"/aria-label
  when ariaLabel is passed. Shared component, affects every icon-only
  usage app-wide, no visual change.
- Color contrast: --text-light fails WCAG AA 4.5:1 for normal text in
  every theme (dexar 3.39:1, lavero/novo 2.54:1 against white). The two
  in-scope usages (company-details org-short/basis, review-form
  upload-placeholder) switched to --text-secondary (4.55:1-7.56:1,
  passes), same visual family, no layout change.

Flagged, not fixed (design-system decisions, not polish):
- --border-color fails WCAG 1.4.11 3:1 for UI-component boundaries in
  every theme (dexar 1.42:1, lavero/novo 1.24:1 vs white) - pervasive
  token used by hundreds of borders app-wide; needs theme-owner sign-off.
- --success-color/--warning-color/--error-color/--info-color used as
  plain text-on-white in several places (product-information,
  question-card, review-form, compare-page) fail 4.5:1 (2.15-3.76:1) -
  genuine brand semantic colors, changing them to pass would visibly
  shift the palette; needs a deliberate token decision.
- Header mobile-menu max-height/padding transition (pre-existing,
  unrelated to this fix) flagged by design lint as layout-thrashing;
  left as-is per the "no layout/business-logic changes" constraint.

Verified: npx tsc --noEmit clean; npm run build green (only the
pre-existing bundle-budget warning, unrelated to this pass).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 08:46:18 +04:00
sdarbinyan
3253b297eb docs: add PERFORMANCE_REPORT.md for RC PERF-01
Consolidates the 3 perf-audit commits (reactivity/change-detection,
bundles/lazy-loading/tree-shaking, assets) into one report: headline
1.47MB->1.12MB initial bundle (-24%), plus per-area findings and a
remaining-work list (primeng/primeicons still in package.json pending
a blocked npm uninstall, large lazy chunks, combineLatest sites).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 08:28:00 +04:00
sdarbinyan
2e931bbdc4 perf(app): remove confirmed-dead global CSS classes
RC PERF-01 asset audit (images/fonts/SVG/CSS), follow-up to 61a5714/4bf0666.

Removed from src/styles.scss - zero references (literal and hyphen-safe)
in any .html/.ts across the repo, and no dynamic class-string construction
found for the utility classes:
- .btn-primary / .btn-secondary (+ :hover) - unused button variants
- .catalog-product-card - unused selector in a shared comma group with
  .product-card/.item-card, which stay
- .item-badges-overlay, .item-simple-desc - unused component helpers
- .text-center, .mt-1..4, .mb-1..4, .p-1..4 - fully unused spacing utilities

styles-*.css: 9.60 kB -> 8.41 kB raw (2.22 kB -> 1.99 kB transfer), -12%.

No other category needed a code change:
- Images: <img> tags already have loading="lazy"/decoding="async" on
  storefront grids/galleries (product-card, catalog, category-grid,
  cart, item-detail) from prior polish passes; CLS is already handled
  via CSS aspect-ratio on those containers rather than width/height
  attrs, so none were added. Payment-logo <img>s already have explicit
  width/height. Flagged, not fixed: a handful of single-image admin/
  editor previews (page-editor, brand-overview, asset-details-drawer)
  lack loading="lazy" - low traffic, negligible impact, left alone to
  avoid unnecessary diff.
- Fonts: index.html preconnects to fonts.gstatic.com/googleapis.com and
  loads DM Sans 400/500/600/700 via Google Fonts CSS2 (display=swap
  already in the URL). All 4 loaded weights are used in app CSS - no
  dead weight to drop. Flagged, not fixed: 800/900 are used in several
  component styles but never loaded, so the browser faux-bolds those -
  a pre-existing rendering quirk, out of scope (changing loaded weights
  risks visible text changes).
- SVG: icon-registry.ts centralizes all icons via @lucide/angular (no
  inline SVG path duplication). Checked SVGs under public/ for editor
  cruft (metadata/inkscape/sodipodi comments) - found none, already
  clean. Flagged, not fixed: mastercard-logo.min.svg, dexar-logo*.svg,
  dexar-favicon.svg, novo-logo.svg, novo-favicon.svg appear unreferenced
  in src/public manifests - left in place since deletion is out of this
  task's scope and they may be used by backend-driven tenant branding.

Verified: npx tsc --noEmit clean, npm run build green (initial bundle
unchanged at 1.12 MB, this pass only touched global CSS).
2026-07-24 08:26:31 +04:00
sdarbinyan
4bf0666fd1 perf(app): lazy-load i18n translation packs, drop dead items-carousel component
RC PERF-01 bundle audit follow-up on 61a5714.

- i18n: ru/en/hy translation packs (346 KB raw combined) were all
  statically imported in TranslateService and shipped in the initial
  bundle regardless of the visitor's language. Now only 'ru' (platform
  default) is bundled eagerly; 'en'/'hy' are dynamic import()s. The
  language route guard (languageGuard) awaits preloadLanguage() before
  activating the route, so translations are always fully loaded before
  any component renders - no flash of untranslated/fallback content.
- widget-host.service.ts: import UnknownWidgetComponent directly instead
  of via the widgets/ui barrel (index.ts re-exports 6 widgets).
- Deleted src/app/components/items-carousel/* - confirmed dead (zero
  references anywhere, verified via knip and grep), the only consumer
  of primeng/primeicons in the app. Removed the now-unused
  `@import 'primeicons/primeicons.css'` from styles.scss (no primeicons
  CSS classes used elsewhere). primeng/primeicons remain listed in
  package.json/package-lock.json - npm CLI in this environment is
  blocked by an unrelated, pre-existing broken `barry-cache` devDependency
  (ETARGET on `npm install`/`npm uninstall`), so the lockfile could not be
  safely regenerated. Flagged, not fixed.

Routes audit (app.routes.ts): all storefront/builder/backoffice feature
routes already use loadComponent/loadChildren; nothing eagerly imported.
No route changes needed.

Lucide icons (icon-registry.ts): already named/tree-shakeable imports
from @lucide/angular, not a full-library import. No change needed.

Before/after (npm run build, production):
- Initial bundle raw: 1.47 MB -> 1.12 MB (-350 KB / -24%)
- Initial bundle transfer (est.): 263.59 kB -> 221.51 kB (-42 kB / -16%)
- Budget overage: 769.22 kB over -> 416.84 kB over (still exceeds the
  700 KB budget; project-editor-page-component (320 kB),
  catalog-container-component (126 kB), product-details-container
  (88 kB), cart-component (61 kB) lazy chunks unchanged - no safe
  mechanical split identified within scope, see PERF-01 report for
  detail).

Verified: npx tsc --noEmit clean, npm run build green (warning only,
no errors).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 08:19:13 +04:00
sdarbinyan
61a57142b0 perf(app): add OnPush to root App component
RC PERF-01 platform-wide performance audit. App was the only one of 191
@Component decorators still on default change detection; all state
mutation flows through signal.set()/router-event handlers, so OnPush is
safe (no direct DOM mutation, no non-signal mutable bindings read in the
template).

Audit findings (see report):
- RxJS subscription leaks: 149 .subscribe() calls across 44 files
  reviewed; all either use takeUntilDestroyed, manual Subscription +
  ngOnDestroy, or self-completing HTTP/shareReplay observables in
  providedIn:'root' singletons. No leaks found, no changes needed.
- OnPush coverage: 190/191 components already OnPush; app.ts fixed here.
- @for/*ngFor tracking: 0 legacy *ngFor found; @for requires track at
  compile time in this Angular version. Already fully compliant.
- Duplicate HTTP calls: CategoryFacade and ConfigService already use
  shareReplay({bufferSize:1, refCount:true}) caching consistently.
- Signals/BehaviorSubject boilerplate: only 2 combineLatest usages
  app-wide, both narrow and already minimal; left as-is (no safe,
  isolated leaf case to convert without touching facade state shape).
- Template method calls: mostly cheap signal reads or small pure
  per-item formatters; none warranted extraction given OnPush is
  already in place everywhere they're used.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 08:08:51 +04:00
sdarbinyan
28459a8274 docs: add STORE_REVIEW.md for RC STORE-01, close known-issues 9/10
- docs/STORE_REVIEW.md: RC STORE-01 mission summary — what was closed
  (category/search skeleton, cart dead email-form) vs what's still
  correctly gated behind an architecture/design decision.
- KNOWN-ISSUES.md: items 9/10 moved Open -> Fixed.
- FRONTEND-ROADMAP.md: known-open-items list deduped against the fix.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 23:53:39 +04:00
sdarbinyan
ce96ef184d chore(storefront): remove dead cart email-capture markup and CSS
Post-payment email/phone-capture form in cart.component.html was
commented-out markup (never rendered), with a matching ~90-line dead
.email-form CSS block still shipping in the bundle. Removed both.
Closes KNOWN-ISSUES.md item 10.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 23:51:10 +04:00
sdarbinyan
2e854954ac fix(storefront): use shared app-skeleton in category/search loading state
Category and Search pages still hand-rolled their infinite-scroll
loading skeleton (.skeleton-card/.skeleton-image/.skeleton-line
divs with their own hardcoded-hex shimmer animation) instead of the
shared app-skeleton primitive already used by catalog-container and
product-details-container. Swapped both to app-skeleton (shape=rect
for image/button, shape=text for lines), removed the now-dead
per-page shimmer CSS/hex colors. Closes KNOWN-ISSUES.md item 9.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 23:50:59 +04:00
sdarbinyan
b672cd90d5 docs: end-of-sprint refresh — known issues, roadmap progress
- KNOWN-ISSUES: log 4 items surfaced during RC-Premium-01 (payment modal
  still custom, cart confirm() has no dialog pattern, stars/legacy hex
  with no token match, category/search hand-rolled skeletons), not
  previously tracked outside STORE_FRONT_UX_REVIEW.md.
- FRONTEND-ROADMAP: add Sprint 30 status (verify pass re-run green,
  git push still pending explicit go-ahead), dedupe open-items list
  against KNOWN-ISSUES.
- graphify graph regenerated (graphify-out/, cache only, not tracked).
- Obsidian notes: skipped, no running Obsidian instance in this session.
- No architecture change this sprint — no ADR links to update.
- No application code touched.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 23:38:06 +04:00
sdarbinyan
18beb7b7a1 docs: add STORE_FRONT_UX_REVIEW.md for RC-Premium-01 audit
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 12:08:21 +04:00
sdarbinyan
d5603c229e fix(storefront): premium UX polish for static pages
- faq-{ru,en,hy}.component.html: convert each FAQ entry from an always-
  expanded <div>/<h3> block into a native <details class="faq-item">/
  <summary> disclosure, reusing the global expander-chevron pattern
  already defined in styles.scss (no bespoke accordion component built);
  answer body wrapped in .faq-answer for spacing
- faq.component.scss: restyle .faq-item for the details/summary shape
  (summary uses tokenized font-size/weight, focus-visible ring, [open]
  state gets a stronger shadow instead of the old always-on hover-lift);
  hardcoded `all 0.3s ease` replaced with --transition-normal on the
  specific properties that change; added a reduced-motion override
- shared-legal.scss: hardcoded `transition: all 0.3s ease` (4 call sites:
  info-card, features-list feature, contact-item/contact-link,
  contact-email) normalized to --transition-normal on transform/
  box-shadow/background; paragraphs and lists get max-width: 70ch so
  long-form legal/info text keeps a readable line length within the
  wider 900px .legal-container
- static-page.component.scss (CMS-driven static-page renderer): spacing
  converted to --space-* tokens; prose now capped at 70ch; added actual
  content styling (headings, lists, links, images, blockquote, table)
  for arbitrary CMS-authored HTML rendered via [innerHTML], since the
  previous rules only styled h2/h3 margins and left every other tag
  unstyled; line-height moved to --line-height-relaxed token

Build verified green via `npm run build`.

Out of scope / skipped:
- info/contacts has no contact form (plain link list) - no app-input/
  app-form-field polish applicable
- no breadcrumbs/anchor nav exist on any page in scope - nothing to
  align focus-visible on
- legal-page/info scss files (about, delivery, guarantee, company-
  details, payment-terms, privacy-policy, public-offer, return-policy)
  already used design tokens with no hex literals and had no accordion/
  form elements - left untouched
- shared-legal.scss's border-left accent on .legal-section/.info-box/
  .highlight and the fadeIn entrance animation durations left as-is;
  pre-existing sitewide pattern, not a new introduction, changing it is
  a redesign call outside this pass's scope

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 12:07:14 +04:00
sdarbinyan
99560202c3 fix(storefront): premium UX polish for cart, checkout
- cart.component.scss: normalize hardcoded hex colors to design tokens
  (--text-primary, --text-secondary, --bg-primary/--bg-secondary/
  --bg-tertiary, --border-color, --error-color, --success-color,
  --warning-color, --shadow-*, --transition-*, --radius-* fallbacks)
  across cart items, quantity controls, summary, login gate, terms
  checkbox, payment modal, payment-active QR screen, and bank-payment
  iframe modal
- cart.component.scss: deduplicate an accidental duplicate
  .close-modal-btn rule block (identical CSS repeated twice)
- cart.component.scss: add focus-visible rings to clear-cart, remove,
  quantity, checkout, close-modal, retry-payment, copy/open-link,
  telegram-login, and card-payment buttons
- cart.component.scss: delivery-required warning now pairs an icon
  with the text instead of relying on color/background alone
- cart.component.html: add warning icon + role="alert" to the
  delivery-required notice; add aria-live/aria-label to the quantity
  value so screen readers announce quantity changes
- delivery-selector.component.scss: normalize hardcoded hex colors to
  design tokens; remove dead :host-context(.cart-container.alt) rules
  left over after the .alt theme was removed from cart.component in
  RC-Visual-02 (cart-container never carries an .alt class anymore);
  add hover/focus-visible states to the delivery <select>

Build verified green via `npm run build`.

Out of scope / skipped:
- Did not restructure the payment modal or bank-payment iframe overlay
  into shared app-dialog - it has custom multi-step state (creating/
  waiting/success/error/timeout) and an already-implemented manual
  focus-trap; restructuring it is a composition change, not visual
  polish
- Did not convert clearCart()'s native confirm() to a custom
  confirm-remove dialog - no existing storefront confirm-dialog
  pattern to follow, and adding one is a composition/architecture
  change
- spinner-large/spinner-small left untouched per RC-Visual-02 guidance
  (in-progress action state, not content loading)
- .email-form block (email/phone capture after payment success) is
  dead CSS behind commented-out markup; left in place rather than
  deleting, since removing it is a code-cleanup call, not visual
  polish
- region-selector/language-selector are header-only, not part of the
  cart/checkout flow - left untouched
- no dedicated checkout page exists; checkout is the payment section
  of the cart page, covered above

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 11:57:23 +04:00
sdarbinyan
ea1a5d9b8a fix(storefront): premium UX polish for product, compare, wishlist
- delivery-information, product-actions, product-description,
  product-gallery, product-information, related-products,
  variant-selector: normalize hardcoded hex colors to design tokens
  (--text-primary, --text-secondary, --border-color, --bg-primary/
  --bg-secondary, --primary-color/--primary-hover); stock status and
  discount badge now use semantic --success-color/--warning-color/
  --error-color instead of near-duplicate literal hex
- product-actions: add aria-pressed to wishlist/compare toggle
  buttons; add hover/active/disabled states to action buttons
- product-gallery: add aria-current + aria-label to active thumbnail
  button; add focus-visible ring and hover state on thumbnails and
  toolbar buttons
- variant-selector: add aria-pressed to colour/size option buttons;
  add a visible checkmark glyph on the selected colour swatch so
  selection isn't color-only; add hover states
- product-tabs: add role="tab"/aria-selected to tab buttons
- star-selector: add per-star aria-label (new starsLabel i18n key
  added to en/hy/ru + translations.ts interface)
- question-list: add aria-expanded to the ask-question disclosure
  toggle; swap plain empty-state <p> for app-empty-state; add
  hover/disabled states to pager buttons
- review-list: swap plain empty-state <p> for app-empty-state; add
  hover/disabled states to pager and load-more buttons
- question-card, question-form, review-form: normalize accepted/
  success/error colors to semantic tokens; add focus-visible and
  hover/disabled states to inputs and submit buttons
- compare-table: add scope="col"/scope="row" to table headers; make
  header row and attribute column sticky for easier comparison on
  long tables
- compare-page: add hover/focus states to the remove-from-compare
  chip button

Build verified green via `npm run build`.

Out of scope / skipped:
- src/app/pages/item-detail/* is dead code (not referenced by any
  route or component) - left untouched
- wishlist page and product-details-container were already fully
  composed with shared skeleton/empty-state/button components from
  the RC-Visual-02 pass - no changes needed
- stars.component display-only rating glyphs use a light gray not an
  exact token match - left as-is to avoid an unintended visual shift

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 11:47:57 +04:00
sdarbinyan
9ea8c98faf fix(storefront): premium UX polish for home, catalog, search
- product-card: normalize hardcoded hex colors to design tokens
  (--text-primary, --border-color, --primary-color, --bg-tertiary,
  --bg-secondary); stock bar and stock badge now use semantic
  --success-color/--warning-color/--error-color instead of
  near-duplicate literal hex; add-to-cart hover uses --primary-hover
  and --transition-* tokens; card hover shadow uses --shadow-lg
- product-card: add aria-pressed to favorite/compare toggle buttons
  so their selected state isn't color-only
- filters-panel: add aria-pressed to color/size/rating filter chips;
  add a visible checkmark glyph on selected color swatches plus a
  focus-style selection ring, so selection isn't conveyed by border
  color alone
- layout-switcher: add aria-pressed to the active layout button
- catalog-container: add aria-current to the mobile sort-sheet and
  grid-sheet option buttons; active sort option gets a checkmark
  and bold weight instead of color-only highlighting
- category-grid: normalize hardcoded border/background/text colors
  to tokens; align focus ring with the color-mix pattern used
  elsewhere in catalog
- search-results, sorting-control: normalize skeleton/select colors
  to tokens; sort <select> gets a hover border state
- home: convert loading-grid/empty-state spacing to --space-* tokens

Build verified green via `npm run build`.

Out of scope / skipped:
- pages/category and pages/search retain their existing hand-rolled
  skeleton markup (not app-skeleton) - replacing it is a composition
  change, not covered by this visual-polish pass
- product-card rating-stars color and legacy pages/category,
  pages/search hex literals left as-is where no exact token match
  exists, to avoid an unintended visual shift

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 11:34:20 +04:00
sdarbinyan
2c244ad366 docs: add UI-COMPOSITION-REVIEW.md for RC-Visual-02 audit
- Documents 4-commit composition audit across Storefront, Builder, Backoffice
- Recurring bug: CSS var() calls referencing undefined theme variable names,
  silently falling back to hardcoded hex, never responding to tenant theming
- Corrects stale docs/ADMIN.md placeholder claims against live app.routes.ts
- Lists remaining recommendations not applied (out of surgical-diff scope)
2026-07-23 11:07:58 +04:00
sdarbinyan
63c9ceeaa6 fix(backoffice): composition audit fixes for transactions, customers, moderation, users, monitoring, analytics
- Transactions list: hardcoded #fff background replaced with var(--bg-primary); missing th scope=col added on all 7 headers
- Customers list: hardcoded #fff background replaced with var(--bg-primary); missing th scope=col added on all 7 headers
- Customer detail: fake CSS vars --border-subtle/--brand-primary (never defined, silently falling back to hex) replaced with real --border-color/--primary-color
- Reviews list: hardcoded #fff card background and sticky-header background replaced with var(--bg-primary)/var(--bg-secondary); missing th scope=col added across dynamic column table header
- Reports list: hardcoded #fff background replaced with var(--bg-primary); fake --brand-primary var replaced with --primary-color; missing th scope=col added
- Review health widget: fake --surface-muted/--brand-primary vars replaced with real --bg-tertiary/--primary-color (matches product-health-widget precedent)
- Users page: hardcoded #fff background replaced with var(--bg-primary); missing th scope=col added on both tables
- Monitoring page: hardcoded #fff background replaced with var(--bg-primary); missing th scope=col added on webhooks and events tables
- Analytics page: fake --color-primary var (undefined anywhere in codebase) replaced with real --primary-color across tabs/chart/focus rings; fake --surface-muted/--brand-primary on health bar replaced with --bg-tertiary/--primary-color; hardcoded #fff card/summary-card backgrounds replaced with var(--bg-primary); missing th scope=col added across 4 tables

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 11:06:17 +04:00
sdarbinyan
712a7b4daf fix(backoffice): composition audit fixes for dashboard, products, categories, orders
- Fix var(--x, #hex) references to nonexistent theme variables (--brand-primary, --color-primary, --border-subtle, --surface-muted, --text-muted, --text-tertiary, --danger-color) across admin products/categories/orders forms, lists, health widgets, variants editor, timeline, and dashboard stat cards. These silently fell back to hardcoded hex and never responded to theming; remapped to the real tokens (--primary-color, --border-color, --bg-tertiary, --text-secondary, --text-light, --error-color, --bg-primary).
- Add scope="col" to table headers in admin-products-list, admin-categories-list, admin-orders-list for proper header/data-cell association.
2026-07-23 10:57:06 +04:00
sdarbinyan
4ebc15fff8 fix(builder): composition audit fixes for project editor sections
- Reset-section button: raw <button> with hardcoded colors -> app-button variant="danger"
- section.shared.scss: raw button/input/select colors switched to CSS theme vars (--primary-color, --bg-primary, --bg-secondary, --error-color) instead of bare hex
- save-bar scss referenced nonexistent CSS vars (--surface, --border, --warning, --danger, --muted-foreground, --info-bg, --info) that always fell back to hardcoded hex; renamed to the real theme vars (--bg-primary, --border-color, --warning-color, --error-color, --text-secondary, --info-color) so the save bar is actually theme-aware
- footer/homepage/widgets section scss: nonexistent --danger-color var renamed to --error-color
- static-pages-editor: replaced dead `.editor-section-card` wrapper class (removed from shared stylesheet in the Sprint 30 redesign, never migrated here) with app-section-card, restoring the card chrome every sibling editor section has
- widgets-section: empty state (no widgets) rendered nothing; added app-empty-state
- homepage-section: empty state (no homepage page) rendered nothing; added app-empty-state
- navigation-section: header/footer nav move-up/move-down buttons had no accessible name (bare uarr/darr glyphs); added aria-label
- Added builder.widgetsEmptyTitle/Desc and builder.homepageEmptyTitle/Desc i18n keys (en/ru/hy)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 10:47:37 +04:00
sdarbinyan
2e31e80e28 fix(storefront): composition audit fixes for cart, catalog, product, compare, wishlist, static pages
- Replace hand-rolled loading/error/empty markup with shared app-skeleton,
  app-empty-state, and app-button across catalog, product details, cart,
  compare, wishlist, and the public static-page renderer
- Fix hardcoded hex colors that bypassed theme CSS variables (catalog,
  product details), restoring multi-tenant theme correctness
- Remove ~1100 lines of dead "alt" cart theme CSS (never applied by the
  template) from cart.component.scss, bringing it back under the 40kB
  build budget (89.49kB -> 59.39kB cart-component chunk)
- Swap legacy global .btn/.btn-ghost/.btn-primary classes for app-button
  in compare and wishlist empty/toolbar actions
2026-07-23 10:37:06 +04:00