Commit Graph

538 Commits

Author SHA1 Message Date
Brandon Thomas 7f2146476e Fix clippy on main: allow the clock read in native-only import tests
#101/#100 added tests that name temp dirs with SystemTime::now(); #125's
disallowed-methods lint (wasm has no clock) landed alongside them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:58:22 -04:00
Brandon Thomas ca4011dc5e Review fix-up: merge fixed #104; Portuguese as an i18n/pt.rs module
Merge the fixed #104 branch (which carries #31 and #38) and restructure
the Brazilian Portuguese language onto its per-language layout:

- The PORTUGUESE table moves, unchanged, to crates/ui-egui/src/i18n/pt.rs
  as pt::translate, like zh/ko/ru. Language::PtBr gets code() "pt"
  (parse also accepts pt-BR/pt_BR via the tag reduction); it is still
  saved as "pt".
- No per-language command: the View combo and the control channel switch
  with app.language.set {"language": "pt"} (app.language.portuguese is
  dropped); error text, engine.commands params and the snapshot example
  list every code.
- pt.rs covers the keys added since (Page Layout|Orientation, the display
  theme combo, and the Sheet Options View/Print checkboxes, Exibir /
  Imprimir); the coverage test checks pt like zh/ko/ru.
- people.toml keeps both new contributor entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:54:33 -04:00
Brandon Thomas b68ae0fe53 Merge pull request #100 from harrisonoconnorhover/codex/ods-import
Import worksheet data and cached values from ODS files
2026-10-10 12:52:43 -04:00
Brandon Thomas 09b1ac8d16 Merge pull request #101 from harrisonoconnorhover/codex/xlsb-import
Import worksheet data and cached results from XLSB workbooks
2026-10-10 12:52:42 -04:00
Brandon Thomas f54c0ca2a6 Review fix-up: merge fixed #31; language-ordered Han faces on #38's fallback
Merge the fixed #31 branch (which carries #38's font fallback) and resolve:

- theme.rs: build on #38's fallback_faces/load_fallback instead of the old
  load_cjk. The interface language only reorders the two Han entries
  (sys-cjk-han-ja / sys-cjk-han-zh; Japanese first for ja, Chinese first
  otherwise); Hangul, Thai and Hebrew keep their place. The region-merged
  Noto Sans CJK .ttc is loaded once, with the leading language's face index.
- Fonts are rebuilt on a language switch only when the Han order changes
  (HanOrder), not on every switch. font_definitions()/setup_context() use
  the default order and never read the host locale.
- Tests stay locale-independent (UiState defaults to English; the desktop
  app applies the system language). The web build follows the browser
  language except CJK, which would render as tofu without system fonts.
- app.language.set error/params list all five codes; engine.commands lists
  it. zh/ko/ru gain the keys #31 added (Page Layout|Orientation, display
  theme). The Page Layout screen checkbox keeps English "View" via a
  "Sheet Options|View" key (was shown as "Screen").
- Coverage test checks zh/ja/ko/Thai/Hebrew/Cyrillic in both the UI and
  cell families by comparing glyphs with the tofu glyph.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:52:00 -04:00
