Skip to content

Bug: Document preview reserves most of the mobile screen for its fixed metadata sidebar #3628

Closed

Description

@yannickmonney

At a 390 px mobile viewport, Document preview reserves 260 px for metadata and leaves only 98 px of readable text width. The document title is also reduced to a few characters. Confirmed in Chrome against the isolated local build at 44e0dcf254975286c0e9dea443b5cd1ca6b23347; no production testing.

Suggested severity: P2.

Reproduction

  1. Store a short plain-text document in Knowledge > Documents on a local instance.
  2. At a 390 × 844 viewport, open the document preview.
  3. Read the document and its header. Compare with the same open preview at desktop width.

Expected: At narrow widths, reading the document remains the primary use of the dialog. Metadata should stack, collapse, or move behind a details control so the preview can use the available width. The title and close/download actions should fit.

Observed: The header columns measure 130px 260px; the body keeps the same fixed sidebar. The actual <pre> width is only 98 px. Ordinary text wraps after roughly two words, while the mostly empty metadata area consumes two thirds of the screen. The filename folder-audit.txt displays as fold….

Desktop control: the same dialog is 1100 px wide and the text preview is 808 px wide, with the same 260 px sidebar. The content loads successfully in both cases; this is layout, not a fetch failure.

Evidence and cause

Read-only DOM measurements from Chrome:

{"viewport":390,"dialogWidth":390,"headerColumns":"130px 260px","sidebarWidth":260,"textPreviewWidth":98}
{"dialogWidth":1100,"sidebarWidth":260,"textPreviewWidth":808}

Screenshots retained in the audit artifacts: mobile-document-preview.png (failure) and desktop-document-preview.png (control). The local synthetic fixture is folder-audit.txt; indexing was intentionally skipped and is unrelated. The temporary viewport override was reset after testing.

Both the custom header and content grid apply grid-cols-[minmax(0,1fr)_260px] without a responsive breakpoint:

Deduplication: reviewed all-state document preview results and the audit's 931-issue baseline. Closed #1032 concerns page/table overflow, not this modal's fixed metadata column. #2380 concerns supported preview formats.

Acceptance: Verify readable text and accessible title/actions at 320 and 390 px, retain the desktop metadata layout, and inspect both real Chrome layouts after the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions