Skip to content

fix(photo): mac finish pass on text layers, the PJ-TX family pick and 8K typing - #6125

Merged
prakashUXtech merged 9 commits into
devfrom
fix/mac-finish-photo-20261031-114136
Nov 1, 2026
Merged

prakashUXtech merged 9 commits into
devfrom
fix/mac-finish-photo-20261031-114136

Conversation

@prakashUXtech

@prakashUXtech prakashUXtech commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Mac finish pass for the two boxes still open on #5951 (text layers in Photo): Return adding a text layer in the live app, and the 8K typing and Size-scrub budgets.

Refs #5951

What changed

  • A typed key no longer lays out the 8K editor. The open Type tool box was part of the canvas facet, so every key re-ran PhotoEditor's body on the whole 8K image (debug p50 74 ms, p95 176 ms before). The box is now its own textBox facet. Only PhotoTextBoxOverlay reads it, and the canvas reads the box at key time through the session. Test: PhotoFacetsTests.aKeystrokeMovesOnlyTheTextBox (a key moves only textBox), and RenderBudgetPhotoTextTests.typeTwentyCharsInThreeBodiesEach now gates at 0 editor bodies per key, down from 60 for 20 keys. The Tests/mutations/ plans for PhotoModel.PhotoFacets and PhotoApp.PhotoSession gain entries that empty the box's facet or fold it back into the canvas.
  • The wall-clock budgets now run. typeOnEightKInSixteenMs and a new textSizeScrubInSixteenMs were .disabled while they waited for a Tests/perf-suites.txt line. They now sit in RenderBudgetPhotoTests, which that file already lists, so perf-nightly runs them and they fail over 16 ms. The merge gate still skips them. scripts/test-scope timing is clean.
  • PJ-TX's Size step. Its typeValue typed into panel.textFields.firstMatch. Since the colour row landed, that is the hex field above Size, so "120" went into Color and no Text Size step came. It now types into the scrub's own editor (suite.scrub.typing). Found by this pass's journey run.
  • PJ-TX's Family step. It picked System UI, which a new layer already uses, so the pick made no Font step. It also read app.menus.firstMatch, which is the closed Apple menu. The journey now opens the inspector's menu, checks that Helvetica is listed, and picks it.

Proof

