Skip to content

Implement mini-editor#93

Merged
AlanRockefeller merged 2 commits into
mainfrom
Mini-editor
May 29, 2026
Merged

Implement mini-editor#93
AlanRockefeller merged 2 commits into
mainfrom
Mini-editor

Conversation

@AlanRockefeller

@AlanRockefeller AlanRockefeller commented May 29, 2026

Copy link
Copy Markdown
Owner

Editor is now small - and can be expanded if more controls are needed.

Summary by CodeRabbit

  • New Features

    • Added a compact editor window for streamlined image editing alongside the existing expanded editor
    • Editor can now toggle between compact and expanded modes
    • Compact editor includes histogram display (overlay/channel modes), exposure/shadow/black/color balance controls, and auto-adjustment buttons
    • Enhanced keyboard shortcuts and navigation for both editor modes
  • Bug Fixes

    • Improved save and close behavior to prevent unintended editor closures when unsaved edits exist

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@AlanRockefeller, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 37 minutes and 25 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ce12c289-0e14-49c2-aee3-f95c684e8e03

📥 Commits

Reviewing files that changed from the base of the PR and between b07bc28 and ebd6ef9.

📒 Files selected for processing (2)
  • faststack/app.py
  • faststack/qml/CompactEditorWindow.qml

Walkthrough

This PR introduces a compact editor window mode alongside the existing expanded dialog editor. The change adds editor-expansion state tracking, backend dual-mode support through new controller slots, and a complete compact editor UI with histogram and adjustment controls, coordinated via menu actions and keyboard shortcuts.

Changes

Compact Editor and Dual-Mode Editing

Layer / File(s) Summary
Editor expansion state foundation
faststack/ui/provider.py
UIState gains isEditorExpanded property with is_editor_expanded_changed signal and initialization in __init__ to track editor mode (compact vs expanded).
Backend dual-mode integration
faststack/app.py
New handle_key_from_compact_editor(), has_unsaved_edits(), and toggle_editor() slots enable compact editor interaction; eventFilter() defers to QML when editor is expanded; save lifecycle updated to only close editor when both open and expanded.
Expanded editor dialog updates
faststack/qml/ImageEditorDialog.qml
Dialog visibility now requires both isEditorOpen and isEditorExpanded; new "Compact" button collapses editor to compact mode.
Compact editor window UI
faststack/qml/CompactEditorWindow.qml
New 786-line window component with histogram (overlay/channel modes), light/color adjustment sliders with live drag-update, footer controls (Reset/Close/Save), keyboard handlers (Esc/E/S/arrows), unsaved-edits protection, and reusable compact slider delegate.
Main UI menu and shortcut coordination
faststack/qml/Main.qml
"Edit Image" menu action coordinates both editor states; E shortcut context changed from application-wide to window-scoped and now clears isEditorExpanded; CompactEditorWindow instantiated with focus restoration on hide.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • AlanRockefeller/faststack#71: Both PRs modify faststack/app.py's save/edit lifecycle—this PR changes editor-close gating in save_edited_image()/_on_save_finished() to require both isEditorOpen and isEditorExpanded, while PR #71 reworks post-save handling and crop-related save flows.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 68.75% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Implement mini-editor' directly and clearly describes the main change: adding a compact/mini editor component, which aligns with the PR's primary objective of implementing a smaller editor that can be expanded.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch Mini-editor

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b07bc283d9

ℹ️ 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".

Comment thread faststack/app.py Outdated
Comment on lines 3103 to 3107
if (
self.ui_state.isEditorOpen
and self.ui_state.isEditorExpanded
):
self.ui_state.isEditorOpen = False

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep compact editor loaded after saving

When saving from the compact editor, editor_was_open is true but isEditorExpanded is false, so this new guard leaves the compact window visible while the following self.image_editor.clear() still unloads the backing image. Because CompactEditorWindow.ensureEditorLoaded() only reloads when currentIndex changes, any subsequent slider movement after a successful Save in the still-open compact editor calls set_edit_parameter() against a cleared editor and is ignored until the user closes/reopens or navigates away.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@faststack/app.py`:
- Around line 1074-1083: handle_key_from_compact_editor currently constructs a
QKeyEvent then calls keybinder.handle_key_press directly, bypassing the widget's
eventFilter (and its _dialog_open and mode guards). Instead of calling
keybinder.handle_key_press(event), forward the QKeyEvent through the same event
pipeline used elsewhere so eventFilter runs (e.g., call self.eventFilter(self,
event) or post/send the event via QApplication.postEvent/sendEvent to this
widget) and remove the direct keybinder invocation; this ensures the same guards
and routing logic are applied.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 43eeac72-9324-4868-904e-0c8651c78be9

📥 Commits

Reviewing files that changed from the base of the PR and between 114b0df and b07bc28.

📒 Files selected for processing (5)
  • faststack/app.py
  • faststack/qml/CompactEditorWindow.qml
  • faststack/qml/ImageEditorDialog.qml
  • faststack/qml/Main.qml
  • faststack/ui/provider.py

Comment thread faststack/app.py
@AlanRockefeller AlanRockefeller merged commit ea9c14d into main May 29, 2026
4 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jun 7, 2026
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.

1 participant