Skip to content

View: Formula Bar and Zoom 100% as engine commands (#289) - #295

Merged
h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
vangel76:feat/view-formula-bar-zoom100
Oct 11, 2026
Merged

h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
vangel76:feat/view-formula-bar-zoom100

Conversation

@vangel76

Copy link
Copy Markdown
Contributor

Fixes #289

view.formulaBar (View › Show › Formula Bar) and view.zoom100 (View › Zoom › 100%) already worked in the desktop UI, but only as UI-only commands. Headless sessions (CLI, MCP) couldn't run them, and the parity catalog didn't count them. Both are now engine commands (catalog 258 → 260 / 290, View 18/20 → 20/20).

What changed

  • view.zoom100 ({} → {zoom}): sets the active sheet's zoom to 100%, the same as view.zoom {percent: 100}. The ribbon's 100% button now runs it.
  • view.formulaBar ({on?: bool} → {on}): toggles a new formulaBar preference in Prefs (default shown). Excel keeps this as an application option, so it's not saved in the workbook. It runs without an open workbook (enabled: always).
  • UI: the formula bar shows from session.prefs.formula_bar. The ribbon checkbox runs the command, and so do the native menu (unchanged, it already ran view.formulaBar) and the control channel's ui.set {formulaBar} (its response still includes formulaBar). I removed the UI-only interceptions and their duplicate entries in engine.commands, and dropped UiState.formula_bar.
  • Docs: regenerated docs/parity-checklist.md; catalog number and revision rows in docs/target-app-parity.md and ROADMAP.md (plus a progress-log row); a note in docs/control-protocol.md.

Tests

  • cmd::view::tests::zoom_100_resets_the_active_sheet_zoom
  • cmd::view::tests::formula_bar_toggles_without_a_workbook_and_defaults_to_shown: also checks that a prefs.json saved before the option existed keeps the formula bar shown.
  • tests::every_command_survives_empty_params covers both commands.

Commands run (touched crates only):

  • cargo test -p gridcraft-engine --lib (127 passed)
  • cargo test -p gridcraft-ui-egui --lib (21 passed)
  • cargo clippy -p gridcraft-engine -p gridcraft-ui-egui -p gridcraft --all-targets -- -D warnings
  • cargo fmt -p gridcraft-engine -p gridcraft-ui-egui -- --check
  • cargo xtask parity / --check
  • Offscreen render of the View tab after view.zoom {150}, view.zoom100, view.formulaBar {}: formula bar hidden, checkbox cleared, zoom 100%. Checked by eye.

Not done / notes

Unverified assumptions

  • None about Excel behaviour beyond "Formula Bar is an application option (File › Options › Advanced › Display), not stored in the workbook", which matches where Excel exposes it.

🤖 Generated with Claude Code

- view.zoom100 sets the active sheet's zoom to 100% (the ribbon's 100%
  button runs it).
- view.formulaBar {on?} toggles a formulaBar preference (Prefs, saved in
  prefs.json on desktop; an application option, not in the file). The UI
  shows the formula bar from it; the ribbon checkbox, native menu and
  ui.set {formulaBar} go through the command.
- The UI-only interceptions and their entries in engine.commands are gone,
  so the CLI and MCP can run both. Parity checklist regenerated (260 / 290).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit 4f7144d into storytold:main Oct 11, 2026
@echelon

echelon commented Oct 11, 2026

Copy link
Copy Markdown
Member

Merged — thank you for the contribution! (I resolved a conflict with #294 in control.rs/lib.rs — the UI-level view.zoom100 handler is gone now that it's an engine command.)

If you haven't already, come join us on the ArtCraft Discord: https://discord.gg/artcraft

h-a-n-a-s-h-i pushed a commit that referenced this pull request Oct 11, 2026
…after #295)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parity: View › Formula Bar and Zoom 100% (view.formulaBar, view.zoom100)

3 participants