feat: dead-config sweep, test suite foundation, widget settingsSchema validation
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Sprint G: audited every BootstrapConfig field for a real runtime consumer (docs/DEAD-CONFIG-AUDIT.md). Wired 3 previously-dead editable fields: footer.logoUrl, company.address.street/contacts.phone, catalog.suggestionsEnabled. Remaining dead fields needing a business/design decision tracked in PRODUCT_BACKLOG.md/KNOWN-ISSUES.md, not silently left. Sprint H: 6 new spec files (test count 57 -> 83), covering ProjectEditorFacade (undo/redo, draft persistence, publish gating), AdminAnalyticsFacade (never-fabricate-a-number contract), and regression coverage for this session's carousel/hero/profile-toggle fixes. Sprint I: widget settingsSchema (declared in widget-manifest.json, never validated) now enforced via a new lightweight schema check in ProjectValidator, surfaced through the existing issuesByField pipeline. Same check reused in diagnostics so editor and diagnostics can't disagree. Verification: tsc clean, ng build clean, 83/83 tests pass, barry-cache validate clean (2 pre-existing unrelated warnings only). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import { ParamMap, Params } from '@angular/router';
|
||||
import { Observable, Subject, of } from 'rxjs';
|
||||
import { debounceTime, distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators';
|
||||
import { Category } from '../../../core/categories/models/category-domain.model';
|
||||
import { ConfigService } from '../../../core/config/config.service';
|
||||
import { Product, ProductListResult } from '../../../core/products/models/product-domain.model';
|
||||
import { CategoryFacade } from '../../../facades/platform/category.facade';
|
||||
import { ProductFacade } from '../../../facades/platform/product.facade';
|
||||
@@ -42,6 +43,7 @@ export class SearchFacade {
|
||||
private readonly trendingService = inject(SearchTrendingService);
|
||||
private readonly cacheService = inject(SearchCacheService);
|
||||
private readonly store = inject(SearchStore);
|
||||
private readonly configService = inject(ConfigService);
|
||||
|
||||
private readonly metadataMemo = new Map<string, FilterGroup[]>();
|
||||
private readonly autocompleteInput$ = new Subject<{
|
||||
@@ -123,6 +125,10 @@ export class SearchFacade {
|
||||
|
||||
autocomplete(query: string, products: Product[], categories: Category[] = [], limit = 10): void {
|
||||
this.store.setQuery(query);
|
||||
if (this.configService.getBootstrapSnapshot()?.catalog?.suggestionsEnabled === false) {
|
||||
this.store.setSuggestions([]);
|
||||
return;
|
||||
}
|
||||
this.autocompleteInput$.next({ query, products, categories, limit });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user