From 3b299375e335cf2168dc8671f0dfff5eddd41e7d Mon Sep 17 00:00:00 2001 From: iris Date: Sun, 2 Aug 2026 18:29:28 +0200 Subject: [PATCH] fix: move settings section after effort picker, matching docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit argus caught the settings block appending before the effort picker's conditional despite the PR description and docs both saying it lands after — DOM order is visual order here (no CSS order: override), so actual layout was model -> settings -> effort. Moved the block after the effort picker's if-block; layout now matches what both already claimed. --- frontend/packages/agent/src/app.js | 68 +++++++++++++++--------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/frontend/packages/agent/src/app.js b/frontend/packages/agent/src/app.js index 6b2cc320..f8be2e10 100644 --- a/frontend/packages/agent/src/app.js +++ b/frontend/packages/agent/src/app.js @@ -267,40 +267,6 @@ window.marked = marked; menu.append(btn); } - // ─── settings: expand tool output by default ─────────────────── - // Pure client-side, browser-local preference (no backend involved) — - // see docs/web-ui/agent.md::Overflow button. Controls the *default* - // open state of otherwise-collapsed `
` rows in the live - // terminal (long tool-results, Write/Edit diffs, …); rows that - // already default open (send/ask/answer/recv) are unaffected. - // Read live by the shared terminal factory (HiveTerminal.create's - // `expandDetails` option below), so toggling mid-session applies to - // the next rendered row without a reload. - const settingsSep = el('div', { class: 'overflow-sep', 'aria-hidden': 'true' }); - const settingsLabel = el('div', { class: 'overflow-section-label' }, 'settings'); - menu.append(settingsSep, settingsLabel); - const expandIcon = el('span', { class: 'overflow-item-icon', 'aria-hidden': 'true' }, - getExpandDetailsPref() ? '☑' : '☐'); - const expandBtn = el('button', { - type: 'button', - class: 'overflow-item overflow-item-verbosity' + (getExpandDetailsPref() ? ' active' : ''), - role: 'menuitemcheckbox', - 'aria-checked': String(getExpandDetailsPref()), - title: 'expand tool output panels by default in this terminal (persisted to this browser only)', - id: 'expand-details-btn', - }, - expandIcon, - 'expand tool output', - ); - expandBtn.addEventListener('click', () => { - const next = !getExpandDetailsPref(); - setExpandDetailsPref(next); - expandBtn.classList.toggle('active', next); - expandBtn.setAttribute('aria-checked', String(next)); - expandIcon.textContent = next ? '☑' : '☐'; - }); - menu.append(expandBtn); - // ─── effort quick-picker ─────────────────────────────────────── // One-click shortcuts for each reasoning-effort level the backend // declares in `availableEfforts` (from `state.available_efforts`). @@ -344,6 +310,40 @@ window.marked = marked; } } + // ─── settings: expand tool output by default ─────────────────── + // Pure client-side, browser-local preference (no backend involved) — + // see docs/web-ui/agent.md::Overflow button. Controls the *default* + // open state of otherwise-collapsed `
` rows in the live + // terminal (long tool-results, Write/Edit diffs, …); rows that + // already default open (send/ask/answer/recv) are unaffected. + // Read live by the shared terminal factory (HiveTerminal.create's + // `expandDetails` option below), so toggling mid-session applies to + // the next rendered row without a reload. + const settingsSep = el('div', { class: 'overflow-sep', 'aria-hidden': 'true' }); + const settingsLabel = el('div', { class: 'overflow-section-label' }, 'settings'); + menu.append(settingsSep, settingsLabel); + const expandIcon = el('span', { class: 'overflow-item-icon', 'aria-hidden': 'true' }, + getExpandDetailsPref() ? '☑' : '☐'); + const expandBtn = el('button', { + type: 'button', + class: 'overflow-item overflow-item-verbosity' + (getExpandDetailsPref() ? ' active' : ''), + role: 'menuitemcheckbox', + 'aria-checked': String(getExpandDetailsPref()), + title: 'expand tool output panels by default in this terminal (persisted to this browser only)', + id: 'expand-details-btn', + }, + expandIcon, + 'expand tool output', + ); + expandBtn.addEventListener('click', () => { + const next = !getExpandDetailsPref(); + setExpandDetailsPref(next); + expandBtn.classList.toggle('active', next); + expandBtn.setAttribute('aria-checked', String(next)); + expandIcon.textContent = next ? '☑' : '☐'; + }); + menu.append(expandBtn); + overflowMenuPopulated = true; }