Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class OfflineCoordinatorService {

readonly networkState = this.#network.state;
readonly syncState = this.#sync.syncState;
readonly pendingCommands = this.#sync.pendingCommands;
readonly pendingCount = this.#sync.pendingCount;
readonly conflicts = this.#sync.conflicts;
/** Device-local control for accepting new durable Outbox mutations. */
Expand Down
4 changes: 3 additions & 1 deletion projects/kit/offline/src/lib/offline-request-policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function shouldCommitOfflineCollection<T>(emission: OfflineReadEmission<r
}

/** Controls GET emission order between local replica and remote transport. */
export type OfflineReadStrategy = 'network-first' | 'local-first' | 'fastest-first';
export type OfflineReadStrategy = 'network-first' | 'local-first' | 'fastest-first' | 'local-only';

/** Product read policy backed by a local replica fallback for transport failures. */
export interface OfflineReadRequestPlan {
Expand All @@ -61,6 +61,8 @@ export interface OfflineReadRequestPlan {
* `fastest-first` emits whichever usable local or remote response settles
* first. A winning local response is followed by remote revalidation; a
* winning remote response cancels and suppresses the slower local read.
* `local-only` never starts HTTP transport and emits only the projected local
* response. Use it for provisional identities that cannot exist remotely.
*/
readStrategy?: OfflineReadStrategy;
/** Serializes read-only response projection behind replica mutations. Do not enable when projection starts a replica mutation itself. */
Expand Down
Loading