Include TUI client logs in diagnostic uploads (#47889)

## Why

Diagnostic uploads through the app server do not include the TUI client's diagnostic buffer. Attach those diagnostics when users consent to uploading logs.

## What changed

- Stage the most recent 1 MiB of client logs as `client-logs.txt` on the app-server host and append it to `extra_log_files`.
- Skip staging without log consent and list the optional attachment in the consent dialog.
- Continue uploading the report if staging fails, noting the omitted logs in the report reason. Attempt to remove the staging directory after both successful and failed uploads.
- Make app-server filesystem helpers usable by background requests.

## Testing

Extend submission tests to cover log truncation, preservation of existing attachments, consent gating, staging failures, cleanup after upload failure, and error display. Update consent dialog snapshots to include the client log attachment.

GitOrigin-RevId: 9790834d52772c08a147ee7c176cbbc2aa029d5f
This commit is contained in:
Eric Traut
2026-09-24 17:21:45 +00:00
committed by copyberry
parent 3d6428510f
commit b3ea9fa632
13 changed files with 199 additions and 28 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
//! request/response plumbing out of `App` and `ChatWidget`.
mod external_agent_config;
mod fs;
pub(crate) mod fs;
mod history;
mod models;
mod realtime;