Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

Label browser extension site toggles

dajiaohuang68b99ad0487a
diff --git a/browser-extension/src/options/options.html b/browser-extension/src/options/options.html
index cfae3fc2..85f4528d 100644
--- a/browser-extension/src/options/options.html
+++ b/browser-extension/src/options/options.html
@@ -29,8 +29,8 @@
<input type="text" id="endpoint" data-testid="endpoint" />
<label>Sites</label>
- <div class="site"><input type="checkbox" id="site_claude_web" /><span>claude.ai</span></div>
- <div class="site"><input type="checkbox" id="site_chatgpt_web" /><span>chatgpt.com</span></div>
+ <label class="site"><input type="checkbox" id="site_claude_web" /><span>claude.ai</span></label>
+ <label class="site"><input type="checkbox" id="site_chatgpt_web" /><span>chatgpt.com</span></label>
<div>
<button id="save">Save</button>
diff --git a/browser-extension/test/unit/options.test.ts b/browser-extension/test/unit/options.test.ts
new file mode 100644
index 00000000..6f657b0b
--- /dev/null
+++ b/browser-extension/test/unit/options.test.ts
@@ -0,0 +1,18 @@
+import { readFileSync } from 'node:fs';
+import { describe, expect, it } from 'vitest';
+
+const optionsHtml = readFileSync(
+ new URL('../../src/options/options.html', import.meta.url),
+ 'utf8',
+);
+
+describe('options page site toggles', () => {
+ it.each([
+ ['site_claude_web', 'claude.ai'],
+ ['site_chatgpt_web', 'chatgpt.com'],
+ ])('associates the %s checkbox with its visible site name', (id, name) => {
+ expect(optionsHtml).toContain(
+ ` <label class="site"><input type="checkbox" id="${id}" /><span>${name}</span></label>`,
+ );
+ });
+});