Commit Graph
8 Commits
Author SHA1 Message Date
spacedandy-agents-simplex 0c73033192 ci: read a capital I and a lowercase l as the same letter in desktop OCR
In the app's font they look alike, and run 38729120356 read the descriptions "CI seed group" and "CI seed channel" as "Cl seed ...", failing four checks.
2026-10-15 12:31:52 +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 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 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