Skip to content

fix(runtime): lay out <panel> children as a column - #76

Merged
SunkenInTime merged 1 commit into
masterfrom
fix/panel-column-layout
Sep 6, 2026
Merged

SunkenInTime merged 1 commit into
masterfrom
fix/panel-column-layout

Conversation

@SunkenInTime

@SunkenInTime SunkenInTime commented Sep 5, 2026 •

Copy link
Copy Markdown
Collaborator

What

<panel> projected directly onto Native SDK's panel kind, whose children overlay each other. The contract (sdk/CONTRACT.md lines 127 and 604) promises column layout. Two <text> children in a <panel> rendered at identical bounds, one on top of the other.

Now <panel> lowers exactly like a styled <column>: outer panel for paint and effects, inner column for child layout and gap.

Receipts

  • Before: experiments/render-loop-cadence/panel-probe/ (branch master today). Snapshot shows both texts at bounds=(8,8 56x80).
  • After: same widget, texts at (32,31 7x11) and (32,48 7x17), matching the <column> control beside them.
  • New unit test: panel lowers to a painted box around a column so children stack vertically.
  • zig build test: 89 passed, 1 skipped.

Why it went unnoticed

weaver check passes, the receipt says ok, and the semantic tree has every node. Only pixels show it. One of four agents in the render-loop cadence experiment shipped this exact defect at 7/10 self-confidence.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@greptile-apps

greptile-apps Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Greptile Summary

Native <panel> elements now place their children in a vertical column while retaining the panel as the painted container. Runtime checks verified stacked children, single gap ownership, retained alignment and wrapping settings, and preserved outer paint effects.

Confidence Score: 5/5

The panel layout change is safe to merge based on passing null-backend runtime checks and targeted before-and-after behavior checks.

The checks demonstrated the former direct-child panel structure, verified the new column structure, rejected duplicate gap ownership under a deliberate mutation, and confirmed that paint effects remain on the outer panel. The current null-backend runtime suite also completed successfully.

Files Needing Attention: No changed files need further attention. runtime/src/main.zig contains the validated projection and regression coverage.

T-Rex T-Rex Logs

What T-Rex did

  • I compared the former direct-child panel projection with the current nested-column projection and verified the null-backend runtime tests pass (88 tests passed, 2 were skipped, and none failed) with the test graph compiling.
  • I validated that the gap is assigned to the inner column and cleared on the outer panel, and that restoring the implementation made the focused regression test pass.
  • I inspected the mappings from retained panel options to the nested column and confirmed current runtime test coverage, noting a historical worktree could not start due to a missing Native SDK dependency.
  • I ran equivalent paint-effect reproductions before and after the layout change, confirmed the outer panel's visuals stayed the same while the inner child changed to a column, and executed the panel-lowering regression test on the current checkout.
  • I removed temporary validation edits from the runtime files and captured the final diff and repository status showing no staged or unstaged changes.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (2): Last reviewed commit: "fix(runtime): lay out <panel> children a..." | Re-trigger Greptile

@SunkenInTime

Copy link
Copy Markdown
Collaborator Author

Re the Greptile P1: the flagged setCrossAlign(panel, .center) call is not in this PR. The commit touches runtime/src/main.zig only at the .panel lowering arm and adds one test, panel lowers to a painted box around a column so children stack vertically, which uses setNumberProp(panel, "gap", 6) and no alignment setter. git grep setCrossAlign b48e600 -- runtime/src/main.zig returns nothing. The uncompilable test named in the review (panel inner column preserves child alignment and wrapping projections) is T-Rex's own scratch test, not part of the branch.

Local receipt on this exact commit: zig build test --summary all → 9/9 steps, 89/90 tests passed, 1 skipped, on macOS.

The failed macOS headless job was dev watcher normalizes atomic saves and ignores Weaver output (expected 1, actual 2), a filesystem-timing test in cli/test/dev-watcher.test.mjs that this runtime-only change cannot affect; the same job passed on #77 minutes later. Rerunning it.

The contract describes <panel> as "a styled box; column layout", but the
runtime projected it straight onto Native's panel kind, whose children are
overlay-positioned. Two texts inside a <panel> therefore rendered on top of
each other at the panel's full bounds, pinned top-left. weaver check, the
semantic snapshot, and the capture receipt all passed.

Project <panel> the way a styled <column> is already projected: the outer
panel owns paint and effects, an inner column owns child layout and the gap.

Receipt: experiments/render-loop-cadence/panel-probe (before) and the new
unit test (after). Found by the render-loop cadence experiment, where one of
four blind agents shipped it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@SunkenInTime
SunkenInTime force-pushed the fix/panel-column-layout branch from b48e600 to 2f17e99 Compare September 5, 2026 20:09
@SunkenInTime
SunkenInTime merged commit b7f79e3 into master Sep 6, 2026
9 checks passed
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.

1 participant