Host and Argyll subprocess lines already go to iccery.log. Three support gaps remain:
Frontend — many failures only use console.error / console.warn (app.js init, chartread/targen invoke errors, settings load/save). Webview log forwarding is not a reliable support contract.
Sensitive paths — spawn lines at info often include full home-directory cwd/args; awkward when users paste logs.
Excerpt for support — Copy Path exists; copying the last N lines of the log does not.
Scope
A. Frontend → file
Small helper (logError / logWarn) that writes to console and forwards to Rust (tauri-plugin-log JS API or a thin log_message(level, msg) command).
Wire high-value paths first: safeInit failures, instrument detection, major invoke failures in stage modules and settings.
Avoid per-swatch / high-frequency UI noise.
Add log plugin permissions to capabilities/default.json if required.
B. Path handling in subprocess logs
At info, shorten or tilde-prefix home paths on spawn/cwd lines.
Keep full paths at debug/trace for local diagnosis.
Do not change paths passed to Argyll — logging only.
C. Copy recent excerpt
Settings action: Copy recent log lines (e.g. last 100–200 lines or last ≤64 KiB).
Backend reads the active log with a size cap; frontend copies to clipboard.
Feedback: “Copied N lines” / empty / missing file.
Acceptance Criteria
A forced UI/invoke failure appears in iccery.log, not only DevTools.
Default info spawn lines are less likely to expose raw home prefixes.
User can copy a recent log excerpt from Settings without opening the file externally.
Large logs are not fully loaded into memory when copying.
Dependencies
Independent of #158 (level apply), but more useful once levels work.
Builds on existing get_log_path / app_log_dir layout from #139.
### Description
Host and Argyll subprocess lines already go to `iccery.log`. Three support gaps remain:
1. **Frontend** — many failures only use `console.error` / `console.warn` (`app.js` init, chartread/targen invoke errors, settings load/save). Webview log forwarding is not a reliable support contract.
2. **Sensitive paths** — spawn lines at `info` often include full home-directory cwd/args; awkward when users paste logs.
3. **Excerpt for support** — **Copy Path** exists; copying the **last N lines** of the log does not.
### Scope
#### A. Frontend → file
- Small helper (`logError` / `logWarn`) that writes to console and forwards to Rust (`tauri-plugin-log` JS API or a thin `log_message(level, msg)` command).
- Wire high-value paths first: `safeInit` failures, instrument detection, major `invoke` failures in stage modules and settings.
- Avoid per-swatch / high-frequency UI noise.
- Add log plugin permissions to `capabilities/default.json` if required.
#### B. Path handling in subprocess logs
- At `info`, shorten or tilde-prefix home paths on spawn/cwd lines.
- Keep full paths at `debug`/`trace` for local diagnosis.
- Do not change paths passed to Argyll — logging only.
#### C. Copy recent excerpt
- Settings action: **Copy recent log lines** (e.g. last 100–200 lines or last ≤64 KiB).
- Backend reads the active log with a size cap; frontend copies to clipboard.
- Feedback: “Copied N lines” / empty / missing file.
### Acceptance Criteria
- [ ] A forced UI/`invoke` failure appears in `iccery.log`, not only DevTools.
- [ ] Default `info` spawn lines are less likely to expose raw home prefixes.
- [ ] User can copy a recent log excerpt from Settings without opening the file externally.
- [ ] Large logs are not fully loaded into memory when copying.
### Dependencies
- Independent of #158 (level apply), but more useful once levels work.
- Builds on existing `get_log_path` / `app_log_dir` layout from #139.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
Host and Argyll subprocess lines already go to
iccery.log. Three support gaps remain:console.error/console.warn(app.jsinit, chartread/targen invoke errors, settings load/save). Webview log forwarding is not a reliable support contract.infooften include full home-directory cwd/args; awkward when users paste logs.Scope
A. Frontend → file
logError/logWarn) that writes to console and forwards to Rust (tauri-plugin-logJS API or a thinlog_message(level, msg)command).safeInitfailures, instrument detection, majorinvokefailures in stage modules and settings.capabilities/default.jsonif required.B. Path handling in subprocess logs
info, shorten or tilde-prefix home paths on spawn/cwd lines.debug/tracefor local diagnosis.C. Copy recent excerpt
Acceptance Criteria
invokefailure appears iniccery.log, not only DevTools.infospawn lines are less likely to expose raw home prefixes.Dependencies
get_log_path/app_log_dirlayout from #139.