fix: UE5 texture cloning, centralize text measurement, add flex layout - #11
Conversation
- Use Rc<Vec<u8>> for UE5 texture data to avoid O(n) clone on every blit - Add BITMAP_GLYPH_WIDTH constant and bitmap_measure_text() helper to oasis-types, replacing 13 hardcoded `text.len() * 8` approximations - Add FlexLayout, GridLayout, and vertical_list helpers in oasis-ui/flex - Migrate dashboard grid and app runner content lines to use new layout Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gemini AI Code ReviewIssues
Previous Issues(none) Suggestions
Notes
Generated by Gemini AI (gemini-3-flash-preview). Supplementary to human reviews. |
Review Response Agent (Iteration 1)Status: No changes needed Fixed Issues
Ignored Issues
Deferred to Human
Notes
The agent reviewed feedback but determined no code changes were required. |
Missed in initial migration -- use BITMAP_GLYPH_WIDTH constant. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gemini AI Incremental ReviewThis is an incremental review focusing on changes since the last review. Issues
Previous Issues
Suggestions
Notes
Generated by Gemini AI (gemini-3-flash-preview). Supplementary to human reviews. |
Review Response Agent (Iteration 2)Status: No changes needed Fixed Issues
Ignored Issues
Deferred to Human
Notes
The agent reviewed feedback but determined no code changes were required. |

Summary
Vec<u8>clone (O(n) per blit) withRc<Vec<u8>>(O(1) refcount bump) in UE5 backend texture data path -- eliminates ~522 KB allocation per blit callBITMAP_GLYPH_WIDTHconstant andbitmap_measure_text()helper tooasis-types, replacing 13 hardcodedtext.len() * 8approximations across 3 backends, browser, and test stubsoasis-ui/src/flex.rsmodule withFlexLayout(row/column, gap, justify, flex weights, percent sizing),GridLayout(uniform grid with gap/padding), andvertical_list()helper -- 12 unit testsGridLayout::cell_rect(), app runner content lines useflex::vertical_list()Test plan
cargo fmt --all -- --checkpassescargo clippy --workspace -- -D warningspassescargo test --workspace-- all tests pass (including 12 new flex layout tests)cargo build --release -p oasis-appsucceedscargo build --release -p oasis-ffisucceedsGenerated with Claude Code