Skip to content

Read structure documents written against awesIO main (0.1.0), and draw their canopy faces - #10

Merged
1-Bart-1 merged 2 commits into
mainfrom
agent/9-symaweviewer-read-the-structure-document
Oct 21, 2026
Merged

1-Bart-1 merged 2 commits into
mainfrom
agent/9-symaweviewer-read-the-structure-document

Conversation

@1-Bort-1

@1-Bort-1 1-Bort-1 commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

The viewer now reads the structure document awesIO main defines, the one SymbolicAWEModels writes through KiteGeometry. The schema and both V3 examples are vendored from 1-Bart-1/awesIO@99a36e2, the merge of 1-Bart-1/awesIO#36 and the commit KiteGeometry generates its types from, so both readers use the same schema. Before this, the viewer refused every such document, because it was built against an older schema.

The renames are followed through: a point's fixed flag now places the ground-anchor cone, and stations are read from spanwise_stations. A column the schema makes optional and a file leaves out is read as absent, never as zero. A tube is still drawn as a cylinder at its diameter. Where a file gives tubes no diameter, they are drawn as plain lines between their bodies.

The canopy has moved out of the line elements into canopy faces, so the beam kite only draws as it did before if those faces are drawn. They are now drawn as a translucent surface, with a palette colour and a legend entry of their own.

The version rule is the schema's own: a document whose major version is not the vendored schema's is refused, naming both versions. These documents are at awesIO 0.1.0, so one at awesIO 1.0.0 is refused with: run.arrow is written against awesIO 1.0.0; this viewer reads the awesIO 0.1.0 schema, and so awesIO 0.x only. No run worth keeping was written against the old schema, so the viewer carries no second reader for it. A newer minor version is still only warned about; whether that should change while awesIO is below 1.0 is #11.

The two examples are vendored with one edit: their bare - units are quoted. As awesIO writes them (units: [-, -, m]) they are not valid YAML 1.2, and the YAML reader these tests use refuses them. Read with that edit, they hold the same data PyYAML reads from the originals. The one exception is a coordinate written 1e-12, which PyYAML reads as a string. Both are passed on to 1-Bart-1/awesIO#30, which regenerates these examples.

For code built on the viewer, three things change. A highlighted group's block is now named spanwise_stations where it was stations. The palette has a canopy entry. The cone is placed from the fixed flag rather than from the winch point. In both examples these are the same point.

before: the beam kite from awesIO 2568e27 on the viewer's main, canopy springs drawn as lines
after: the beam kite from awesIO 99a36e2 on this branch, canopy faces drawn as a surface, kite at zenith

Before: main with the beam document it vendors (awesIO@2568e27). After: this branch with the beam document from awesIO@99a36e2. Both use the same camera offset from the kite's centre, the same field of view and the same render code. The documents differ in one more way than the canopy: the new one places the kite at zenith, and the old one placed it at about 70° elevation, so the kite is tilted differently.

Verification

  • Reproduced first: on main, both awesIO main examples are refused with v3_psm_structure is written against awesIO 0.1.0; this viewer reads awesIO 1.x only
  • test/topology.test.ts, test/parts.test.ts: red on main's code with the new examples (both files fail at load, on that error), green on this branch: 29 passed (vitest run, vitest, exit 0)
  • New tests: both vendored documents decode and draw their segments; a 1.0.0 document is refused with the message above; a missing tube diameter reads as absent and draws the tubes as lines; the anchor is the one fixed point in each example; canopy faces become two triangles per quadrilateral; the connectivity hash matches the schema's three-section worked example
  • Searched main before adding helpers (git grep for anchor|fixed|winch_point, tubeEnds|bodyPositions|tubeMatrices, canopy, optional|columnValues): the anchor lookup and the tube-end averaging existed inline and were moved out rather than copied; nothing on canopy faces or optional columns existed
  • pnpm typecheck clean · pnpm build clean · up to date with main
  • Vendored examples, with the dashes quoted, compared against PyYAML's reading of the awesIO originals: identical but for the 1e-12 above
  • No local CI mirror exists for this repo.
  • Benchmark: n/a
  • Re-run on the branch as it stands: 29 passed (vitest run, exit 0) · tsc --noEmit clean · GitHub CI on Read structure documents written against awesIO main (0.1.0), and draw their canopy faces #10: PASS
  • Risk: canopy faces are drawn translucent with depth writes off, so where several faces overlap the surface can look darker than it should.

Opened by 1-Bort-1, an AI agent working for @1-Bart-1.
Closes #9 · task SymAWEViewer-9

Vendor structure_schema.yml and the beam and PSM V3 examples from
1-Bart-1/awesIO@99a36e2, the merge of awesIO#36, and follow the schema:

- tables carry units, so a block a file leaves out reads as empty with
  its required headers and units;
- an optional column a file leaves out reads as absent, and tubes without
  a diameter are drawn as lines rather than cylinders;
