Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

docs(newtab): round-69 review — the handoff hold budget is about 15 s, not 30

Claudea7cdc8441675
diff --git a/docs/newtab.md b/docs/newtab.md
index 00c1e5998..7a07c574a 100644
--- a/docs/newtab.md
+++ b/docs/newtab.md
@@ -51,9 +51,11 @@ No search engine is hard-coded and nothing is sent to WebBrain's servers by the
draft, an unconfirmed Act task, a declined Ask). The new task is added below it for
review; the panel keeps the mode that draft was written in, and an Ask is not sent
automatically in that case.
- - A later hand-off is held back (retried every 150 ms, for up to about 30 s) while an
+ - A later hand-off is held back (retried every 150 ms, for up to about 15 s) while an
earlier Ask's text is still in the composer waiting for its send to commit, so one
- task can never replace the other. The record stays in storage meanwhile.
+ task can never replace the other. The record stays in storage meanwhile; after the
+ 15 s the polling stops, and the task is picked up as soon as that send settles (or the
+ next time the panel is triggered).
The text is user-typed, so it enters the panel exactly like typing in the composer;
it is never treated as page content.
diff --git a/test/newtab.mjs b/test/newtab.mjs
index 49f03d286..91927ccd0 100644
--- a/test/newtab.mjs
+++ b/test/newtab.mjs
@@ -2273,3 +2273,10 @@ test('round-64: a failed gallery write reaches the batch uploader instead of cou
assert.match(src, /error\.name === 'QuotaExceededError'/);
assert.match(src, /errors\.push\(files\[i\]\.name\)/);
});
+
+test('round-69: the documented hold budget matches the constants', async () => {
+ const { NEWTAB_HANDOFF_SEND_RETRY_MS: every, NEWTAB_HANDOFF_SEND_HOLD_MAX_RETRIES: max } =
+ await import(path.join(root, 'src/chrome/src/ui/newtab-handoff.js'));
+ assert.equal((every * max) / 1000, 15);
+ assert.match(readFileSync(path.join(root, 'docs/newtab.md'), 'utf8'), /retried every 150 ms, for up to about 15 s/);
+});