Brandon Thomas e8ec40da8b Review fix-up: build test anchors with ..Anchor::default()
Keeps the smooth round-trip test compiling as Anchor gains fields (e.g. #12's anchor mode).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:45:00 -04:00
Brandon Thomas d7c77e94cd Review fix-up: locale-independent defaults, lenient saved language, listed commands
- UiState::default() is English: tests, the kittest harness and the
  snapshot example no longer depend on the host's locale. The desktop app
  alone starts from the system language, when ui.json names no supported
  language (first run, an older file, an unknown value).
- An unknown or malformed saved language reads as English instead of
  failing the whole UiState and resetting every other preference.
- app.language.set takes {"language": "ja"} (with `code` as an alias, the
  name the PR description used); the View combo now uses it via
  Language::code(). The app.language.* commands are listed by
  engine.commands with the other UI commands and documented in
  docs/control-protocol.md.
- Home's text "Orientation" (方向) and Page Layout's print "Orientation"
  (印刷の向き) get separate keys through a `context|label` key form.
- Japanese: Hide Rows → 行を表示しない, Trace Dependents → 参照先のトレース;
  translate the display-theme combo merged in from main.
- system_theme test: the View tab now has two combo boxes; pick the theme one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:44:57 -04:00
Harrison O'Connor-Hoover 9dc3aaf9fa Support static pictures inside cells with XLSX roundtrip (#61) 2026-10-10 12:43:27 -04:00
Brandon Thomas fa9c6798ab Review fix-up: sort moves only objects inside the block; picture default oneCell
Re-anchor loop zips objects with their measured corners instead of indexing; a sort moves
only objects anchored inside the sorted block on the other axis too (a picture at Z3 stays
put when A1:B4 is sorted). insert.picture defaults to Move but don't size (Excel's
editAs="oneCell", which the writer emits for it), and object.setAnchorMode errors on an
unknown or empty kind. Tests for each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:41:17 -04:00
Brandon Thomas b5fe936d83 Merge pull request #66 from LloydNicholson/fix/recalc-range-dependents
Issue #122: Recalc: linear in the number of range formulas
2026-10-10 12:40:00 -04:00
Brandon Thomas c450b545a6 Merge pull request #125 from LloydNicholson/fix/wasm-commit-trap
Issue #118: committing a cell in the web app no longer traps on the clock
2026-10-10 12:39:58 -04:00
Brandon Thomas d2cc499c1d Review fix-up: return copy/cut HTML only when requested
edit.copy and edit.cut build and return the HTML table only with
{"html": true}; the UI asks for it when the host can publish HTML, so
MCP and control-channel responses are not bloated by up to 4 MB. Tests
cover the default, html:false and html:true.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:37:06 -04:00
Harrison O'Connor-Hoover 811cb116fd Release each native MSI preview through its handle (#24) 2026-10-10 12:36:07 -04:00
Brandon Thomas 36723ec310 Merge remote-tracking branch 'origin/main' into pr-12 2026-10-10 12:35:42 -04:00
Brandon Thomas f041904bf8 Review fix-up: only CFB files with an EncryptedPackage are encrypted
Every legacy .xls/.doc is a CFB/OLE2 file, so the signature alone isn't encryption. Walk the
compound file's directory (bounds-checked, bounded loops; raw UTF-16 scan when the structure
is unreadable) and report Encrypted only for an EncryptedPackage/EncryptionInfo stream;
other compound files are LegacyBinary with a "save as .xlsx" message. Tests build CFB bytes
in code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:35:36 -04:00
Brandon Thomas 277f01265b Merge fixed #38 (font fallback) into feat/i18n-language
# Conflicts:
#	crates/ui-egui/src/grid.rs
#	crates/ui-egui/src/ribbon.rs
#	crates/ui-egui/src/widgets.rs
2026-10-10 12:31:57 -04:00
Brandon Thomas c5bf34d5d7 Merge pull request #81 from dylanmtaylor/ci/flatpak-pages
Publish Flatpak repository through GitHub Pages
2026-10-10 12:30:39 -04:00
Brandon Thomas d61a21c922 Merge pull request #90 from dylanmtaylor/feat/riscv-build
ci: Add RISC-V Linux build
2026-10-10 12:30:37 -04:00
Harrison O'Connor-Hoover 784c091ae9 Handle absent installer registry values in Windows smoke checks (#24) 2026-10-10 12:30:29 -04:00
Brandon Thomas efcfd08822 Review fix-up: align the riscv64 job with the other Linux jobs
- Pin actions/checkout and upload-artifact to the SHAs the other jobs use
  (v7.0.1, v7.0.2); add rust-cache; use the same version-override command.
- Run on ubuntu-24.04 (ubuntu-26.04 is not a known hosted label) and take the
  ports suite from /etc/os-release; 22.04's riscv64 ports lag its amd64
  updates and the multiarch install fails there.
- Add linux-riscv64 to the release job's needs so release-linux-riscv64 is
  downloaded before the draft release is built.
- Drop the unused libasound2 dependency, the linker -L flags and the
  qemu-static symlink; package.sh's emulator check is the smoke test
  (QEMU_LD_PREFIX), and quote $EMULATOR there.
- Move the job above the FreeBSD comment; list riscv64 in docs/releasing.md.