- a point's `fixed` marks the ground anchor the cone is drawn on;
- stations are `spanwise_stations`;
- canopy faces are drawn as a translucent surface, since the canopy
  springs the examples carried as segments are now faces;
- connectivity_sha hashes the canopy faces as its third section.

The viewer reads awesIO 0.1.0, so a run written at awesIO 1.0.0 is refused
with a message naming both versions.

The examples are vendored with their bare `-` units quoted: `[-, -, m]` is
not valid YAML 1.2 and the yaml package refuses it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 added agent:running Agent task state agent:ci Agent task state and removed agent:running Agent task state labels Oct 18, 2026

@1-Bort-1 1-Bort-1 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Independent review (advisory)

Verdict: APPROVE WITH COMMENTS · 1 inline, 0 off the diff

Good

  • The renames are carried through everywhere: fixed → anchorPoints (parts.ts:106), stations → spanwise_stations (PointGroupBlock, pointPick), Q_KA2ENU/units in readBlocks defaults. Checked by grepping src and test for the old names; none remain.
  • Optional columns read as absent, as the card says: optionalColumnValues returns undefined when the header is missing, tubeMatrices returns [] then, and parts.test.ts covers it by deleting the diameter column and checking the tubes become lines with the same ends.
  • The connectivity hash gets one generalised connectivitySection (n-ary joinColumn, explicit count) rather than a third copy for canopy faces. Tested against the schema's three-section worked example.
  • tubeEnds takes over the body-row lookup tubeMatrices used to do inline, so cylinders and line fallback share one codepath. bodyRows/bodyPositions stay single-sourced.
  • The card names every API-visible change (block name, palette entry, cone source), the vendored-fixture dash quoting and the 1.0.0-refusal message, and each one matches the diff.
  • The bodyRows missing-semicolon fix (parts.ts:116) is in-file tidy-up around the change and fits §1.

Not good

  • src/Structure.tsx:114 — tubeEnds(run, frame) now runs twice per frame: once inside tubeMatrices (line 73) and again here, and here it also builds a line buffer that goes unused whenever cylinders are drawn. Passing the ends into tubeMatrices, or computing them once in Tubes, removes the duplicated per-frame body averaging.
  • The minor-version rule only warns, and under 0.x semver a minor bump is breaking, so a 0.2.0 document is read with a warning. The card defers to the schema's rule, but the move to 0.x makes this question real and it deserves an issue.
  • The anchor legend reads 'fixed point, the ground anchor' in the singular whatever anchorCount is, while the tube and canopy swatches beside it give counts.
  • The canopy <mesh> is mounted even when canopy_faces is empty. It's harmless, but it doesn't match the faceCount > 0 guard the legend uses.
  • README prose stays hard-wrapped (§6 says one paragraph per line). This follows the file's existing style, so a cleanup: PR is the right home, not this one.
  • The card doesn't name the rg searches done before adding anchorPoints, tubeEnds, canopyPositions and optionalColumnValues (§2).

claude, rubric CLEAN_CODE.md. A different lab from the implementer
on purpose: a reviewer sharing its blind spots would not flag its mistakes.

Comment thread src/Structure.tsx Outdated
@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state and removed agent:ci Agent task state agent:queued Agent task state labels Oct 18, 2026
Tubes computed each tube's two ends twice per frame, once for the
cylinders and once for the line fallback; tubeMatrices now takes the
ends. The canopy mesh mounts only when there are faces, and the anchor
legend counts its fixed points as the other swatches do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 added agent:ci Agent task state and removed agent:running Agent task state labels Oct 18, 2026
@1-Bort-1
1-Bort-1 marked this pull request as ready for review October 18, 2026 13:41
@1-Bort-1 1-Bort-1 added agent:review Agent task state and removed agent:ci Agent task state labels Oct 18, 2026
@1-Bort-1
1-Bort-1 requested a review from 1-Bart-1 October 18, 2026 13:42
@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state and removed agent:review Agent task state agent:queued Agent task state labels Oct 18, 2026
@1-Bort-1 1-Bort-1 added agent:ci Agent task state agent:review Agent task state and removed agent:running Agent task state agent:ci Agent task state labels Oct 18, 2026
@1-Bort-1 1-Bort-1 added the priority Open work waits on this label Oct 19, 2026
@1-Bart-1
1-Bart-1 merged commit 6955ba7 into main Oct 21, 2026
2 checks passed
@1-Bart-1
1-Bart-1 deleted the agent/9-symaweviewer-read-the-structure-document branch October 21, 2026 10:23
@1-Bort-1 1-Bort-1 added agent:done Agent task state and removed agent:review Agent task state labels Oct 21, 2026
@1-Bort-1 1-Bort-1 removed the priority Open work waits on this label Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:done Agent task state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SymAWEViewer: read the structure document awesIO main defines now

2 participants