`C1#` gave `#REF!` while the dynamic-array formula in C1 happened to return a
single value -- a FILTER matching one row, a SORT or UNIQUE over one item -- so
`ROWS(C1#)` and `SUM(C1#)` failed and `COUNT(C1#)` gave 0. Every formula that
counts or sums a filtered list therefore broke the moment the list had exactly
one entry. In Excel the formula is the anchor of a 1 x 1 range and the three
give 1, the value, and 1.
A pass recorded the spill only for an array larger than one cell:
if a.rows > 1 || a.cols > 1 {
self.spills.insert(k, a.clone());
}
so a 1 x 1 result left no range for `spill_range` to answer with, and `eval`
turned the missing range into `#REF!`. It is recorded unconditionally now.
The report suggested keying this on the cell carrying `cm`, which turned out not
to be expressible: nothing in the model says "dynamic array" positively -- the
reader tells one from a legacy CSE formula only by leaving `Formula::array`
unset. The arm itself is the better test, because a formula whose result is a
scalar never reaches it: `=1+1` does not become an anchor, which a test pins.
It also matches Excel 365, where `=A1:A1` is a 1 x 1 anchor of its own.
gaps.md §6 still listed four things as missing and function-parity.md still
marked 15-significant-digit comparison as missing, citing #57 — all five
reports are closed and their PRs merged. The work list reads as the place to
pick work from, so a closed entry sends someone after work that is done.
Checked by behaviour, not by issue state, where that was possible:
=0.1+0.2=0.3 -> TRUE
=(0.1+0.2)-0.3 -> 5.55E-17 (full precision kept,
as in Excel: the 15-digit rule
is for comparison)
=MATCH(0.3,{0.30000000000000004},0) -> 1
=COUNTIF({0.30000000000000004},0.3) -> 1
a spill blocked and then unblocked -> #SPILL! then the spill again,
with its dependent back to 6
and by their regression tests for the other two:
`deleting_a_3d_span_end_sheet_keeps_the_rest` (#140) and
`sheet_operations_keep_names_on_their_sheets` (#134).
§6 is left open rather than deleted: it says wrong numbers are the worst kind of
bug, and five closed reports are not the same as the category being clear —
that needs §15's oracle suite. The function counts are untouched; this is
formula-language semantics, not the inventory.
Templates hide grouped columns as width="0" hidden="1". Show Detail and the level buttons only cleared hidden, so the columns stayed invisible; they now reset a zero size, as Unhide does.
The in-cell editor ignored Wrap Text: it widened to the text's one-line
width, up to the grid's right edge, so a long wrapped cell became one
unmanageable line while edited. With Wrap Text on it now keeps the
column's width, wraps, and grows down to show every line, as Excel's does.
The multiline field is one row tall at least, not four, so a short edit
doesn't reach over the rows below.
### Summary
This change centralizes the translation of user-facing error messages in the UI layer while preserving the original error payloads for machine consumption and AI-agent integrations.
### What changed
- Added a centralized error-translation path in `i18n.rs`.
- The UI now translates only the final display text, instead of altering the underlying engine or protocol error payload.
- If a translated string is not available, the original message is kept as a fallback, avoiding broken or overly-simplified output.
- The translation logic is applied at the presentation layer, not at the source of the error.
### Updated call sites
- Error and alert rendering in `widgets.rs`
- Dialog error presentation in `dialogs.rs`
- Print and feedback failures in `printing.rs`
- Top-level UI error handling in `lib.rs`
### Design intent
- Keep the raw engine errors intact for scripts, control channels, and AI/agent integrations.
- Present a clearer, localized message only to end users.
- Avoid modifying dictionary files or adding new translation entries to the global catalog unnecessarily.
- Keep the behavior consistent with the project’s accessibility and internationalization goals.
### Validation
- The focused i18n test passed successfully.
- The relevant UI test suite passed successfully.
- The repository-required CI gate was run and completed without failures according to the latest verification output.
The symbol was interpolated with Rust's Debug formatting, which escapes a
control character into literal `\n`-style text. It is now written into the
format's quoted literal directly, and a symbol holding a control character is
refused along with a quote or a backslash, so nothing is escaped behind the
user's back.
Test: `accounting_format_takes_the_symbol_it_is_given` covers `\n` and a tab.
`cargo xtask ci`: 8/8 steps, 0 failures.
`home.accounting` documents `{range?, symbol?}` but ignored the symbol: the
command always applied the `$` format, so a script or MCP client asking for
lempiras (#1893) or any other currency silently got dollars. The symbol is now
part of the code it writes, and a symbol that would break the format string (a
quote or a backslash) is refused instead of being pasted in. The default is
unchanged, character for character.
Tests: `accounting_format_takes_the_symbol_it_is_given` (displayed text for `L`
and the default, and the two refused symbols) and
`the_default_symbol_reproduces_the_accounting_format` (the built code still
equals the named `Accounting` format). `cargo xtask ci`: 8/8 steps, 0 failures.
range.fill parsed the input once at the active cell, then put back the old
style of every target that already held a cell, so 5%, $5, 3/4/2026 or
=DATE(...) lost their automatic format there (0.05, 5, 46085), and empty
targets took the active cell's style. Each target now gets what
input_to_cell gives for it (parsed once per distinct style), as typing does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI installs the stable toolchain, and Rust 1.95's clippy fails
'cargo clippy --workspace --all-targets -- -D warnings' on main:
- xls/mod.rs: collapsible_match. The XF record's size check becomes a
match guard; a full table still ignores the record (the catch-all arm).
- passthrough_tests.rs: nonminimal_bool. !is_some_and(x) is written as
is_none_or(!x).
No change in behaviour.
Signed-off-by: MH <q6rrzz@gmail.com>
With whole rows or whole columns selected, Excel inserts or deletes them
directly; it asks which way to shift only for other selections. Both
shortcuts always opened the Insert or Delete dialog, an extra step for
the most common case.
Signed-off-by: MH <q6rrzz@gmail.com>
At high zoom the heading labels stopped at 16 points (the outline levels
at 14) while the cells kept growing, so at 300-400% the letters and
numbers looked tiny in their tall headings. Excel scales them with the
zoom. The labels now scale without a cap and keep their readable floor
at low zoom (heading_font_size).
Signed-off-by: MH <q6rrzz@gmail.com>
Cells are painted left to right and a right-to-left sheet is mirrored
afterwards, so an explicit Align Right ended up on the left (and Align
Left on the right). Excel keeps an explicit alignment on the side it
names in either sheet direction; General alignment follows the sheet.
The alignment is now swapped before painting (painted_halign), for
straight and rotated text alike.
Signed-off-by: MH <q6rrzz@gmail.com>
From CodeRabbit's review of #1892: the fix also strips the prefix from
"Sheet Options|View" (the Gridlines and Headings checkboxes), but the test
only rendered File › Options. It now opens Page Layout in French and
Serbian too and checks that the checkboxes read "Affichage" / "Prikaz",
not "Options de la feuille|Affichage" / "Opcije lista|Prikaz". It fails
with the old catalog values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Undo stored the selection at the moment of undoing (wherever the user had
clicked) in the redo entry, so redo jumped back there instead of to the
cells it changed. The redo entry now keeps the undone step's selection.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Backspace clears the cell (edit.clearContents) and opens an empty editor.
Committing that editor ran cell.set "" on the already-empty cell, which
recorded a second, empty undo step, so Ctrl+Z appeared to do nothing and
the next Ctrl+Z undid an unrelated earlier edit. Committing empty text
into an empty cell now runs no command.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Alt+H, O, A (AutoFit Row Height) and Alt+H, O, I (AutoFit Column Width)
ran nothing when Alt was still held for H, as Excel allows: any key with
Alt down cancelled keytips. KeyTips now tracks the left Alt key, and a
letter typed with it held that continues a known sequence is handled as
a keytip letter. Other Alt combinations still cancel; AltGr (right Alt)
and macOS Option are unchanged (#1864).
fr.rs and sr.rs translated three `context|label` keys with the context
kept ("Options|Général", "Opcije|Opšte", "Options de la feuille|Affichage"
...). `Language::tr` shows a found translation as it is, so File › Options
section headings and the Sheet Options "View" checkboxes showed the prefix.
The values now hold only the label.
Tests: `translations_never_show_the_context_prefix` (no catalog shows a `|`
for any key) and `translated_options_headings_show_no_context_prefix`
(File › Options in French and Serbian); both fail on main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A LAMBDA recursion answered #NUM! once the formula had used 512 KiB of
native stack, so the depth it reached depended on frame sizes. On a
Windows release build the deepest countdown was F(F,94), where 0.7.0
reached F(F,131).
The evaluator now counts the LAMBDA calls a formula has in progress, in
call_lambda_values, which direct calls, defined names, MAP, REDUCE,
SCAN, BYROW, BYCOL and MAKEARRAY all go through. The 141st call answers
#NUM!. The countdown F(F,131), the deepest that the 400-level MAX_DEPTH
allows, has 132 calls in progress and still runs.
The stack check stays as a guard. Its budget rises to 896 KiB, which
leaves 128 KiB of a 1 MiB thread for the frames above the formula.
a_recursive_lambda_stops_at_the_same_call_on_any_stack_size runs
recursions on each side of the limit on a 1 MiB and a 64 MiB thread and
expects the same results. The 1 MiB test now runs the countdown
F(F,131).
rowGrandTotals is the Grand Total row under the report and colGrandTotals the
Grand Total column at its right. Both were mapped the other way round; a
GridCraft round trip hid it, but an Excel file with only one grand total opened
with the other one.
Found while testing crates/engine/src/cmd/data.rs:550 (custom_ok, used from apply_filter at :623)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SheetApp gains a non-persisted `chrome` field. Both parts stay on by
default; a host that owns its window and files can hide the title bar,
and the File tab together with the Backstage view it opens.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
file.open takes {csvAsText: true}: a CSV, TSV or TXT file opens with every field as the text
it holds, with no number, date or boolean conversion, so identifiers such as GTINs, SKUs and
ZIP codes keep their digits and leading zeros and save back unchanged. The default is
unchanged. The CsvOptions.parse_values switch already existed in the reader.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
While pointing at another sheet, a reference without a sheet name (A1) was outlined on the
sheet being shown instead of the sheet the edit started on.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Fixed: On macOS, Cmd-click sets mods.command, not mods.ctrl. Both calls therefore pass false for add, so point_header replaces the reference instead of adding a column or row union. Pass mods.command, as the adjacent selection path does. egui defines command as Cmd on macOS and Ctrl elsewhere. (docs.rs)
&
Fixed: Point mode remains active when the user changes sheets. The extension closure combines whole-column or whole-row references by coordinates only and discards the previous reference’s sheet. A prior Sheet2!C:C reference can therefore be combined with column E on Sheet3, then emitted as Sheet3!C:E.
Compare the previous reference’s effective sheet with the active sheet before extending it. If they differ, use only the clicked range.
Excel counts TRUE/FALSE and error values as strings in a cache field's
<sharedItems>. GridCraft wrote containsString="0" (and counted booleans and
errors as separate kinds for containsMixedTypes) for such columns, which made
the file unopenable in Excel, even when the column wasn't used in the pivot.
Add Stats::strings() (text, booleans, errors) and use it for
containsSemiMixedTypes, containsString and containsMixedTypes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>