# Changelog

## [1.7.0] - 2026-10-17

### Added
- **Color Grade…** in the Other menu — grades a **copy** of the current image and opens the result as a new tab (`<name>_graded`); the original is never changed. Pick a **reference image** (a file, or **Paste reference from clipboard**) and press **Match** to set the grade so the picture takes on the reference's tones and colours; every control stays editable afterwards. Basic, Tone, Lift, Gamma, Gain and Offset controls are grouped with a reset per group, a double-click reset per control and Reset All, and the Master/Red/Green/Blue tone curves and the four hue curves can be drawn by hand. The preview updates live from a reduced copy; Apply grades the full-resolution pixels. **Save Grade…** and **Load Grade…** keep a look as a `.json` file, and **Export LUT…** writes the whole grade as a 65³ `.cube` LUT (usable as a Shot-Swap Look).

### Changed
- **Automated tests no longer get in your way.** The end-to-end suite now runs Peashell off-screen, out of the taskbar and without taking focus, the same way PeaStudio's does, so a test run never covers or interrupts what you are working on. The two tests that must press real keys in the foreground (the Ctrl+S save and the hotkey checks) only run when asked for with `PEASHELL_HOTKEY_E2E=1`.

## [1.6.7] - 2026-09-03

### Changed
- **The prompt in Prompt Metadata is now easy to read** — bigger type with more line spacing, a wider dialog, and slightly larger text for the render record and the file path underneath.

## [1.6.6] - 2026-09-03

### Added
- **Prompt Metadata…** in the Other menu — shows the AI prompt that made the picture you have open, and the render record beside it (engine, model, source image, reference sheets, seed, when it was made). Peashell looks in the file itself first (PNG text chunks, JPEG comment segments) and then at the `<name>.prompt.txt` file beside it, which is where formats that cannot hold a prompt keep theirs. **Copy prompt** puts the text on the clipboard; **Show in folder** opens the file where it lives. If nothing is stored, it says so plainly and shows no prompt at all — a prompt you did not write is worse than none.

## [1.6.5] - 2026-09-01

### Added
- **Add Film Grain now has a Shot Swap mode.** Switch the dialog to "Shot Swap" and it offers that app's own two settings — stock (35mm or 16mm) and amount — and lays down the same grain Shot Swap renders. So you can open a still here, find a look you like, then put the same stock and amount into Shot Swap's Project Settings and get it back. In this mode the preview is exact rather than an approximation: what you see, including as you drag around the picture, is the grain you will get. Peashell's own mode (amount, grain size, colour) is still there on the other tab.
- When you capture a still out of Shot Swap to work on here, set its grain to Off first — Shot Swap bakes grain into captured frames, and grain on top of grain is nobody's idea of a good time.

## [1.6.4] - 2026-09-01

### Added
- **New "Other" menu on the toolbar**, holding two filters that work on a **copy** of the current image — each opens the result in a new tab, so the picture you started from is never changed.
- **Apply LUT…** — pick a `.cube` colour LUT (3D or 1D) and Peashell grades a copy with it. Handles the `DOMAIN_MIN`/`DOMAIN_MAX` range tags, keeps transparency, and says plainly what is wrong with a file it cannot read instead of half-applying it.
- **Add Film Grain…** — adds photographic grain, with **Amount**, **Grain size**, and an optional **Colour grain** tick box. The preview shows the middle of the picture at full size; drag inside it to look around the image before you commit. Grain is strongest in the mid-tones and eases off towards black and white, the way grain behaves on a print, and the size setting is judged against the whole picture so the same setting looks the same on a small file and a large one.

### Fixed
- **Ctrl+S no longer stops working in other applications while Peashell runs.** Peashell reserves Ctrl+S, Ctrl+Shift+S, Ctrl+N and Ctrl+Shift+N with the OS while its window has focus and hands them back when it loses focus. If that hand-back was missed, the keys stayed reserved — every other program on the machine (Blender, Notepad, anything) lost Ctrl+S until Peashell quit. They are now released on hide, minimize and close as well, and a once-a-second check releases them if focus was lost without notice.

## [1.6.2] - 2026-08-08

