post.html: gear-btn + #id_post_menu (NVM / DEL / BYE) mirror room.html's #id_room_menu — all Posts get the gear w. NVM (→ billboard:my_posts); user-Posts (kind=USER_POST / SHARE_INVITE) additionally surface DEL for the author (POST → billboard:delete_post → hard-deletes the Post; cascades Lines via FK + clears shared_with M2M) and BYE for invitees (POST → billboard:abandon_post → removes request.user from post.shared_with; owner + other invitees keep the thread); admin-Posts (kind=NOTE_UNLOCK) intentionally render gear w. NVM only since the system thread isn't user-owned (defence-in-depth: both delete_post + abandon_post no-op on NOTE_UNLOCK so a forged POST can't bypass the menu's branch); _post_gear.html partial gates DEL/BYE on viewer_is_owner (set by view_post since the buds sprint) + post.kind, then includes the shared apps/applets/_partials/_gear.html btn; styling rides the existing applets.scss page-level pattern — .post-page joins .billboard-page / .room-page / .dashboard-page / .wallet-page / .gameboard-page / .billscroll-page in the > .gear-btn { position: fixed; bottom: 4.2rem; right: 0.5rem } rule (and the landscape footer-sidebar centred variant), #id_post_menu joins the %applet-menu extension list + the page-level fixed-menu rule (bottom: 6.6rem; right: 1rem); 5 FTs in test_bill_post_gear.py (owner DEL flow, invitee BYE flow, 3 menu-shape assertions for owner/invitee/admin) + 11 ITs across DeletePostViewTest + AbandonPostViewTest (302 redirect target, side effect, GET-is-no-op, non-owner / non-invitee / NOTE_UNLOCK protection) — TDD
Some checks failed
ci/woodpecker/push/pyswiss Pipeline was successful
ci/woodpecker/push/main Pipeline failed

Code architected by Disco DeDisco <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-05-12 22:26:12 -04:00
parent c64d7b9534
commit 6a7464ee4b
7 changed files with 322 additions and 0 deletions

View File

@@ -82,6 +82,7 @@
#id_game_kit_menu { @extend %applet-menu; }
#id_wallet_applet_menu { @extend %applet-menu; }
#id_room_menu { @extend %applet-menu; }
#id_post_menu { @extend %applet-menu; }
#id_billboard_applet_menu { @extend %applet-menu; }
#id_billscroll_menu { @extend %applet-menu; }
@@ -90,6 +91,7 @@
.dashboard-page,
.wallet-page,
.room-page,
.post-page,
.billboard-page,
.billscroll-page {
> .gear-btn {
@@ -104,6 +106,7 @@
#id_game_applet_menu,
#id_game_kit_menu,
#id_wallet_applet_menu,
#id_post_menu,
#id_billboard_applet_menu,
#id_billscroll_menu {
position: fixed;
@@ -121,6 +124,7 @@
.dashboard-page,
.wallet-page,
.room-page,
.post-page,
.billboard-page,
.billscroll-page {
> .gear-btn {
@@ -135,6 +139,7 @@
#id_game_kit_menu,
#id_wallet_applet_menu,
#id_room_menu,
#id_post_menu,
#id_billboard_applet_menu,
#id_billscroll_menu {
right: calc((var(--sidebar-w) - 3rem) / 2);