Skip to content

Fade sent message headers and words together in Firefox - #1933

Merged
max-sixty merged 1 commit into
mainfrom
codex/thread-flash-coverage
Oct 6, 2026
Merged

max-sixty merged 1 commit into
mainfrom
codex/thread-flash-coverage

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A sent message’s sticky “You” header can stay yellow after its words have faded in Firefox. Gecko can repaint an inherited animated background late. The header and body now fade together on ordinary sends.

One animated arrival phase now mixes the message’s highlight with its resting ground in CSS. Both the message and sticky header paint the same typed, inherited colour. Animating the numeric phase also avoids Firefox’s discrete interpolation of var() colour keyframes and allows CSS to resolve each message’s own colour scheme after insertion. The existing motion gate still handles restoration and reduced motion.

Validation: a native Firefox screencast regression fails the original runtime on intermediate header/body colour differences and passes this change. The six existing send-surface cases, eight Mac appearance/first-frame checkpoints and 225 runtime tests pass. Independent native Firefox captures also verify smooth light/dark keyboard sends and reduced motion. Firefox is required in local and CI browser setup, including generated Tend workflows.

This was written by Codex on behalf of max-sixty

Drive one typed inherited message ground from a numeric arrival phase. This avoids both stale inherited animated backgrounds and discrete var() colour keyframes in Gecko while retaining the shared motion gate and per-surface resting ground.

Add native Firefox intermediate-frame regression coverage and make Firefox part of local, CI and generated Tend browser setup.
@max-sixty
max-sixty merged commit de8f649 into main Oct 6, 2026
4 checks passed
@max-sixty
max-sixty deleted the codex/thread-flash-coverage branch October 6, 2026 21:49
leaf-agent added a commit that referenced this pull request Oct 7, 2026
The margin-card arrival regression in [the failed
run](https://github.com/max-sixty/leaf/actions/runs/37536533741) reads
the old `backgroundColor` animation keyframe. #1933 replaced that
keyframe with the numeric `--lf-msg-arrival` phase shared by the message
and sticky header. This updates the existing test to find and pause the
phase animation, preserving its check that only the new reply is cued.

The targeted test failed on current `main` before this change and passes
afterward: `uv run pytest -q
tests/test_render_margin.py::test_an_agent_reply_into_an_open_card_cues_only_its_own_words`.

This addresses one of seven failures in that run. The other six have
distinct diagnostics and are still being investigated.

Co-authored-by: leaf-agent <[email protected]>
max-sixty pushed a commit that referenced this pull request Nov 9, 2026
…led card (#5749)

`test_firefox_paints_the_author_and_words_in_the_same_send_flash` failed
intermittently: 3 of 10 local runs on `main`, plus the scheduled run
that #5710 cites. Its frame filter let through screencast frames that
say nothing about the sent message's grounds. On a loaded runner, its
fade-density check also failed on real fades. The assertion that the
author's row and the words fade together is unchanged and still catches
a head that lags its words. Test-only; no product behavior changes.

**Frames that were getting through**, from frames captured in failing
local runs:

- **Stale page content over the card.** Headless Firefox sometimes
composites a band of earlier page content (here, the diff widget) over
the card. The existing check compares the card's right edge on both
rows, but the band can cover the author's row and stop short of that
edge, leaving the author's row reading the page's white `(255, 255,
255)`. This is the frame in the failing [scheduled
run](https://github.com/max-sixty/leaf/actions/runs/42365682113): head
`(255, 255, 255)`, words `(253, 249, 222)`, both edges `(250, 249,
245)`.
- **The card still growing.** In the first frame of the arrival, the
reply field still covers the words. The words' sample, 3px above the
message's foot, read a blend of field and highlight, e.g. head `(255,
249, 199)` against words `(253, 251, 230)`.

**The filter now:**

- Samples the words at the middle of their row, beside the short
sentence.
- Reads a frame only when three things hold: the card's edge matches on
both rows; the author's row shows a colour the message's ground can take
(its yellow, the card's paper, or a mix), which the page's white fails;
and the reply field's top ring reads as it does in most of those frames,
so the card has grown into place.
- Takes that ring majority only over frames that already passed the
first two checks, because under load the band frames can outnumber the
rest.

**Fade density.** The test required three distinct fade colours at least
12 apart. On this PR's loaded CI runner it captured only two frames
inside the fade. Locally, under five busy loops on four cores, it often
captured two colours, or several within 8 of each other. The check
exists to reject a discrete jump (no intermediate colour) and the
constant 0.5 pending blend (one colour plus JPEG jitter). It now
requires intermediate colours more than 6 apart, which still rules out
both.

**Verification** (local Linux, `--run-nightly -n0`):

- `main`: 3 of 10 runs failed.
- This head: 10 of 10 pass idle and 12 of 12 under five busy loops.
Before the density change, the filter alone passed 50 of 50 idle and 8
of 8 under two busy loops.
- Injecting a head that stays 60% highlighted (`.lf-margin-preview
.lf-msg-head { background: color-mix(in srgb, #fff8c5 60%, var(--paper))
!important }`) still fails the head-against-words assertion.

The test came in with #1933, and its edge filter with #3100. The next
scheduled `ci` run will settle the macOS lane.

Closes #5710 — automated triage

---------

Co-authored-by: leaf-agent <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants