Skip to content

render-pipeline: \boxed draws its frame (amsmath \fbox geometry), no more dropped-frame warning (#311) - #336

Merged
GoKubar merged 5 commits into
mainfrom
agent/daniel-parent/boxed-gh311
Sep 14, 2026
Merged

GoKubar merged 5 commits into
mainfrom
agent/daniel-parent/boxed-gh311

Conversation

@d-q222

@d-q222 d-q222 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Lane daniel-parent (Max 20x, mac-m5pro-dq222; not daniel-vpclaude), claim GH-311, in the math-layout area the Commander gave daniel-parent on #2 at 05:23Z.

Problem

\boxed{…} parsed but rendered without a frame, with warning[math_limitation] \boxed frame dropped: math-layout has no framed-box atom.

Change (crates/render-pipeline/src and tests only; no vendor/ or math-layout change, no re-pin needed)

  • Placeholder seam: the \boxed body goes through the pipeline's existing placeholder handle, the same seam that sets \text runs and grids inside math. It is laid out in display style (amsmath: \boxed{#1} = \fbox{\m@th$\displaystyle#1$}).
  • Frame: framed_math_box wraps the body with \fboxsep = 3pt and \fboxrule = 0.4pt.
    • Width: body + 2(sep + rule).
    • Height: body + sep + rule.
    • Depth: body + sep + rule.
    • That's LaTeX's \@frameb@x. The parent formula's Appendix G spacing and script placement see the framed box's real metrics.
  • Rules: four existing Item::Rules. The side rules overlap the horizontal rules by half their thickness, matching the existing \fcolorbox display-list geometry. (TeX's \vrule runs the full height; the difference is 0.2pt at each end.)
  • Also: nested frames work, source tags are preserved, and limitations inside the body are still reported. The dropped-frame diagnostic is removed.

Tests

  • New tests/boxed_math.rs, inline and display: 4 rules per frame, 0.4pt thickness, sides aligned with top and bottom, first glyph inset 3.4pt, no dropped-frame diagnostic. It failed first at checkpoint f831674b.
  • daniel-parent, own run: --test boxed_math 1/0, --lib 79/0, --test math_text 7/0.
  • Worker: full render-pipeline suite 79 passed with all result lines ok, identical to the base control run; incremental 1 passed, 1 ignored (same as control); math-glyph-spans boxed test 1/0; git diff --check clean.

Provenance

Codex gpt-5.6-luna at max (cx slot plus), checkpoints f831674b → 3de6f17d → 64c3ec89 → 98398d1d; the worker ran offline and daniel-parent pushed each checkpoint. daniel-parent reviewed the geometry against \fbox and re-ran the gate.

Added an end-to-end render-pipeline test for inline and display \boxed frames, including four-rule geometry assertions and the dropped-frame diagnostic check.

Ran: CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-boxed cargo test --manifest-path crates/render-pipeline/Cargo.toml --test boxed_math boxed_math_draws_frames_in_inline_and_display_math -- --nocapture
Result: test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out.

Next step: implement framed math through the existing math placeholder substitution path.
Open questions: none; vendor copies remain read-only.

Implementation-Agent: codex gpt-5.6-luna (max, cx slot plus)
Commit-Executor: codex
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Rendered compiler Frame::Box atoms through the existing math placeholder and MathBox::Rule paths. Box bodies are laid out in display style, framed with 3pt separation and 0.4pt rules, substituted with matching dimensions, and no longer reported as dropped. Added inline/display rule geometry assertions.

Ran: CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-boxed cargo test --manifest-path crates/render-pipeline/Cargo.toml --test boxed_math boxed_math_draws_frames_in_inline_and_display_math -- --nocapture
Result: test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out.

Next step: run focused feature/source-span checks and the full render-pipeline suite, then self-review.
Open questions: none; vendor copies remain untouched.

Implementation-Agent: codex gpt-5.6-luna (max, cx slot plus)
Commit-Executor: codex
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Removed an unused public wrapper after the combined grid/frame substitution helper became the only call path.

Ran: CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-boxed cargo test --manifest-path crates/render-pipeline/Cargo.toml --features math-glyph-spans --test boxed_math boxed_math_draws_frames_in_inline_and_display_math -- --nocapture
Result: test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out.

Ran: CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-boxed cargo test --manifest-path crates/render-pipeline/Cargo.toml --features math-glyph-spans --test math_glyph_spans -- --nocapture
Result: test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out.

Next step: run the complete render-pipeline suite after the implementation.
Open questions: none.

Implementation-Agent: codex gpt-5.6-luna (max, cx slot plus)
Commit-Executor: codex
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Reserved None key entries for grid and framed-box placeholders so TextSink::keys stays parallel with TextSink::texts, and narrowed the new frame-only helpers to crate scope.

Ran: CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-boxed cargo test --manifest-path crates/render-pipeline/Cargo.toml --test boxed_math -- --nocapture
Result: test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s

Ran: CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-boxed cargo test --manifest-path crates/render-pipeline/Cargo.toml --test math_text -- --nocapture
Result: test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.13s

Ran: CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-boxed cargo test --manifest-path crates/render-pipeline/Cargo.toml --features math-glyph-spans --test boxed_math -- --nocapture
Result: test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s

Next step: hand off the clean lane with the full-suite evidence from the prior implementation checkpoint.
Open questions: none.

Implementation-Agent: codex gpt-5.6-luna (max, cx slot plus)
Commit-Executor: codex
Lane-Owner: daniel-parent (mac-m5pro-dq222)
@GoKubar
GoKubar merged commit a987c2e into main Sep 14, 2026
19 of 20 checks passed
@GoKubar
GoKubar deleted the agent/daniel-parent/boxed-gh311 branch September 14, 2026 14:42
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