R5.5: ElyTable right-click menus, Excel-style; three rounds used, last fixes tested

Grid and header menus share ely_office::menu with ElyDoc. Each item's
availability is the kernel's state for the exact command it runs
(patch 0045). Patch 0046 lets a header select its row or column while
a shape is selected or its text is edited: the view shell ends the
drawing edit, keeps the typed text, leaves drawing mode, then marks.
Ely no longer sends Esc first.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-14 13:02:10 -04:00
1 parent 07c0b43542
commit 87886c8a8d
30 files changed
+1010 -106

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
FAIL
apps/ely-table/src/menu.rs:150 — [P2] Header menus enable every action unconditionally, violating R5.5's requirement that availability come from the kernel. Protect a sheet with only selection allowed, then right-click a row header: Insert, Delete, Cut and Clear Contents remain enabled. The kernel disables those operations, and choosing Delete produces `rows.delete: the undo history did not move` instead of an unavailable menu item. Reproduced against the rebuilt worker; see `.work/R5.5-r1-review/kernel-probe.log`. Obtain authoritative availability after the header selection settles, store it with the menu offer, and test protected row and column headers instead of treating all header actions as enabled.
crates/ely-office/src/menu.rs:1 — [P3] Six new comments exceed the explicit ten-word limit: this file's lines 1, 33, 50 and 69, and `apps/ely-table/src/menu.rs:155` and `:186`. Running `python tests/scripts/comments.py` exits with failure on precisely these six comments (`.work/R5.5-r1-review/comments.log`). Shorten or remove them so the repository's required comment check passes.
+5
View File
@@ -0,0 +1,5 @@
FAIL
apps/ely-table/src/menu.rs:199 — [P2] Requesting a header menu by right-clicking the first displayed cell also hit-tests drawing objects. Place a rectangle over the top-left cells, then right-click an affected row or column header: the synthetic click returns `Target::Object`, and `offer_menu` rejects it at line 178, showing an engine error instead of the header menu. Both header kinds fail through the application event path (`.work/R5.5-r2-review/ui-probe.log`); the rebuilt-worker probe confirms the object target. Obtain header availability without hitting or selecting overlaid objects, preserve the row/column selection, and add regression coverage for covered headers.
apps/ely-table/src/menu.rs:117 — [P2] Row and column insertion use `.uno:InsertCell` availability, which differs from the commands they execute on protected sheets. Protect a sheet with selection and Insert Rows allowed, then right-click a row header: insertion is disabled although `rows.insert_above` succeeds. Insert Columns has the same failure. Both application probes fail; the rebuilt-worker probe reports `InsertCell=false` followed by successful insertion (`.work/R5.5-r2-review/kernel-probe.log`). Gate insertion with authoritative availability for the actual row/column commands, exposing that kernel state through the menu interface as needed, and test protection that explicitly permits each insertion.
+3
View File
@@ -0,0 +1,3 @@
FAIL
apps/ely-table/src/grid.rs:146 — [P2] The header-selection guard only exits an object when `graphic()` is present, but Calc clears that frame while editing the object's text. Insert a rectangle, press F2, type text, then right-click a row or column header: no row or column is selected, and Insert/Delete are disabled on the unprotected sheet because the drawing-text shell remains active. Both application probes fail (`.work/R5.5-r3-review/edit-probe.log`); the ordinary cell-editing control passes. Finish drawing-text editing and deselect its object before dispatching SelectRow/SelectColumn, preserving the entered text, and add regression coverage for both header kinds.