Skip to content

Self-test: scan a populated panel for translation and contrast (#777) - #785

Merged
CaYatur merged 1 commit into
mainfrom
test/smoke-populated-777
Oct 19, 2026
Merged

CaYatur merged 1 commit into
mainfrom
test/smoke-populated-777

Conversation

@CaYatur

@CaYatur CaYatur commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Part of #777, section 3.

The self-test's settings had no saved scenes, no clip cells with a preview and no sourceless slot. So the untranslated-text scan and the theme contrast audit never drew those screens. The selected scene row at 3.9:1 in Light (#775) was found by hand.

Change

After the i18n step opens the timeline and clip deck, the panel's own config object gets, in memory:

  • four scenes:
    • smoke-same, a copy of the current config, is applied as the selected row and changes nothing on screen;
    • white, black and gradient background scenes provide the preview cells;
  • clip slots:
    • three that reference those scenes;
    • a white SVG image;
    • white and black colour slots;
    • a slot with no source.

The slots go to the visible deck, grown to at least 3×4. The earlier clip-deck step leaves it at 2×2, and that clipped the cells on the first run.

Both scans open every fold. The theme step re-applies the selected scene after each theme pick, because any config change clears the highlight by design. It counts what it scanned and fails when the selected row, four preview cells or the sourceless slot were not drawn. Afterwards the scenes, slots, grid size and selected scene are restored. The settings file was already protected during the self-test.

Verified

  • --smoke with an isolated profile: PASS.
    • dolu panel tarandı: {active: true, thumbs: 4, noref: 1}.
    • About 3,040 texts per theme, up from ~2,680, none below the threshold.
    • No untranslated text.
  • The first two runs failed this new check, which is the point of it: the 2×2 deck, and the highlight cleared by the theme pick.
  • npm test: 3230 passed. The new test pins the populated step, the folds, the coverage check and the restore.

The self-test's settings have no saved scenes, preview cells or sourceless slots, so the untranslated-text scan and the contrast audit never drew those screens (the selected scene row at 3.9:1 in Light was found by hand, #775). The panel now gets, in memory: four saved scenes (white, black, gradient backgrounds, and a no-op one applied as the selected row), clip slots referencing them, a white image, white and black colour slots and a slot without a source, written to the visible deck and grown to at least 3x4 (an earlier step leaves 2x2). Folds are opened in both scans; the theme step re-selects the scene after each theme pick (any change clears the highlight), counts what it scanned and fails if the selected row, four preview cells or the sourceless slot were missing. Content is restored afterwards.

Verified: --smoke with an isolated profile PASS; ~3,040 texts per theme, none below threshold; the first run caught the 2x2 deck. Tests 3230.

Co-authored-by: caganturgut <271973834+caganturgut@users.noreply.github.com>
@CaYatur
CaYatur merged commit d0d50a8 into main Oct 19, 2026
5 checks passed
@CaYatur
CaYatur deleted the test/smoke-populated-777 branch October 19, 2026 22:37
@cayadraft

cayadraft Bot commented Oct 19, 2026

Copy link
Copy Markdown

@CaYatur

CaYaDraft — pull request

Summary
This pull request adds a self-test that populates the UI panel with scenes and clip slots to verify that translation scans and contrast audits correctly process populated panels. Previously, these scans failed because the test settings lacked the necessary content to render preview cells or sourceless slots. The change ensures the scan opens every fold, counts rendered elements, and fails if critical components (like the selected row or preview cells) are missing before restoring the original state.

Files

  • CHANGELOG.md
  • README.md
  • README.tr.md
  • ROADMAP.md
  • src/main/main.js
  • tests/ui-themes.test.js

Note
Nothing blocking is visible from the text.


Stopping here. I will not merge, push, or change this pull request until you ask.

/caya explain describes the diff. /caya plan previews the next edit. /caya revise adds a commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant