diff --git a/docs/superpowers/contracts/app-icon-mahjong-2026-11-21.json b/docs/superpowers/contracts/app-icon-mahjong-2026-11-21.json new file mode 100644 index 00000000..b6c08263 --- /dev/null +++ b/docs/superpowers/contracts/app-icon-mahjong-2026-11-21.json @@ -0,0 +1,10 @@ +{ + "title": "Mahjong launcher icon", + "objective": "Register a family icon for com.kuhy.mahjong that passes every icon_qa check.", + "acceptance_criteria": [ + "apps.get_app('mahjong') renders the standard set", + "icon_qa.py prints PASS for all six checks" + ], + "out_of_scope": ["Changing other apps or style.py"], + "verifier": "pytest python_pkg/app_icons/tests; ~/.claude/skills/app-icon/scripts/icon_qa.py" +} diff --git a/docs/superpowers/evidence/app-icon-mahjong-2026-11-21.json b/docs/superpowers/evidence/app-icon-mahjong-2026-11-21.json new file mode 100644 index 00000000..2324aeae --- /dev/null +++ b/docs/superpowers/evidence/app-icon-mahjong-2026-11-21.json @@ -0,0 +1,25 @@ +{ + "intent": "com.kuhy.mahjong (kuhyx/mahjong-teacher app/) gets a family launcher icon: an upright tile with one dot.", + "scope": [ + "python_pkg/app_icons: glyph, registry entry, launcher label, registry test", + "No style.py or other app changes" + ], + "changes": [ + "New glyph mahjong-tile in _glyph_art_extra.py (dot r=52 so it does not merge with the wall at 48px)", + "Registry entry mahjong (Android only) and label Mahjong" + ], + "verification": [ + { + "command": "pytest -q python_pkg/app_icons/tests --no-cov", + "result": "pass", + "evidence": "154 passed" + }, + { + "command": "icon_qa.py /app", + "result": "pass", + "evidence": "bw, px48, px16, bg, accent, svg all PASS" + } + ], + "risks": ["None outside the new entry"], + "rollback": ["git revert this commit", "rerun app_icons tests"] +} diff --git a/docs/superpowers/evidence/brother-printer-stuck-job-2026-10-12.json b/docs/superpowers/evidence/brother-printer-stuck-job-2026-10-12.json deleted file mode 100644 index 85f43805..00000000 --- a/docs/superpowers/evidence/brother-printer-stuck-job-2026-10-12.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "intent": "The Brother status report stops lying while a job is stuck: it names the real reason the USB probe was skipped, installs pyusb on its own, and flags a stalled job (paper misfeed) or a hung backend left behind by a cancelled job.", - "scope": [ - "python_pkg/brother_printer/{_stuck_job,_cups_fallback,cups_service,constants,data_classes,display}.py, run.sh, tests", - "Non-goal: fixing the printer's paper pick-up, which is mechanical" - ], - "changes": [ - "USBResult.probe_note carries _usb_probe_skip_reason(): CUPS busy / pyusb missing / printer silent; display prints it instead of 'pyusb not available'", - "run.sh ensure_pyusb: probes /usr/bin/python3 (what sudo runs; the user's python3 is a pyenv shim) and pacman-installs python-pyusb", - "_stuck_job.py: scans /proc for usb://Brother backends; orphaned backend of a cancelled job -> cups:backend-orphaned + y/N SIGKILL offer; job-impressions-completed frozen 15 s -> cups:job-stalled", - "41xxx status now reads 'Out of Paper / not feeding' since a misfeed sets the same paper-empty bit" - ], - "verification": [ - { - "command": "./run.sh during stalled job 105 (2026-10-12 16:01)", - "result": "pass", - "evidence": "Note: USB status probe skipped: CUPS has a job on the printer; status obtained via CUPS only." - }, - { - "command": "fake orphan (exec -a usb://Brother/... sleep 40) + display_usb_results with stdin y", - "result": "pass", - "evidence": "Queue blocked by a hung backend of a cancelled job / Kill hung backend PID 960784 ... Backend killed; process gone" - }, - { - "command": "flag_stuck_job with frozen vs moving counter", - "result": "pass", - "evidence": "frozen: cups:job-stalled after 15.0s; moving: cleared after 1.0s" - }, - { - "command": "python3 -m pytest -q --cov=python_pkg.brother_printer --cov-branch python_pkg/brother_printer/tests", - "result": "pass", - "evidence": "431 passed, coverage 100.00%" - }, - { - "command": "lpr Krasnale-sie-rzadza.pdf (jobs 106, 107 pages 52-55), monitored via ipptool", - "result": "pass", - "evidence": "all 55 pages on paper, user-confirmed; printer back at 10001 Ready" - } - ], - "risks": [ - "Stall window is 15 s: a healthy run froze the counter up to ~9 s, so a very slow first page could false-flag", - "A status run during printing now blocks up to 15 s while it samples progress" - ], - "rollback": [ - "git revert the commit", - "Run ./run.sh on an idle printer and confirm Ready 10001" - ] -} diff --git a/python_pkg/app_icons/_apps_more.py b/python_pkg/app_icons/_apps_more.py index d861fcef..215c0e00 100644 --- a/python_pkg/app_icons/_apps_more.py +++ b/python_pkg/app_icons/_apps_more.py @@ -91,4 +91,13 @@ MORE_APPS: Final[tuple[AppIcon, ...]] = ( # Android only: the desktop half is the server's own web page. linux=False, ), + AppIcon( + key="mahjong", + repo=_HOME / "src/mahjong-teacher/app", + accent="#B8862E", + glyph="mahjong-tile", + icon_name="mahjong", + # Android only: the PC plays the same game in a normal browser. + linux=False, + ), ) diff --git a/python_pkg/app_icons/_glyph_art_extra.py b/python_pkg/app_icons/_glyph_art_extra.py index c6a5a28a..0b1389b1 100644 --- a/python_pkg/app_icons/_glyph_art_extra.py +++ b/python_pkg/app_icons/_glyph_art_extra.py @@ -80,3 +80,16 @@ _CAMERA = """\ A 64 64 0 0 1 768 400 L 768 688 A 64 64 0 0 1 704 752 L 320 752 \ A 64 64 0 0 1 256 688 L 256 400 A 64 64 0 0 1 320 336 Z"/> """ + +# A mahjong tile -- mahjong (com.kuhy.mahjong), the Riichi teaching game: one +# upright tile showing the one-of-circles dot. The game's own object, and no +# other family glyph is a tall rounded card with a single dot. +# +# Geometry, ink x=326..698 (372 wide), y=236..788 (552 tall): +# tile rounded rect x=362..662, y=272..752, corner r=56 (stroked). +# dot filled circle r=52 about (512,512). Ink gap dot->tile wall is +# 150-52-36 = 62px sideways: r=72 left 42px, which merged into the +# wall at 48px (icon_qa px48), so the dot stays small. +_MAHJONG_TILE = """\ + + """ diff --git a/python_pkg/app_icons/glyphs.py b/python_pkg/app_icons/glyphs.py index 4125434c..3c38ac30 100644 --- a/python_pkg/app_icons/glyphs.py +++ b/python_pkg/app_icons/glyphs.py @@ -39,6 +39,7 @@ from python_pkg.app_icons._glyph_art_extra import ( _CAMERA, _HEADPHONES, _LIGHTBULB, + _MAHJONG_TILE, _PROMPT_BUBBLE, ) from python_pkg.app_icons._glyph_art_more import ( @@ -130,6 +131,7 @@ GLYPHS: Final[dict[str, Glyph]] = { _SCREEN_TICK_PLAY, ), Glyph("square-tick", "Rounded square holding a tick", _SQUARE_TICK), + Glyph("mahjong-tile", "Upright tile with one filled dot", _MAHJONG_TILE), ) } diff --git a/python_pkg/app_icons/labels.py b/python_pkg/app_icons/labels.py index 1f31955b..6b640dc3 100644 --- a/python_pkg/app_icons/labels.py +++ b/python_pkg/app_icons/labels.py @@ -53,6 +53,7 @@ LABELS: Final[dict[str, str]] = { "leetcode": "LeetGuard", "todoimpl": "TodoImpl", "logo_review": "LogoJudge", + "mahjong": "Mahjong", } diff --git a/python_pkg/app_icons/tests/test_registry_code_apps.py b/python_pkg/app_icons/tests/test_registry_code_apps.py index 1216e143..f1358ac6 100644 --- a/python_pkg/app_icons/tests/test_registry_code_apps.py +++ b/python_pkg/app_icons/tests/test_registry_code_apps.py @@ -25,6 +25,7 @@ _EXPECTED: dict[str, tuple[str, str, bool, str]] = { "leetcode": ("code-brackets", "leetcode-guard-app", True, "src/leetcode-guard/app"), "todoimpl": ("screen-tick-play", "todoimpl", False, "src/todoImplementer/app"), "logo_review": ("square-tick", "logo-review", False, "src/logo-review/app"), + "mahjong": ("mahjong-tile", "mahjong", False, "src/mahjong-teacher/app"), }