#4865 [GUI] keep tool Approve cards under the latest reply

open · @realno · 0 comentarios · En GitHub

Setup & installAMD / HIPNVIDIA / CUDAWindowsLinux

Descripción

## Problem and result

When the model asked for Manual tool approval, the Approve/Deny card sat above the assistant reply. Long thought or output pushed the card out of view, so it looked like the request had been denied or never shown.

After this change, finished and failed tool rows stay above the reply (where the work happened). Only waiting and running tool cards sit after the latest output, so Approve stays next to what just scrolled into view. Activity lines still get a bubble while tools run, so their expand control keeps working.

## Related discussion

none

## Approach

Split each message’s tools into settled vs live in `Chat.tsx`: settled (and failed) render before the bubble; `proposed` / `running` render after it. Open the bubble when the message has activity blocks, not only when there is text or an error, so expand stays usable during a run.

Also, `npm run dev` now picks up an installed desktop Harness when `STRATA_HARNESS_DIR` is unset, so Manual approvals work in local host/web without a separate Harness checkout. No default runtime path for users of the packaged app.

## Validation

**Passed:**
- `npm test` in `apps/host` on `e6381e12` (Windows, Node from the host package): 1151 tests passed, including the new layout check that settled tools stay above the reply and live Approve cards sit after it
- Manual check in local `npm run dev`: Manual Approve/Deny appears under the latest assistant output; failed tool rows stay above the reply; activity-line expand still works while a tool is live

**Failed:**
- none observed for this change (two existing `EPERM` symlink failures in the host test run are unrelated to the chat layout)

**Not run:**
- packaged desktop / Tauri build
- CUDA, HIP, SYCL, Metal engine builds (UI-only change)

## Limits

Harness auto-detect in `dev.mjs` only helps when the desktop app’s harness is already installed on the machine; Linux has no default install path in that script. Packaged-app behavior is unchanged.

En el sitio

Enlaces a install, modelos, releases.