chore: remove internal documents and service directories (P2.2 part 1)
The commercial repository carries the product's internal history: audits, screenshots, briefs, decisions, pricing, publication drafts, personal data and research runs. None of it belongs in the community edition. - delete judging/, "UAT 3/", benchmarks/ (including LoCoMo data under CC BY-NC), preflight-results/, gepa-phase-5/, notes/, decisions/, .understand-anything/, .agents/, .lovable/, the legacy sidecar/ package and waggle-cowork/ (an analysis of Claude Code sources) - delete docs/ except docs/oss, the user guides (without the team-mode guide), the reference, methodology, architecture, getting-started and contributing pages, which P2.4 rewrites - delete render.yaml, .parity-allowlist, the retired mind-parity and sync-mind workflows and 29 one-off scripts nothing references - delete tests that only checked removed files (sidecar package, Render blueprint, UAT capture, benchmark harness isolation, internal audit and signing docs); drop sidecar/ and benchmarks/ from the hive-mind subtree split guard; prune ignore, attribute, lint and test globs - replace the commercial README with an interim one for this edition Source comments still point at some deleted docs; P2.2 part 2 cleans them together with names and paths.
This commit is contained in:
@@ -1,97 +0,0 @@
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { resolve } from 'node:path';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
const repoRoot = resolve(__dirname, '..');
|
||||
const scorecards = readFileSync(
|
||||
resolve(repoRoot, 'docs/audits/2026-07-08-five-persona-judge-scorecards.md'),
|
||||
'utf8',
|
||||
);
|
||||
const stateBundleSpec = readFileSync(
|
||||
resolve(repoRoot, 'tests/e2e/five-persona-state-bundles.spec.ts'),
|
||||
'utf8',
|
||||
);
|
||||
|
||||
const personaSections = [
|
||||
'Persona 1: Solo Founder',
|
||||
'Persona 2: Researcher',
|
||||
'Persona 3: Engineer / Power User',
|
||||
'Persona 4: Team Admin / Security Reviewer',
|
||||
'Persona 5: Mobile Executive',
|
||||
];
|
||||
|
||||
const requiredFields = [
|
||||
'Account mode:',
|
||||
'Billing tier:',
|
||||
'UI disclosure tier:',
|
||||
'Model state:',
|
||||
'Data state:',
|
||||
'Offline/error state:',
|
||||
'Viewport:',
|
||||
'Non-main gate decisions:',
|
||||
];
|
||||
|
||||
const requiredFailureProbes = [
|
||||
{ persona: 'researcher', id: 'memory-large-list' },
|
||||
{ persona: 'researcher', id: 'memory-slow-list' },
|
||||
{ persona: 'researcher', id: 'timeline-large-events' },
|
||||
{ persona: 'engineer-power-user', id: 'agents-slow-list' },
|
||||
{ persona: 'engineer-power-user', id: 'agents-large-list' },
|
||||
{ persona: 'engineer-power-user', id: 'mission-control-health-degraded' },
|
||||
{ persona: 'engineer-power-user', id: 'marketplace-unavailable' },
|
||||
{ persona: 'engineer-power-user', id: 'files-upload-failure' },
|
||||
{ persona: 'engineer-power-user', id: 'files-upload-success' },
|
||||
{ persona: 'engineer-power-user', id: 'files-large-list' },
|
||||
{ persona: 'engineer-power-user', id: 'marketplace-large-catalog' },
|
||||
{ persona: 'team-admin-security-reviewer', id: 'billing-checkout-unavailable' },
|
||||
{ persona: 'team-admin-security-reviewer', id: 'billing-team-active-state' },
|
||||
{ persona: 'team-admin-security-reviewer', id: 'team-settings-unlocked-state' },
|
||||
{ persona: 'team-admin-security-reviewer', id: 'billing-checkout-success-return' },
|
||||
{ persona: 'team-admin-security-reviewer', id: 'billing-checkout-cancel-return' },
|
||||
{ persona: 'team-admin-security-reviewer', id: 'backup-restore-failure' },
|
||||
{ persona: 'team-admin-security-reviewer', id: 'approvals-revoke-all-grants' },
|
||||
{ persona: 'mobile-executive', id: 'local-model-runtime-unavailable' },
|
||||
];
|
||||
|
||||
function sectionFor(heading: string): string {
|
||||
const start = scorecards.indexOf(`## ${heading}`);
|
||||
expect(start, `${heading} section should exist`).toBeGreaterThanOrEqual(0);
|
||||
const next = scorecards.indexOf('\n## ', start + 4);
|
||||
return scorecards.slice(start, next === -1 ? scorecards.length : next);
|
||||
}
|
||||
|
||||
function specSectionFor(slug: string): string {
|
||||
const start = stateBundleSpec.indexOf(`slug: '${slug}'`);
|
||||
expect(start, `${slug} persona should exist in the state-bundle spec`).toBeGreaterThanOrEqual(0);
|
||||
const next = stateBundleSpec.indexOf('\n {', start + 1);
|
||||
return stateBundleSpec.slice(start, next === -1 ? stateBundleSpec.length : next);
|
||||
}
|
||||
|
||||
describe('five-persona judge scorecards', () => {
|
||||
it('requires a concrete T12 state bundle in every persona scorecard section', () => {
|
||||
for (const heading of personaSections) {
|
||||
const section = sectionFor(heading);
|
||||
|
||||
expect(section, `${heading} should have an explicit state bundle`).toContain('State bundle to capture:');
|
||||
for (const field of requiredFields) {
|
||||
expect(section, `${heading} should include ${field}`).toContain(`- ${field}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
it('keeps Mobile Executive Command Center proof in the rendered state bundle', () => {
|
||||
const section = specSectionFor('mobile-executive');
|
||||
|
||||
expect(section, 'Mobile Executive should capture Command Center as a mobile overlay').toContain("'command-center'");
|
||||
expect(stateBundleSpec, 'Command Center proof should check mobile fit and Escape close').toContain(
|
||||
'command center opened, described, fit, and closed with Escape',
|
||||
);
|
||||
});
|
||||
|
||||
it('keeps sampled T12 failure, workflow, and scale probes in the rendered state bundle', () => {
|
||||
for (const probe of requiredFailureProbes) {
|
||||
const section = specSectionFor(probe.persona);
|
||||
expect(section, `${probe.persona} should capture ${probe.id}`).toContain(`id: '${probe.id}'`);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -46,12 +46,6 @@ const DRIFT_SCRIPT_PATH = join(REPO_ROOT, 'scripts', 'oss-drift-check.sh');
|
||||
const DRIFT_NODE_PATH = join(REPO_ROOT, 'scripts', 'oss-drift-check.mjs');
|
||||
const DRIFT_BASELINE_PATH = join(REPO_ROOT, 'scripts', 'oss-drift-baseline.json');
|
||||
const RETIRED_PARITY_SCRIPT_PATH = join(REPO_ROOT, 'scripts', 'parity-check.sh');
|
||||
const SUPERSEDED_PLAN_PATH = join(
|
||||
REPO_ROOT,
|
||||
'docs',
|
||||
'plans',
|
||||
'E-4-OSS-EXTRACTION-VERIFIED-2026-05-20.md',
|
||||
);
|
||||
const PACKAGES_DIR = join(REPO_ROOT, 'packages');
|
||||
|
||||
function normalizedDriftHash(content: string): string {
|
||||
@@ -207,11 +201,9 @@ describe('oss-subtree-split.sh — forbidden monorepo-level entries', () => {
|
||||
const FORBIDDEN: readonly string[] = [
|
||||
'apps',
|
||||
'packages',
|
||||
'sidecar',
|
||||
'.planning',
|
||||
'.scratch',
|
||||
'.mind',
|
||||
'benchmarks',
|
||||
];
|
||||
|
||||
// .planning / .scratch / .mind are gitignored working dirs — forbidden from
|
||||
@@ -417,14 +409,6 @@ describe('hive-mind publication boundary', () => {
|
||||
}
|
||||
});
|
||||
|
||||
it('invalidates the historical raw-push plan', () => {
|
||||
const content = readFileSync(SUPERSEDED_PLAN_PATH, 'utf-8');
|
||||
|
||||
expect(content).toContain('SUPERSEDED');
|
||||
expect(content).toContain('DO NOT FOLLOW');
|
||||
expect(content).not.toMatch(/git push\s/);
|
||||
});
|
||||
|
||||
it('uses Node as the primary drift checker and keeps the shell entrypoint thin', () => {
|
||||
const wrapper = readFileSync(DRIFT_SCRIPT_PATH, 'utf-8');
|
||||
const checker = readFileSync(DRIFT_NODE_PATH, 'utf-8');
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
import { describe, it, expect, beforeEach } from 'vitest';
|
||||
import { McpManager, type McpServerConfig } from '../../sidecar/src/mcp-manager.js';
|
||||
|
||||
describe('MCP Manager', () => {
|
||||
let manager: McpManager;
|
||||
|
||||
beforeEach(() => {
|
||||
manager = new McpManager();
|
||||
});
|
||||
|
||||
it('starts with no servers', () => {
|
||||
expect(manager.listServers()).toEqual([]);
|
||||
});
|
||||
|
||||
it('adds a server config', () => {
|
||||
const config: McpServerConfig = {
|
||||
id: 'filesystem',
|
||||
name: 'File System',
|
||||
command: 'npx',
|
||||
args: ['-y', '@modelcontextprotocol/server-filesystem', '/tmp'],
|
||||
};
|
||||
manager.addServer(config);
|
||||
expect(manager.listServers()).toHaveLength(1);
|
||||
expect(manager.listServers()[0].id).toBe('filesystem');
|
||||
});
|
||||
|
||||
it('removes a server config', () => {
|
||||
manager.addServer({ id: 'test', name: 'Test', command: 'echo', args: ['hello'] });
|
||||
expect(manager.listServers()).toHaveLength(1);
|
||||
manager.removeServer('test');
|
||||
expect(manager.listServers()).toHaveLength(0);
|
||||
});
|
||||
|
||||
it('prevents duplicate server IDs', () => {
|
||||
manager.addServer({ id: 'dup', name: 'First', command: 'a', args: [] });
|
||||
expect(() => {
|
||||
manager.addServer({ id: 'dup', name: 'Second', command: 'b', args: [] });
|
||||
}).toThrow('already exists');
|
||||
});
|
||||
|
||||
it('gets server by ID', () => {
|
||||
manager.addServer({ id: 'fs', name: 'FS', command: 'npx', args: [] });
|
||||
const server = manager.getServer('fs');
|
||||
expect(server?.name).toBe('FS');
|
||||
});
|
||||
|
||||
it('returns undefined for unknown server', () => {
|
||||
expect(manager.getServer('nope')).toBeUndefined();
|
||||
});
|
||||
|
||||
it('serializes and deserializes config', () => {
|
||||
manager.addServer({ id: 'a', name: 'A', command: 'x', args: ['1'] });
|
||||
manager.addServer({ id: 'b', name: 'B', command: 'y', args: ['2'], env: { FOO: 'bar' } });
|
||||
|
||||
const json = manager.toJSON();
|
||||
const restored = McpManager.fromJSON(json);
|
||||
|
||||
expect(restored.listServers()).toHaveLength(2);
|
||||
expect(restored.getServer('b')?.env).toEqual({ FOO: 'bar' });
|
||||
});
|
||||
});
|
||||
@@ -1,107 +0,0 @@
|
||||
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
|
||||
import { RpcHandler } from '../../sidecar/src/rpc-handler.js';
|
||||
import { MindDB, IdentityLayer } from '@waggle/core';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import os from 'os';
|
||||
|
||||
describe('RPC Handler', () => {
|
||||
let handler: RpcHandler;
|
||||
let dbPath: string;
|
||||
let db: MindDB;
|
||||
|
||||
beforeEach(() => {
|
||||
dbPath = path.join(os.tmpdir(), `waggle-rpc-test-${Date.now()}.mind`);
|
||||
db = new MindDB(dbPath);
|
||||
handler = new RpcHandler(db);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
db.close();
|
||||
try {
|
||||
if (fs.existsSync(dbPath)) fs.unlinkSync(dbPath);
|
||||
} catch {
|
||||
// Windows file lock
|
||||
}
|
||||
});
|
||||
|
||||
it('handles ping method', async () => {
|
||||
const result = await handler.handle({
|
||||
jsonrpc: '2.0',
|
||||
method: 'ping',
|
||||
id: 1,
|
||||
});
|
||||
expect(result).toEqual({
|
||||
jsonrpc: '2.0',
|
||||
result: { status: 'ok' },
|
||||
id: 1,
|
||||
});
|
||||
});
|
||||
|
||||
it('handles mind.getIdentity', async () => {
|
||||
const identity = new IdentityLayer(db);
|
||||
identity.create({
|
||||
name: 'TestBot',
|
||||
role: 'assistant',
|
||||
department: '',
|
||||
personality: '',
|
||||
capabilities: '',
|
||||
system_prompt: '',
|
||||
});
|
||||
|
||||
const result = await handler.handle({
|
||||
jsonrpc: '2.0',
|
||||
method: 'mind.getIdentity',
|
||||
id: 2,
|
||||
});
|
||||
expect(result.result).toContain('TestBot');
|
||||
});
|
||||
|
||||
it('handles mind.getAwareness', async () => {
|
||||
const result = await handler.handle({
|
||||
jsonrpc: '2.0',
|
||||
method: 'mind.getAwareness',
|
||||
id: 3,
|
||||
});
|
||||
expect(result.result).toBeDefined();
|
||||
});
|
||||
|
||||
it('returns error for unknown method', async () => {
|
||||
const result = await handler.handle({
|
||||
jsonrpc: '2.0',
|
||||
method: 'nonexistent',
|
||||
id: 4,
|
||||
});
|
||||
expect(result.error).toBeDefined();
|
||||
expect(result.error!.code).toBe(-32601);
|
||||
});
|
||||
|
||||
it('handles chat.send with stub response', async () => {
|
||||
const result = await handler.handle({
|
||||
jsonrpc: '2.0',
|
||||
method: 'chat.send',
|
||||
params: { message: 'hello' },
|
||||
id: 5,
|
||||
});
|
||||
expect(result.result).toBeDefined();
|
||||
});
|
||||
|
||||
it('handles settings.get', async () => {
|
||||
const result = await handler.handle({
|
||||
jsonrpc: '2.0',
|
||||
method: 'settings.get',
|
||||
id: 6,
|
||||
});
|
||||
expect(result.result).toBeDefined();
|
||||
});
|
||||
|
||||
it('handles settings.set', async () => {
|
||||
const result = await handler.handle({
|
||||
jsonrpc: '2.0',
|
||||
method: 'settings.set',
|
||||
params: { key: 'model', value: 'claude-sonnet-4-6' },
|
||||
id: 7,
|
||||
});
|
||||
expect(result.result).toEqual({ success: true });
|
||||
});
|
||||
});
|
||||
@@ -1,120 +0,0 @@
|
||||
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
|
||||
import { SkillLoader, type Skill } from '../../sidecar/src/skill-loader.js';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import os from 'os';
|
||||
|
||||
describe('Skill Loader', () => {
|
||||
let skillDir: string;
|
||||
let loader: SkillLoader;
|
||||
|
||||
beforeEach(() => {
|
||||
skillDir = path.join(os.tmpdir(), `waggle-skills-${Date.now()}`);
|
||||
fs.mkdirSync(skillDir, { recursive: true });
|
||||
loader = new SkillLoader([skillDir]);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
fs.rmSync(skillDir, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
it('discovers skills from SKILL.md files', () => {
|
||||
const skillPath = path.join(skillDir, 'summarize');
|
||||
fs.mkdirSync(skillPath, { recursive: true });
|
||||
fs.writeFileSync(path.join(skillPath, 'SKILL.md'), `---
|
||||
name: summarize
|
||||
description: Summarize text into key points
|
||||
model: haiku
|
||||
---
|
||||
|
||||
You are a summarization expert. Given text, produce a concise summary.
|
||||
`);
|
||||
const skills = loader.discover();
|
||||
expect(skills).toHaveLength(1);
|
||||
expect(skills[0].name).toBe('summarize');
|
||||
expect(skills[0].description).toBe('Summarize text into key points');
|
||||
expect(skills[0].model).toBe('haiku');
|
||||
expect(skills[0].prompt).toContain('summarization expert');
|
||||
});
|
||||
|
||||
it('discovers skills from multiple directories', () => {
|
||||
const dir2 = path.join(os.tmpdir(), `waggle-skills2-${Date.now()}`);
|
||||
fs.mkdirSync(dir2, { recursive: true });
|
||||
|
||||
fs.mkdirSync(path.join(skillDir, 'skill-a'), { recursive: true });
|
||||
fs.writeFileSync(path.join(skillDir, 'skill-a', 'SKILL.md'), `---
|
||||
name: skill-a
|
||||
description: First skill
|
||||
---
|
||||
Prompt A
|
||||
`);
|
||||
|
||||
fs.mkdirSync(path.join(dir2, 'skill-b'), { recursive: true });
|
||||
fs.writeFileSync(path.join(dir2, 'skill-b', 'SKILL.md'), `---
|
||||
name: skill-b
|
||||
description: Second skill
|
||||
---
|
||||
Prompt B
|
||||
`);
|
||||
|
||||
const multiLoader = new SkillLoader([skillDir, dir2]);
|
||||
const skills = multiLoader.discover();
|
||||
expect(skills).toHaveLength(2);
|
||||
fs.rmSync(dir2, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
it('ignores directories without SKILL.md', () => {
|
||||
fs.mkdirSync(path.join(skillDir, 'empty-dir'), { recursive: true });
|
||||
const skills = loader.discover();
|
||||
expect(skills).toHaveLength(0);
|
||||
});
|
||||
|
||||
it('handles invalid YAML frontmatter gracefully', () => {
|
||||
fs.mkdirSync(path.join(skillDir, 'bad-skill'), { recursive: true });
|
||||
fs.writeFileSync(path.join(skillDir, 'bad-skill', 'SKILL.md'), `No frontmatter here.`);
|
||||
const skills = loader.discover();
|
||||
expect(skills).toHaveLength(0);
|
||||
});
|
||||
|
||||
it('parses optional tools field', () => {
|
||||
fs.mkdirSync(path.join(skillDir, 'researcher'), { recursive: true });
|
||||
fs.writeFileSync(path.join(skillDir, 'researcher', 'SKILL.md'), `---
|
||||
name: researcher
|
||||
description: Research topics
|
||||
tools: WebSearch, WebFetch
|
||||
model: sonnet
|
||||
---
|
||||
|
||||
Research the given topic.
|
||||
`);
|
||||
const skills = loader.discover();
|
||||
expect(skills[0].tools).toEqual(['WebSearch', 'WebFetch']);
|
||||
});
|
||||
|
||||
it('deduplicates skills by name (later directory wins)', () => {
|
||||
const dir2 = path.join(os.tmpdir(), `waggle-skills-dup-${Date.now()}`);
|
||||
fs.mkdirSync(dir2, { recursive: true });
|
||||
|
||||
fs.mkdirSync(path.join(skillDir, 'dupe'), { recursive: true });
|
||||
fs.writeFileSync(path.join(skillDir, 'dupe', 'SKILL.md'), `---
|
||||
name: dupe
|
||||
description: First version
|
||||
---
|
||||
First
|
||||
`);
|
||||
|
||||
fs.mkdirSync(path.join(dir2, 'dupe'), { recursive: true });
|
||||
fs.writeFileSync(path.join(dir2, 'dupe', 'SKILL.md'), `---
|
||||
name: dupe
|
||||
description: Second version
|
||||
---
|
||||
Second
|
||||
`);
|
||||
|
||||
const multiLoader = new SkillLoader([skillDir, dir2]);
|
||||
const skills = multiLoader.discover();
|
||||
expect(skills).toHaveLength(1);
|
||||
expect(skills[0].description).toBe('Second version');
|
||||
fs.rmSync(dir2, { recursive: true, force: true });
|
||||
});
|
||||
});
|
||||
@@ -1,231 +0,0 @@
|
||||
import { test, expect, Page } from '@playwright/test';
|
||||
|
||||
const TOKEN = '36a36b027129a154c0e86122ed56927409b612b6eb41f612b9177c85848719d3';
|
||||
const BASE_URL = process.env.WAGGLE_E2E_BASE_URL ?? 'http://localhost:3333';
|
||||
const SS = 'UAT 3/mega-test-v2/screenshots';
|
||||
|
||||
async function setupPage(page: Page, theme = 'dark') {
|
||||
await page.goto(BASE_URL, { waitUntil: 'domcontentloaded', timeout: 15000 });
|
||||
await page.evaluate((t: string) => {
|
||||
localStorage.setItem('waggle:onboarding', JSON.stringify({ completed: true }));
|
||||
localStorage.setItem('waggle-theme', t);
|
||||
}, theme);
|
||||
await page.goto(BASE_URL, { waitUntil: 'domcontentloaded', timeout: 20000 });
|
||||
await page.waitForTimeout(2000);
|
||||
}
|
||||
|
||||
async function clickNavView(page: Page, viewName: string): Promise<boolean> {
|
||||
const all = await page.locator('button').all();
|
||||
for (const btn of all) {
|
||||
const t = (await btn.textContent().catch(() => '')).trim();
|
||||
const a = (await btn.getAttribute('aria-label').catch(() => '') || '');
|
||||
if (t.toLowerCase() === viewName.toLowerCase() || a.toLowerCase().includes(viewName.toLowerCase())) {
|
||||
await btn.click();
|
||||
await page.waitForTimeout(800);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
test.describe('R2 - Mega UAT Visual', () => {
|
||||
test.use({ viewport: { width: 1920, height: 1080 } });
|
||||
|
||||
test('40 - chat view dark 1920x1080', async ({ page }) => {
|
||||
await setupPage(page, 'dark');
|
||||
await page.screenshot({ path: `${SS}/40-chat-dark.png` });
|
||||
|
||||
const html = await page.content();
|
||||
const honeyCount = (html.match(/honey|amber|#F5A|#f5a/gi) || []).length;
|
||||
const hexCount = (html.match(/hex|hexagon|honeycomb/gi) || []).length;
|
||||
const emojiCount = (html.match(/[\u{1F300}-\u{1FFFF}]/gu) || []).length;
|
||||
const imgCount = (html.match(/<img/g) || []).length;
|
||||
const hasBee = html.toLowerCase().includes('bee');
|
||||
const bodyFont = await page.evaluate(() => getComputedStyle(document.body).fontFamily);
|
||||
const bgColor = await page.evaluate(() => getComputedStyle(document.body).backgroundColor);
|
||||
const navTxts = await page.locator('nav button, aside button').allTextContents();
|
||||
|
||||
console.log(`honey/amber refs: ${honeyCount}`);
|
||||
console.log(`hex/hexagon refs: ${hexCount}`);
|
||||
console.log(`emoji in HTML: ${emojiCount}`);
|
||||
console.log(`img tags: ${imgCount}`);
|
||||
console.log(`bee refs: ${hasBee}`);
|
||||
console.log(`body font: ${bodyFont}`);
|
||||
console.log(`body bg: ${bgColor}`);
|
||||
console.log(`nav buttons: ${navTxts.slice(0, 8).join(' | ')}`);
|
||||
|
||||
expect(bgColor).not.toBe('rgb(255, 255, 255)');
|
||||
});
|
||||
|
||||
test('41 - home cockpit view', async ({ page }) => {
|
||||
await setupPage(page, 'dark');
|
||||
const found = await clickNavView(page, 'Home');
|
||||
const btns = await page.locator('nav button, aside button').allTextContents();
|
||||
console.log(`Nav buttons: ${btns.join(' | ')}`);
|
||||
console.log(`Found cockpit: ${found}`);
|
||||
await page.screenshot({ path: `${SS}/41-cockpit.png` });
|
||||
const html = await page.content();
|
||||
console.log(`Has KPI/metric: ${html.includes('kpi') || html.includes('KPI') || html.includes('metric')}`);
|
||||
console.log(`Has cost chart: ${html.includes('cost') || html.includes('Cost')}`);
|
||||
console.log(`Has heartbeat/health: ${html.includes('health') || html.includes('Health')}`);
|
||||
});
|
||||
|
||||
test('42 - memory browser', async ({ page }) => {
|
||||
await setupPage(page, 'dark');
|
||||
await clickNavView(page, 'Memory');
|
||||
await page.waitForTimeout(1000);
|
||||
await page.screenshot({ path: `${SS}/42-memory.png` });
|
||||
const html = await page.content();
|
||||
console.log(`Has source dots: ${html.includes('dot') || html.includes('source-type') || html.includes('hex')}`);
|
||||
console.log(`Has bee researcher: ${html.includes('bee') && html.includes('empty')}`);
|
||||
});
|
||||
|
||||
test('43 - settings tabs', async ({ page }) => {
|
||||
await setupPage(page, 'dark');
|
||||
await clickNavView(page, 'Settings');
|
||||
await page.waitForTimeout(1000);
|
||||
await page.screenshot({ path: `${SS}/43-settings.png` });
|
||||
const tabCount = await page.locator('[role="tab"]').count();
|
||||
const tabTexts = await page.locator('[role="tab"]').allTextContents();
|
||||
console.log(`Settings tab count: ${tabCount}`);
|
||||
console.log(`Tab labels: ${tabTexts.join(' | ')}`);
|
||||
const html = await page.content();
|
||||
console.log(`Has DEFAULT badge: ${html.includes('DEFAULT') || html.includes('default-badge')}`);
|
||||
console.log(`Has model grid: ${html.includes('model') || html.includes('Model')}`);
|
||||
});
|
||||
|
||||
test('44 - capabilities', async ({ page }) => {
|
||||
await setupPage(page, 'dark');
|
||||
await clickNavView(page, 'Capabilities');
|
||||
await page.waitForTimeout(1000);
|
||||
await page.screenshot({ path: `${SS}/44-capabilities.png` });
|
||||
const html = await page.content();
|
||||
const hasWave8A = html.includes('Wave 8A') || html.includes('wave-8a');
|
||||
const beeImgCount = await page.locator('img[src*="bee"], img[alt*="bee"]').count();
|
||||
console.log(`Has Wave 8A text (should be false): ${hasWave8A}`);
|
||||
console.log(`Bee img elements: ${beeImgCount}`);
|
||||
});
|
||||
|
||||
test('45 - onboarding re-trigger', async ({ page }) => {
|
||||
await page.goto(BASE_URL, { waitUntil: 'domcontentloaded', timeout: 15000 });
|
||||
await page.evaluate(() => {
|
||||
localStorage.removeItem('waggle:onboarding');
|
||||
});
|
||||
await page.goto(BASE_URL, { waitUntil: 'domcontentloaded', timeout: 20000 });
|
||||
await page.waitForTimeout(2000);
|
||||
await page.screenshot({ path: `${SS}/45-onboarding.png` });
|
||||
const html = await page.content();
|
||||
console.log(`Onboarding welcome: ${html.includes('Welcome') || html.includes('welcome')}`);
|
||||
console.log(`Has Hive: ${html.includes('Hive') || html.includes('hive')}`);
|
||||
console.log(`Has bee mascot: ${html.toLowerCase().includes('bee')}`);
|
||||
console.log(`Has hex/progress dots: ${html.includes('hex') || html.includes('progress')}`);
|
||||
console.log(`Has provider selection: ${html.includes('provider') || html.includes('API Key')}`);
|
||||
});
|
||||
|
||||
test('46 - events', async ({ page }) => {
|
||||
await setupPage(page, 'dark');
|
||||
await clickNavView(page, 'Events');
|
||||
await page.waitForTimeout(1000);
|
||||
await page.screenshot({ path: `${SS}/46-events.png` });
|
||||
const html = await page.content();
|
||||
console.log(`Has timeline: ${html.includes('timeline') || html.includes('Timeline') || html.includes('event')}`);
|
||||
console.log(`Has filter: ${html.includes('filter') || html.includes('Filter')}`);
|
||||
});
|
||||
|
||||
test('47 - light mode', async ({ page }) => {
|
||||
await setupPage(page, 'light');
|
||||
expect(await clickNavView(page, 'Chat')).toBe(true);
|
||||
await page.screenshot({ path: `${SS}/47-light-chat.png` });
|
||||
const bgColor = await page.evaluate(() => getComputedStyle(document.body).backgroundColor);
|
||||
const htmlClass = await page.evaluate(() => document.documentElement.className);
|
||||
console.log(`Body bg (light): ${bgColor}`);
|
||||
console.log(`HTML classes: ${htmlClass}`);
|
||||
const isLight = !bgColor.includes('17,') && !bgColor.includes('20,') && !bgColor.includes('0, 0, 0');
|
||||
console.log(`Light mode applied: ${isLight}`);
|
||||
expect(await page.evaluate(() => document.documentElement.getAttribute('data-theme'))).toBe('light');
|
||||
expect(isLight).toBe(true);
|
||||
|
||||
await clickNavView(page, 'Home');
|
||||
await page.screenshot({ path: `${SS}/47-light-cockpit.png` });
|
||||
await clickNavView(page, 'Memory');
|
||||
await page.screenshot({ path: `${SS}/47-light-memory.png` });
|
||||
});
|
||||
|
||||
test('48-49 - brand assets and custom icons', async ({ page }) => {
|
||||
const r1 = await page.goto(`${BASE_URL}/brand/logo.jpeg`);
|
||||
const s1 = r1?.status();
|
||||
const r2 = await page.goto(`${BASE_URL}/brand/logo-light.jpeg`);
|
||||
const s2 = r2?.status();
|
||||
console.log(`logo.jpeg: ${s1}`);
|
||||
console.log(`logo-light.jpeg: ${s2}`);
|
||||
|
||||
await setupPage(page, 'dark');
|
||||
const iconImgs = await page.locator('img[src*="icon-"]').count();
|
||||
const svgNavIcons = await page.locator('nav svg, aside svg').count();
|
||||
const emojiInNav = await page.evaluate(() => {
|
||||
const navEl = document.querySelector('nav, aside, [role="navigation"]');
|
||||
if (!navEl) return 0;
|
||||
const txt = navEl.textContent || '';
|
||||
return (txt.match(/[\u{1F300}-\u{1FFFF}]/gu) || []).length;
|
||||
});
|
||||
console.log(`icon- img tags: ${iconImgs}`);
|
||||
console.log(`nav SVG elements: ${svgNavIcons}`);
|
||||
console.log(`emoji in nav: ${emojiInNav}`);
|
||||
|
||||
expect(s1).toBe(200);
|
||||
});
|
||||
|
||||
test('50 - bee character count', async ({ page }) => {
|
||||
await setupPage(page, 'dark');
|
||||
const beeImgs = await page.locator('img[src*="bee"], img[alt*="bee"], img[alt*="Bee"]').count();
|
||||
const html = await page.content();
|
||||
const beeInText = (html.match(/\bbee\b/gi) || []).length;
|
||||
console.log(`Bee img elements: ${beeImgs}`);
|
||||
console.log(`bee word in HTML: ${beeInText}`);
|
||||
});
|
||||
|
||||
test('51-53 - contrast readability', async ({ page }) => {
|
||||
await setupPage(page, 'dark');
|
||||
const metrics = await page.evaluate(() => {
|
||||
const bodyColor = getComputedStyle(document.body).color;
|
||||
const bodyBg = getComputedStyle(document.body).backgroundColor;
|
||||
const bodyFontSize = getComputedStyle(document.body).fontSize;
|
||||
const sidebar = document.querySelector('nav, aside, [role="navigation"]');
|
||||
const sidebarColor = sidebar ? getComputedStyle(sidebar).color : 'N/A';
|
||||
const sidebarBg = sidebar ? getComputedStyle(sidebar).backgroundColor : 'N/A';
|
||||
return { bodyColor, bodyBg, bodyFontSize, sidebarColor, sidebarBg };
|
||||
});
|
||||
console.log(JSON.stringify(metrics, null, 2));
|
||||
});
|
||||
|
||||
test('54 - 1024x768 resize', async ({ page }) => {
|
||||
await page.setViewportSize({ width: 1024, height: 768 });
|
||||
await setupPage(page, 'dark');
|
||||
await page.screenshot({ path: `${SS}/54-1024x768.png` });
|
||||
const hasHScroll = await page.evaluate(() => document.documentElement.scrollWidth > window.innerWidth);
|
||||
console.log(`Horizontal scroll at 1024: ${hasHScroll}`);
|
||||
await clickNavView(page, 'Settings');
|
||||
await page.screenshot({ path: `${SS}/54-1024-settings.png` });
|
||||
const tabCount = await page.locator('[role="tab"]').count();
|
||||
console.log(`Settings tabs at 1024: ${tabCount}`);
|
||||
});
|
||||
|
||||
test('55 - 768x1024 mobile', async ({ page }) => {
|
||||
await page.setViewportSize({ width: 768, height: 1024 });
|
||||
await setupPage(page, 'dark');
|
||||
await page.screenshot({ path: `${SS}/55-768x1024.png` });
|
||||
const hasHScroll = await page.evaluate(() => document.documentElement.scrollWidth > window.innerWidth);
|
||||
const sidebarVisible = await page.locator('nav, aside').first().isVisible().catch(() => false);
|
||||
console.log(`768 - horizontal scroll: ${hasHScroll}`);
|
||||
console.log(`768 - sidebar visible: ${sidebarVisible}`);
|
||||
expect(hasHScroll).toBe(false);
|
||||
|
||||
const coachmark = page.getByRole('dialog', { name: /waggle tips/i });
|
||||
if (await coachmark.isVisible().catch(() => false)) {
|
||||
const box = await coachmark.boundingBox();
|
||||
expect(box).not.toBeNull();
|
||||
expect(box!.x).toBeGreaterThanOrEqual(0);
|
||||
expect(box!.x + box!.width).toBeLessThanOrEqual(768);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user