Repository navigation
feat: inspect image previews at actual size - #4901
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @jcfs's task in 25s —— View job Review of PR #4901 (head 51006ee)I read the component diff and tests. I did not run the tests or the e2e specs. Suggestion
Checks
Verdict: Ready with suggestions. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Inspection behavior and scope docs/specs/agents/requirements/shared-image-inspection.md, docs/specs/agents/system-design/shared-image-inspection.md, docs/specs/agents/system-design/image-preview-expansion.md, docs/public/automation-and-mcp.md, docs/public/tasks-and-workflows.md, docs/plans/shared-image-inspection/plan.md |
Specifications and public guidance describe Fit and Actual size modes, source-change and reopen resets, scrolling, dismissal, and preserved image-source behavior. |
Dialog modes and focus restoration apps/web/components/task/chat/image-preview-dialog.tsx, apps/web/components/task/chat/context-items/image-item.tsx, apps/web/components/task/chat/context-items/image-item.test.tsx, apps/web/components/task/chat/image-preview-dialog.test.tsx, apps/web/components/task/chat/messages/kandev/rich-output/rich-output-renderer-file-targets.test.tsx |
The dialog toggles between contained Fit mode and scrollable Actual size mode. Mode changes reset canvas scrolling. Closing returns focus to the chip button when available. Tests check mode resets, image identity, focus, callbacks, and file-read behavior. |
Browser coverage and verification apps/web/e2e/tests/chat/image-inspection*, docs/plans/shared-image-inspection/* |
Desktop, narrow-viewport, and phone tests cover geometry, scrolling, touch targets, dismissal, focus, and composer entry. The work-order documents record acceptance criteria and verification results. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
actor User
participant ImagePreviewDialog
participant InspectionCanvas
User->>ImagePreviewDialog: Open image preview
ImagePreviewDialog->>InspectionCanvas: Show image in Fit mode
User->>ImagePreviewDialog: Select Actual size
ImagePreviewDialog->>InspectionCanvas: Set intrinsic image size and reset scroll
User->>ImagePreviewDialog: Select Fit
ImagePreviewDialog->>InspectionCanvas: Contain image and reset scroll
Suggested labels: medium
Suggested reviewers: zeval, carlosflorencio
Merge Risk: 
Minimal · up to 51006
-
Image previews add actual-size inspection. No material merge risk was identified.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Description check
-
Explanation
The description includes a clear two-sentence summary, validation results, the required checklist, and supporting screenshots and preview details. Optional sections are omitted appropriately, and the content is in English and relevant to the change.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 5 functions across 8 files. (7 skipped: 7 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit taps Fit, then Actual size,
And follows the scroll where detail lies.
Back to Fit, the whole image gleams,
The opener gets focus, neat as dreams.
“Hop, inspect, and close!” the rabbit beams.
Comment @coderabbitai help to get the list of available commands.
Cloudflare Pages docs previewBuilt from docs commit Stable PR alias: https://docs-pr-4901.landing-87j.pages.dev/docs |
[Medium impact] The PR appears safe to merge; no actionable issues were found.
|


Tip
PR walkthrough: Open the visual walkthrough
Large screenshots in ordinary image previews were fitted to the viewport, making fine detail difficult to inspect. The shared viewer now offers actual-size inspection with bounded scrolling, while each opening starts fitted.
Validation
i18n:check, specification catalog and lint, and public documentation validators passed.Checklist
apps/web/), I have added or updated Playwright e2e tests inapps/web/e2e/and verified them withmake test-e2e.docs/public/**and updated them or noted why no docs change is needed.Screenshots