### Added
- **Save As now offers a "Save as type" list** — PNG, JPG, WEBP, and PSD (plus the document's current format, listed first). Picking a type saves in that format; the file's bytes always match the extension you end up with.
- **Saving as PSD from Photopea's own File menu now re-targets the Save button.** After a File → Save as PSD, the toolbar Save (and Ctrl+S) overwrites that `.psd` instead of the originally opened file. Exports (PNG/JPG/… downloads) still leave Save alone.

### Fixed
- **The white "document.referrer is empty" toast on every launch is gone.** The packaged app now serves its own shell over a loopback web server (127.0.0.1, fixed port) instead of loading it from disk, so the embedded Photopea sees a real referrer — the same way the dev build always did. One-time side effect: the remembered JPEG/WEBP quality and New-document size reset to defaults.

### Changed
- The user manual now publishes to the same live WebDAV folder as the ZIP (`widgetgadget.com/cw1/Peashell/`, short link `cw1.me/peashell-docs`) — live immediately, no follow-up site publish. Refreshed the About page hero image (smaller file).

## [1.6.1] - 2026-07-14

### Added
- **JPEG / WEBP export quality** — the Export menu now has a quality slider (and number box, 1–100, default **85**) that controls the compression quality of JPG and WEBP exports. Lower it for smaller files, raise it for higher fidelity. The setting is remembered between sessions and also applies when you Save As to a `.jpg`/`.webp` file. PNG, SVG, PSD, GIF, and BMP are unaffected.

## [1.6.0] - 2026-07-06

### Added
- **New ▾ menu** on the New button: **Blank document…** opens a size dialog (width/height/DPI with presets; the size is remembered and reused by a plain click on New), and **From Clipboard** opens the image currently on the clipboard as a new tab — the menu shows its dimensions and is disabled when the clipboard has no image.
- **Ctrl+S, Ctrl+Shift+S, Ctrl+N and Ctrl+Shift+N now trigger Peashell's own Save, Save As, New, and New-from-Clipboard** — even while typing/working inside the editor. Previously Ctrl+S was captured by Photopea and saved a copy into your Downloads folder instead of overwriting your file.
- **PSD** added to the toolbar Export menu.

### Fixed
- Saving a `.bmp` file no longer silently writes PNG data into it — BMP files are now saved as real BMPs.
- **Save As / Export now honor the extension you type.** Typing `photo.jpg` in a dialog that suggested `.png` previously wrote PNG bytes into a `.jpg` file; the image is now re-exported in the format matching the name you chose.
- Closed a race where switching tabs inside Photopea at the exact moment of a Save/Export could write one document's pixels to another document's file. The document is now exported and identified in a single atomic step and verified before writing.
- Closing a tab inside Photopea now also forgets its file link. Previously a later document that happened to get the same tab name could silently overwrite the closed file on Save.
- Saves made through Photopea's own File menu now default the save dialog to the original file's folder (when the name matches a recently opened file) instead of always Downloads, and the saved file is added to the recent-files list.

### Changed
- The close-confirmation is honest now: it says changes **may** be unsaved (Photopea can't tell Peashell what was already saved with the toolbar) and shows the file and time of your last save to disk.
- Toolbar **New** creates the document at the last-used size instead of always 1920×1080.

### Developer
- Pruned unused template scaffolding (StatusBar/LogViewer/AboutModal/DropZone/UpdateBanner components, `main/ipc`, `projectStore`, `SidecarManager`, `useAppStore`, `pathUtils`, the legacy `window.electron` bridge, and the generic `fs:*`/`dialog:*` IPC handlers).
- Migrated off Electron 43 deprecations: `protocol.handle` replaces `registerFileProtocol`; `child-process-gone` replaces the removed `gpu-process-crashed` event.
- Rewrote the project `CLAUDE.md` to describe the real codebase.
- E2E: Photopea stub now models `app.documents` as an indexable array with `close()`; new specs cover Ctrl+S interception, extension reconciliation, and the New menu (blank sizes + clipboard).

## [1.5.4] - 2026-07-03

### Fixed
- Fixed the editor rendering washed-out (grayed) after opening a large image and pressing Ctrl+A (Select All). Peashell now focuses the editor when it opens an image, which avoids a Windows graphics glitch that could gray out the whole editor until the app was restarted.

## [1.5.3] - 2026-07-03

### Changed
- Upgraded the app runtime from Electron 28 to Electron 43 (Chromium security + performance updates from the last two years).

### Fixed
- Drag-and-drop of files kept working after the runtime upgrade (newer Electron removed the API the drop zone relied on; it now uses the supported replacement).

### Developer
- Dev builds can run alongside the installed app: launching with `PEASHELL_ISOLATED_USERDATA=1` gives the dev instance its own settings/profile directory.

## [1.5.2] - 2026-07-01

### Changed
- Refreshed the app icon — a red **P** and teal **S** with a small pea-sprout leaf, on a rounded black tile. Shown in the taskbar, window, and Explorer.

## [1.5.1] - 2026-06-22

### Changed
- New app icon — a red **PS** mark with a pea pod and seashells ("Peashell"). Shown in the taskbar, window, and Explorer.

## [1.5.0] - 2026-06-21

### Added
- **Revert** button in the toolbar (next to Save As) — discards all unsaved changes to the active tab and reloads it from the last version saved on disk, after a confirmation. The reloaded file stays linked to its original, so **Save** keeps overwriting the same file. The button is enabled only for tabs that have a file on disk (greyed out for new documents and unsaved AI/Straighten results).

## [1.4.0] - 2026-06-18

### Added
- **Straighten & Crop Photograph** in the AI menu — flattens a photo of a print, document, or whiteboard shot at an angle. It auto-detects the four corners, lets you fine-tune them by dragging (with a zoom magnifier for precise placement), shows a live corrected preview, and opens the de-warped result as a new tab. An **Aspect** control keeps the photo's true proportions automatically (no stretching) or forces a standard print ratio (3:2, 7:5, 4:3, 5:4, or Square).

## [1.3.0] - 2026-06-16

### Added
- **macOS support** — Peashell now ships as a Developer ID–signed macOS app (Apple Silicon), with the same Photopea editor, AI menu (Upscale, Lanczos, Remove Background), and image file handling as the Windows build.
- The toolbar **⚙ default-app button now appears on macOS** too. On Mac it opens a short guide for making Peashell your default image editor; on Windows it still opens Windows Settings to set the default.

## [1.2.2] - 2026-06-16

### Changed
- Updated the app logo and icon artwork (Windows, macOS).

## [1.2.1] - 2026-06-16

### Changed
- Refreshed the app icon with softly rounded, transparent corners, and added a macOS app icon.

## [1.2.0] - 2026-06-16

### Added
- **Help button** in the toolbar (next to the ⚙ Settings button) that opens the Peashell documentation in your browser.

### Changed
- Updated the Peashell app logo and window/taskbar icon artwork.

## [1.1.1] - 2026-06-16

### Changed
- Updated the Peashell app logo artwork.

## [1.1.0] - 2026-06-16

### Changed
- **Renamed the app to Peashell** (formerly "Photopea Windows").

> Note: because of the rename, saved window size/position and your recent-files list reset to defaults on first launch of this version.

## [1.0.7] - 2026-06-15

### Added
- **AI menu** in the toolbar with on-device image tools (nothing is uploaded). Each tool runs on the active tab and opens its result as a new tab:
  - **Upscale 2× / 4× (AI)** — AI super-resolution (Real-ESRGAN) that adds detail; needs a graphics card (Vulkan).
  - **Upscale 2× / 4× (Lanczos)** — fast, high-quality classic resize that works on any PC.
  - **Remove Background** — automatically cuts out the subject and makes the background transparent.

## [1.0.5] - 2026-06-06

### Changed
- The "Close Peashell?" confirmation now appears **only when there are genuinely unsaved changes**. Closing with nothing open — or with a document you haven't edited — now closes immediately with no prompt.

## [1.0.4] - 2026-06-06

### Fixed
- Fixed the app getting stuck unable to open any files after a Photopea dialog (e.g. Image Size) was open when a file was double-clicked. It now recovers on its own instead of needing a restart.

## [1.0.3] - 2026-06-06

### Fixed
- The window can now always be closed. When documents are open you get a "Close Peashell?" confirmation (Cancel / Close Anyway); previously Photopea's unsaved-changes guard could make the window silently refuse to close.

### Added
- Full end-to-end test suite (Playwright) that launches the real app and covers the toolbar, opening files (including the multi-file tab-name case), Save / Save As / Export, recent files, file-association routing, and the close confirmation.

### Changed
- Updated the app logo and icon.

## [1.0.2] - 2026-06-05

### Fixed
- Opening several images at once (multi-select or double-clicking multiple files) now gives each tab its real filename instead of every tab showing `file.png`. Saves again target the correct original file.

## [1.0.1] - 2026-06-04

### Added
- Native Windows desktop wrapper around the Photopea editor, with a thin toolbar above Photopea's own menu bar.
- Toolbar actions — **New, Open, Save, Save As, Export** (PNG/JPG/WEBP/SVG) — all using native Windows file dialogs instead of Photopea's file browser.
- Open a file as a new tab in the running editor; **Save** overwrites the original file in place.
- Multi-tab Save targets the correct file — tabs are named by their filename, with a `(2)` suffix for duplicates, so the right original is always overwritten.
- **PNG file association**: double-clicking a PNG opens it as a new tab in the single running window (no more a new app instance per file). A settings button registers the app and opens Windows "Default apps" to set it as the default PNG editor.
- **Recent files**: right-click the Open button to see the last 12 opened files (full path) and reopen one.
- App version shown at the right of the toolbar; window position and size are remembered between launches.

### Notes
- Photopea's native "reopen last documents on launch" is not available in this wrapper (a side effect of enabling Photopea's embedding API).