Verified: the job's steps in an ubuntu:24.04 container build, package and
run gridcraft-cli --version under qemu-riscv64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:29:33 -04:00
Brandon Thomas cee21c64ec Merge remote-tracking branch 'origin/main' into feat/riscv-build 2026-10-10 12:29:27 -04:00
Harrison O'Connor-Hoover ce1e2d1cee Offer a machine-wide optional Windows desktop shortcut (#24) 2026-10-10 12:29:03 -04:00
Brandon Thomas c67931cff6 Review fix-up: protect and cap text box edits
shape.setText refuses edits on a protected sheet (drawing objects are
locked; there is no edit-objects allowance yet) and text longer than
32,767 characters, like a cell. The editor doesn't open on a protected
sheet and its TextEdit carries the same character limit. Tests for both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:23:51 -04:00
Brandon Thomas 20e39fa3cd Review fix-up: clip blank ODS repeats past the sheet edge, struct-update Cell literal
Blank cell and row repeats that run past 16384 columns / 1048576 rows
(padding from writers with larger sheets) are clipped instead of
rejecting the file; any data or merge past the edge is still an error.
convert() builds its Cell with ..Cell::value(value) so new Cell fields
take their defaults.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:22:51 -04:00
Brandon Thomas c4fd49afc2 Review fix-up: dedupe CJK fallback load, wider Linux/macOS font paths
- Load each fallback font file once: the region-merged Noto Sans CJK .ttc
  found for Han also covers Hangul (and Tahoma covers Thai and Hebrew), so a
  later script whose candidate file is already loaded reuses it instead of
  loading tens of MB again. New test: no two fallback faces share a file.
- Fold in the Linux CJK paths from #103: Fedora google-noto-cjk/, Arch
  noto-cjk/ and wenquanyi/, Debian truetype/wqy/wqy-microhei.ttc, the SC
  .otf builds, /usr/local, plus SimSun on Windows. Document the .ttc face
  indices (JP 0, KR 1, SC 2, TC 3, HK 4); Hangul uses the KR face.
- macOS: Hiragino Sans (ヒラギノ角ゴシック W3) and Hiragino Sans GB come
  before PingFang.ttc, which recent macOS no longer ships in /System.
- Comments promise glyphs instead of tofu, not correct rendering.
- fallback_covers_its_script compared has_glyphs, which is a false negative
  when the owning face also draws the replacement glyph (DejaVu Sans as UI
  font owns Hebrew); compare laid-out glyphs with the tofu glyph instead.

