Skip to content

feat(editor): insert cut bands and reveal saved captures - #116

Open
tobi wants to merge 2 commits into
mainfrom
integrate-pr-114-115
Open

feat(editor): insert cut bands and reveal saved captures#116
tobi wants to merge 2 commits into
mainfrom
integrate-pr-114-115

Conversation

@tobi

@tobi tobi commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Integrates #114 and #115 onto current main.

  • Ctrl+Cut inserts an undoable transparent band and shifts later content.
  • Save gestures can reveal the resulting file in Nautilus.
  • Saved notifications reveal the selected file using safe argv-based Omarchy actions.
  • Clamps insert endpoints before deriving band size.
  • Keeps insert modifier handling consistently Ctrl-only.
  • Adds horizontal/vertical out-of-range insertion regression coverage.

Validation: make check and make install.

lukejmorrison and others added 2 commits August 31, 2026 12:34
With Cut armed, hold Ctrl (or press Ctrl+X) to insert space instead of
collapsing it. The toolbar icon swaps to a split-plus, the live band
shows a plus, and annotations past the seam shift out. Undo is the
same Cut op with insert set.
Copilot AI balanced review requested due to automatic review settings August 31, 2026 16:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Cropped-region annotations shift incorrectly during insertion, and unbounded image growth can exhaust memory or crash.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds undoable transparent-band insertion to the Cut tool and optional reveal-in-Nautilus behavior for saved captures.

Changes:

  • Adds Ctrl-based insert-band editing, replay, persistence, visuals, and tests.
  • Adds Shift-save reveal gestures and safe argv-based notification actions.
  • Updates user and architecture documentation.
File summaries
File Description
src/cut.cpp Implements band insertion and replay.
src/cut.hpp Extends the cut operation API.
src/editor.cpp Integrates insertion and reveal gestures.
src/editor.hpp Updates editor interfaces and test hooks.
src/capture.cpp Persists insertion and launches reveal actions.
src/capture.hpp Exposes file-reveal functionality.
src/icons.cpp Adds the insert-band icon.
tests/cut-smoke.cpp Tests insertion primitives and bounds.
tests/cut-mapping-smoke.cpp Tests Ctrl-drag insertion.
tests/editor-smoke.cpp Tests reveal gestures and notification arguments.
README.md Documents new controls and dependencies.
docs/editing-model.md Documents insertion replay behavior.
docs/dependencies.md Records reveal command dependencies.
Review details
  • Files reviewed: 13/13 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/cut.cpp
Comment on lines +50 to +54
const int extent =
orientation == Qt::Horizontal ? source.height() : source.width();
start = std::clamp(start, 0, extent);
end = std::clamp(end, start, extent);
const int band = end - start;
Comment thread src/editor.cpp
Comment on lines +2732 to +2738
if (op.cut.insert) {
if (horizontal)
point.setY(shiftForInsert(point.y(), lo, band));
else
point.setX(shiftForInsert(point.x(), lo, band));
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants