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
+26 -3
View File
@@ -287,12 +287,18 @@ def broker_message(why=None):
return BROKER_WORDING.get(why, BROKER_UNREACHABLE)
def availability(mode, coordinator_online, broker_reachable=True, why=None):
def availability(mode, coordinator_online, broker_reachable=True, why=None,
assume_default=False):
"""Whether a teacher may send a call now, and what to say if not.
Returns (can_send, message). The wording for an off mode is the
coordinator's own, so the room says the same thing the sanctuary
would.
would. A message of None means the question is not answered yet
rather than answered no.
assume_default is the caller saying the retained topics have had
their chance. Until then a missing mode is undecided; after it, a
missing mode is the coordinator's own default — see below.
"""
if not broker_reachable:
return False, broker_message(why)
@@ -304,6 +310,23 @@ def availability(mode, coordinator_online, broker_reachable=True, why=None):
return False, WORDING[UNAVAILABLE]
if mode is None:
return False, "Parent Call has not been set up yet"
# No retained mode on the broker at all.
#
# This is not a room that was never set up, and treating it as
# one is what every classroom did: the card said "Parent Call has
# not been set up yet" on machines whose broker, room and
# coordinator were all exactly right. The coordinator publishes
# the retained mode only in answer to an operator writing to
# …/mode/set, and on this church's broker nobody ever has, so the
# topic does not exist. Read from the real broker: …/coordinator
# and …/pending are retained, …/mode is absent.
#
# So a mode nobody has set is the coordinator's own DEFAULT_MODE,
# and the sanctuary is the end that knows it. The room offers the
# call and lets the coordinator answer; if the true mode is off it
# refuses, in its own words, through the status topic. A wrong no
# here costs a teacher the call. A wrong yes costs a round trip
# and tells the truth at the end of it.
return (True, None) if assume_default else (False, None)
return True, None