Repository navigation
Conversation
Stacked on View › New Window. Arrange All tiles the main window and the extra window once, leaving the main window at least its minimum size. The second window moves and resizes shapes on its own slide, then puts the editor's selection back. The text caret stays in the first window. Co-authored-by: Cursor <cursoragent@cursor.com>
16f7fdf to
bf50790
Compare
FredApps
left a comment
There was a problem hiding this comment.
ReviewerA — source-read COMMENT (not an approval)
I read the head of the diff: View › Arrange All, and editing in the second window. The ROADMAP table is again hand-edited with the parity numbers (feature breadth 80%, P2 40%, UI/UX fidelity ~60%, Application shell 71%, Views 95%), which the tooling generates. PowerPoint's Arrange All tiles open presentation windows, and editing in the second window means two windows over one document need one undo history and consistent selection, a design question that this PR resolves in code I did not read. The feature is in the same group as deckcraft#433. I have not run it, and no exact-head CI result exists for this head. Nothing was run.
I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.
Status: waiting_author.
aiongg
left a comment
There was a problem hiding this comment.
AI-generated review (Opus). Not a maintainer decision.
Changes needed:
This adds Arrange All, which tiles the main window and the second window once with sensible minimums. It also lets the second window edit shapes through the shared tool. The tiling logic is careful, but the editing half and the docs need more work.
- Arrange All and editing in the second window are separate features. Splitting them would let the tiling (doc_window.rs arrange, arrange_within, take_tiles) land on its own.
- During a gesture that starts in the second window, the main canvas draws the smart guides, marquee, shape preview and freeform path on the editor's slide (crates/ui-egui/src/canvas.rs:932-964). The second window paints only the slide image and selection handles, so drawing a new shape there shows no rubber band.
- edit_pointer rewrites undo entries from index undo_before onwards. When the undo stack is at its limit, push_undo drops the oldest entry (crates/engine/src/lib.rs:754), so the new entry is skipped and keeps the second window's selection.
- If the editor already has an open interaction, a second-window gesture is folded into it. Both then commit as one undo step (doc_window.rs edit_pointer, had_ix branch).
- ROADMAP.md adds a second 'Last reviewed' line and duplicate Feature breadth, Features and per-area rows with older numbers (80%, P1 75%, P2 40%, Views 95%) next to the current ones (ROADMAP.md:6, 20-21, 53-54, 75-80).
- The figures disagree across files: docs/parity-checklist.md gives Views 100% and P2 56%, while the ROADMAP.md rows and the docs/target-app-parity.md revision line say Views 95% and P2 40%, and 'breadth 79% → 80%'.
- The new milestone change-log entry says grid options are still missing, but the Views milestone row in the same file lists them as done.
Claims checked:
- unverified: View › Arrange All tiles the main window and the extra window once, side by side on a wide screen (crates/ui-egui/src/doc_window.rs arrange() stores the plan, take_tiles() consumes it once and apply_tile() sends the position and size to each viewport; arrange_within prefers the horizontal split whe…
- verified: The main window stays at least 900×560 points so it does not cover the other window (crates/ui-egui/src/doc_window.rs MAIN_MIN = (900.0, 560.0) passed to arrange_within/split_axis; apps/deckcraft/src/main.rs:202 has the same minimum)
- verified: With only one window open, Arrange All reports that New Window has to be open (crates/ui-egui/src/doc_window.rs:89-91 returns Err("Arrange All needs New Window open") when doc_window is None)
- unverified: A request with no monitor size waits until a screen size is known (crates/ui-egui/src/doc_window.rs take_tiles returns None for Arrange::Screen without a monitor (or one under 64 points) before clearing app.arrange)
- contradicted: The second window moves and resizes shapes on its own slide and draws with the current tool (Edits go through crates/ui-egui/src/doc_window.rs edit_pointer, but the tool's guides, marquee, preview and path_preview are painted only by crates/ui-egui/src/canvas.rs:932-964 on the editor's slide. The s…
- verified: The editor's slide and selection stay where they were, and undo does too (crates/ui-egui/src/doc_window.rs edit_pointer restores st.selection, sets a new interaction's selection to the editor's and rewrites undo entries after undo_before. Edge cases: push_undo trimming at crates/engine/src/lib.rs:7…
- unverified: The text caret stays in the first window (crates/ui-egui/src/doc_window.rs arm_window sets selection.text = None for the gesture, and edit_pointer restores the editor's selection, including text, afterwards)
- contradicted: Checklist row done; breadth is 80% (Views 95%, P2 40%) (docs/parity-checklist.md summary now gives P2 56% and Views 100%. ROADMAP.md:18 keeps 84% and :20 adds a duplicate 80% row, and ROADMAP.md:75-80 duplicates the area rows with older values)
- unverified: Stacked on #560; only the last commit is new (crates/ui-egui/src/doc_window.rs already exists on the default branch with New Window. The diff changes it to add Arrange All and editing)
Recommendation: update the pull request; it will be reviewed again.
Reviewed at bf50790.
Summary
view.arrangeAll) tiles the main window and the extra window once. On a wide screen they sit side by side. The main window stays at least 900×560 points, so it does not cover the other window. With only one window open, the command reports that New Window has to be open.Test plan
cargo fmt --check, clippy-D warnings, workspace tests, assets, layers, and wasm. Three craft-fonts tests were skipped because the font manifest is not on this machine:symbol_font_characters_draw_in_the_sym_font,korean_composes_in_the_notes_pane,cjk_text_in_the_interface_is_drawn_with_real_glyphs.