Repository navigation
Look at a window before calling it done: screenshot actions and Qt warnings, unseen-window check, steadier repeats, project-Python checks - #146
Merged
Conversation
…indow check, steady repeats
From a real session that 'fixed' a double-click feature in a PyQt6 camera wall four
times, checking only imports and unrelated tests, while the user saw a blank window
each time. The cause was printed by Qt (setLayout on a widget that already had a
layout), and only showed after a double-click.
- screenshot actions (Python Qt programs): click / double_click / right_click a point
or a widget by its text, key (with modifiers), type, wait, run by the Qt hook before
the picture; the result says what each step hit.
- A request that changed a Python file importing a GUI toolkit, with no screenshot or
view_image, is sent back once before the answer counts.
- The repeat check ignores timings and clock times, so the same test run four times
('75 passed in 0.14s', '0.12s') counts as a repeat.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A real run on the camera wall ended after two dropped replies, and nobody could see what the model had been thinking: the session doesn't keep them. Now the dropped reply (thinking and text) is saved with the other long outputs and the message gives the path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…f reasoning about it In a real run the model's dropped thinking said 'let me create a test config and run the app' ten times without doing it. The note after such a reply now says: if you were about to check something by running it, run it now; for a window, take a screenshot (with actions for clicks or keys). Co-Authored-By: Claude Opus 5.5 <[email protected]>
In a real run the model double-clicked the camera with the new actions and the cause, 'QWidget::setLayout: ... which already has a layout', was in what the program printed, among 30 lines of camera logs. The model noticed it and then went back to its own theories. Qt's warnings are now taken from everything the program printed (not only the shown end), without repeats or offscreen noise, and listed first: 'Qt printed warnings (they often name the cause)'. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A real run on the camera wall ended with lcode's checks failing: they ran 'python -m unittest discover' with the Python on PATH, which has neither the project's dependencies (PyQt6, PyAV) nor a way to run its pytest-style tests. The model then 'fixed' that instead of the user's problem. - Python checks run with the project's .venv/bin/python (or venv, env) when there is one. - Tests that import pytest, or a requirements file listing it, get pytest without a pytest configuration. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…line Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merged
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.
Why
A real session asked lcode (qwen3.6-35b) for a double-click feature in a PyQt6 camera wall: double-click a camera to fill the window, double-click again for the grid. The model "fixed" it four times, while the user saw a blank window each time and finally a grid of blank cameras.
How the model checked its work: an
importand the project's 75 tests, which cover the config and the camera reader, never the window. It never ran the program or took a screenshot. It also ran the same tests four times in a row.The cause was printed by Qt the moment the double-click happened:
QWidget::setLayout: Attempting to set QLayout "" on FocusedCamera "", which already has a layout. The full-screen widget created a layout and then tried to install a second one, so it stayed empty.Why lcode didn't catch it:
75 passed in 0.14s, then0.12s, as different results.What changes
actionsrun in the Qt hook before the picture:click/double_click/right_clickat a point (300,200, window coordinates) or on a widget by its text (double_click Camera 1),key Escape/key ctrl+s,type …,wait 2.QtTest, with a 0.4 s pause after each. The report lists what each step hit, or why it couldn't, before the window measurements.checks.unseen_windows): when a request changed a.pyfile that imports PyQt5/6, PySide2/6, tkinter, Kivy, wx orgi.repository, and the model used neitherscreenshotnorview_image, it's sent back once. The note says to look at the window, with actions if the change shows after a click, or to say plainly that it's unchecked. It runs where the checks run (main agent, not plan mode) and is off withchecks = "off".0.14s,250 ms,2 minutes) and clock times are masked before results are compared, so counts and other output still have to match.Added after the first real-model runs (below):
.venv/bin/python,venv,env). Tests that import pytest, or a requirements file listing it, get pytest without a config. In run 4,python -m unittest discoverfrom PATH failed on the project's imports, and the model chased that.Real-model runs (qwen3.6-35b, 64K,
-p, isolated copy of the camera wall in its broken state)The project ran in its own fresh venv, with cameras at TEST-NET addresses (192.0.2.x), and got the user's own words: "I double click a camera: it fills the whole window but I see only a white screen…". The user's original session made 4 "fixes", never ran the app, and never found the cause.
loop)actions: ["double_click 194, 160"]and sawFocusedCameraholding only the ✕ button. Its saved thinking noticed thesetLayoutwarning, then drifted and loopedSo, with this branch the model finds and fixes the cause of the white screen, which it never did before. The small model doesn't finish the whole feature in one request: the return to the grid needs another round. The user's camera wall has a separate, simpler fix (hide the other cameras), verified with screenshots and 3 window tests.
Checks
tests/test_look.py(17 tests): action parsing and its error messages, where actions are refused, the report lines, the tool passing actions through and rejecting bad ones, the nudge (once; not after a screenshot; not for non-GUI files; not with checks off), and timing-only repeats.LCODE_TEST_QT_PYTHON(skipped in CI, which has no Qt): it double-clicks a label by its text, types into the focused field, clicks a button twice, and gets an error for a missing widget. Run locally and passed.screenshots.takewithactions=["double_click Camera 1"]:setLayoutwarning, which is the cause.tests/test_look.py,tests/test_stuck.py,tests/test_checks.py).🤖 Generated with Claude Code