Fixes #5459. Integrated sixel raster output, improved ImageView and scenarios#5460
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd87e87ccd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Integrates sixel raster output into the normal output-buffer composition path (with clip capture), routes ImageView sixel rendering through this buffer, and adds a UICatalog scenario to exercise clipping/overlay behavior.
Changes:
- Added
RasterImageCommandand new raster-image APIs onIOutputBufferwith storage inOutputBufferImpl. - Updated
OutputBaseto render raster images duringWrite()and to include them inToAnsi()output. - Updated
ImageViewto emit sixel via the output buffer (and added a new Mandelbrot UICatalog scenario for interactive testing).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/UnitTestsParallelizable/Drivers/Output/OutputBaseTests.cs | Adds tests for raster-image clip capture, ANSI emission, skip-on-non-intersection, and ordering vs later dirty cells. |
| Terminal.Gui/Views/ImageView.cs | Switches sixel rendering from the out-of-band queue to IOutputBuffer.AddRasterImage(); removes old cached-queue state. |
| Terminal.Gui/Drivers/Output/RasterImageCommand.cs | Introduces a command object describing raster images for buffered composition. |
| Terminal.Gui/Drivers/Output/OutputBufferImpl.cs | Stores raster image commands and captures clip; marks covered cells clean to avoid redundant redraw. |
| Terminal.Gui/Drivers/Output/OutputBase.cs | Renders raster images as part of output composition and appends raster-image output in ToAnsi(). |
| Terminal.Gui/Drivers/Output/IOutputBuffer.cs | Adds raster image APIs (AddRasterImage, RemoveRasterImage, GetRasterImages). |
| Examples/UICatalog/Scenarios/Mandelbrot.cs | Adds an interactive Mandelbrot sixel scenario with overlay dialog to exercise clipping/composition. |
Add regression coverage for raster command IDs, stale cell invalidation, and ToAnsi layering. Update raster buffer replacement/removal to dirty stale image cells and make ToAnsi emit raster images before text overlays. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… tig/sixel-integration-plan
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…output Switch Terminal.Gui from NuGet (2.4.3) to local project reference targeting the tig/sixel-integration-plan branch (gui-cs/Terminal.Gui#5460) which provides integrated raster image output with proper clipping, Z-order, and invalidation. Removed from PreviewPane: - Mouse drag-to-pan (GrabMouse/UngrabMouse, position tracking) - Scroll-wheel and keyboard zoom (+/-/0) - SuspendSixel/ResumeSixel dialog workaround - Manual pixel-budget calculation (Frame * cell-size assumptions) - MaterializeSample fallback helper Removed from PageRenderer: - Zoom, PanX, PanY properties and associated transform math Removed from MainView: - RunnableOpening/RunnableClosed → SuspendSixel/ResumeSixel wiring Deleted: - ImageLoader.cs (dead code) - Resources/preview-sample.png (unused fallback asset) Also includes prior uncommitted work: - fix: settings changes now update preview (SettingsChanged subscription) - fix: sheet change reloads file (SheetApplied handler) - UI border/thickness/scheme tweaks and comment cleanup - Regenerated all 11 golden snapshots Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ImageView and scenarios
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Summary
IOutputBuffer/OutputBase, including clipping-aware composition and pre-encoded sixel reuse for full visible raster images.ImageViewsixel drawing through the output buffer and fix first-render/card sizing issues across sixel and cell-based rendering.ImageViewkeyboard handling: arrow/scroll keys are consumed, panning works when zoomed, PageUp zooms in, PageDown zooms out, and zoom-out can shrink to a 1x1 rendered image.ImageView; async rendering scales and sixel-encodes off the UI thread, keeps the last completed frame visible, and shows anAesthetic2SpinnerViewwhile work is pending.ImageViewinto focused partials underTerminal.Gui/Views/ImageView/and colocate backing fields with their properties or first use.*.actualsnapshot artifacts and remove the accidentally committed snapshot output.Tests
dotnet build Terminal.Gui --artifacts-path ...\isolated-build-artifactsdotnet build Examples\UICatalog --artifacts-path ...\isolated-build-artifactsdotnet test --project Tests\UnitTestsParallelizable --filter-class "*ImageViewTests" --artifacts-path ...\isolated-test-artifactsdotnet test --project Tests\UnitTestsParallelizable --filter-class "*OutputBaseTests" --artifacts-path ...\isolated-test-artifacts