Stop the textFormat test from passing when it has not checked

The root rule matched only a file-level root Text, of which this tree has
exactly one. QML inline components are roots for the same reason — the
`text` of `component InfoValue: Text {` comes from every caller, so the
file it lives in never binds it — but they sit inside another element, so
the depth-1 test never saw them. Six went uncovered while the test
reported green, among them the network panel's InfoValue, which callers
bind to the IP address and gateway.

Six more ways to write a Text were read as clean rather than as unreadable:
an opening brace that is not last on its line, a brace on the line after
`Text`, a one-line block containing nested braces, a wrapped binding split
by a comment or a blank line before its `+` (which exempted a dynamic
binding as a literal), and a root Text indented from column zero. Require
the forms a line scanner can read instead of parsing QML; the tree already
writes every Text that way.

Last, a run that read no files reported success. A checkout with no shell/
QML now fails instead, since an all-clear from a scan that opened nothing
is the one answer this test must never give.

Each case is covered by a fixture that fails without its fix.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: OpenAI Codex (gpt-5, xhigh) <noreply@openai.com>
This commit is contained in:
David Heinemeier Hansson
2026-08-26 17:42:07 +02:00
co-authored by Claude Opus 5 OpenAI Codex
parent e428dc2627
commit 0260d2accb
4 changed files with 109 additions and 2 deletions
+2
View File
@@ -530,6 +530,7 @@ Panel {
}
component InfoLabel: Text {
textFormat: Text.PlainText
color: root.foreground
opacity: 0.6
font.family: root.fontFamily
@@ -537,6 +538,7 @@ Panel {
}
component InfoValue: Text {
textFormat: Text.PlainText
color: root.foreground
font.family: root.fontFamily
font.pixelSize: Style.font.bodySmall
+2
View File
@@ -1954,6 +1954,7 @@ Panel {
}
component InfoLabel: Text {
textFormat: Text.PlainText
color: root.bar.foreground
opacity: 0.6
font.family: root.bar.fontFamily
@@ -1961,6 +1962,7 @@ Panel {
}
component InfoValue: Text {
textFormat: Text.PlainText
color: root.bar.foreground
font.family: root.bar.fontFamily
font.pixelSize: Style.font.bodySmall
+2
View File
@@ -520,6 +520,7 @@ Panel {
}
component InfoLabel: Text {
textFormat: Text.PlainText
color: root.bar.foreground
opacity: 0.6
font.family: root.bar.fontFamily
@@ -527,6 +528,7 @@ Panel {
}
component InfoValue: Text {
textFormat: Text.PlainText
color: root.bar.foreground
font.family: root.bar.fontFamily
font.pixelSize: Style.font.bodySmall