feat: screenshot range crop, grid contact sheet, render backend - #8
Open
Pilser wants to merge 2 commits into
Open
feat: screenshot range crop, grid contact sheet, render backend#8Pilser wants to merge 2 commits into
Pilser wants to merge 2 commits into
Conversation
added 2 commits
July 19, 2026 14:30
Screenshot Range Crop (--range): - New --range, --zoom, --padding flags to crop screenshots to element bbox - handle_screenshot_with_range: verify element exists → get bbox from text offset map → crop viewport Grid Contact Sheet (--grid): - Multi-page tiled thumbnail view using grid columns - Works with docx (pages), pptx (slides), xlsx (sheets) Render Backend Selection (--render): - Choose rendering path: auto, native, html (docx only) Infrastructure: - ViewOptions: added range, grid, render fields - MCP/resident/watch servers: thread new params
…table - Image add: accept 'file' property (not just 'src'/'path') — fixes 0-byte media - Table border: recognize 'all' shorthand (was falling through to empty) - Xlsx set cell: accept 'text' alias alongside 'value' - Multi-row table: fix rNcN text so each row gets unique content (was all rows same)
RainLib
requested changes
Jul 20, 2026
RainLib
left a comment
Owner
There was a problem hiding this comment.
当前版本暂不能合并,请修正后推送新的 head SHA 再请求审核。
必须修正:
cargo fmt -- --check未通过;请 rebase 最新main后执行 fmt、clippy 和全工作区测试。- DOCX
--range的真实命令验证返回no bbox data for range;XLSX 范围参数会被错误解析为普通路径。必须按 DOCX、XLSX、PPTX 的不同文档结构分别处理,不能假设所有格式都有相同 bbox/路径模型。 --render当前没有实际选择渲染后端,--grid的通用 HTML 包装也没有形成可靠的多页、幻灯片或工作表网格。请实现真实效果并添加输出文件验证。- 本 PR 依赖 #7,但按 #7 → #8 顺序模拟合并后,#8 没有新增 tree diff,说明当前提交已被 #7 覆盖。请 rebase 后只保留独立、原子的改动,或明确拆分依赖关系。
- 验证必须包含各文件格式的实际截图命令、生成文件存在性/尺寸检查,以及失败输入测试。
新提交到达后我会按新的 head SHA 重新验证;所有功能、fmt、clippy 和测试均通过后再 Approve。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three screenshot-related features for the
viewcommand:--range(screenshot crop to element bbox)Crop screenshot to a single element's bounding box. Works across all formats using bbox data from text offset maps.
--grid N(contact sheet)Tile pages/slides/sheets into an N-column grid thumbnail view for a single screenshot.
--render(backend selection)Choose rendering backend:
auto,native,html(docx only).Validation
Files Changed
5 files: view.rs, output_format.rs, mcp.rs, resident.rs, watch.rs
Note
Depends on ViewOptions fields introduced in the bbox-engine PR. Apply in order: bbox-engine → screenshot-crop.