cockpit: the empty Timeline card says its line on one line

Before any event, the Timeline card of the Now view held one line of text, and
that text was the only cell of an event row's grid (62 px for the time, 14 px for
the dot, the rest for the message): it filled the time's column and read one word
a line in a wide card. The empty line is a block now. Seen on the captures of
2026-11-03 (timeline-main.png), checked again on a capture of this branch; the test
fails on the stylesheet before it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hasan BasbunarandClaude Opus 5.5 committed 2026-11-03 13:38:54 +01:00
1 parent a83eb6aca6
commit b963739969
2 files changed
+25

No files matched your search

+2
View File
@@ -570,6 +570,8 @@ button.bay:hover{border-color:rgba(255,255,255,.22); background:linear-gradient(
.spark.tall{height:96px}
.timeline{list-style:none; padding:0; display:flex; flex-direction:column}
.timeline li{display:grid; grid-template-columns:62px 14px 1fr; gap:var(--s-2); align-items:start; padding:7px 0; font-size:var(--t-14)}
/* the empty list's one line is no event: laid in the time's 62 px column, it read one word a line (2026-11-03) */
.timeline li.none{display:block}
.timeline time{font-size:var(--t-12); color:var(--fg-3); font-variant-numeric:tabular-nums; padding-top:2px}
.timeline .dot{width:8px; height:8px; border-radius:50%; background:var(--rule-3); margin-top:6px; position:relative}
.timeline li:not(:last-child) .dot::after{content:''; position:absolute; left:3px; top:10px; width:2px; height:calc(100% + 18px); background:var(--rule-1)}
+23
View File
@@ -2543,6 +2543,29 @@ class TheBoxItIs(unittest.TestCase):
self.assertTrue(all("Download" in row for row in r["library"]), r["library"])
class AnEmptyTimelineReadsAsOneLine(unittest.TestCase):
"""The Timeline card of the Now view before any event: its one line of text was the only cell of an event's
three-column grid, so it filled the time's 62 px column and read one word a line in a wide card (capture
timeline-main.png, 2026-11-03)."""
def test_the_line_is_not_laid_in_the_time_column(self):
r = run(self, r"""
feed({config: CONFIG, units: UNITS, lifecycle: life({'qwen38-sglang.service': eng('ready')})});
const li = document.querySelector('#now-timeline li');
report({cls: li ? li.className : null, text: li ? li.textContent : null,
children: li ? li.children.length : null});
""")
self.assertEqual(r["text"], "No event yet in this cockpit session.", r)
self.assertEqual(r["children"], 0, "its text is the grid's only cell")
cls = r["cls"].split()
grid = [d for sel, media, d in css_rules() if not media and ".timeline li" in [x.strip() for x in sel.split(",")]]
self.assertTrue(any(re.search(r"display:\s*grid", d) for d in grid), grid)
mine = [d for sel, media, d in css_rules() if not media and any(
x.strip() in [".timeline li." + c for c in cls] for x in sel.split(","))]
self.assertTrue(any(re.search(r"display:\s*block", d) for d in mine),
f"no rule takes the empty line out of the event grid: {mine}")
class TheOtherBoxOfAPairIsShownInNow(unittest.TestCase):
"""The tile of the other box of a pair (docs/pair.md, decision 975), as the captures of 2026-11-03 read
it: hidden on a box alone, the other box's figures as this box says its own, its words as text only."""