Skip to content

Cell formatting semantics: scoped format wire field (comment stays excluded) #553

Description

@hhimanshu

Scope amended 2026-07-25

Original scope ("cell formatting semantics" — format/comment reserved-but-rejected) was post-v1/tracking-only per 2026-06-07-workbook-v1-scope.md Decision 2. That row is now superseded by 2026-07-25-amend-workbook-v1-scope-arrayformula-format.md (Decision 2), owner-approved via truecalc/distributions#64.

Approved, in scope now: a scoped format wire field on CellnumberFormat (reusing the TEXT() pattern grammar, which needs extracting into a shared module first — a prerequisite refactor), font (bold/italic/color/family/size), fill (color), border (top/right/bottom/left, each {style, color}). Canonical hex-color casing and enum spellings must be pinned for byte-identical JCS round-trip. An empty format object is rejected. Schema version bumps "1""2".

Design requirement: a set_format()-style API must NOT add the touched address to the edited list passed to Workbook::recalc_incremental (crates/workbook/src/recalc.rs:232) — a formatting-only edit must not spuriously dirty dependents or appear in the Vec<Change> the way a value/formula edit does.

Open architectural question for this issue to resolve: inline-per-cell format risks blowing the 100 MiB / ~50–100 bytes-per-cell resource-limit math (original ADR Decision 5) on real-world styled sheets at the 1M-cell cap. A workbook-level shared-style table (referenced by index — the data-structure pattern only, not xlsx import/export, which stays excluded) is the likely fix; this issue should resolve it, possibly with a follow-up Decision-5 amendment.

comment stays excluded — separate from format, still post-v1, pending its own follow-on decision (author/timestamp questions collide with the RecalcContext no-ambient-clock rule).

Blocked on fixtures. Today's GAS pipeline extracts evaluated values, not userEnteredFormat/notes — format ground truth needs a materially different Sheets API extraction path. A fixtures-pipeline design addendum is a precondition for any format fixture row, not an afterthought. This is being sequenced together with other fixtures-needing issues; do not start core work ahead of that landing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions