Skip to content

Commit dc9d9e6

Browse files
πŸ“ Scribe: Add docs for useAnonymizedMetrics (#304)
* πŸ“ Scribe: Add docs for useAnonymizedMetrics Co-authored-by: daggerstuff <261005129+daggerstuff@users.noreply.github.com> * πŸ“ Scribe: Add docs for useAnonymizedMetrics Co-authored-by: daggerstuff <261005129+daggerstuff@users.noreply.github.com> * πŸ“ Scribe: Add docs for useAnonymizedMetrics Co-authored-by: daggerstuff <261005129+daggerstuff@users.noreply.github.com> * πŸ“ Scribe: Add docs for useAnonymizedMetrics Co-authored-by: daggerstuff <261005129+daggerstuff@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: daggerstuff <261005129+daggerstuff@users.noreply.github.com>
1 parent 8b3ca08 commit dc9d9e6

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

β€Žsrc/simulator/hooks/useAnonymizedMetrics.tsβ€Ž

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,15 @@ export interface SimpleMetrics {
2222
}
2323

2424
/**
25-
* Simplified hook for anonymized metrics that provides data for the MetricsDialog
26-
* This implementation is focused on the UI needs rather than the full data model
25+
* Simplified hook for anonymized metrics that provides data for the MetricsDialog.
26+
*
27+
* Why this exists:
28+
* This implementation is focused on the immediate UI needs (displaying simple metrics
29+
* like session count and average score) rather than maintaining the full complex
30+
* data model of all user interactions. It caches data in localStorage to persist
31+
* between sessions for demo purposes.
32+
*
33+
* @returns {SimpleMetrics} An object containing the simplified metrics and an update function.
2734
*/
2835
export function useAnonymizedMetrics(): SimpleMetrics {
2936
const [metrics, setMetrics] = useState<Omit<SimpleMetrics, 'updateMetrics'>>({

0 commit comments

Comments
Β (0)