diff --git a/app/components/MyUsageViewer.vue b/app/components/MyUsageViewer.vue index 525fdc0a..b3ce5e34 100644 --- a/app/components/MyUsageViewer.vue +++ b/app/components/MyUsageViewer.vue @@ -122,7 +122,23 @@ -
Accepted lines
+
+ Accepted lines + + + Lines added from accepted completions and agent edits. Chat / ask-only usage adds no lines, so this can be 0 even with many interactions. + +
{{ data.totals.loc_added_sum.toLocaleString() }}
diff --git a/tests/MyUsageViewer.source.spec.ts b/tests/MyUsageViewer.source.spec.ts new file mode 100644 index 00000000..7946cd76 --- /dev/null +++ b/tests/MyUsageViewer.source.spec.ts @@ -0,0 +1,16 @@ +// @vitest-environment node + +import { readFileSync } from 'node:fs'; +import { fileURLToPath } from 'node:url'; +import { dirname, resolve } from 'node:path'; +import { describe, expect, it } from 'vitest'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const componentSource = readFileSync(resolve(__dirname, '../app/components/MyUsageViewer.vue'), 'utf8'); + +describe('MyUsageViewer source', () => { + it('documents why accepted lines can be zero for chat-only usage', () => { + expect(componentSource).toContain('data-testid="my-usage-accepted-lines-tooltip"'); + expect(componentSource).toContain('Lines added from accepted completions and agent edits. Chat / ask-only usage adds no lines, so this can be 0 even with many interactions.'); + }); +});