Skip to content

plugin-list: the list toolbar Print button is a bare window.print() — no preview, no output, silent no-op in headless/WebView #4462

Description

@baozhoutao

Reported from an app project (steedos-labs/os-project-titanwind-ehr#1161) on @objectstack/*@17.0.0-rc.6.

What it does

The list view toolbar's Print button is a bare browser print call:

// packages/plugin-list/src/ListView.tsx:2626
onClick={() => window.print()}

No print layout, no preview, no PDF generation, no downloaded artifact. The same bare
call also backs packages/plugin-report/src/ReportViewer.tsx:115 and
packages/app-shell/src/views/DashboardView.tsx:101.

Why it's a defect, not just a thin feature

window.print() is a no-op in exactly the environments a platform gets driven in:
headless/automated browsers and several embedded WebViews. The click resolves normally —
no exception, no console error, nothing rendered. Observed at the reporting project:
the click dispatched successfully, console clean, nothing happened. From the outside it
is indistinguishable from a broken button, and it is being read by acceptance testers as
the product's "export to PDF" entry point.

Even in a normal desktop browser the result is the browser's own dialog printing the
whole Console chrome — unpaginated, tables clipped, styling unsuited to paper (this is
the exact workaround objectstack-ai/objectstack#1301 already documented and rejected as
inadequate).

Repro

  1. Open any object list view in Console.
  2. Click Print in the toolbar.
  3. Headless/WebView: nothing happens, no error. Desktop browser: the browser's print
    dialog for the whole page, including Console chrome.

What we're asking for

Note that the real feature — a print/PDF primitive — was closed NOT_PLANNED as
objectstack-ai/objectstack#1301, so we are not re-litigating that here. Given that
decision, the minimum fix is to stop the button from reading as an export entry point.
In descending order of preference:

  1. Give the list a print stylesheet / print-scoped render so window.print() produces a
    usable page (no Console chrome, paginated, table not clipped).
  2. Document the button's semantics explicitly ("opens your browser's print dialog"; not a
    PDF export), so it stops being accepted against "export PDF" requirements.
  3. Failing both, remove or gate the button rather than ship a control that is a silent
    no-op in a supported runtime.

Related

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions