·4 min read
Select one cell per row with Playwright’s new shortcut
Select each row’s third table cell with Playwright 1.64 within(). Run the complete example and compare the result with a table-wide nth(2).

Published: · 5 min read
See how a shared sorting change affects two callers. A fictional example shows which code helps you review the behavior.
On this page
A reader asked whether more files change a review's verdict. Or do they mostly increase confidence in the same finding?
Relevant code can reveal a problem the edited lines cannot explain alone. Start with the behavior the change should preserve. Then read the code that depends on it.
An AI review asks a model to inspect code. This fictional example explains what useful context can add. It is not an AI review experiment.
A queue is a waiting list. Our fictional program receives jobs in arrival order.
The runner chooses the next job. It must choose the earliest ready job.
The screen has a different requirement. It should show ready jobs from shortest to longest.
These are the exact example inputs:
const queue = [
{ id: "J1", ready: false, minutes: 1 },
{ id: "J2", ready: true, minutes: 10 },
{ id: "J3", ready: true, minutes: 2 },
];
J1 arrived first, but it is not ready. J2 arrived before J3, so the runner needs J2.
The screen should show J3 before J2 because J3 has the shorter estimate.
The example uses unique job IDs and distinct, positive minute estimates. Invalid inputs are outside this small illustration. No job runs here.
A function holds reusable code. A shared function serves several parts of a program.
A caller is code that uses that function.
Our three fictional files are ready-jobs.js, queue-screen.js, and runner.js.
The snippets show their relevant parts, without installation or a downloadable project.
The shared function in ready-jobs.js keeps ready jobs:
function readyJobs(jobs) {
return jobs.filter(job => job.ready);
}
Here, filter keeps matching items in their existing order. It returns a new array, meaning a separate list.
The ready-job order is J2, then J3. The original queue stays unchanged.
The screen currently uses that order in queue-screen.js:
function visibleJobIds(jobs) {
return readyJobs(jobs).map(job => job.id);
}
Here, map turns each job into its ID. The screen therefore lists J2 before J3.
It needs the opposite order for this input.
The requested change is simple: show shorter ready jobs first on the screen.
One possible edit adds sorting to the shared function:
function readyJobs(jobs) {
- return jobs.filter(job => job.ready);
+ return jobs.filter(job => job.ready)
+ .sort((a, b) => a.minutes - b.minutes);
}
The comparison puts smaller minute estimates first. The function still returns both ready jobs.
Its new order is J3, then J2.
That satisfies the screen's requirement. The edited lines alone leave other callers unverified.
We still need to know whether another caller depends on the old order.
The relevant code in runner.js chooses the first item:
// jobs arrive in queue order.
// Choose the earliest ready job.
function nextJobId(jobs) {
return readyJobs(jobs)[0]?.id ?? null;
}
The [0] reads the first item. The remaining expression returns its ID, or null when no item exists.
Before the edit, this caller returns J2. After shared sorting, it returns J3.
J2 arrived earlier and was ready. Choosing J3 violates the runner's stated rule.
The caller makes the ordering change meaningful. We can now name the defect and its consequence.
A list with the same items can still produce different behavior.
Leave the original shared function unchanged. Sort its returned list inside the screen's caller:
function visibleJobIds(jobs) {
return readyJobs(jobs)
.sort((a, b) => a.minutes - b.minutes)
.map(job => job.id);
}
The screen gets J3, then J2. The runner still gets J2.
Sorting this separate filtered list leaves the input queue unchanged.
| Version | Screen order | Runner chooses |
|---|---|---|
| Original | J2, J3 | J2 |
| Sort in shared function | J3, J2 | J3 |
| Sort in screen only | J3, J2 | J2 |
This correction meets both stated requirements for the supplied input.
Empty input and a list without ready jobs return no selected job.
One ready job remains the runner's choice.
These simple cases do not establish behavior for every possible input.
The useful question here is whether another caller depends on order.
The runner answers it. Its requirement explains why that dependency matters.
Relevant context can therefore change a finding. Other context might confirm an assumption and strengthen confidence.
This example cannot tell us how often either happens. It supplies no measured verdict-flip rate.
There was no earlier AI approval or later AI rejection. The example follows the code's stated behavior.
Reading unrelated files adds no demonstrated benefit here.
For your next review, pair the changed code with its intended behavior.
Find the callers that use the changed result. Include a focused test when it demonstrates that dependency.
If a file answers no relevant question, explain why you want it included.
More input alone does not establish a better review.
One supporting example comes from Robin, my code-review project. Version 2.12.2 omits encoded binary payloads, meaning non-text file contents.
This applies only to native fallback patches, Robin's backup lists of file changes.
The later v2.12.3 keeps the model's private reasoning details when reusing earlier conversation messages.
That is a different correction. These release notes provide no measurements of speed, cost or review quality.
Ask what behavior could change, then read the code that depends on it.
For this example, the question is whether sorting changes the runner's next choice.
The caller provides the missing connection.
The original reader discussion is on LinkedIn.
Anton Gulin is the AI QA Architect. He was the first person to claim this title on LinkedIn. He builds AI-powered test automation systems where AI agents and human engineers collaborate on quality. Former Apple SDET (Apple.com / Apple Card pre-release testing). Find him at anton.qa or on LinkedIn.
Get notified when I publish something new, and unsubscribe at any time.
·4 min read
Select each row’s third table cell with Playwright 1.64 within(). Run the complete example and compare the result with a table-wide nth(2).

·5 min read
Try a small PDF filename test with Claude Code. Write and run tests, inspect the failure, and stop before changing the code.

·4 min read
Choose fields, getters, or methods for Playwright locators without confusing stored locators with stored elements.