Proof: Live app: Return adds no text layer (PJ-TX, #4798) | PJ-TX (PhotoTextJourneyTests.testTitleOverPhoto) through the journey wrapper on this Mac, on this branch (head 2376f22, 11-01 02:43): XCUITest drove the built Photo.app with T, a click on the sky, SUMMER SALE, then Return | "Undo Add Text" appeared, a SUMMER SALE layer row sat above Background, and the canvas drew the words. The journey's next steps also passed: Family picked Helvetica from the open menu and made a Font step ("Undo Font"), then Bold. It then failed at Size (line 149) | photo-text-editing.png (the open box) and photo-text-done.png (the layer added) from that run's .build/ui-screens. Dev's scoped photo journeys run 41116708736 on 3d4c647 shows the same Return result
Proof: Typing budget on 800x600 with atMost 60; packet asks 8K; sizeScrub absent | swift test -c release -Xswiftc -DDEBUG --no-parallel through the gate on this branch: 20 keys into a box on a 7680x4320 image, and a 120-sample Size scrub on a text layer of the same image, in the real PhotoWindow | keystroke p50 4.92 ms, p95 7.27 ms (budget 16, target 8), window bodies 0; Size scrub p50 0.17 ms, p95 0.49 ms, window bodies 1 | RenderBudgetPhotoTests/typeOnEightKInSixteenMs, RenderBudgetPhotoTests/textSizeScrubInSixteenMs, RenderBudgetPhotoTextTests/typeTwentyCharsInThreeBodiesEach and sizeScrub all passed (6 tests in 4 suites, 48 s)

Proof: photo-text-inspector-light.png: "Weight" label with no control under it; no Italic checkbox visible | PhotoTextInspectorSnapshots.inspector re-rendered through the gate on this branch (11-01), the real PhotoWindow inspector on the window's live text services with a "SALE" layer at 120 pt; plus PJ-TX's live run above, where XCUITest picked Helvetica in the built Photo.app and then pressed Bold | under Weight sit nine chips, Thin to Black, with Regular selected. Under Style, Upright (selected) and Italic sit side by side, followed by Color #000000. Both modes are readable. In the live app the Bold chip made a weight step | photo-text-inspector-light.png, photo-text-inspector-dark.png (✔ Test inspector() passed); the live run's photo-text-editing.png / photo-text-done.png
Proof: No text colour: catalog has no text.set-color and TextStyleRows has no colour row; text.read always rgba [0,0,0,255] | the built afterglow CLI on this branch (debug, 11-01) on Tests/RealJobs/photo/sale-title/input/beach.png: photo text.add {"x":32,"y":24,"words":"SUMMER SALE"}, text.read, text.set-color {"rgba":[200,30,30,255]}, text.read again, then unzip -p a2.ora stack.xml | text.read read "rgba":[0,0,0,255] before and "rgba":[200,30,30,255] after. set-color reported "undoStep":"Text Color". The saved layer's afterglow:text attribute keeps rgba [200,30,30,255], so the colour survives a save. The inspector snapshot above shows the Color row (#000000 swatch with an eyedropper) | the CLI JSON output and the snapshot PNGs above
Proof: Stale header PhotoWindow+Text.swift:4 says commit adds nothing until TX-5 | read Sources/PhotoApp/PhotoWindow+Text.swift lines 1-5 on this branch's head | line 4 now reads "Return and losing focus .commit, Escape .cancel, and a commit adds a text layer through text.add". The TX-5 caveat is gone, and the header matches the live behaviour the Return proof above shows | the file on this head

Not done in this pass

  • No sample of the live Photo.app during typing. Journeys aren't allowed on this pass, and posting real input is off-limits, so the harness window is the measurement. Neither action moves existing pixels, so the compositor-transform rule doesn't apply here.
  • Neither the Size fix nor anything after it in PJ-TX (Center, Undo/Redo, save and reopen) has run in a journey yet. The rerun at 03:16 timed out launching Photo.app (66 s, no process ID, the Mac under load from two lanes' gates), and the wrapper refuses journeys between 03:15 and 06:15. The next scoped photo journeys run on dev settles it.
  • The journey's audit flagged two things outside this issue. One is a 5 pt overlap between the suite switcher's buttons (SuiteUI, the same overlap as SuiteUI: suite switcher's Library item overlaps Halo's by 5 pt (audit overlap fails Halo journeys) #6011). The other is two contrast hits in the right inspector (the file line, photo.adjust.header), measured while the Documents privacy prompt of the newly signed runner sat over that panel. Both screenshots show the text readable.

Snapshots

No PNG changed. photo-text-inspector-light.png and photo-text-inspector-dark.png re-render the same.

Fast-Check: pass
Head: 28e0168

The journey picked System UI, the family a new text layer already has, so
no Font step could follow, and it read the first of the app's menus, the
closed Apple menu. It now opens the inspector's menu button, checks the
shown menu lists Helvetica, and picks it by click or by type-select.
@prakashUXtech prakashUXtech added mac-finish Mac finisher pass PR quality-gate 10-26 audit bugs the Mac finisher fixes and proves in the built app labels Oct 31, 2026
…itor

The open box's words move to their own textBox facet, which only the box's
overlay reads, so a keystroke stops laying the whole editor out again.
The typing body test now allows no editor body, and the keystroke and Size
scrub p95 budgets are wall-clock tests waiting for their perf-suites lines.

Refs #6000
They sat .disabled waiting for a Tests/perf-suites.txt line, so nothing ran
them. RenderBudgetPhotoTests is already on that list, so they move into it:
enabled, failing over 16 ms, run by perf-nightly and kept out of the merge gate.
@prakashUXtech prakashUXtech mentioned this pull request Oct 31, 2026
6 of 7 tasks
@prakashUXtech
prakashUXtech marked this pull request as ready for review October 31, 2026 22:37
@prakashUXtech prakashUXtech added the fast-lane Merge automatically when small, green and outside protected paths label Oct 31, 2026
prakashUXtech added a commit that referenced this pull request Nov 1, 2026
…pshot (#6151)

Mac finish pass on Photo's Select. It covers #6018 (shared Select, with
Move folded into it), #6142 (closing a window cancels its canvas
renders) and #6144 (no painted-box re-read per redraw).

## Findings

1. Photo's Select icon didn't match the rest of the suite. #6018 gave it
`cursorarrow.click`, and at palette size that reads as a refresh or
rotate glyph. V is Select in every app, and Flare, Design and Halo all
show the plain `cursorarrow`.
   - Fix: `PhotoTool.select.systemImage` is now `cursorarrow`.
- Test: `PhotoToolsKeyTests.selectWearsTheSuitesSelectArrow` failed
before the fix and passes now.
2. The Select box disappeared over blue. SelectBoxMark drew a 1 pt
accent edge with no halo, so over a sky (accent on blue) the edge went
away. Every other canvas mark puts its ink on a paper halo.
- Fix: SelectBoxMark strokes `SuiteColor.overlayPaper` at
`SuiteSize.pointMarkPaper` under the accent edge. Design's marquee uses
the same mark and gets the same fix.
- Test: new `SelectBoxMarkTests`. Over the accent, the edge's red
channel was 24 everywhere before the fix and reaches about 139 with the
halo. Over white, the accent ink still shows.
3. No snapshot showed Photo's Select box.
- Fix: `PhotoEditorSnapshots.selectBoxDrag` drags from off the image
across the sun with the pointer still down. It checks the model's box
and the overlay's `photo.canvas.select-box` mark, then writes the PNGs.

## Snapshots

- New: `photo-select-box-light.png`, `photo-select-box-dark.png`. The
box edge is visible in both schemes.
- Changed: the Select button in every Photo editor shot's palette
(`photo-opened-*`, `photo-move-*`, `photo-selection-*` and so on) now
shows the plain arrow.
- Before: the palette showed the click-arrow glyph, and no shot had the
box.

## Profiling (RenderBudgetPhotoSelect, 24 MP)

- Debug: select redraw p95 54.5 ms, marquee 40.3 ms. 0 painted-box reads
over 30 redraws, so #6144 holds.
- Release (`-c release -DDEBUG -enable-testing`, three runs): select
redraw p95 was 36 to 44 ms and marquee 38 to 57 ms.
- Select click and Select box drag ran 0 editor bodies and 0 render
regions with the pointer down. A drag step does no CPU pixel work.
- The redraw figures are whole-window reruns, not drag steps, and Select
is no slower than marquee.
- `sample` attached to the test helper, but the run finished in about 6
s and the file came back with no stacks. The numbers above come from the
harness.

## API checks

- `NSWindow.willCloseNotification` (#6142): checked against Apple's
docs. It is posted with the closing window as its object and no
userInfo, which is how #6142 uses it.
- The xcode DocumentationSearch tool needs approval in unattended runs,
so I used the apple-docs server.

## Not fixed here (filed)

- #6149: picked layers show no outline on the canvas with Select.
- #6150: TransformRows stacks X, Y, W and H as four rows instead of
pairing X/Y and W/H.
- The Select hint in Tool Options runs to three lines. I left it alone;
it's copy, not a bug.

No `Supersedes` line: the open Photo finisher PRs #6125 (text layers)
and #6093 (file flow) touch other screens and files.

Refs #6012
Refs #6133
Refs #6136

FINISHER_GAPS: #6149 #6150

FINISHER_CI: pass f02d3df
@prakashUXtech
prakashUXtech merged commit 3dd5c67 into dev Nov 1, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-lane Merge automatically when small, green and outside protected paths mac-finish Mac finisher pass PR quality-gate 10-26 audit bugs the Mac finisher fixes and proves in the built app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant