Skip to content

fix(edit): recalculate every cell changed by large clears (#1032) (#1128) - #3

Open
anton-belkin wants to merge 48 commits into
mainfrom
agent-layer
Open

anton-belkin wants to merge 48 commits into
mainfrom
agent-layer

Conversation

@anton-belkin

Copy link
Copy Markdown
Owner

No description provided.

harrisonoconnorhover and others added 30 commits October 15, 2026 13:38
…ver crash) (storytold#1330)

A hostile file could abort any process that opens it: a cell formula of a
million `%` (`1%%%…`) or a 200,000-term sum parsed into trees deep enough to
overflow the stack when printed, saved, evaluated or dropped, even in release
builds. Postfix operators (`%`, invoking a result) built their nesting in a
loop that the 256-level limit did not see.

- `parse` refuses formula text longer than Excel's 8,192 characters
  (`MAX_FORMULA_LEN`, counted in characters, the leading `=` excluded). This
  also bounds the depth of the left-deep trees long operator chains build.
- Each postfix `%` and each call of a result counts towards the nesting limit.
- A file's formula that is refused keeps its text and cached value, as other
  unparsable formulas do.

Regression tests: formula (small-stack thread: long `%`, invoke and operator
chains are errors; the limit counts characters, not bytes) and xlsx
(`hostile_formula_text_does_not_overflow_the_stack`: open, save and drop a
workbook with such formulas and a defined name on a 1 MiB stack). Both abort
with a stack overflow without the fix.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…nter-applies

AutoFilter: Enter in the filter menu applies the filter and closes it
…-workflow

ci: delegate FreeBSD workflow, add nix check, and remove flatpak-pages
Generic hooks so crates an app links in can add behaviour without editing
upstream code (used by the agent-layer fork; nothing here knows about it):

- gridcraft_engine::ext: register_commands (found by find_command, listed by
  Session::commands, so control channel, CLI and MCP reach them) and
  register_observer (told before and after every Session::execute).
- gridcraft_ui_egui::ext: UiExtension with frame, side_panel, paint_cells
  (with cell geometry and the hovered cell) and context_menu.
- Name Box: hidden defined names are no longer shown for the selection, as
  in Excel.

Every edited upstream line is marked `fork:agent`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n-app MCP

crates/agent (gridcraft-agent):
- the layer per document (questions, notes, input ranges, client-data marks,
  confidence, decision history and audit trail), kept out of undo and written
  into the .xlsx as a custom XML part before every save;
- anchors as hidden defined names, so they follow inserted rows and columns
  and survive Excel;
- agent.* commands; agent reads are masked: private constants replaced by
  stand-ins (same sign and magnitude) and the model recalculated from them;
  writes to private cells refused;
- deterministic trace (precedent tree with labels) and sensitivity (output at
  each end of each input's range);
- MCP over HTTP inside the app (POST /mcp) and /events, one JSON line per new
  question for an agent's background monitor.

crates/agent-ui (gridcraft-agent-ui): the Agent pane, cell flags, client-data
hatch, confidence and impact heat maps, hover card with a tornado chart,
context-menu items, and an offscreen snapshot example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e script

The app starts the agent server on 127.0.0.1:7980 (and the control channel
it uses on 7979); --agent-port picks the port, --no-agent turns it off.
FORK.md describes the patch to upstream files and how to keep the fork
rebased; agent-layer/rebase.sh rebases onto upstream/main and runs the gates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agent.exportHtml {path, web?} writes one HTML file: GridCraft for the web
(wasm + glue, gzipped) and the workbook with its layer, answered questions
kept and shown as new, open questions dropped. set_read_only refuses every
changing agent.* command but agent.seen; the pane hides Ask and Mark, the
Connect tab says the copy is read-only and, on the desktop, offers Export
web page. Glyphs the web fonts lack are replaced. export-web.sh builds the
web app and exports a workbook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e by side

"A or B?" for a range (values or formulas) kept in the layer: agent.variants,
agent.useVariant (an undoable range.setValues, recorded as a switch),
agent.compareVariants (every option on a scratch copy, the furthest results
first). agent.method adds an exact formula beside the readable one with a
threshold; the difference is flagged where it is material, on the cell (≈)
and on the results it moves (amber underline). Variants tab and cards in the
Cell tab; MCP tools add_alternatives, add_calculation_method,
compare_alternatives, use_alternative. Refused on private ranges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agent.stress moves 3-12 inputs together inside their reasoned ranges and
finds the lowest and highest value of an output: single moves first (the
no-interaction estimate), all corners in Gray-code order when they fit the
budget (else a fixed sample), fixed points inside, then a coordinate search
from both extremes. Deterministic, on a scratch copy, capped by evaluations
and by evaluations x cells under the inputs. Cell tab: the range together vs
each input alone, and where each input sits at the two extremes. MCP tool
worst_case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agent.risk puts each input of an output on impact (its swing over its range,
relative to the widest) against the agent's confidence in it, ranked by
impact x (1 - confidence); an input nobody vouched for counts as a guess.
Risk tab: the matrix with check first / watch / refine later / fine, and the
ranked list. MCP tool risk_matrix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agent.safeMode: every save writes the workbook the agent sees (client data as
stand-ins, everything derived recalculated from them) and seals the real
values in the layer with AES-256-CTR + HMAC-SHA256 under a random key kept
outside the workbook (key folder, GRIDCRAFT_AGENT_KEYS, or the macOS keychain
with GRIDCRAFT_AGENT_KEYCHAIN=1). The observer swaps a safe copy in for the
save only and puts the real workbook back right after (and before the next
command if the save failed). Opening the file where the key is restores the
real values; elsewhere it opens locked, with stand-ins (agent.unlock retries).
agent.exportExcel writes a copy with the real values and nothing sealed.
Only a person turns the mode off. Native key store is cfg-gated; in the
browser a save writes stand-ins only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agent-layer/demo/build-demo.sh builds a small SaaS revenue model with the
whole layer (client data, reasoned inputs, confidence, alternatives, a
calculation method, safe file) and renders one offscreen PNG per feature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Per the ArtCraft links contract v1 (DeckCraft's agent-layer/links.md):
link.copy (context menu Copy Link to Cells, Cmd+Alt+C, Cell tab button)
anchors the range with a hidden _GcLink_ name (never cleaned up, put back
after an undo), gives the workbook a stable workbookId and puts a table on
the clipboard whose data-artcraft-link attribute carries the payload.
link.read answers DeckCraft with the current values (saved or not);
link.addUses and the ArtCraft registry file (read on open) record which
slides use a range, kept in the layer: outline and "N slides" badge, the
slides in the hover card, Go to Slide (link.gotoSlide, DeckCraft's control
channel, starting it on the deck when needed). link.reveal and --goto open
the workbook at the linked cells.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd agent)

A mode the app sets, never the file (Connect tab, --agent-mode):
- My session (Claude Code Channels, research preview): the server declares
  experimental["claude/channel"] and streams each new question on GET /mcp
  (SSE) as notifications/claude/channel; gridcraft --agent-stdio bridges it
  to the stdio transport Claude Code spawns channel servers with.
- Background agent: one claude -p stream-json process per document, in the
  workbook's folder, strict MCP config with only GridCraft, its tools only,
  the skill as system prompt, max turns and budget, renamed
  "GridCraft · <file>". Each new question is sent once; the session id is
  kept in the layer and resumed on reopen; New session starts from a summary
  of the history. Stop: end of input, then SIGINT. Never --bare.
Tested with a fake agent CLI; checked live with the app and a logged-in
claude 2.1.301 (one question answered with links, $0.30).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Alternatives and calculation methods, worst/best combinations, the risk
matrix, safe file mode, GridCraft's side of Excel → slide links, and the app
bringing the agent in itself (channel or background agent), merged with the
web-page export.

Conflicts resolved by keeping both sides: the read-only guard of exported
pages now wraps every spec! command (full paths in the macro, so modules
outside commands.rs use it too) and also lets a reader switch the author's
alternatives (agent.useVariant), which only changes their own copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
UiExtension::ribbon_tabs names tabs an extension adds after the built-in
ones; ribbon_tab draws one when it is active (ribbon_separator draws a
group separator like the built-in tabs). Three lines in ribbon.rs, marked
fork:agent: the tab row, the extension drawing its tab, and a match arm so
the built-in fallback doesn't draw under it. Keytips are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A generic ribbon hook (ui-egui ext: extension tabs, drawn by the extension;
three marked lines in ribbon.rs). The Agent tab holds what isn't about one
cell, in groups named as in WordCraft and DeckCraft: Agent (the pane with
what waits, questions, history), Client data (mark/unmark, safe file,
export for Excel), Connection (server status and whether an agent is
connected, the mode, New session, Copy MCP command, Connect Cowork, Open
Claude), View (heat maps), Share (link for a slide, web page). The pane
keeps the content only; its Connect tab is gone. The floating Agent button
shows only when something waits and the tab isn't in view.

gridcraft --agent-stdio is a full MCP server over stdio: handshake and tool
list answered locally, calls forwarded to the app, which it starts when
needed. Connect Cowork writes the gridcraft entry into
claude_desktop_config.json (backup first, nothing else touched), only while
Claude Desktop is closed, since it rewrites the file when it quits. The
skill tells agents without a monitor (Cowork) to loop on wait_for_questions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stdio MCP server (crates/agent/src/stdio.rs) answers the handshake and
the tool list itself and reaches the running app through the control
channel, connected on the first tool call; while GridCraft is closed, a
tool says the channel isn't reachable ("Is GridCraft open?"). It no
longer proxies to the HTTP server or starts the app. Channel events still
come from the app's GET /mcp stream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Served before logging and the window start, so only protocol reaches
stdout; [--control HOST:PORT] (default 127.0.0.1:7979).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
UiExtension::ribbon_keytips gives an extension tab its keytip (a sequence
the built-in table already has is refused); the keytip state machine opens
it and the tab row shows its badge. Two lines marked fork:agent, and a test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Connect Cowork writes {command: this app, args: [--agent-stdio,
  --control, 127.0.0.1:7979]} into claude_desktop_config.json: backup
  .bak-gridcraft-<ms>, temp file + rename, only mcpServers.gridcraft,
  non-JSON refused. While Claude Desktop runs (ps -axo comm=), it waits in
  the background for it to quit and writes 1.5 s after.
- Agent tab: Agent is one big button with the agent's mark and 1 ready /
  1 in work / 2 waiting / idle; Connection has Connect Cowork (connected /
  not set up / quit Claude / open Claude / other build), Listening ·
  127.0.0.1:7980, Agent active · just now (an agent.* call with actor
  agent in the last two minutes, HTTP or stdio), Copy Claude Code command,
  and the mode switch. Keytip G (A is Data here). The floating button shows
  only while the ribbon is collapsed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NSMicrophoneUsageDescription and the hardened runtime's audio-input
entitlement, one marked line each (fork:agent), for voice questions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hold Option (or click the microphone on the Agent tab), speak, click the
cells you mean; release and the question goes on in the background. It is
on the cells at once (transcribing flag, anchors on every cell pointed at),
local Whisper (craft-voice, candle on Metal) transcribes it off the UI
thread, and the text with a ⟦n⟧ marker where each cell was pointed at goes
to the agent's queue. Questions keep refs [{n, anchor}]; agent-facing reads
expand the markers (masked values). Failed transcriptions are flags with
Retry and Dismiss. Model choice (off, Whisper small, large-v3-turbo) on the
Agent tab, downloaded on first use with progress on the ribbon. Audio stays
in memory and is never stored. agent.spoken, agent.removeQuestion,
agent.voiceModel, agent.voiceStatus; zip 8.6.0 seeded in Cargo.lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… questions

The Voice group moves after Connection and draws its microphone with the
tab's tall button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed it

A click whose press and release fell in one frame was read before the grid
handled it, so the cell selected before was pointed at too (a stray marker
before the next click). The place is now read a frame after the button comes
up; a drag counts once; the same place again within a second adds no marker.
Each transcription is logged with segment and pointer times (text only).
craft-voice 93f7452: windows stitched without repeating a cut phrase,
looping decodes retried at higher temperature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Connection group on the Agent tab holds three things:
- the status, answering "is anyone listening?": Agent answering ·
  checked 12 s ago / Listener connected · not checked / Nobody is
  listening / No answer to check, with a Check button;
- the mode, a list: I connect my agent (MCP), Send to my Claude Code
  session (channels), Background agent, Off (tools refuse);
- Copy, one thing per item by mode, and Details… (URL, streams, session,
  last error).

Check sends agent.ping: a question of kind ping that goes out on every
path (list/wait_for_questions, /events, the channel, the background agent)
but is never shown, badged, logged or saved; answer_question on it records
how fast the agent answered. Passive signals: open /events streams,
Claude Code channel streams, wait_for_questions polled in the last minute,
the background agent, recent tool calls. The skill and the MCP
instructions say to answer a ping with "here" at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anton-belkin and others added 18 commits October 16, 2026 16:10
Push-to-talk checked egui_wants_keyboard_input, which is true for any
focused widget, and the grid takes focus with every click on a cell: once
the reader had clicked a cell, holding Option did nothing. It now checks
for a focused text box only. Option's own key event no longer counts as
another key, keytips opened by releasing Alt (Windows, Linux) are closed
after a question, and the UI extension registers once. Test: egui_kittest
drives the app: click a cell, hold Option, point, release; a shortcut and
a tap record nothing (stand-in microphone).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nto voice questions

Questions keep both the ping kind and the voice fields; counts, the channel
and the file leave out pings and spoken drafts alike.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Registry: ArtCraft/agents/gridcraft-<pid>.json, written atomically on
  changes (at most once a second) and as a 10 s heartbeat, removed when
  the window closes; stale entries of crashed instances swept. Titles and
  paths only.
- Documents by id (gridcraft:<pid>:<doc uid>): every MCP tool takes
  document; agent.onDocument runs a command with that document active
  and puts the active one back. list_documents, attach {label} ->
  listener, detach; question tools take listener (refreshed per call,
  dropped after 90 s); questions carry document and documentTitle;
  /events?document= streams one document. A ping answer records which
  listener answered.
- Connection group: the active document's listener (Listening: Cowork ·
  Acme · 20 s ago), the check with who answered, or Nobody is listening
  for this document. Modes: Claude Desktop / Cowork (AItoCraft), My
  Claude Code session (AItoCraft channel), Background agent, Off; Copy
  phrase for Claude, Install AItoCraft in Claude Desktop, Claude Code:
  add AItoCraft; the per-app --agent-stdio under Details.
- Background agent: a neutral ArtCraft/agent-sessions/ folder by default,
  the document's folder only when asked; the protocol's warning line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Ping ids ping<ms>; an unanswered ping leaves agent.questions after 60 s
  (a background agent never wakes for a stale check; the status still
  says No answer to check).
- agent.questions flags: wait_for_questions sends waiting (a listener for
  60 s, HTTP or stdio), /events, GET /mcp and the runner send poll;
  neither counts as a tool call (is_tool_call).
- Background agent: --name "GridCraft · <file>" instead of /rename; the
  history seed only when the log has something.
- Off refuses every agent-side command app-side (the command guard):
  "the agent connection is off in GridCraft (Agent tab ▸ Connection ▸
  Mode)"; initialize and tools/list still answer.
- The mode is remembered in <settings>/agent/mode; --agent-mode overrides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each registry document says when it last had focus (its window focused
while it was the active document): set when the window gains focus or the
active document changes while focused, so it moves only on those
transitions and goes out with the debounced registry writes. The hub uses
it to pick "the open file".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agent-layer was fast-forwarded to claude/agent-layer-next-20f5cf (Agent ribbon
tab, Cowork over stdio, simpler Connection group with a connection check,
AItoCraft app side, focusedAt), then claude/agent-voice-130c13 (hold-to-talk
voice questions with cells pointed at while speaking, local Whisper via
craft-voice, a Voice group on the Agent tab) is merged on top.

Conflicts: the ping question literal (both sides added fields; kept
`..Question::default()`), and the snapshot example's flags (both sets kept:
--listener and repeated --click, plus the --voice* flags).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ext::push_undo_step puts an extension's own step (label, undo, redo) into
a document's undo history beside its workbook snapshots. Undo and redo run
it in order with the ordinary steps; a step entry never restores cells,
and undoing a cell edit never runs a step. HistoryEntry gets an optional
step; edit.undo/redo hand step entries to the extension. Marked
fork:agent, with a test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A topic is the unit the layer keeps about a workbook: places (anchors with
the agent's reasons), a status (Open, Revise, Agreed, For information),
notes and the discussion. Layer format v2; v1 workbooks become topics on
load.

- Links inside text: answers, notes, status text and questions store cell
  references as anchors and show current addresses.
- Deleted places keep their whereabouts (neighbours anchored before the
  delete); cut moves a place, copy and fill don't duplicate it.
- A person's layer actions are on their undo stack through custom undo
  steps; undo of a question removes, withdraws or hides it, redo re-sends.
- Only a person sets Agreed; the agent proposes it.
- MCP: list_topics, get_topic, add_places, widen_place, set_status,
  propose_agreed; add_note takes a topic; the web export drops the
  discussion unless included.
- UI: numbered markers that keep clear of the value, Selection / Overview /
  History pane, sign-off count on the Agent button, Include Discussion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Agent tab's Connection group becomes Context, per the brief shared
with WordCraft and DeckCraft.

- A mode button with the Ready dot; its menu: No context (only this
  document, background), Claude Cowork (your chat, its project and
  memory), Claude Code (your session or a project folder), with chips.
- Beside it: Web (No context), My session | Project folder (Claude
  Code), the Ready lamp (Ready / Waiting / Not ready) and Get ready, whose
  main click runs the next step not done (log in, install AItoCraft in
  Claude Desktop or Claude Code, copy the phrase or the channel command,
  choose a folder).
- The context is per document (agent.agentContext, saved in the layer,
  undoable, logged); a new document starts with the app's last choice.
  The runner follows it: mode, folder, web tools.
- Readiness is checked in the background; something listening that
  hasn't answered gets a quiet internal check. No ping wording in the UI.
- The status line, Check, Mode list and Copy menu are gone.
- A saved context never starts a background agent by itself: only after
  the person acts on the document in this run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In a topic the agent proposes instead of editing:
- run_command {topic, option?} runs the command on a draft of the
  accepted workbook and records it in the topic's proposal;
  describe_option and discard_proposal shape it.
- Reads mark what pending proposals change (pending), read_range
  {view: "proposal"} reads a draft, topics show their proposal, and
  questions carry pendingNearby.
- The card shows the options with old -> new; the sheet previews the
  option shown. Apply replays it as one undo step (the person's), with a
  decision note "chose X: ..."; overlapping proposals go out of date; a
  step that no longer fits applies nothing.
- Reject takes a comment, which also comes back as a follow-up question.
- Events proposal_applied, proposal_rejected and proposal_outdated.
- Skill and server instructions: propose, don't ask for confirmation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The active cell inside a place lights up its topic: places outlined,
  markers ringed, the card outlined.
- The pane's text is one point larger.
- The file's own context: entries kept in the file and when it is
  sent; MCP get/add/update/remove_file_context; a summary with
  get_context and every question; a File context button beside the
  pane's tabs, where the person's edits are undoable.
- Hovering a link in the pane highlights its target without moving the
  selection: cells, a topic's places, a place (a removed one shows its
  neighbours); off screen, an edge hint ("↓ C40").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…agent

The offscreen snapshot example wrote the Context choice into the app's
settings (context.json), so the real app later started as No context
and ran a background agent on the person's subscription. The example
now keeps choices in memory (context::persist(false)) and points the
runner at a command that doesn't exist; readiness checks ask the real
claude CLI regardless.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le heartbeat

- A proposal's draft started from a fresh DocState, which recalculates
  the whole workbook: 0.4-1.3 s per run_command {topic} on a 5,000-row
  model, rebuilt by the pane after every edit (read_range with a pending
  proposal 2.2 s, listing questions 1.4 s). Drafts now start from the
  accepted document's calculated state: 2 ms, 8 ms and 5 ms.
- The AItoCraft registry heartbeat came from UI frames: an idle or hidden
  window draws none, the entry went stale after 30 s and the hub stopped
  listing GridCraft. The heartbeat now has its own thread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MCP set_ranges {ranges: [{range, values?, formulas?, format?}], reason,
source?, topic?, option?} (command agent.setRanges):
- values and formulas are 2-D arrays matching each range (one value
  fills it); format maps onto home.* commands;
- the whole call is one undo step ("(agent): set N ranges") and one
  history entry with the reason and source;
- refused whole when a range touches client data (the cells are named),
  at most 200 ranges and 100,000 cells;
- with topic it is one step of the topic's proposal, previewed old -> new.
Skill and server instructions: prefer set_ranges for more than one cell.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A fourth state, Working…, outranks Ready, Waiting and Not ready: blue and
pulsing, never green, while the agent works on this document (a claimed
question not answered, until 90 s without an agent call; or a proposal
step in the last 10 s). One topic: "Working… · topic 3", a click opens
it; the tooltip names the listener. The Agent button shows the same small
blue pulse. Only these repaint, at about 30 fps, and only while working.
The snapshot example gets --working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When Working ends the lamp turns green Ready, not grey: an answer the
agent wrote in this document in the last 10 minutes counts as proof it is
there, even with no listener attached (Anton).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reading the layer started from an empty one when any part failed to
deserialize (e.g. an unknown "kind":"codex" from a newer build), and the
next save deleted the customXml part: every topic, answer and decision
gone. Now:
- unknown enum values read as their default (an unknown context kind as
  no context of the document's own);
- list entries are read one by one; one that can't be read is left out,
  with a warning in History;
- a save is a three-way merge of the file's JSON, the layer as read and
  the layer now: what this build didn't change goes back as the file had
  it, unknown fields, values and unreadable entries included;
- a part that can't be read at all is never overwritten, and the pane
  says so.
Regression tests: an unknown context kind, unknown fields, a corrupt
topic, an unknown status, an unreadable part, an all-unknown layer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
speech_with_pointing_reaches_the_agent and three_phrases_three_clicks
still read `spokenText` and "⟦1: Sheet1!B2 · …⟧", which topics (5526877)
replaced: a pointed cell is now a link inside the text, where it was
pointed at, with refs describing it. The tests check that now: the links
in order and within the phrase spoken, refs with masked client data, the
pointed cells as places of the topic.

They hadn't failed since 5526877 because they skip without macOS `say`
and the model, and in parallel they raced on one temporary folder (one
call removed it while the other wrote), so both skipped. Each call now
has its own folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anton-belkin pushed a commit that referenced this pull request Oct 22, 2026
Japanese Excel's B4/B5/B6 are the JIS sizes (257×364, 182×257 and 128×182 mm),
but Page Setup's `b4`/`b5` were the ISO ones (250×353, 176×250): a Japanese B5
worksheet printed 8 mm narrow. `known_paper` now reads `B4`/`B5`/`B6` as JIS and
keeps the ISO sizes reachable as `B4 (ISO)`/`B5 (ISO)`/`B6 (ISO)`. This also
fixes the XLSX round-trip, whose `paperSize` ids 12/13 are the JIS sizes.

Adds the Japanese papers Page Setup lacked: Japanese Postcard (はがき,
100×148 mm), Japanese Double Postcard (往復はがき, 148×200 mm), Japanese
Envelope #3/storytold#4 (長形3号/4号, 120×235 and 90×225 mm), Japanese Envelope Kaku
#2/#3 (角形2号/3号, 240×332 and 216×277 mm), A6, and aliases such as
`postcard`, `chou #3`, `kaku #2`; the xlsx paper table gains ids 42 (ISO B4) and
43/69–74/88 so these names survive save and reopen (the ISO B5/B6 names have no
ECMA-376 paper id and stay engine-side).

The pageSetup/pageLayout.size parameter docs list the names, the Page Layout
Size menu lists them, and tests pin the point sizes, the PDF MediaBox for A4
(unchanged), B5, postcard, double postcard and kaku #2, landscape and
fit-to-page, the unknown-name Letter fallback, and the XLSX round-trip.

Docs: docs/target-app-parity.md print row + revision history, and ROADMAP.md
progress log, dated 2026-10-21.
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.

6 participants