Open-source AI browser agent for Chrome and Firefox (monorepo) ðŸ§
JavaScript ai-agentai-agentsai-toolsbrowser-aibrowser-automationbrowser-extensionchrome-aichrome-devtoolschrome-extensionchrome-extensionsfirefox-addonfirefox-addonsfirefox-extensionfirefox-extensionsgemmagemma4minimaxoffline-aioffline-llmqwen
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.mdindex 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 thedraft, an unconfirmed Act task, a declined Ask). The new task is added below it forreview; the panel keeps the mode that draft was written in, and an Ask is not sentautomatically 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 anearlier 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.mjsindex 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 couassert.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/);+});