fix(browser-files): observe dismissals as DISMISSED instead of SUCCEEDED (02-06)
A cancelled save dialog and a browser handoff were both recorded as DOWNLOAD SUCCEEDED, so the cancel rate hid inside the handoff success rate. BrowserDataObservation.outcome gains DISMISSED (additive). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
55c0bf52bb
commit
d76653bfcd
@@ -17,7 +17,9 @@ type BrowserFileObservation = Readonly<{
|
||||
|
||||
/**
|
||||
* File adapters use the platform BrowserDataObserver as the telemetry SSOT.
|
||||
* The helper below is the sole mapper from file-local dismissal semantics.
|
||||
* The helper below is the sole mapper from file-local outcomes. A dismissal
|
||||
* stays `DISMISSED` (02-06): folded into `SUCCEEDED` it hid the save-dialog
|
||||
* cancel rate inside the browser handoff success rate.
|
||||
*/
|
||||
export type BrowserFileObserver = BrowserDataObserver;
|
||||
|
||||
@@ -30,7 +32,7 @@ export function observeBrowserFile(
|
||||
Object.freeze({
|
||||
operation: observation.operation,
|
||||
outcome:
|
||||
observation.outcome === "FAILED" ? "FAILED" : "SUCCEEDED",
|
||||
observation.outcome === "SUCCESS" ? "SUCCEEDED" : observation.outcome,
|
||||
...(observation.failureCode
|
||||
? { failureCode: observation.failureCode }
|
||||
: {}),
|
||||
|
||||
@@ -96,7 +96,8 @@ export type BrowserDataResult<Value> = Result<Value, BrowserDataFailure>;
|
||||
|
||||
export type BrowserDataObservation = Readonly<{
|
||||
operation: BrowserDataOperation;
|
||||
outcome: "SUCCEEDED" | "FAILED" | "DEGRADED";
|
||||
/** `DISMISSED`: the user closed a picker or save dialog; not a failure. */
|
||||
outcome: "SUCCEEDED" | "FAILED" | "DEGRADED" | "DISMISSED";
|
||||
failureCode?: BrowserDataFailureCode;
|
||||
durationBucket?: "LT100MS" | "100_TO_499MS" | "500_TO_1999MS" | "GTE2000MS";
|
||||
byteBucket?: "ZERO" | "LT1MIB" | "1_TO_9MIB" | "10_TO_99MIB" | "GTE100MIB";
|
||||
|
||||
Reference in New Issue
Block a user