Context
The document workspace preview currently forces one visualization mode at a time: historically a single-page preview with pagination, and now a stacked scroll preview. Both are useful for different inspection tasks.
Single-page mode is still the fastest way to inspect precise bounding boxes, page-local layout, and chunk placement on one page. The stacked scroll mode solves a different problem: it lets users follow structures that span page boundaries without losing context.
This matters for Docling outputs where the logical structure is distributed across pages, for example:
- long text blocks split by page breaks
- chunks whose source items continue on the next page
- sections where headers, paragraphs, tables, or captions are visually disconnected by pagination
Without both modes, the user either loses the compact page-focused workflow or loses the ability to visually track cross-page continuity.
Goal
Support both preview modes in Parse and Chunk:
- Page mode — classic single-page preview with page pills / prev-next navigation.
- Scroll mode — vertically stacked full-document preview with the current page inferred from the viewport.
The same shared preview component should own the switch so both tabs behave consistently.
Scope
In scope — Frontend only
- Add a local preview mode switch to
frontend/src/features/document/ui/PagePreviewWithOverlay.vue.
- Keep existing page navigation controls for the single-page workflow.
- Keep stacked multi-page rendering for cross-page inspection.
- Preserve existing overlay interactions in both modes:
- Parse tree selection -> preview highlight
- bbox click -> tree or chunk selection
- chunk selection -> preview highlight
- Keep page state synchronized appropriately:
- in Page mode, page changes are explicit through navigation
- in Scroll mode, the active page follows the page mostly visible in the viewport
- Add i18n labels for the mode switch.
Out of scope
- Persisting the chosen preview mode across sessions
- Zoom controls
- OCR / chunking backend changes
- Redesigning the surrounding Parse or Chunk tab layouts
Why this helps
This change makes it much easier to identify structures distributed across pages, especially text pieces and chunks whose semantic continuity is broken by pagination. Users can stay in Scroll mode to understand the full structure, then switch back to Page mode for precise per-page inspection and editing.
Acceptance criteria
References
frontend/src/features/document/ui/PagePreviewWithOverlay.vue
frontend/src/pages/DocParseTab.vue
frontend/src/pages/DocChunkTab.vue
Context
The document workspace preview currently forces one visualization mode at a time: historically a single-page preview with pagination, and now a stacked scroll preview. Both are useful for different inspection tasks.
Single-page mode is still the fastest way to inspect precise bounding boxes, page-local layout, and chunk placement on one page. The stacked scroll mode solves a different problem: it lets users follow structures that span page boundaries without losing context.
This matters for Docling outputs where the logical structure is distributed across pages, for example:
Without both modes, the user either loses the compact page-focused workflow or loses the ability to visually track cross-page continuity.
Goal
Support both preview modes in Parse and Chunk:
The same shared preview component should own the switch so both tabs behave consistently.
Scope
In scope — Frontend only
frontend/src/features/document/ui/PagePreviewWithOverlay.vue.Out of scope
Why this helps
This change makes it much easier to identify structures distributed across pages, especially text pieces and chunks whose semantic continuity is broken by pagination. Users can stay in Scroll mode to understand the full structure, then switch back to Page mode for precise per-page inspection and editing.
Acceptance criteria
Page/Scrollpreview switch.Pagemode renders only the active page.Scrollmode renders the full document as a vertically scrollable stack.References
frontend/src/features/document/ui/PagePreviewWithOverlay.vuefrontend/src/pages/DocParseTab.vuefrontend/src/pages/DocChunkTab.vue