Integrate Blitz DOM and Shell patches; add UI framework scaffolding#8
Merged
Conversation
- Add appthere-ui to workspace members and workspace.dependencies - Remove thiserror from appthere-ui (unused dep, OQ-F) - Add pick_error_prefix and viewport_width_px props to AtHomeTabProps (OQ-A, OQ-D) - Update iris-app/Cargo.toml with Phase 2 dependencies (appthere-ui, tracing-subscriber) https://claude.ai/code/session_0124A4b3rVSawFEMkb2cUmcn
Implements the full iris-app shell using appthere_ui components: - state.rs: AppState, OpenDocument, ToolMode, detect_platform() - app.rs: root App component with AtThemeContext injection - layout.rs: AppLayout composing AtTitleBar, AtTabBar, and body panels - home_tab.rs: IrisHomeTab wrapping AtHomeTab with Iris templates - ribbon.rs: IrisRibbon with Edit/Adjustments/Export tabs (text label placeholders) - tool_palette.rs: ToolPalette left sidebar with Pixel/Vector mode toggle - canvas_area.rs: CanvasArea mounting IrisCanvas with viewport sync - layers_panel.rs: LayersPanel right sidebar with add/remove/visibility controls - status_bar.rs: IrisStatusBar repurposing AtStatusBar for layer count + canvas dims - main.rs: tracing init + dioxus::launch(App) All files under 300 lines. cargo check --workspace clean. All tests pass. https://claude.ai/code/session_0124A4b3rVSawFEMkb2cUmcn
WGSL `vec3<f32>` has 16-byte alignment, which forced `_pad` to start at offset 48 and bloated the struct to 64 bytes. The Rust `[f32; 3]` counterpart has 4-byte alignment, making the Rust struct 48 bytes. wgpu validation rejected the draw call because the uploaded buffer was 48 bytes but the shader expected 64. Replace `_pad: vec3<f32>` with three separate `f32` scalars (_pad0, _pad1, _pad2). All three have align=4, so they pack immediately after opacity at offsets 36/40/44, giving a 48-byte struct on both sides. 48 is already a multiple of 16, so no struct-level padding is added. https://claude.ai/code/session_0124A4b3rVSawFEMkb2cUmcn
…omPaintSource Calling queue.submit() inside CustomPaintSource::render() corrupts Vello's in-progress CommandEncoder, causing the "Encoder is invalid" crash. Add Compositor::composite_to_texture(), which composites all visible pixel tiles in CPU RAM (Porter-Duff over, f16→f32→sRGB u8) and uploads the result via queue.write_texture(). This is safe to call mid-frame because it never creates or submits a CommandEncoder. Switch IrisCanvasPaintSource::render() to call composite_to_texture() instead of composite(). For Phase 2 (blank document, no tile data), the CPU loop body is never entered and the result is a transparent Rgba8Unorm texture. The GPU BlendPass in pass.rs is retained for the Phase 4 compute path, which will need to route through render_to_texture() rather than queue.submit(). https://claude.ai/code/session_0124A4b3rVSawFEMkb2cUmcn
"0.7.4" is a semver range (>=0.7.4 <0.8.0) and was resolving to 0.7.9. "=0.7.4" forces the exact version so Loki-borrowed patches apply correctly. https://claude.ai/code/session_0124A4b3rVSawFEMkb2cUmcn
The workspace pinned dioxus to =0.7.4, but dioxus's internal dep on dioxus-native-dom is a semver range that resolves to 0.7.9 on crates.io. The patch declared version 0.7.4, so Cargo flagged it unused. Update the patch Cargo.toml to declare version 0.7.9 so Cargo applies the vendored event-converter fixes (composition, touch, scroll) at the correct resolved version. fontique: patch remains at 0.8.0 — the crate graph uses fontique 0.6.0 (parley 0.6.0 + blitz-dom), so the 0.8.0 alias fix is correctly unused. https://claude.ai/code/session_0124A4b3rVSawFEMkb2cUmcn
Vello's register_texture() requires COPY_SRC so it can copy the texture into its image atlas each frame (wgpu copy operation). The texture was created with TEXTURE_BINDING | COPY_DST, missing COPY_SRC. When Vello attempted the atlas copy, wgpu rejected it mid-encoder with a validation error, invalidating the encoder. Every subsequent begin_render_pass on that encoder then failed with "Encoder is invalid". Fix: replace TEXTURE_BINDING with COPY_SRC. COPY_DST is still needed for the initial queue.write_texture() upload. https://claude.ai/code/session_0124A4b3rVSawFEMkb2cUmcn
Blitz applies default browser-style body margin (~8px). Wrapping AppLayout in a zero-margin/padding div that fills 100vw × 100vh removes the gap around the shell chrome. https://claude.ai/code/session_0124A4b3rVSawFEMkb2cUmcn
Blitz's UA stylesheet sets body { margin: 8px } which a div-level
margin:0 cannot override (UA vs author specificity). Inject a <style>
element at the root so blitz processes it via Origin::Author, which
beats the UA stylesheet in the cascade.
Resets html and body to: margin/padding 0, 100% × 100% fill,
overflow hidden, border-box sizing.
https://claude.ai/code/session_0124A4b3rVSawFEMkb2cUmcn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR integrates the Blitz DOM and Shell rendering engine patches into the AppThere Iris codebase, establishes the UI framework foundation, and restructures the application entry point to use the new rendering pipeline.
Key Changes
Blitz DOM Integration (
crates/patches/blitz-dom/)Blitz Shell Integration (
crates/patches/blitz-shell/)UI Framework Scaffolding (
crates/iris-app/)main.rsto use Dioxus-based application architectureapp.rs,layout.rs,ribbon.rs,home_tab.rs,status_bar.rs,canvas_area.rs,tool_palette.rs,layers_panel.rsstate.rs)appthere-uiframeworkSupporting Infrastructure
crates/patches/dioxus-native-dom/)crates/patches/fontique/)Cargo.tomlto includeappthere-uiDependency Updates
iris-app: Replaced direct canvas/pixel/vector dependencies withappthere-uiintegrationappthere-canvas: Updated Dioxus dependencyappthere-ui: Removed unusedthiserrordependencyiris-canvas: Enhanced compositor with tile data and blend mode supportImplementation Details
Notes
https://claude.ai/code/session_0124A4b3rVSawFEMkb2cUmcn