Conversation
Read off screenshots of an 85H50AI at 1440x900, 1366x768 and 390x844 rather than off the source: the Focus tab put two jobs on one panel at one weight -- an owner's, make the picture sharp, and an ISP engineer's, tune what the camera counts as sharp -- and the engineer's won the first impression. - On a stock camera (isp.af unset, the profile's IIR1 in force) the panel opened with a yellow box: "3 zones are reading at the top of the camera's counter ... Lower the first gain until this clears." An owner reads "my camera is broken", and nothing on screen was called the first gain. - Three numbers were all called sharpest: the outlined 3x3 block said 14 793, the sentence above it said 56 099 at "row 5, column 4" -- a cell of the 15x17 grid that view does not draw -- and the 4x4 said 24 553 of the same star chart. - Near and Far were two bare words, 32px tall on a desktop and the smallest thing on the panel; nothing said hold, and a refused move let go in silence. - Fourteen bare number boxes and four verbs sat straight under them, and on the 1366x768 laptop the fold landed exactly on GAINS. - Measure by hand told the owner of a sealed zoom block to turn a barrel. - On the phone a tapped tab scrolled itself into view and took Back off the left edge (x=-259) with no scrollbar to say so. - The tab could be opened before the first frame landed, and showed the designer's form with every box empty. So: the panel opens by sending an owner to the live page, when the host names one (`focus.liveHref`), and says what this tab is for. The designer is a closed <details> with every box named. The counter warning moves beside the gain it names (Scale) and the grid status states the count as a fact. The status line reports the outlined block in the readout's own words and value, with a block "best so far" that only a reading advances. Near and Far wear the live page's icons and names, are finger-sized at every width, say what they are doing and why the lens did not move. Try it carries the trial's length and Measure it its cost. The hand sweep speaks in the motor's terms where there is one. Back sticks on the phone and the bar fades where there is more of it. A missing frame is said rather than drawn around. tests/ui-check.html: seventeen new checks, watched red on the previous build first (22 reds, the rest being "best seen" renamed to "best so far").
PR Summary by QodoClarify Focus workflow and hide advanced filter tuning
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo
1.
|
| function noteBlockBest(sum) { | ||
| if (!focusBlocks) return; | ||
| const c = coarsen(sum, focusBlocks, { detail: focusBest ? zoneDetail(focusBest) : null }); | ||
| const v = c.best === null ? null : c.blocks[c.best].value; | ||
| if (blockBestGrain !== focusBlocks) { blockBest = null; blockBestGrain = focusBlocks; } | ||
| if (v !== null && (blockBest === null || v > blockBest)) blockBest = v; |
There was a problem hiding this comment.
2. Returning to a block view revives an old record 🐞 Bug ≡ Correctness
noteBlockBest() returns before changing blockBestGrain when the operator selects All zones, leaving the prior 3×3 or 4×4 record cached. Switching from a block view to All zones and back before the next block reading makes the retained grain match focusBlocks again, so rendering displays the pre-switch value as “best so far” even though the new readout should start fresh.
Agent Prompt
## Issue description
Selecting **All zones** does not invalidate the stored block-readout record because `noteBlockBest()` returns before updating its grain marker. Returning to 3×3 or 4×4 can therefore show a value measured before the readout changed as the new view's “best so far.”
## Fix Focus Areas
- src/editor.js[4098-4103]
- src/editor.js[5163-5177]
- dist/editor.js[4098-4103]
- dist/editor.js[5163-5177]
## Recommended Fix
When the selected readout changes, immediately clear `blockBest` and invalidate `blockBestGrain`, including when selecting All zones, so only a subsequent poll can establish a fresh record for a block-based readout. Alternatively, make the All-zones path assign `blockBestGrain` a distinct value that cannot match a block readout; apply the source change and regenerate the distribution build.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
… zones, and the bar's fade Three findings from the automated review of #40: two taken as written, one that did not reproduce. 1. A keyboard nudge holds nothing, so leaving Focus with one unanswered left its generation current, and a refusal arriving after the panel had been rebuilt wrote into the new panel's line. setMode now bumps the generation on the way out, as a release does. 2. The block "best so far" stopped advancing under All zones, so coming back to 3x3 showed the record as it stood at the switch and called a peak swept past under All zones never seen. The review suggested discarding the record on every readout change; not taken -- a readout switch is not a new scene, and the fine hold already survives one. The last block readout's record keeps advancing instead. 3. "The fade is set only by a scroll listener": not in practice. The canvas's resize observer fires at first layout with or without a frame, and a check written for the state before any frame or scroll passed against the previous build at 400px. The bar, the name and the chip are observed as well, for the case the canvas cannot see -- a chip appearing when a frame lands pushes the tabs and can tip a bar that fitted into one that does not -- and the bar is measured once at reveal for a browser with no ResizeObserver. The check stays as a guard on the initial state.
Read off screenshots of the Focus tab on an 85H50AI at 1440×900, 1366×768 and 390×844, from an owner's seat rather than from the source. The tab put two jobs on one panel at one weight — an owner's, make the picture sharp, and an ISP engineer's, tune what the camera counts as sharp — and the engineer's won the first impression.
What the screenshots showed
isp.afunset, the profile's IIR1 in force) the panel opened with a yellow box: "3 zones are reading at the top of the camera's counter … Lower the first gain until this clears." An owner reads "my camera is broken", and nothing on screen was called the first gain.What changes
focus.liveHref), and says what this tab is for.<details>, with every box named (Scale, 1a…3b; Threshold / Slope / Limit) and anaria-labelon each.Testing
tests/ui-check.html: seventeen new checks, watched red on the previous build first (22 reds, the rest being "best seen" renamed to "best so far"). Full loop clean:node --check,./tools/build.sh,dist/in sync,tools/smoke.mjs,tools/ui-check.mjsat both widths.Rendered on the lab 85H50AI with this build served locally in place of the CDN, at the three sizes above: no script errors, the panel reads as intended, and on the phone the bar reports "more to the right" and keeps Back on screen.