feat/phase-4-authoring: authoring + parameter-fill flyout (stacked on #6)#7
Merged
Conversation
The Copy / Edit / Delete / favourite buttons on Snip cards become live, with
ContentDialogs for editing and a parameter-fill flyout for copy:
Copy
- Snips with no parameters copy the template directly.
- Snips with parameters open ParameterFillDialog (TextBox / ComboBox per
input, live preview, primary button gated on full resolution).
- On success: writes to clipboard via WindowsClipboardService, bumps
UsageCount + LastUsedAt, saves the store.
Edit / New Snip
- SnipEditorDialog binds to SnipEditorViewModel: title, command template
(monospace), description, tags (comma-separated), parameter rows with
add/remove and Text/Choice typing.
Delete
- Confirmation ContentDialog, then sets IsTrash = true and saves.
Favourite
- Star toggles IsFavourite + saves; glyph swaps via x:Bind function.
CLI authoring
- New CLI / Edit CLI buttons (Home and CLI view header).
- CliEditorDialog picks an image via FileOpenPicker (initialised against
the main window's HWND), normalises it to a 256² centre-square PNG via
WindowsIconNormaliser (Windows.Graphics.Imaging), and stores it under
<data>/icons/<cli-id>.png via IconAssetStorage.
- Clicking a CliCard on Home now navigates into that CLI.
New Core abstractions: IClipboardService, IIconNormaliser, IIconAssetStorage,
IShellInteractions (the App's WinUI ContentDialog presentations).
New Core view models: ParameterFillViewModel, ParameterInputViewModel,
SnipEditorViewModel, ParameterEditorRowViewModel, CliEditorViewModel.
ShellViewModel grows the commands (CopySnip, EditSnip, DeleteSnip,
ToggleFavourite, NewSnip, NewCli, EditCurrentCli, SelectCli). Test doubles
(FakeClipboardService, FakeShellInteractions, FakeIconAssetStorage) drive
the command flow in unit tests — 18 new tests, 106 total.
App-side platform services: WindowsClipboardService,
WindowsIconNormaliser (Windows.Graphics.Imaging),
WindowsShellInteractions (resolves MainWindow lazily for XamlRoot / HWND so
the singleton constructs before the main window exists).
This PR is the second in a stack of four. Base: feat/phase-3-shell.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Stacked PRs (e.g. Phase 4 → Phase 3 instead of → master) don't trigger the pull_request filter when their base isn't master. Trigger on every branch push so the stack gets exercised end-to-end. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PixelWidth / PixelHeight are already uint on BitmapDecoder, and Math.Min on two uints returns uint, so the explicit (uint) casts trip IDE0004 under TreatWarningsAsErrors. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
StuartMeeks
added a commit
that referenced
this pull request
May 29, 2026
feat/phase-5-platform: hotkey, tray, close-to-tray, file-picker (stacked on #7)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 4 of the build plan. Authoring + the parameter-fill flow.
Base: `feat/phase-3-shell` (PR #6). Once #6 merges, please retarget this PR to `master` and rebase. The diff against master would otherwise also show Phase 3.
What's live now
ParameterFillDialog(TextBox per Text param, ComboBox per Choice param, live preview of the resolved command, Copy disabled until fully resolved). On confirm: clipboard write +UsageCount+++LastUsedAt = now.SnipEditorDialogwith title / command template (monospace) / description / tags / parameters (Text or Choice, default, options). Add/remove parameters inline.IsTrash = true).IsFavourite, glyph swaps via x:Bind function binding.CliEditorDialogwith name + icon picker. Picked images go throughWindowsIconNormaliser(centre-square crop, 256² PNG viaWindows.Graphics.Imaging) andIconAssetStoragewrites to<data>/icons/<cli-id>.png.New abstractions in Core
IClipboardServiceIIconNormaliserIIconAssetStorageIShellInteractions— Core view models present dialogs by handing off to this; the App implements it via WinUIContentDialogs.New view models in Core
ParameterFillViewModel,ParameterInputViewModel,SnipEditorViewModel,ParameterEditorRowViewModel,CliEditorViewModel.ShellViewModelgrows the commands (CopySnip,EditSnip,DeleteSnip,ToggleFavourite,NewSnip,NewCli,EditCurrentCli,SelectCli).Tests
106 passing (up from 88). Three new test files:
ParameterFillViewModelTests— preview live-updates, copy-enabled gating, default pre-fill.SnipEditorViewModelTests— CanSave gating, BuildUpdatedSnip preserves identity, parameter add/remove, tag dedup.ShellViewModelCommandsTests— copy with/without parameters, edit replaces in-place, delete only after confirmation, favourite flips, new-CLI persists icon bytes viaFakeIconAssetStorage.What CI doesn't verify (please eyeball)
WinRT.Interop.InitializeWithWindow.Initializeagainst the main window HWND)Not in this PR (deferred)
CliCard— identicons still show; replacing them with the uploaded image lands in Phase 5 (alongside the rest of the platform polish).🤖 Generated with Claude Code