Repository navigation
Read a chart's times through Date, and chart moments that state their zone - #1395
Merged
Merged
Conversation
… 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
reviewed
Sep 28, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
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]>
leaf-agent
approved these changes
Sep 28, 2026
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lf-charttyped its x column with a date parser of its own, which accepted only an ISO month or day and built eachDatefrom its parts. Two authors in the arrangement eval wrote2026-09-27T14:00Zto 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
Datedraws a bare2026-06-01under May 31 west of Greenwich. That holds only on a local-time scale. The chart's scale is UTC, andDatereads 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 inlf-chart, since Plot draws strings as categories whatever they say, butDatenow does the reading:14:00Z,14:00+02:00) draws on a time axis, labelled in UTC.Datewould read it in each viewer's own zone.2026-06and2026-06-01, or1and1.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.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.pywith nightly tests passes excepttest_ask_action_binding_badges_use_the_available_card_action_seats, which fails the same way on main without this change.🤖 Generated with Claude Code