Skip to content

fix(ui): canvas filter and render size, recall shortcuts, prompt syntax, and hint popovers - #9881

Open
joshistoast wants to merge 6 commits into
mainfrom
fix/ui-fixes
Open

joshistoast wants to merge 6 commits into
mainfrom
fix/ui-fixes

Conversation

@joshistoast

@joshistoast joshistoast commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

UI fixes for the canvas, the image-recall shortcuts, prompt syntax and the field hint popovers:

  • ControlNet filter preview (Controlnet undefined to value validation #9872). Choosing a ControlNet model with a default preprocessor opened a filter session with auto-process on, but the session never processed its starting settings. Process is hidden while auto-process is on, and Apply needs a preview, so only Reset and Cancel stayed clickable. The session now runs its starting settings once, using the existing debounce. Choosing a model on a control layer with no content no longer opens a session, matching the Filter button.

  • Custom "Render at" size follows a locked ratio (Manual 'render at' needs to lock to aspect ratio #9873). The canvas dims sync now refits a Custom render size at roughly the same area when the locked ratio changes: preset, swap, turning the lock on, a bbox resize under the lock, or recall. While locked, editing one Custom side updates the other. Free bbox drags leave the Custom size alone, even when they land on a preset ratio. Before: 16:9 at 768×432, swap → still 768×432 (stretched output). After: 432×768.

  • Recall shortcuts work from Gallery (Recall shortcuts not doing anything #9874). A, S and P (plus D for use size and W for load workflow) were scoped to Preview only, but images are usually selected in Gallery, which holds focus there. They now work while Gallery or Preview has focus. R stays per widget, because Gallery binds its own remix. Widget hotkey scopes now accept several widget types, and the Settings conflict check handles overlapping scopes.

  • Attention syntax only for models that read it. Only the SD 1.5, SD 2.x and SDXL graphs encode prompts with Compel. Other bases (FLUX, Krea, SD3, CogView4, Z-Image, Qwen, video, external) ignore (word)1.2 / word+. On those bases the prompt editors no longer highlight attention syntax, and Ctrl+Up/Down no longer rewrites weights; the shortcut now targets only prompts that read attention syntax, instead of every text field. Dynamic-prompt syntax stays highlighted for every model. One base table drives both the editor and the graphs' Compel node choice; a test fails if they drift. Regional guidance prompts and the upscale graph follow the same table. The prompt-syntax docs and the prompt hint copy say which models support weighting and embeddings.

  • Hint popovers on scrubber inputs. Hints with legacy copy are added for:

    • denoising strength (the copy had been attached to the FLUX Redux select)
    • LoRA weight
    • control layer weight
    • regional reference weight
    • Krea-2 rebalance gain and seed-variance controls
    • control-layer and reference-image step ranges

    Every hint card now opens beside the panel, level with the label, instead of covering the field. It stays open while the pointer moves from the label to "Learn more". It closes about 1 s after the pointer stops short of the card, or when another hint opens. The aspect-ratio hint is removed: it no longer had a label, and wrapping the dropdown kept the card open.

Related Issues / Discussions

QA Instructions

  • pnpm check:release (in invokeai/frontend/webv2) passed in a clean worktree on the full branch: lint, 10,247 unit tests, 2,920 browser tests, fixtures, architecture/browser performance, project-file journeys, accessibility.

    • Three browser tests failed once under full-suite load and passed on every isolated rerun: modal hotkeys, toast contrast and the workflow style-preset picker.
    • A last hint-corridor change landed after that run; its hint, Field and ScrubberField browser tests and pnpm lint pass.
  • The prompt commit alone passes pnpm lint, the generation core unit tests and the prompt, hotkey and regional guidance browser tests.

  • Docs: pnpm test and pnpm build in docs/ pass, and the link validator is clean.

  • Browser check (mock backend), canvas project, Render at = Custom, ratio locked:

    • 16:9, width 768 → height links to 432.
    • Swap → 432×768.
    • Pick 1:1 → 576×576.
    • The values persist across reload.
  • Gallery recall: click a thumbnail, press p / s. The "Recalled prompts" / "Recalled seed" toasts appear and the values apply. This was checked against the mock backend with injected metadata.

  • Prompt syntax, browser-checked against the mock backend with a FLUX, a Krea-2 and an SDXL main model added through a local proxy (the mock serves only SD 1.5 main models):

    • Type a {red|blue} cat, (dog)1.2.
    • SD 1.5 and SDXL: (dog)1.2 is highlighted, and Ctrl+Up/Down rewrites the selection (cat → cat+, 1.2 → 1.1).
    • FLUX and Krea-2: (dog)1.2 is plain text, and Ctrl+Up/Down leaves the prompt unchanged.
    • {red|blue} stays highlighted on every model.
    • Switching back to SD 1.5 restores the highlighting and the shortcut.
  • Hints, browser-checked with hints enabled. Each card opened beside its panel:

    • denoising strength
    • control layer weight and step range (the card opens to the left of the Layers panel)
    • LoRA weight (SDXL)
    • Krea-2 rebalance gain, seed variance, variance strength and randomized channels

    The pointer reached "Learn more" without the card closing. The card closed after the pointer left, and moving to another label swapped the cards.

  • Regional reference weight and reference-image "Active steps" hints are covered by browser tests only.

  • Not browser-verified: Controlnet undefined to value validation #9872. The mock backend has no ControlNet model with a default preprocessor. To check on a real backend: add a control layer with content, pick a ControlNet model that has a default preprocessor (e.g. an SDXL depth model), and confirm a preview appears and Apply enables. Picking a model on an empty control layer should open no filter session.

Review

Resolved before merge:

  • A free bbox drag that landed on a preset ratio overwrote the Custom size. Locking that ratio afterwards did not refit it.
  • While typing, the linked Custom side snapped early.
  • The Gallery shortcut docs were missing the new keys.
  • The prompt hint copy claimed Compel and embedding support for every model.
  • The step-range and control-weight hint copy did not match the controls' ranges and behaviour.
  • A hint card could stay open after the pointer left, and the aspect-ratio card stuck open over its portalled listbox.

Remaining limits:

  • The first filter preview starts after the 400 ms debounce, rather than immediately as in legacy.
  • Custom side linking treats a preset label from a bbox drag as locked, because that is what the Size section shows. The sync itself refits only under a lock you set.
  • Undoing a bbox change refits the Custom size at the same area, which can land one grid step from the original. Widget values are not in undo history.
  • Scrolling or a focus change while the pointer travels to a hint card closes it after the normal 300 ms.
  • Fields without legacy hint copy (video, PiD steps, canvas tool options) still have no hint.

Compatibility / Rollout

  • No persisted schema changes. SD 1.5, SD 2.x and SDXL graphs build the same Compel nodes as before.
  • The performance baselines gain three source owners: canvasScaling.ts (grouped into the editor boot chunk), compel.ts and hintGeometry.ts. Request counts are unchanged.
  • The locale otherRawBytes figure goes from 200,480 to 205,278 on the routes that load en.json. Part of that growth was already on main; the new hint copy pushed it over. No timing figures were re-recorded.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Meaningful regression coverage added / updated where needed; obsolete tests/code removed
  • Persisted-state and API changes include required migrations / compatibility validation
  • Relevant performance/efficiency opportunities considered; material claims have evidence
  • Material review findings resolved and relevant checks rerun
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…hosen

Auto-process filter sessions now run their starting settings, so Apply is no longer stuck disabled.
Choosing a ControlNet model on an empty control layer no longer opens a filter session.
Preset, swap, lock and locked bbox changes refit the custom render size at about the same area.
Custom width and height link while the ratio is locked; free bbox drags leave them alone.
Recall, use-size and load-workflow keys now act on the selected image while Gallery or Preview has focus.
Widget hotkey scopes accept several widget types; the gallery shortcut docs list the new keys.
@github-actions github-actions Bot added frontend PRs that change frontend files docs PRs that change docs labels Oct 16, 2026
Highlight and Ctrl+Up/Down weighting only for SD 1.5, SD 2.x and SDXL prompts; other bases show plain text.
One base table now picks both the editor behaviour and the graphs' Compel prompt nodes.
Add legacy hint copy to denoising strength, LoRA, control and regional reference weights, Krea-2 controls and step ranges.
Open the card beside the panel and keep it open while the pointer moves from the label to the card.
Drop the aspect-ratio hint and the denoising copy misplaced on the FLUX Redux select.
@joshistoast joshistoast changed the title fix(ui): control filter preview, locked render size, and gallery recall shortcuts fix(ui): canvas filter and render size, recall shortcuts, prompt syntax, and hint popovers Oct 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs PRs that change docs frontend PRs that change frontend files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recall shortcuts not doing anything Manual 'render at' needs to lock to aspect ratio Controlnet undefined to value validation

1 participant