Compare commits

..

2 Commits

Author SHA1 Message Date
Loretta 779f59c652 Add quick-filter panel support to MgGridBase
Introduced a FilterPanel slot and supporting components for per-field quick filtering in DevExpress Blazor grids. Added MgGridFilterPanelBase and MgTagBox for declarative, AND-combined field filters. Updated IMgGridBase and base classes to support SetFieldQuickFilter. Documented the extension in ADR 0004 and clarified SearchText handling. Registered DevExpress docs fetch domain and performed minor cleanups.
2026-07-15 15:20:44 +02:00
Loretta 2c1440d42b Add env infra (IsProdDb), ADRs for env & server filtering
Introduced AcEnv.IsProdDb with hydration and change events for framework-level environment tracking. Added ADR 0002 (environment infra migration) and ADR 0004 (SignalR DataSource server-side filtering via CriteriaOperator). Updated docs and TODOs to reflect new features and design decisions. Marked ADR 0003 as accepted and extended DataSource documentation.
2026-07-15 10:16:00 +02:00
6 changed files with 165 additions and 1 deletions

View File

@ -34,6 +34,32 @@ namespace AyCode.Core.Consts
set => _baseUrl = value;
}
/// <summary>
/// A szerver ADAT-környezete: a mögöttes adatbázis PROD-e. FIGYELEM: NEM build-konfiguráció (Debug/Release)
/// és NEM hosting-környezet (ASPNETCORE_ENVIRONMENT) — három független tengely; ez az adat-tengely.
/// Forrás: a szerver a DB-katalógusából sorolja be magát (fail-closed); a kliens tükrözi (kapcsolat-felépüléskor
/// a szerver env-válaszából + push-on-connect announce). Fail-fast: hidratálatlan olvasás exception.
/// </summary>
private static bool? _isProdDb;
public static bool IsProdDb
=> _isProdDb ?? throw new InvalidOperationException(
"AcEnv.IsProdDb nincs hidratálva — a szerver a DB-katalógusból tölti induláskor; a kliens a kapcsolat felépülésekor a szerver env-válaszából.");
/// <summary>True, ha az IsProdDb már hidratált — kapu-logikához (első-connect await) és a push-összevetéshez.</summary>
public static bool IsProdDbHydrated => _isProdDb != null;
/// <summary>Csak TÉNYLEGES változáskor tüzel (első hidratálás + announce-detektált env-váltás) —
/// a megjelenítők (title-badge, UI-sáv) feliratkozási pontja.</summary>
public static event Action<bool>? IsProdDbChanged;
public static void SetIsProdDb(bool isProdDb)
{
var changed = _isProdDb != isProdDb;
_isProdDb = isProdDb;
if (changed) IsProdDbChanged?.Invoke(isProdDb);
}
private static IConfiguration? _appConfiguration = null;
public static IConfiguration AppConfiguration => _appConfiguration ??= GetAppSettingsConfiguration();

View File

@ -27,3 +27,13 @@ Custom binary SignalR protocol, client infrastructure, message tagging, and seri
### Serialization & Pooling
- **`SignalRSerializationHelper.cs`** — Static helpers: `SerializeToBinary()`, `DeserializeFromBinary()`, compressed JSON variants.
- **`SignalRRequestModel.cs`** — Poolable (`IResettable`) request tracking model with `ObjectPool` for reuse.
### Data Source
> **Full specification:** `AyCode.Services/docs/SIGNALR_DATASOURCE/README.md`
- **`AcSignalRDataSource.cs`** — Abstract generic real-time collection (`AcSignalRDataSource<TDataItem, TId, TIList>`) implementing `IList<T>`, `IList`, `IReadOnlyList<T>`. Consumer of the transport above (not part of it) — wraps CRUD-tag communication behind a regular list. Transport-agnostic by design; the current implementation is SignalR-coupled.
- **Change tracking:** `TrackingItem<T, TId>` wraps each modified item with `TrackingState` + `OriginalValue` (rollback snapshot). `ChangeTracking<T, TId>` manages the tracked list.
- **Loading:** `LoadDataSource()` (sync-wait), `LoadDataSourceAsync()` (async callback), `LoadItem(id)` (single). Raw-`byte[]` path uses `AcBinaryDeserializer.PopulateMerge` into `IAcObservableCollection` (batch UI notification via `BeginUpdate`/`EndUpdate`); `SerializerType` selects Binary vs JSON+GZip.
- **Saving:** `SaveChanges()` / `SaveChangesAsync()` iterate tracked items, post each via the state's CRUD tag, roll back on failure; `SaveItem()` for individual saves. `IsSyncing` + `OnSyncingStateChanged` expose sync state.
- **`TrackingItemHelpers.cs`** — `JsonClone` / `ReflectionClone` deep-clone helpers producing the `OriginalValue` rollback snapshots.

