9.3 follow-up — make CurrentLine wash visible + presence debug aid

Manual retest still showed nothing. Two changes to localize and fix:

1. CurrentLine alpha 0.08 → 0.22. The original value computed to only
   ~10/255 above the dark clear color and was swamped by glyphs on any
   text line — effectively invisible even when the wash was being
   drawn correctly. 0.22 reads as a current-line band while staying
   below Selection's 0.30. Static analysis of the full wire path
   (daemon sweep → multi_frontend broadcast → reader → apply_attach_
   message → peer_background_rects) found no break, so faint alpha is
   the leading explanation for "still nothing."

2. Env-gated diagnostic in the PresenceUpdate arm. Running with
   `PMACS_GPU_DEBUG_PRESENCE=1` prints each received presence
   (frontend, buffer, current buffer, cursor, selection). If presence
   lines appear, the wash geometry/alpha was the issue; if none appear,
   the broadcast isn't reaching the mirror and the next step moves to
   the daemon side. Off by default — no effect on normal runs.

Gates: fmt clean; clippy -p pmacs-gpu -D warnings clean; pmacs-gpu
unit 15.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Levi Neuwirth 2026-05-28 14:57:26 -04:00
parent 57feae1e2d
commit ffdd5d801a
1 changed files with 19 additions and 6 deletions

View File

@ -772,6 +772,18 @@ impl State {
cursor,
selection,
} => {
// Run with `PMACS_GPU_DEBUG_PRESENCE=1` to confirm peer
// presence is arriving and routed to the right buffer.
// A `buf != current` line means the peer is on a buffer
// this mirror isn't displaying (no wash expected); no
// line at all means the message isn't reaching us.
if std::env::var_os("PMACS_GPU_DEBUG_PRESENCE").is_some() {
eprintln!(
"pmacs-gpu presence: fid={frontend_id:?} buf={buffer_id:?} \
current={:?} cursor={cursor} sel={selection:?}",
self.current_buffer_id
);
}
self.peer_presences.insert(
frontend_id,
PeerPresence {
@ -1798,12 +1810,13 @@ fn decoration_kind_to_bg_color(kind: DecorationKind) -> Option<[f32; 4]> {
// because the text render pass runs after this one in the same
// render pass (Q#2 stance α).
DecorationKind::Selection => Some([0.31, 0.42, 0.82, 0.30]),
// Very subtle blue-grey wash. CurrentLine is always on, so it
// wants to be visually quietest of the four background kinds:
// just enough tint to track which line carries the cursor,
// not enough to compete with Selection or syntax color when
// both cover the same bytes (bet #2 overlap surface).
DecorationKind::CurrentLine => Some([0.55, 0.60, 0.75, 0.08]),
// Blue-grey wash, quietest of the background kinds (it's always
// on) but still visible. The first 9.2/9.3 value (alpha 0.08)
// computed to ~10/255 above the dark clear color and was
// swamped by glyphs on a text line — invisible in practice.
// 0.22 keeps it subtle vs Selection's 0.30 while actually
// reading as a current-line band.
DecorationKind::CurrentLine => Some([0.55, 0.60, 0.75, 0.22]),
// Deferred to the search-feature arc.
DecorationKind::SearchMatch | DecorationKind::SearchMatchActive => None,
// Foreground-only — handled by [`decoration_kind_to_color`].