Skip to content

fix(workspace): Reports tab shows raw JSON to clients — reuse the display_hint renderers #2162

Closed

Description

@vybe

Summary

The Workspace agent page's Reports tab renders raw JSON to external clients. The Workspace is a client-facing surface — a report must always render in a human-readable form; a JSON blob is never an acceptable presentation there.

Context

The Agent Detail surface already has the full renderer set for reports (#918/#1535): src/frontend/src/components/reports/ picks a renderer by display_hint → report_type prefix → fallback. The Workspace agent page (ent#360) fetches report metadata/detail through src/backend/client_portal/agent_page.py::reports / report_detail but does not reuse those renderers, so payloads land as raw JSON.

Acceptance Criteria

  • The Workspace Reports tab renders reports through the shared components/reports/ renderer set (display_hint → report_type prefix → fallback), same behavior as Agent Detail
  • The fallback for an unknown/malformed payload is a human-readable presentation (e.g. titled key-value summary), never a raw JSON dump — stricter than Agent Detail's JSON-viewer fallback, because the audience is an external client
  • table payloads use the windowed rows endpoint pattern (Make reporting handle large datasets (payload scale, pagination, streaming) #1537) so a large report doesn't transfer wholesale
  • Verified in light and dark themes on the Workspace surface

Technical Notes

  • Frontend: src/frontend/src/components/portal/PortalAgentPage.vue (Reports tab) + shared src/frontend/src/components/reports/ renderers
  • Backend: src/backend/client_portal/agent_page.py::reports (metadata) / report_detail (payload) — the list-metadata / detail-payload split already matches the feat: agent-reported structured reports via MCP + dashboard display #918 convention
  • Renderer keys are CI-pinned to the MCP display_hint enum (tests/unit/test_1535_report_prompt_guidance.py) — reuse, don't fork

Activity

  1. added
    priority-p1
    type-bug
    theme-ui-ux
    status-ready
    on Aug 13, 2026
  2. added
    status-in-progress
    and removed
    status-ready
    on Aug 13, 2026
  3. self-assigned this
    on Aug 13, 2026
  4. added
    status-in-dev
    and removed
    status-in-progress
    on Aug 14, 2026
  5. removed
    status-in-dev
    on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority-p1theme-ui-uxtype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions