TenantAtlas/apps/platform/.pnpm-store/v10/files/27/391294ae8ca7f6d8236c59d6bc50e1c695e029732567fbe1576dab9b83a636bfdb694b66e13f486de51c7c12db134576286f03ddd22c68a010ca0d6068b5ac
ahmido 1fec9c6f9d
Some checks failed
Main Confidence / confidence (push) Failing after 45s
feat: compress governance operator outcomes (#253)
## Summary
- introduce surface-aware compressed governance outcomes and reuse the shared truth/explanation seams for operator-first summaries
- apply the compressed outcome hierarchy across baseline, evidence, review, review-pack, canonical review/evidence, and artifact-oriented operation-run surfaces
- expand spec 214 fixtures and Pest coverage, and fix tenant-panel route assertions by generating explicit tenant-panel URLs in the affected Filament tests

## Validation
- `cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent`
- focused governance compression suite from `specs/214-governance-outcome-compression/quickstart.md` passed (`68` tests, `445` assertions)
- `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Filament/InventoryItemResourceTest.php tests/Feature/Filament/BackupSetUiEnforcementTest.php tests/Feature/Filament/RestoreRunUiEnforcementTest.php` passed (`18` tests, `81` assertions)

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #253
2026-04-19 12:30:36 +00:00

49 lines
1.8 KiB
Plaintext

import { ObservableInputTuple, OperatorFunction, Cons } from '../types';
import { combineLatest } from './combineLatest';
/**
* Create an observable that combines the latest values from all passed observables and the source
* into arrays and emits them.
*
* Returns an observable, that when subscribed to, will subscribe to the source observable and all
* sources provided as arguments. Once all sources emit at least one value, all of the latest values
* will be emitted as an array. After that, every time any source emits a value, all of the latest values
* will be emitted as an array.
*
* This is a useful operator for eagerly calculating values based off of changed inputs.
*
* ## Example
*
* Simple concatenation of values from two inputs
*
* ```ts
* import { fromEvent, combineLatestWith, map } from 'rxjs';
*
* // Setup: Add two inputs to the page
* const input1 = document.createElement('input');
* document.body.appendChild(input1);
* const input2 = document.createElement('input');
* document.body.appendChild(input2);
*
* // Get streams of changes
* const input1Changes$ = fromEvent(input1, 'change');
* const input2Changes$ = fromEvent(input2, 'change');
*
* // Combine the changes by adding them together
* input1Changes$.pipe(
* combineLatestWith(input2Changes$),
* map(([e1, e2]) => (<HTMLInputElement>e1.target).value + ' - ' + (<HTMLInputElement>e2.target).value)
* )
* .subscribe(x => console.log(x));
* ```
*
* @param otherSources the other sources to subscribe to.
* @return A function that returns an Observable that emits the latest
* emissions from both source and provided Observables.
*/
export function combineLatestWith<T, A extends readonly unknown[]>(
...otherSources: [...ObservableInputTuple<A>]
): OperatorFunction<T, Cons<T, A>> {
return combineLatest(...otherSources);
}