
Keep open screens in step with changes
When records change, open screens should not stay confidently out of date. Wildo connects resource notifications with its read and mutation state.
Returning to a record can reuse a previous result while the application has a live subscription that would report changes to it. When that coverage is absent, the next read fetches again.
Example — Revisit a task after a colleague changes it
A colleague updates a task’s status. The notification invalidates affected read results, so returning to the task does not reuse the old status as if nothing happened.
For engineers
Use the resource runtime rather than a separate cache
Standard resource surfaces use the registry read path and useResourceRMM for update state. The application runtime supplies the mutation registry and ResourceReadCacheBridge; the bridge connects the cache with WebSocket room coverage and session state.
A custom component that fetches with its own client does not acquire this behavior merely by rendering inside Wildo. Reuse the resource operation surface or explicitly connect to the framework’s resource hooks and lifecycle.
Understand when a cached result may be served
The current ResourceReadCacheFrontendService.read implementation checks live coverage on every lookup:
public read(key: string): unknown | undefined {
if (!this.enabled) return undefined;
const entry = this.entries.get(key);
if (!entry) return undefined;
if (!this.authority?.covers(entry.resourceType, entry.scopes)) {
// Not an error and not necessarily stale — simply unprovable. Dropping it keeps the map from
// filling with entries that can never be served.
this.entries.delete(key);
logDebug('entry dropped: no live coverage', { resourceType: entry.resourceType });
return undefined;
}
entry.lastReadAt = Date.now();
return entry.value;
}
The cached value is a candidate, not a freshness promise. A disconnected socket, a refused or missing room, or an absent coverage authority makes the lookup miss. Session and reconnect resets and resource-event invalidation have their own paths, covering lists as well as individual records. The standard provider tree mounts the bridge inside the route-owned scope provider. Organisation changes clear cached entries and release bridge coverage; late room replies cannot revive retired claims. WebSocket cleanup independently releases old-organisation room claims.
Separate saved, optimistic and remote state
ResourceMutationManager maintains confirmed data and queued changes for a resource instance. Standard forms and inline edits use it to order writes, surface failures and reconcile the server’s response. The same record’s consumers can subscribe to that state instead of each maintaining an unrelated optimistic copy.
Conflicts are not all interchangeable. The configured conflict policy decides how applicable changes reconcile; a deleted record is terminal. Retain the runtime’s failure and remote-change feedback in a custom interaction. This mechanism does not make an arbitrary screen an offline editor or a collaborative text document.