Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(feedback): keep the repro tooling and the companion in step with the trace

nirholas34835e06dbfa
diff --git a/scripts/feedback-repro.mjs b/scripts/feedback-repro.mjs
index e54e8ee34..e80c8f577 100644
--- a/scripts/feedback-repro.mjs
+++ b/scripts/feedback-repro.mjs
@@ -119,7 +119,9 @@ for (const step of steps) console.log(` ${step}`);
if (flags.has('--run')) {
console.log(`\nRunning it. It should FAIL while the reported bug is present.\n`);
- const result = spawnSync('npx', ['playwright', 'test', relative(ROOT, outPath)], {
+ // Repros carry their own config: they live outside tests/e2e precisely so an
+ // unfixed bug does not turn `npm test` red for everyone.
+ const result = spawnSync('npx', ['playwright', 'test', '-c', 'tests/repros/playwright.config.mjs', relative(OUT_DIR, outPath)], {
cwd: ROOT,
stdio: 'inherit',
});
@@ -133,5 +135,5 @@ if (flags.has('--run')) {
process.exit(result.status ?? 0);
}
-console.log(`\nRun it: npx playwright test ${relative(ROOT, outPath)}`);
+console.log(`\nRun it: npx playwright test -c tests/repros/playwright.config.mjs ${relative(OUT_DIR, outPath)}`);
console.log('It is red until the bug is fixed.\n');
diff --git a/src/feedback-companion.js b/src/feedback-companion.js
index 600ac1fc8..643bcd4b2 100644
--- a/src/feedback-companion.js
+++ b/src/feedback-companion.js
@@ -61,10 +61,11 @@ const OFFER_WINDOW_MS = 20_000;
import { witness } from '../packages/witness/src/index.js';
import { failuresIn, narrate } from '../packages/witness/src/compile.js';
-const recorder = witness.start({
- // Our own report endpoint is excluded: a failing report must never become
- // the next report's evidence.
- ignore: (path) => path.startsWith('/api/feedback/'),
+witness.start({
+ // Requests the reporting flow makes itself are excluded. A failing report
+ // must never become the next report's evidence, and the build-info lookup
+ // the panel performs is our fetch, not the visitor's.
+ ignore: (path) => path.startsWith('/api/feedback/') || path === '/build-info.json',
});
/** The failures the recorder saw, in the shape the report API already stores. */
@@ -246,6 +247,10 @@ function createPanel() {
ensureStyles();
const panel = document.createElement('div');
panel.className = 'fb-panel';
+ // The act of reporting a bug is not part of the bug. Marking the panel with
+ // the recorder's own opt-out keeps the visitor's clicks inside this form out
+ // of the trace the form is about to send.
+ panel.setAttribute('data-witness', 'off');
panel.setAttribute('role', 'dialog');
panel.setAttribute('aria-modal', 'false');
panel.setAttribute('aria-label', 'Tell your agent what happened');
@@ -513,6 +518,8 @@ export function installFeedback({ getInstance, getHostEl } = {}) {
const btn = document.createElement('button');
btn.type = 'button';
btn.className = 'walk-companion-feedback';
+ // Same reason as the panel: opening the reporter is not a step in the bug.
+ btn.setAttribute('data-witness', 'off');
btn.title = 'Tell your agent what is wrong';
btn.setAttribute('aria-label', 'Tell your agent what is wrong');
btn.textContent = '!';