Goal
PawWork should capture enough local renderer diagnostics to debug session scroll jumps, timeline flicker, layout thrash, and similar UI regressions without relying on Computer Use, screenshots, or manual observation.
When this is done, a user can export a session or create a problem report and the artifact will include the relevant renderer evidence from the current app run.
Scope
In scope:
- Add a short-retention global renderer diagnostics log for desktop app runtime events.
- Capture structured UI diagnostics for session rendering, scroll state, layout state, lightweight performance, and data refresh boundaries.
- Include the relevant diagnostics slice in session export JSON.
- Include a short diagnostics summary in problem reports and attach the complete diagnostics slice in the report package.
- Add a low-visibility global diagnostics export path for non-session-specific failures.
- Keep diagnostics local by default. No automatic upload.
- Keep the first version lightweight and privacy-conscious.
- Follow the current user-initiated problem-report privacy boundary: diagnostics are local until the user exports a session, exports diagnostics, or creates a problem report.
Out of scope:
- Do not record screenshots, full DOM snapshots, message text, prompt input text, file contents, API keys, tokens, or raw provider/proxy URLs.
- Do not change existing problem-report context fields such as directory and log path in this issue.
- Do not add cloud telemetry or automatic upload.
- Do not introduce a full OpenTelemetry SDK in the first version.
- Do not convert normal session export into a zip package.
- Do not fix every current scroll or flicker bug in this issue. This issue adds the observability layer needed to debug them reliably.
Relevant files or context
Current gaps:
- Full session export is engine/session data oriented. It can explain message, part, tool, subagent, and model-run state, but not what the renderer did on screen.
- Problem reports currently collect app diagnostics, log tail, renderer error, and a limited session message export, but they do not carry a renderer UI trace.
- The app debug bar already observes useful frontend performance signals, but those signals are not persisted or exported.
Likely areas:
packages/app/src/components/debug-bar.tsx
packages/app/src/pages/session/message-timeline.tsx
packages/app/src/pages/session/session-view-controller.ts
packages/app/src/testing/session-composer.ts
packages/desktop-electron/src/main/problem-report.ts
packages/desktop-electron/src/main/feedback.ts
packages/desktop-electron/src/main/ipc.ts
packages/opencode/src/session/export.ts
Related issue:
Verification
- Unit test the diagnostics event sanitizer so sensitive fields are not written outside the allowlisted schema.
- Unit test main-process ingestion limits: known event names only, known fields only, per-event size limit, and simple rate limits for high-frequency events.
- Unit test hostile renderer inputs: unknown events, oversized payloads, URL-like fields, message-text-like fields, and nested unknown fields must be ignored or reduced to the allowlisted output shape before writing.
- Unit test rolling retention: maximum size, maximum age, malformed line handling, and best-effort failure behavior.
- Unit test session export when diagnostics are present, missing, expired, truncated, corrupt, disabled, or write-failed.
- Unit test problem report packaging so the human-readable report contains only a summary while the complete diagnostics slice is attached separately.
- Add an E2E regression probe for a long tool-heavy session with deterministic assertions for
timeline_mount_count, visible_count_min, scroll_anchor_before, scroll_anchor_after, scroll_top_delta, and user_scrolled=false.
- Confirm normal session export remains a single JSON file and remains readable by older consumers that ignore the optional diagnostics field.
Execution mode
Human review required before code changes.
Goal
PawWork should capture enough local renderer diagnostics to debug session scroll jumps, timeline flicker, layout thrash, and similar UI regressions without relying on Computer Use, screenshots, or manual observation.
When this is done, a user can export a session or create a problem report and the artifact will include the relevant renderer evidence from the current app run.
Scope
In scope:
Out of scope:
Relevant files or context
Current gaps:
Likely areas:
packages/app/src/components/debug-bar.tsxpackages/app/src/pages/session/message-timeline.tsxpackages/app/src/pages/session/session-view-controller.tspackages/app/src/testing/session-composer.tspackages/desktop-electron/src/main/problem-report.tspackages/desktop-electron/src/main/feedback.tspackages/desktop-electron/src/main/ipc.tspackages/opencode/src/session/export.tsRelated issue:
Verification
timeline_mount_count,visible_count_min,scroll_anchor_before,scroll_anchor_after,scroll_top_delta, anduser_scrolled=false.Execution mode
Human review required before code changes.