Skip to content

Read a chart's times through Date, and chart moments that state their zone - #1395

Merged
max-sixty merged 3 commits into
mainfrom
layout-survey
Sep 28, 2026
Merged

max-sixty merged 3 commits into
mainfrom
layout-survey

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

lf-chart typed its x column with a date parser of its own, which accepted only an ISO month or day and built each Date from its parts. Two authors in the arrangement eval wrote 2026-09-27T14:00Z to get a time axis, and the chart printed each stamp whole as a category label; the judge named it 11 times.

The parser's stated reason was that Date draws a bare 2026-06-01 under May 31 west of Greenwich. That holds only on a local-time scale. The chart's scale is UTC, and Date reads a month or a day as UTC midnight, which is also how Plot reads an ISO string on a time scale. The column is still typed in lf-chart, since Plot draws strings as categories whatever they say, but Date now does the reading:

  • A moment that states its zone (14:00Z, 14:00+02:00) draws on a time axis, labelled in UTC.
  • A moment without a zone stays a category, since Date would read it in each viewer's own zone.
  • On a line or a scatter, two labels at one x (2026-06 and 2026-06-01, or 1 and 1.0) are refused, like two rows sharing a label. Before, a mixed date column fell back to categories. A bar chart keeps a slot per label, so there they stay two bars.
  • More than ten rows inside ten days can only be moments, so their ticks are Plot's own rather than held to a day.

The registry entry says the same. The axis doesn't yet say its moments are in UTC; an author who needs that can put it in the column's header.

Tests: a new browser test covers the time axis (in a browser set to Anchorage), the zoneless category, the refusal on a line, and the two bars, and fails with each of those rules reverted. The everyday gate and the runtime tests pass, and test_render_widgets.py with nightly tests passes except test_ask_action_binding_badges_use_the_available_card_action_seats, which fails the same way on main without this change.

This was written by Claude Code on behalf of max-sixty

🤖 Generated with Claude Code

max-sixty and others added 2 commits September 28, 2026 08:34
… zone

lf-chart typed its x column with a parser of its own that accepted only an
ISO month or day and built each Date from its parts. Its stated reason, that
Date draws a bare 2026-06-01 under May 31 west of Greenwich, holds only on a
local-time scale; the chart's scale is UTC, and Date reads a month or a day
as UTC midnight, which is how Plot itself reads an ISO string on a time
scale. So the column is still typed here, since Plot draws strings as
categories, but Date does the reading.

That admits moments that state their zone (2026-09-27T14:00Z), which two
authors in the arrangement eval wrote and saw printed whole on the axis. A
moment without a zone stays a category, since Date would read it in each
viewer's own zone. Two labels naming one instant (2026-06 and 2026-06-01)
are refused like two rows sharing a label, where before a mixed column fell
back to categories. More than ten rows inside ten days can only be moments,
so their ticks are Plot's own rather than held to a day. Moments are
labelled in UTC, which the registry entry now says.

A new browser test covers the time axis, the zoneless category and the
refusal, and fails with each rule reverted.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new duplicate-instant refusal also runs for bars, rows, and stack. Those kinds use the written labels as separate category slots, so a bar chart with 2026-06 and 2026-06-01 now shows an error even though the two bars have distinct x values. draw() calls readAxis(table.labels) for every kind before build() chooses the categorical branch. Apply the instant-collision check only when a line or dots chart uses a UTC axis; categorical charts should keep their written labels.

The refusal ran in readAxis, which draw() calls for every kind, so a bar chart
with 2026-06 and 2026-06-01 showed an error though a bar keeps a slot per
label. It now runs where a line or a scatter takes a continuous axis, and
covers numbers too: 1 and 1.0 would draw two rows at one x the same way.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 8255b93 into main Sep 28, 2026
5 checks passed
@max-sixty
max-sixty deleted the layout-survey branch September 28, 2026 16:52
max-sixty added a commit that referenced this pull request Sep 29, 2026
…1434)

This records a third run of the arrangement eval, on main at 0feb179,
after the five layout fixes of #1363 and #1395. Fresh agents write each
page twice, once with Leaf's Layouts and once in their own CSS. A blind
judge then picks between the two from screenshots at 1440px, 900px and
390px. It now prefers the Leaf page in 9 pairs and the plain one in 7,
with 2 split, against 9, 3 and 5 in the second run. All 36 pages pass
the render check, and no plain page used the Layout vocabulary.

| Subject | Before the 900px preference (Leaf / plain / split) | After
it |
|---|---|---|
| Dashboard | 0 / 1 / 2 (was 1 / 2 / 0) | 2 / 1 / 0 (was 1 / 0 / 1) |
| Document | 0 / 3 / 0 (was 1 / 0 / 2) | 1 / 2 / 0 (was 0 / 1 / 2) |
| Queue | 3 / 0 / 0 | 3 / 0 / 0 |

The defects the five fixes targeted mostly dropped out of the judge's
lists, counted by keyword and read as rough sizes. Side content that
came last on a phone went from 5 against 1 to 0 against 3. A tile row
wrapping 3 + 1 went from 8 against 0 to none. Leaf pages carry about 42%
of the plain pages' CSS (154 lines against 354), and none needed a
script of its own.

Two causes now account for most of Leaf's losses:
- **Lines cut off sideways**, 25 against 14. In 15 of the 25, a queue's
log excerpt sits in `lf-code`, which doesn't wrap.
- **Collapsed content**, 11 against 4. Leaf documents put the plan in a
collapsed block, following the guidance to collapse supporting detail.

Both are follow-ups, not part of this change.

- `notes/arrangement-eval/results/r3-main-0feb.{json,md}` and
`r3-main-0feb-reviews.json` hold the scores, the tables and every
verdict.
- `notes/arrangement-eval/plain_arm.py`: the plain arm edits Leaf's
guidance at fixed text anchors, and one sentence in the assets registry
had been reworded on main. This updates that anchor.
- `notes/arrangement-eval/README.md` counts the runs.

> _This was written by Claude Code on behalf of max-sixty_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <[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