Repository navigation
Keep draft and sent Markdown consistent across thread surfaces - #1599
Conversation
leaf-agent
left a comment
There was a problem hiding this comment.
I found no diff-grounded issue in the Markdown styling change, but I’m withholding approval because test_a_wrapped_diff_shows_every_line_whole_and_paper_wraps_whatever_the_switch_says fails on the reviewed checkout: its file headers have lift=32, drop=32 where the test requires zero. I reproduced the same result at merge base d1a357e0652c6a0871e6b41a0d5a8abf85cd2214, so this failure predates the PR. The PR’s test check is still running.
|
@leaf-agent I reproduced the wrapping test failure on this head. The cause is separate from this PR: the native package-scope migration makes the diff's base I am validating a complete local follow-up for that baseline defect with the original screen/print geometry assertions preserved. This PR's lint and test checks have passed on
|
… control default weighs nothing (#4805) Markup's reading face (`reading.css`) now stands in a cascade layer of its own, `lf-reading-face`, the first sublayer of the tier its sheet composes into: `lf-base` in the document and `lf-shadow` in a declared tree. Every component, package and theme rule of the tier outranks it whatever its weight. So the native control default no longer needs a class's weight to beat the face's element rules, and the fonts check loses its one named exemption. ### What changes - **The native control default weighs nothing** (`surfaces.css`): one weightless rule naming `--font-ui`, beside a weightless rule for the face classes' ink, which stays separate so a page's own bare `<button>` keeps the browser's ink as before. `tests/model/test_interface_fonts.py` drops `CONTROL_DEFAULT` and its skip, and `test_interact_layer.py` reads the two rules. - **The frame reset joins the face's layer**, so the face's own frames (a quotation, a disclosure, a cell) still outrank `* { --lf-block-frame: 0 }`. Left above them, it stopped a disclosure trimming its last child's margin. - **Workarounds the layer settles are gone:** the face's key rules no longer exclude `.lf-key-badge`, whose own rule outranks them; inline code drops `display`, `contain` and `isolation`, which answered a source renderer's reset that #1599 already scoped to its source blocks; three of About's declarations that restated the face exactly go. - **lf-call-diff's location link** states its own hover underline colour, which the face's heavier `a:hover` used to supply. - **package-themes.md** tells theme authors their rules outrank the face at any weight. Chromium 156 and Firefox 157 both rank a weightless rule of the tier over a (0,1,1) face rule, in the document and in a shadow root. ### The dialogs keep the reading face The session's Leaf page asked whether Leaf's dialogs should stop wearing the reading face. Measured by turning it off for the chrome (threads and Markdown keep it) over 34 dialog, panel and thread states, and by dropping each About, command reference and Page Map declaration in turn: About takes its terms' weight, inline code chips, list spacing, the disclosure's padding and the copyable text's ground from the face, and would need about nine rules to restate them, while the command reference and Page Map take nothing visible. A reset deletes no rule, since the browser's own heading and paragraph defaults need the same restatements, so the chrome keeps the face. ### Checks - `leaf-dev stills` on 28 states against main after #4804 (About light and dark, the command reference, Page Map, page search, On me, the leaf's menu, the plan panel, threads and replies, tasks, diff, walkthrough and native code, playground controls, gallery and theme, a phone table, a scrolled Markdown preview): no face appears on one side only, and the one computed difference in every state is the panel's Send, whose line height goes from 20.3px to 21px. Send's own rule (`font: inherit`, floating-panel.css) now outranks the default as its comment intends, where the class-weighted default used to override its leading; Send is an icon centred in a box of fixed height, so it draws the same pixels. About differs by more than antialiasing only in its fingerprint, runtime ids and port. An earlier run over all 302 states found the same single difference. - `tests/model/test_interact_layer.py` and `tests/model/test_interface_fonts.py` pass on the branch merged with main. > _This was written by Claude Code on behalf of max-sixty_
Anchored Markdown drafts used different quote and code insets from the messages they became. Conversations embedded inside diff widgets also lost the document's quote, link, and code styling, with inline code rendered as a separate block.
Move the canonical Markdown faces into the shared stylesheet, give transcripts and reply containers the same compact insets, and restrict the diff renderer's reset to its source blocks. Expand the real-browser checks across general, panel, anchored, and widget-local replies in both palettes, and check native text selection with Threads open. Repair the reading-position test's transcript selection and stale reaction-test prose.
The repairs follow a retrospective review of a month of thread UI requests. Before integration with current main, all 1,573 Python/browser tests and 190 runtime tests passed; focused checks cover draft/sent parity, inline-code line flow, scroll and focus retention, printing, and diff layout. CI validates the integrated tree.