fix(app): keep attention dismissals in this client's own storage namespace
This commit is contained in:
@@ -21,10 +21,11 @@ enum AttentionKind {
|
|||||||
final String wireName;
|
final String wireName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The local storage key shared with the browser client: one JSON array of
|
/// This client's own storage key, namespaced like the rest of the app
|
||||||
/// `{runId}:{kind}` strings. A stored dismissal itself never expires; the
|
/// (`pipelines.next.*`). The identity format matches the browser's, but a
|
||||||
/// surface's local-day window is applied when entries are read, not here.
|
/// dismissal set is deliberately not shared with the legacy web app: the two
|
||||||
const attentionStorageKey = 'pipelines.web.attention.v1';
|
/// clients must never rewrite each other's local state on a shared origin.
|
||||||
|
const attentionStorageKey = 'pipelines.next.attention.v1';
|
||||||
|
|
||||||
/// The run id a summary or pushed frame carries, or null when it is malformed.
|
/// The run id a summary or pushed frame carries, or null when it is malformed.
|
||||||
/// The server ids are positive integers; anything else cannot identify an entry.
|
/// The server ids are positive integers; anything else cannot identify an entry.
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ and success alerts are deliberately outside this slice.
|
|||||||
- `attention_models.dart` owns the two kinds (`Decision` rank 0, `Failed` rank 1),
|
- `attention_models.dart` owns the two kinds (`Decision` rank 0, `Failed` rank 1),
|
||||||
qualification, ordered entries, labels/detail wording, `{runId}:{kind}`
|
qualification, ordered entries, labels/detail wording, `{runId}:{kind}`
|
||||||
identities, dismissal/snapshot bookkeeping and the JSON string-array
|
identities, dismissal/snapshot bookkeeping and the JSON string-array
|
||||||
serialisation under `pipelines.web.attention.v1`.
|
serialisation under this app's own `pipelines.next.attention.v1` (deliberately
|
||||||
|
not the legacy web key, so neither client rewrites the other's local state).
|
||||||
- Only `waiting` and `failed` statuses qualify, after trimming/lowercasing. A
|
- Only `waiting` and `failed` statuses qualify, after trimming/lowercasing. A
|
||||||
waiting run with a session audit/export handoff (`export_pending_sequence > 0`)
|
waiting run with a session audit/export handoff (`export_pending_sequence > 0`)
|
||||||
asks no person and is excluded; a failed run stays failed. `resource_wait` is
|
asks no person and is excluded; a failed run stays failed. `resource_wait` is
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ void main() {
|
|||||||
|
|
||||||
group('persistence', () {
|
group('persistence', () {
|
||||||
test('the key is the documented one', () {
|
test('the key is the documented one', () {
|
||||||
expect(attentionStorageKey, 'pipelines.web.attention.v1');
|
expect(attentionStorageKey, 'pipelines.next.attention.v1');
|
||||||
|
expect(attentionStorageKey, isNot('pipelines.web.attention.v1'));
|
||||||
});
|
});
|
||||||
|
|
||||||
test('encoding is one sorted JSON array and round-trips', () {
|
test('encoding is one sorted JSON array and round-trips', () {
|
||||||
|
|||||||
Reference in New Issue
Block a user