Co-authored-by: eyouhi <47080137+eyouhi@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:22:11 -04:00
Brandon Thomas 9365c5a9c6 Merge remote-tracking branch 'origin/main' into pr-17 2026-10-10 12:21:40 -04:00
Brandon Thomas c975b5dc75 Review fix-up: uniform, plot-clamped spline smoothing
smooth_run gives every segment the same number of sub-segments (cap / n, 1..100) so long
series are smoothed end to end within the point cap, and clamps the Catmull-Rom curve to
the plot box. List "smooth" in chart.addElement's params doc, drop the smooth_demo
example, and use the test sheet's own name in series refs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:21:35 -04:00
Brandon Thomas 26b3db78db Merge codex/xlsb-import (with origin/main) into codex/ods-import
Resolves the shared integration points for both formats: combined sniff,
file.open spec, file filters, MCP description, docs. open_bytes now lets
sniffed content (ODS or XLSB) win over the extension.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:20:30 -04:00
Harrison O'Connor-Hoover 42854f2fb9 Preserve array-sensitive XLSX formulas (#64) 2026-10-10 12:19:52 -04:00
Brandon Thomas 4955382a07 Review fix-up: control-protocol doc typo, tolerant XLSB phonetic-run tail
PhRun is 10 bytes per [MS-XLSB] 2.5.103 (four u16 fields plus a 16-bit
phType/alcH/unused1 word), so the documented size is kept; since the
RichStr ends its record and phonetic data is not imported, bytes after
the documented runs are now ignored instead of rejecting the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:19:33 -04:00
Brandon Thomas 86328ec843 Review fix-up: ignore the wall-clock scaling test by default; check its values every run
recalc_with_range_formulas_scales_linearly is flaky under load, so it is #[ignore]d (run with
--ignored in release). A small range_formulas_recalc_and_bulk_edit_correctly test keeps the
helper's value check in every run. The helper reads Instant::now, so it allows
clippy::disallowed_methods (required once #125's clippy.toml lands).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:18:59 -04:00
Brandon Thomas 435a750bba Merge remote-tracking branch 'origin/main' into pr-62 2026-10-10 12:16:17 -04:00
Brandon Thomas ff77dea87f Review fix-up: bound Switch Row/Column on whole-column chart refs
Clip a file chart's series block to the sheet's used range and refuse blocks over the
insert.chart cell cap, so whole-column references can't build ~1M series.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:16:09 -04:00
Brandon Thomas 699b95288a Review fix-up: switch to Home only when the legacy keytip prefix changes
ribbon_keys ran ui.ribbonTab every frame while the prefix was E/O/OC,
forcing the Home tab continuously. Run it once on the prefix change and
add a regression test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:14:34 -04:00
Dylan M. Taylor d3b8929fde
ci: add RISC-V Linux build 2026-10-10 12:14:29 -04:00
Brandon Thomas deecb18f5d Review fix-up: skip pre-releases, prune the Pages repo, read-only pages in build
- Skip the build when the published release is a pre-release, and refuse a
  manual tag with a pre-release suffix or a release GitHub marks as one, so
  rc builds never reach the stable branch.
- flatpak build-update-repo --prune --prune-depth=3 so the re-mirrored
  Pages repository does not grow without bound.
- The build job only needs pages: read for configure-pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:11:51 -04:00
Brandon Thomas ce2cade393 Merge remote-tracking branch 'origin/main' into pr81 2026-10-10 12:11:24 -04:00
Brandon Thomas 11472b340b Merge remote-tracking branch 'origin/main' into fix66 2026-10-10 12:11:09 -04:00
Brandon Thomas 2f9fce88b0 Review fix-up: allow the desktop logger's clock read under the new disallowed-methods lint
The logger (apps/gridcraft/src/logging.rs, merged from main) reads SystemTime::now; the desktop
app never runs on wasm, so allow the lint at that call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 12:10:59 -04:00
Brandon Thomas 7712eb1b0e Merge origin/main into fix/rich-table-clipboard 2026-10-10 12:09:28 -04:00
Brandon Thomas c5a8cf28fe Merge origin/main into codex/text-box-editing
# Conflicts:
#	apps/gridcraft/src/native_menu.rs
#	crates/engine/src/tests.rs
2026-10-10 12:08:36 -04:00
Brandon Thomas c607fe1627 Merge origin/main into fix/thai-hebrew-font-fallback 2026-10-10 12:05:14 -04:00
Brandon Thomas cecbd6cfb3 Merge origin/main into codex/ribbon-keytips 2026-10-10 12:05:04 -04:00
Brandon Thomas ea9d4c6b32 Merge origin/main into codex/xlsb-import 2026-10-10 12:04:33 -04:00
Brandon Thomas 11a921becb Merge remote-tracking branch 'origin/main' into pr-116 2026-10-10 12:04:22 -04:00
Brandon Thomas 15e0f0b6be Merge remote-tracking branch 'origin/main' into pr125 2026-10-10 12:04:21 -04:00
Brandon Thomas 1ded850ee6 Merge pull request #89 from dylanmtaylor/chore/update-actions
chore: bump github actions to fix Node 20 deprecation warnings
2026-10-10 11:57:45 -04:00
Brandon Thomas bd0ccd41b5 Merge pull request #35 from harrisonoconnorhover/fix/ribbon-dropdown-chevron
Fix missing dropdown arrows on large ribbon buttons (#26)
2026-10-10 11:57:44 -04:00
Brandon Thomas 2ad184c2d6 Merge pull request #44 from harrisonoconnorhover/codex/merged-cell-editing
Fix disappearing text when editing merged cells (#40)
2026-10-10 11:57:43 -04:00
Brandon Thomas 886fb0098b Merge pull request #46 from harrisonoconnorhover/codex/header-autofit
Fix header double-click AutoFit for selected columns and rows (#42)
2026-10-10 11:57:42 -04:00