Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit e6505b7cb81d47d069545b6bf8fa2dfda5aafee5
parent ba6a83a66c69a50f5863cc6d152227579f443c88
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Thu, 12 Nov 2026 20:50:38 -0500

umtool trail: the by-date chart's width by the weights a stretch holds as well as by its days

Cause: trailLayout gave each cluster (and each point inside it) width in proportion to days alone --
one px-per-day scale for the whole strip. On rev9-a9 the 2023-26 run is one cluster (no stretch in it
is past the gap threshold), and its last nine weights (July-November 2026) shared 31 px of it, 0.85 px
apart at the closest: the crowd at 5:30-6:00 of the cut.

Fix: each stretch between neighbouring said days (and a cluster's padding) gets DAY_SHARE (0.5) of the
width by its days and the rest by the weights it holds -- every said day an equal slot, half either
side -- and X interpolates along those knots. Clusters, breaks, years, the line and the reflow are
unchanged in kind; positions stay monotone in date. Same rev9-a9 run: ~104 px, min step 11.4 px.
Stills from the take's real schedule (read-only), before | after:
/home/user/.claude/jobs/90437ced/tmp/take-tools/trail/before-vs-after.jpg. knobs.md says it.
Test: trail-plan.test.mjs "a crowded run gets room" (the rev9-a9 shape); the existing ones pass.

Co-Authored-By: Claude <noreply@anthropic.com>

Diffstat:
Meditor/CHANGELOG.md | 1+
Mumtool/docs/knobs.md | 2+-
Mumtool/report-to-video/trail-plan.mjs | 34++++++++++++++++++++++++++++++----
Mumtool/report-to-video/trail-plan.test.mjs | 24++++++++++++++++++++++++
4 files changed, 56 insertions(+), 5 deletions(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -112,6 +112,7 @@ - **umtool: a take's windowed preview shows the seconds you asked for, with its chrome, in its own file.** `umtool take <p> --id <t> --preview --at 440 --dur 170` timed the window over the project's draft rather than the take, so on a take with its own timeline it rendered a different stretch (92 s of early clips), its timeline and counters started from zero, and it was written over the take's full preview. `--at`/`--dur` with `--preview` are now seconds of the take's own cut, timed by its last preview's or render's schedule (or, with neither, its entries' own lengths, said as estimates); an `--at` past the end is refused. The whole take is built, reusing its segments, and only the window is laid and encoded, with the deck at its state at that second (build-video's new `--cut-window <at> <dur>`). The file is `takes/<t>/out/<slug>.preview.<at>-<to>.mp4`, built in `out/window/`; the full preview is never touched. `--preview` without `--at`, and a take's own window, render as before. - **umtool: the quote check can judge a take.** `umtool quote-check` only judged the project's draft, so a take with clips of its own was never checked (on 12 Nov, 25 rows blocked the draft and the take went unjudged), and a take's render was gated by the draft's rows alone. `umtool quote-check <p> --take <t>` now judges the take's clips as it renders them and keeps the rows in `takes/<t>/quote-check.json`; the project's `quote-check.json` is not touched. A take's render, the new `umtool check <p> --take <t>` and `umtool window <p> <clip> --take <t> --align` read the take's rows first; a clip the take has not been checked for keeps the project's row, as before. `--status --take <t>` lists the take's rows and says which came from the project. - **umtool: editing a take from a terminal no longer says it is deprecated.** `umtool window … --take`, `timeline <p> --take <t> <verb>`, `posts <verb> … --in-take` and `take --id <t> --import-item` printed "deprecated — edits land in the draft now; open the take there first (umtool takes open …)" on stderr. They are the supported way to edit a take without touching the draft (as `set --take` and `look --take` already were): they write only the take's patch, with an undo point. The advice was the problem, since `takes open` writes the take over the draft. The line is gone; what the commands do, their stdout and `--json` are unchanged. The old take walk's route (`/api/report/takes/timeline`) still says it. +- **umtool: the by-date weight chart no longer piles a recent run of weights into its right edge.** The chart's width was shared by days alone, so on rev9-a9 the nine weights said for July–November 2026 shared 31 px of a 2023–26 stretch, under a pixel apart. Now half the width goes by days and half by how many weights each stretch holds: the same run spreads over about 100 px, no two weights closer than 11 px, and a long empty stretch still reads as longer. Breaks, years, the line and the reflow are unchanged. ## [0.12.0] - 2026-10-28 - **An X post's screenshot is of the post, not of a page in the middle of laying itself out.** On 2026-10-27 a forced capture of TheQuartering's post 2114859155022389342 came out shifted about 100 px: its left edge cut off, X's menu laid over its words and the gap beside the column showing; another post once came out as a strip of the post above it. The shot was a full-page capture, which resizes the page for the moment of the capture — in the X session profile the page saw its window go to 1×1 — and X laid itself out again for that size while it was being captured, so the shot was cut from a different layout than the one measured. A post is now shot from the window as it stands: scrolled into it, the window made taller first when the post is taller than it, so nothing is resized under the shot; and the post is measured again after the shot and shot again if it moved. An X Article's shot is taken the same way. Posts taller than the tallest window (16,384 px) are still shot from a full-page capture. Needs a restart of the editor. diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md @@ -2767,7 +2767,7 @@ Under the dial: the measure's `state.lost.total` (the highest real-time loss cla ### Weight trail -At the foot of the instruments' column: every weight the cut shows -- the STATED ones and (`remembered`) the remembered ones, "≈390, as of Feb 2023" -- placed by the date he was that weight (its `asOf`, else its date), a dot appearing at its event's `t`; ONE line runs through every weight shown, stated and remembered alike, joining neighbours by date once both are said -- so it never passes over a point; of several weights for one day the line takes the one said last and the others stay as marks beside it. A remembered weight is a hollow grey ring with a solid border (a qualified one a size smaller), and a stretch of the line with a remembered end is drawn quieter, grey and thinner; between two stated weights it keeps the accent (a qualified stated one is hollow). The axes FIT what has been said so far (trail-plan.mjs): each new weight outside them reflows the chart over 0.4 s -- the years, the bounds, every dot -- so the time axis advances with the story; a stretch with no statement longer than `gap` is a break in the time axis (a small `//` on the axis foot, each side with its own years; a year inside a stretch a short tick there) and the line across it dotted, so a decade of nothing does not take the width from the dense run after it. A red ring on the latest said. The `mark` line (300) dashed across; with `count` and the mark at 300, `UNDER 300 · SAID n×` counts the measure's `totals.under300` rows as the cut reaches each. +At the foot of the instruments' column: every weight the cut shows -- the STATED ones and (`remembered`) the remembered ones, "≈390, as of Feb 2023" -- placed by the date he was that weight (its `asOf`, else its date), a dot appearing at its event's `t`; ONE line runs through every weight shown, stated and remembered alike, joining neighbours by date once both are said -- so it never passes over a point; of several weights for one day the line takes the one said last and the others stay as marks beside it. A remembered weight is a hollow grey ring with a solid border (a qualified one a size smaller), and a stretch of the line with a remembered end is drawn quieter, grey and thinner; between two stated weights it keeps the accent (a qualified stated one is hollow). The axes FIT what has been said so far (trail-plan.mjs): each new weight outside them reflows the chart over 0.4 s -- the years, the bounds, every dot -- so the time axis advances with the story; a stretch with no statement longer than `gap` is a break in the time axis (a small `//` on the axis foot, each side with its own years; a year inside a stretch a short tick there) and the line across it dotted, so a decade of nothing does not take the width from the dense run after it. The width is shared half by days and half by the weights each stretch holds (each day a weight is said for owns an equal slot), so a run of weights a few days apart is spread out rather than piled into a few pixels, and an empty year still reads as longer than a week. A red ring on the latest said. The `mark` line (300) dashed across; with `count` and the mark at 300, `UNDER 300 · SAID n×` counts the measure's `totals.under300` rows as the cut reaches each. | Knob | Range · default | From a terminal | |---|---|---| diff --git a/umtool/report-to-video/trail-plan.mjs b/umtool/report-to-video/trail-plan.mjs @@ -28,6 +28,10 @@ // the earlier ones stay as marks beside it, so the line never zigzags up and // down one date. // +// THE WIDTH (12 Nov, rev9-a9 5:30–6:00: nine weights of July–November 2026 piled into the right edge): half of it +// by days, half by the weights each stretch between said days holds (trailLayout, DAY_SHARE), so a dense run is +// spread and an empty year still reads as longer than a week. +// // PURE: the measure slice and a box in, plain data out. import { dayNumber } from "./measure-draw.mjs"; @@ -37,6 +41,8 @@ export const TRAIL_REFLOW = 0.4; /** `gap: "auto"`: a stretch is a break when longer than this many days, or `GAP_MEDIANS` times the median spacing. */ export const GAP_FLOOR_DAYS = 365; export const GAP_MEDIANS = 8; +/** The part of the strip's width shared out by days; the rest goes by the weights each stretch holds (trailLayout). */ +export const DAY_SHARE = 0.5; const r2 = (v) => Math.round(v * 100) / 100; @@ -105,17 +111,37 @@ export function trailLayout(points, box, { thr = Infinity, mark = null } = {}) { c.from = c.first - p; c.to = c.last + p; } + // THE WIDTH BY DAYS AND BY WEIGHTS (12 Nov, rev9-a9: nine weights of July–November 2026 shared 31 px of a 2023–26 + // cluster, under a pixel apart). Each stretch between two neighbouring days a weight is said for (and a cluster's + // padding) gets DAY_SHARE of the width by its days and the rest by the weights it holds -- each said day owning + // an equal slot, half on either side of it -- so a crowded run is spread and an empty year still reads as longer. const widthDays = cl.reduce((s, c) => s + (c.to - c.from), 0) || 1; - const scale = Math.max(0, x1 - x0 - gapPx * Math.max(0, cl.length - 1)) / widthDays; + const avail = Math.max(0, x1 - x0 - gapPx * Math.max(0, cl.length - 1)); + const said = new Set(points.map((p) => p.day)); + const slots = said.size || 1; let at = x0; for (const c of cl) { + const days = [...said].filter((d) => d >= c.first && d <= c.last).sort((a, b) => a - b); + const knots = [c.from, ...days, c.to]; + let x = at; + c.knots = knots.map((d, i) => { + if (i > 0) { + const share = (i > 1 ? 0.5 : 0) + (i < knots.length - 1 ? 0.5 : 0); + x += avail * (DAY_SHARE * (d - knots[i - 1]) / widthDays + (1 - DAY_SHARE) * share / slots); + } + return { d, x }; + }); c.x0 = r2(at); - c.x1 = r2(at + (c.to - c.from) * scale); - at = c.x1 + gapPx; + c.x1 = r2(x); + at = x + gapPx; } const X = (d) => { const c = cl.find((k) => d >= k.from - 1e-9 && d <= k.to + 1e-9) ?? null; - return c ? r2(c.x0 + (d - c.from) * scale) : null; + if (!c) return null; + const i = Math.max(1, c.knots.findIndex((k, j) => j > 0 && d <= k.d + 1e-9)); + const a = c.knots[i - 1]; + const b = c.knots[i] ?? a; + return r2(b.d > a.d ? a.x + ((d - a.d) / (b.d - a.d)) * (b.x - a.x) : a.x); }; const Y = (v) => r2(y1 - ((v - lo) / Math.max(1, hi - lo)) * (y1 - y0)); const gaps = cl.slice(1).map((c, i) => ({ key: `${cl[i].last}_${c.first}`, x: r2((cl[i].x1 + c.x0) / 2) })); diff --git a/umtool/report-to-video/trail-plan.test.mjs b/umtool/report-to-video/trail-plan.test.mjs @@ -185,3 +185,27 @@ test("the line takes one point per day -- the one said last -- and a pair never assert.ok(data.cues.some((c) => c.k === "s1_0" && c.at === 30 && c.to.autoAlpha === 0), "the 390's pair goes when the 400 lands"); assert.match(html, /class="seg" data-k="s4_0"/, "2024 → 2025: stated, the accent"); }); + +test("a crowded run gets room: the width goes by how many weights a stretch holds as well as by its days", () => { + // The rev9-a9 shape (12 Nov, 5:30–6:00 of the cut): 2008, 2013, a 2023–26 run whose last nine weights fall in + // July–November 2026 -- one cluster, so by days alone those nine shared 31 px and stood less than a pixel apart. + const said = [["2008-06-30", "remembered", 368], ["2013-03-09", "stated", 346.7], ["2013-03-21", "stated", 342.9], ["2023-02-24", "remembered", 390], + ["2023-12-31", "remembered", 365.7], ["2024-05-09", "remembered", 335], ["2024-07-01", "remembered", 390], ["2025-02-01", "remembered", 370], + ["2025-04-15", "remembered", 387], ["2025-06-06", "stated", 300], ["2025-08-15", "stated", 351], ["2026-01-09", "stated", 339], ["2026-01-16", "stated", 337], + ["2026-07-19", "remembered", 349], ["2026-07-27", "remembered", 342], ["2026-07-31", "stated", 338], ["2026-08-03", "stated", 335.5], ["2026-08-28", "stated", 320], + ["2026-09-24", "stated", 310.5], ["2026-10-15", "stated", 300], ["2026-10-23", "stated", 291], ["2026-11-07", "stated", 288.5]]; + const pts = trailPoints({ events: said.map(([d, k, v], i) => ev(10 * (i + 1), k, v, d, k === "remembered" ? { asOf: d } : {})) }); + const states = trailStates(pts, BOX, { mark: 300 }); + const last = states.at(-1); + const xs = pts.map((p) => last.pos.get(p.n).x); + // In date order, every weight stands right of the one before, and no two closer than a point's own width. + for (let i = 1; i < xs.length; i += 1) assert.ok(xs[i] - xs[i - 1] >= 8, `${said[i - 1][0]} → ${said[i][0]}: ${(xs[i] - xs[i - 1]).toFixed(2)} px`); + const tail = xs.slice(-9); + assert.ok(tail.at(-1) - tail[0] >= 0.18 * (BOX.x1 - BOX.x0), `the July–November run has room (${(tail.at(-1) - tail[0]).toFixed(1)} px)`); + // Still a time axis: inside the box, the 2023–26 run one cluster, a year's tick between its neighbours' dates. + assert.equal(last.layout.clusters.length, 3); + assert.ok(xs[0] >= BOX.x0 && xs.at(-1) <= BOX.x1); + const y2026 = last.layout.years.find((y) => y.text === "2026"); + assert.ok(y2026 && y2026.x > xs[10] && y2026.x < xs[11], "1 January 2026 between 15 August 2025 and 9 January 2026"); + for (const st of states) for (const c of st.layout.clusters) assert.ok(c.x1 >= c.x0 && c.x0 >= BOX.x0 - 1e-6 && c.x1 <= BOX.x1 + 1e-6, `at ${st.at}`); +});