View File

@ -2,6 +2,8 @@
Forward-looking work specific to `AcSignalRDataSource`. Transport-side TODOs live in `../SIGNALR/SIGNALR_TODO.md`.
> **Server-side filtering — design in ADR 0004.** The client→server filter mechanism (`SignalParams.FilterText` + `[SignalRFilterText]` hub injection + filter-service + per-entity whitelist) is captured in [`0004-signalr-datasource-server-side-filtering.md`](../../../docs/adr/0004-signalr-datasource-server-side-filtering.md) (Status: Proposed). Not yet broken into per-step entries — reference the ADR when implementation begins.
## Priority legend
- **P0** blocker · **P1** important · **P2** nice-to-have · **P3** idea

View File

@ -0,0 +1,35 @@
# ADR 0002: Environment infrastructure lifted to the framework (BaseUrl, server data-environment, env badge) — cross-reference
## Status
Accepted (2026-07-15) — cross-reference; the full decision record lives in the consumer repo (see below).
## Cross-reference
**Primary ADR:** `FruitBankHybridApp/docs/adr/0002-environment-infrastructure-to-framework.md`
([relative link](../../../../../Mango/Source/FruitBankHybridApp/docs/adr/0002-environment-infrastructure-to-framework.md) — workspace layout dependent)
Same NNNN as the primary by design (adr-author skill, multi-repo rule: "under the same NNNN if possible") —
this is why 0002 is used here instead of max+1.
## Scope on this repo's side
The decision moves app-agnostic environment infrastructure from the consumer (FruitBank) into this framework,
executed stepwise (per-step review):
- **AyCode.Core**`AcEnv.BaseUrl` (✅ done, 2026-07-15) and `AcEnv.IsProdDb` (+ `Set`/`Hydrated`/`Changed` event; planned):
single-source, fail-fast state; axis-separated naming (`IsProdDb` = data environment ≠ `IsProdBuild` = build config).
- **AyCode.Services** — framework-reserved tags in `AcSignalRTags` (query 90020 / announce 90021, GridLayout-roaming
precedent) + environment machinery in `AcSignalRClientBase` (first-connect gate, `EnsureEnvironmentAsync`,
fail-closed raw query, announce interception; **opt-in** via `EnvironmentFeatureEnabled => false` default).
- **AyCode.Services.Server** — hub-base push-on-connect announce from `AcEnv.IsProdDb` (best-effort).
- **AyCode.Blazor.Components**`IAcAppTitleService` + browser implementation + `<AcEnvironmentTitleBadge>` component.
Consumer-side remains: domain constants, DB-catalog classification call-site, query endpoint implementation
(framework tag), MAUI title implementation, app name. Consumer facades delegate to `AcEnv` (zero-break migration).
## Related
- Related ADRs: primary record (see Cross-reference above).
- Related TODOs/Issues: `ACCORE-LOG-T-N2D8` (AcEnv.SetConfiguration synergy), `ACCORE-LOG-T-D7S3`,
`ACCORE-SBP-T-T5R2`, `ACBLAZOR-GRID-T-E3B6`.

File diff suppressed because one or more lines are too long

View File

@ -17,7 +17,9 @@ See [`.github/skills/adr-author/SKILL.md`](../../.github/skills/adr-author/SKILL
| ID | Title | Status |
|---------------------------------------------------------|----------------------------------------------------------------------------------------------------|-----------------------|
| [0001](0001-user-bearer-token-flow.md) | User bearer-token authentication flow (HTTP + SignalR + tag dispatch) | Accepted (2026-04-25) |
| [0003](0003-acbinary-streaming-receive-architecture.md) | AcBinary streaming receive — AsyncPipeReaderInput unified primitive and transport-agnostic helpers | Proposed (2026-04-27) |
| [0002](0002-environment-infrastructure-to-framework.md) | Environment infrastructure lifted to the framework (BaseUrl, IsProdDb, env badge) — cross-ref to FruitBankHybridApp ADR 0002 | Accepted (2026-07-15) |
| [0003](0003-acbinary-streaming-receive-architecture.md) | AcBinary streaming receive — AsyncPipeReaderInput unified primitive and transport-agnostic helpers | Accepted (2026-05-03) |
| [0004](0004-signalr-datasource-server-side-filtering.md) | Server-side filtering for SignalR DataSource via DevExpress CriteriaOperator string + `[SignalRFilterText]` hub injection | Proposed (2026-07-15) |
## Related