fix: a room that was set up, a card where its button is, and larger cards

Parent Call told rooms they had never been set up. Nothing about the
rooms was wrong. Read from the church broker: …/coordinator and
…/pending are retained and …/mode is absent, and the coordinator's own
source says why — it publishes the retained mode only in answer to an
operator writing to …/mode/set, and nobody ever has. Every classroom
waited a second and a half for a message that will never exist.

A missing mode is now read as the coordinator's own default rather than
as an unconfigured room: the room offers the call and lets the sanctuary
end answer, because that is the end that knows. A mode that really is
off still refuses, in the coordinator's words, and a broker that is
missing or unreachable still says which of those it is. Proved against a
rig broker made to match the church's exactly, with a call landing on
the sanctuary mock.

The card is anchored to the bottom-left corner instead of centred, by
layer shell, which is what the disc player's cover has used under KWin
for months. Anchoring rather than positioning is what makes it right at
1080p and at 4K without a coordinate anywhere. It falls back to the
centred card if the library is missing.

Notifications are sized for a room. Every Plasma measurement is a grid
unit and a grid unit is the height of the general font, so the font is
the lever — 15 point instead of Breeze's 10, which takes the card from
about 350x110 to about 410x145 at 100% and doubles again at 200%. Text,
icon, padding and buttons move together. The chime stays off. No shell
package: that path cost the panel and is not coming back.

And the product name is gone from everything a teacher sees. The
notification card is from Classroom, the disc player's from DVD.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
ekklesia
2026-09-13 08:34:37 -05:00
co-authored by Claude Opus 5
parent bd55c5abd9
commit ba8768cee5
25 changed files with 327 additions and 24 deletions
+3 -3
View File
@@ -152,7 +152,7 @@ log="$(cat "$NOTIFY_LOG")"
check "runtime dir taken from the compositor" "XDG_RUNTIME_DIR=$RUNTIME" "$log"
check "bus address taken from the compositor" "DBUS_SESSION_BUS_ADDRESS=unix:path=$RUNTIME/bus" "$log"
check "wayland display from the compositor" "WAYLAND_DISPLAY=wayland-7" "$log"
check "styling preserved" "--app-name=Ekklesia Classroom" "$log"
check "styling preserved" "--app-name=Classroom" "$log"
check "default sample title" "DVD Ready" "$log"
check "default sample body" "A disc is ready to play." "$log"
@@ -183,7 +183,7 @@ echo "4. root delivers as the classroom user"
FAKE_CURRENT_UID=0
out="$(run)"
check "runuser targets classroom" "runuser -u classroom --" "$(cat "$RUNUSER_LOG")"
check "notification still sent" "--app-name=Ekklesia Classroom" "$(cat "$NOTIFY_LOG")"
check "notification still sent" "--app-name=Classroom" "$(cat "$NOTIFY_LOG")"
FAKE_CURRENT_UID=4000
# ------------------------------------ 5. unprivileged admin is told how
@@ -276,7 +276,7 @@ export XDG_RUNTIME_DIR="$RUNTIME"
out="$(run)"
check "reports delivery to this session" "Sent normal notification to this session" "$out"
check "notification was sent" "--app-name=Ekklesia Classroom" "$(cat "$NOTIFY_LOG")"
check "notification was sent" "--app-name=Classroom" "$(cat "$NOTIFY_LOG")"
check "inherits the session display" "WAYLAND_DISPLAY=wayland-4" "$(cat "$NOTIFY_LOG")"
check_absent "did not go through runuser" "runuser" "$(cat "$RUNUSER_LOG")"
+24 -2
View File
@@ -154,9 +154,31 @@ check("no broker stops it", not can)
check("and says the network, not the sanctuary",
"network" in why, why)
# No retained mode on the broker. The coordinator publishes one only when
# an operator writes to …/mode/set, and on the church's broker nobody
# ever has — so every room was told it had never been set up.
can, why = availability(None, True)
check("a broker with no retained mode stops it", not can)
check("and says it is not set up", "set up" in why, why)
check("an undecided mode is not yet a yes", not can)
check("and is not a refusal either", why is None, why)
can, why = availability(None, True, assume_default=True)
check("once the retained topics have had their chance, the call goes",
can)
check("with nothing to say about it", why is None, why)
can, why = availability(MODE_OFF, True, assume_default=True)
check("a mode that really is off still stops it", not can)
check("in the sanctuary's own words", why == WORDING[UNAVAILABLE], why)
can, why = availability(None, False, assume_default=True)
check("and a coordinator that is down still stops it", not can)
check("naming the sanctuary, not this room", "sanctuary" in why, why)
can, why = availability(None, True, broker_reachable=False,
why="not configured")
check("a room with no broker configured is still its own answer", not can)
check("and says this room, not the network",
"no church network set up" in why, why)
print()
print(f"{passed} passed, {failed} failed")
+35
View File
@@ -314,6 +314,41 @@ check("and cannot ask to",
chrome_policy.get("NotificationsAllowedForUrls") == []
and chrome_policy.get("NotificationsBlockedForUrls") == ["*"])
print()
print("7c-i. the room does not introduce itself")
# A teacher does not need the name of the software. Every visible name is
# the thing it does — Parent Call, DVD, Browser, Classroom — and the
# product name stays where it belongs: package names, unit names, paths
# and topics, none of which anybody in the room reads.
visible = {}
for entry in sorted((root / "config/plasma").rglob("*.desktop")):
for line in entry.read_text().splitlines():
if line.split("=", 1)[0] in ("Name", "GenericName", "Comment"):
visible[f"{entry.name}:{line}"] = line
for script in sorted((root / "scripts").iterdir()):
if not script.is_file():
continue
for line in script.read_text().splitlines():
if "--app-name" in line:
visible[f"{script.name}:{line.strip()}"] = line
check("there are visible names to check", len(visible) > 10)
offenders = [where for where, line in visible.items() if "Ekklesia" in line]
if offenders:
for where in offenders:
print(f" {where}")
check(f"none of them says the product name ({len(visible)} checked)",
not offenders)
check("the notification card is from the room",
'--app-name="Classroom"'
in (root / "scripts/classroom-notify").read_text())
print()
print("7c-ii. the v2 channel is its own")
v2 = (root / "update_classroom_v2.sh").read_text()