Commit Graph
14 Commits
Author SHA1 Message Date
spacedandy-agents-simplex 78e136c2a3 ci: compare the directory count's text size with the description's by their ink in the desktop smoke test 2026-10-15 17:22:46 +00:00
spacedandy-agents-simplex b61a857c70 ci: let the desktop app reach the test names server directly, and log its debug output 2026-10-15 17:22:24 +00:00
spacedandy-agents-simplex 3908a19bc7 ci: wait for Your servers before opening the test server, and scroll to the names settings in the desktop smoke test 2026-10-15 16:41:38 +00:00
spacedandy-agents-simplex 32675818a9 ci: say in the desktop ui help that a capital I matches a lowercase l
The help text is part of the Claude job's prompt, so it describes the matching the helper actually does.
2026-10-15 13:16:17 +00:00
spacedandy-agents-simplex 15dd2c8851 ci: let an agent chain desktop ui commands, keep its token from what they start
ui do runs several helper commands in one call and stops at the first that fails, so an agent on the runner needs fewer turns for predictable sequences. The helper unsets CLAUDE_CODE_OAUTH_TOKEN first, so nothing it starts inherits the agent's credentials.
2026-10-15 11:50:44 +00:00
spacedandy-agents-simplex 5cae929f0c ci: find text by exact phrase first, report boxes and avatar colours in the desktop ui helper
A phrase that is exactly the text now wins over one that only contains it (the alert's Search button under "Search in Directory?", the Directory header next to the Search in Directory row), and words are compared by their joined characters, so OCR splitting "#ci_group" still matches. New commands: ui find prints a text's centre and box; ui avatar measures the profile image left of a list row's name, saves that area, and with a colour checks that it dominates.
2026-10-15 11:34:49 +00:00
spacedandy-agents-simplex bc41edd8e2 ci: judge each OCR word's background from the rows around it
Run 38715611090 still stopped at the profile screen: averaging 4x4 blocks and taking a 5x5-block median leaves large bold text in the estimate (the title read as a dark background) and lets the white labels lift a grey disabled button over the threshold. A map coarse enough for titles would swallow 55-pixel buttons, so each word's background is now the median of the rows 2 to 4 pixels above and below its box, read from the 8-bit grayscale screenshot, which also feeds both OCR passes. Checked offline on the screenshots and TSVs of runs 38712854507 and 38714550750: the first screen, the profile screen with its title and grey button, and the branch chat list with the typed text and the directory row all read correctly.
2026-10-15 09:57:48 +00:00
spacedandy-agents-simplex e3f0e45e59 ci: write the OCR background map with 8-bit samples
In run 38714550750 the background map judged the white title area dark and the grey "Create profile" button light, so both were dropped, and onboarding stopped at the profile screen on both apps. ImageMagick's Q16 build writes PGM samples as 16 bits unless told -depth 8, while the reader takes one byte per pixel. The reader now also refuses a map without 8-bit samples.
2026-10-15 09:47:56 +00:00
spacedandy-agents-simplex 81f7e0e8f5 ci: take each OCR word from the pass that matches its background
Run 38712854507 got through onboarding on both apps, but on the branch app the typed "ci smoke" was lost: the dark-text pass read it as "ci smokel" with confidence 6, below the cutoff, while the light-text pass read noise ("OKC!") at the same place, and its "i)" split "Search in Directory". The light pass reads the gaps between dark letters as text, and the dark pass reads noise inside the coloured buttons, so neither confidence nor a pass order decides well. A median of the downscaled screenshot gives the background luminance; a word counts only from the dark pass on light backgrounds and from the light pass on darker ones, with no confidence cutoff. Phrases are now built from neighbouring words, so a stray word elsewhere on the same row no longer splits one ("Be" and "free" were).
2026-10-15 09:38:57 +00:00
spacedandy-agents-simplex 45b3851746 ci: OCR dark and light text in separate passes
Run 38712060819 showed that one image for both polarities smears page text: the morphological open treats the white gaps between dark letters as light text. Dark text now comes from the local threshold of run 38707461053, which read the grey and dark onboarding text; light text, such as labels on coloured buttons, from the difference from an open, which leaves no ring at the button edge. The words of both passes are merged by position, keeping the more confident reading.
2026-10-15 09:25:36 +00:00
spacedandy-agents-simplex 85747f5734 ci: let tesseract binarise the normalised OCR image
In run 38711351160 the normalised image had no rings and showed the button labels, grey and dark text all dark on white, but the fixed 80% threshold turned every pixel with over 20% contrast black, so letters merged into blobs ("Be free" read as "Be tires"). With the background now uniformly white, tesseract's own threshold separates the text, so the image goes to it in grayscale.
2026-10-15 09:18:58 +00:00
spacedandy-agents-simplex 4fa605d056 ci: read text of both polarities from one background-normalised image
Run 38707461053 read the grey onboarding text after the local threshold, but not the white labels on the blue buttons: in the negative image the threshold drew a thick ring around each button, and tesseract output nothing inside it. The text image is now the difference of the screenshot from its morphological close and open, so dark and light text both become dark on white and step edges between regions cancel; one tesseract pass instead of two. Each shot keeps that image and tesseract's TSV in UI_OUT/ocr.
2026-10-15 09:13:01 +00:00
spacedandy-agents-simplex f4aad3727d ci: threshold screenshots locally before OCR in the desktop ui helper
In run 38702315040 the app started under Xvfb and showed onboarding, but tesseract's single global threshold, pulled down by the black screen outside the window and the illustration, lost the grey text and the white labels on the blue buttons, so "Create your profile" was never found. A local adaptive threshold (-lat) on the enlarged grayscale image and on its negative turns both into dark text on white. Each shot now also keeps the two images OCR read, in UI_OUT/ocr.
2026-10-15 08:41:13 +00:00
spacedandy-agents-simplex 86358ba5bc ci: build the desktop app for Linux, run a UI smoke test under Xvfb and the desktop tests
First iteration on f/ci-desktop: the core job builds libsimplex.so with scripts/desktop/build-lib-linux.sh on ubuntu-24.04 (GHC 9.6.3, direct-sqlcipher +openssl, no VLC) and caches it by source hash, with the cabal store cached separately. The app job builds :desktop:createDistributable with Corretto 17 and the repo's assets, runs :common:desktopTest, then starts the app under Xvfb and openbox with software rendering and drives onboarding to the chat list and typing in the search field with the ui helper (xdotool input, tesseract OCR to find text), saving numbered screenshots, the text read from them and a step log as artifacts.
2026-10-14 17:33:34 +00:00