Fix pytest suite (main CI) + BEM landing page restructure - #15
Merged
Conversation
PR #13 (test suite) and PR #14 (block list / live panel / audit logging) were developed in parallel against the same pre-merge base; #13's tests encoded the API surface as it stood before #14 changed it, so main's CI went red the moment both merged. No production code changes here -- the merged behavior is correct and already reviewed; the tests were stale. - test_command_tree.py: add yap block/unblock/modlog to the expected command set. - test_panel.py: refresh_panel_message dropped its owner parameter (derives it from the DB instead); updated all four call sites and added a test for the owner-left-guild no-op path. - test_room_actions.py: apply_transfer/apply_kick now call bot.storage.get_active_temp_channel (needed for log_admin_action), added to the shared _bot() fixture; refresh_panel_message call-arity assertions updated from 3 args to 2; added a test locking in that an admin-initiated transfer is logged against the pre-transfer owner, not the post-transfer one. - test_temp_channels.py: reconcile's panel backfill now posts the room's real locked/hidden/permitted state instead of defaults, so the bot fixture needs storage.list_permits and the assertion needs the new kwargs; added a dedicated test covering a backfilled room that was already locked and hidden. 95 passed, 0 failed (was 9 failed, 83 passed on main).
Renamed every class to block__element--modifier form and reorganized the (previously single-line minified) stylesheet into commented sections, one per block, so the page is straightforward to edit going forward. Blocks: page-shell, site-header, button (+button-row), hero, stats, showcase, card (generic, reused by features/steps/two-col sections/closing CTA via --accent-a/--accent-b/--cta modifiers), page-section (+--split), features, steps, code-sample, permissions, site-footer. .muted became the utility class u-muted. The two positional nth-child shadow variants on the feature cards became explicit card--accent-a/--accent-b modifiers, so reordering the cards in HTML no longer silently changes which one gets which shadow. Purely a rename/reformat: verified pixel-identical rendering via a headless-Chromium screenshot before and after (byte-identical PNG, same SHA256) at 1400x1000. No visual, structural, or script change -- the stats.json fetch script and its target element IDs are untouched.
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.
Summary
Two independent changes ended up on the same branch/PR — noting that upfront since they're unrelated:
1. Fix
main's CI (urgent)mainhas been red since PR #14 merged. Root cause: PR #13 (the pytest suite) and PR #14 (block list / live panel state / admin-override logging) were developed in parallel against the same pre-merge base, coordinated to avoid touching the same files — which they didn't — but #13's tests still encoded the API surface and behavior exactly as it stood before #14 changed it. The moment both merged, 9 of the 92 tests failed against the new, intentional behavior.This fixes the tests only — no production code changes. The behavior encoded by PR #14 (already reviewed, including two Codex-flagged fixes) is correct; the tests were stale.
What was stale and why:
test_command_tree.py—EXPECTED_COMMAND_NAMESdidn't includeyap block,yap unblock,yap modlog(all added in Add block list, live panel state, and admin-override audit logging #14).test_panel.py—refresh_panel_messagedropped itsownerparameter in Add block list, live panel state, and admin-override audit logging #14 (it now derives owner, lock/hide state, and the permit list from the DB/channel itself). Updated all four call sites from 3 args to 2, added a test for the owner-left-guild no-op path.test_room_actions.py—apply_transfer/apply_kicknow callbot.storage.get_active_temp_channel(needed for the newlog_admin_action), missing from the shared_bot()fixture. Updated tworefresh_panel_messagecall-arity assertions from 3 args to 2. Added a test locking in that an admin-initiated transfer is logged against the pre-transfer owner, not the post-transfer one.test_temp_channels.py— the reconcile-time panel backfill now posts the room's real locked/hidden/permitted state instead of defaults; added a dedicated test covering an already-locked/hidden/permitted room.pytest: 95 passed, 0 failed locally (was 9 failed, 83 passed, reproducing the actual CI failure first).2. Restructure the landing page to BEM naming
Renamed every CSS class in
docs/index.htmltoblock__element--modifierform and reorganized the previously single-line minified stylesheet into commented sections, one per block, so the page is easy to hand-edit going forward.Blocks:
page-shell,site-header,button(+button-row),hero,stats,showcase,card(generic, reused by the features grid / steps / two-column sections / closing CTA via--accent-a/--accent-b/--ctamodifiers),page-section(+--split),features,steps,code-sample,permissions,site-footer..mutedbecame the utility class.u-muted. The two positionalnth-childshadow variants on the feature cards became explicitcard--accent-a/card--accent-bmodifiers, so reordering the cards in HTML no longer silently changes which one gets which shadow.Purely a rename/reformat — verified pixel-identical rendering via a headless-Chromium screenshot before and after (byte-identical PNG, same SHA256) at 1400×1000. No visual, structural, or script change; the
stats.jsonfetch script and its target element IDs are untouched.Test plan
pytest: 95 passed, 0 failedpy_compileclean.pyfile touched