* docs(contributing): document TAVILY_API_KEY in env var table
* ci: retrigger checks after flaky unhandled error in docs test job
---------
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
* fix(ai-provider): omit deprecated temperature on Gemini 3.6/3.7/3.5-lite
* style: wrap long geminiTurn call for prettier
* fix(ai-provider): keep default temperature for Gemini 3 family
Google strongly recommends the default temperature (1.0) for Gemini 3 since lower values may cause looping or degraded reasoning. Match the whole gemini-3 family instead of specific ids.
---------
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
* fix(slides): serialize concurrent saves to prevent file corruption
The save() function had no in-flight guard: double-tap Ctrl+S, a user-initiated save during the 30s autosave, or a close-save during autosave all issued overlapping slides:save IPC calls. The main-process handler writes via createWriteStream directly to the target path — two concurrent writes interleave zip streams, truncate the pptx, or fail with EPERM/EBUSY on Windows, then both completions race on the dirty flags. Queue saves behind a promise-chain tail (the same pattern as the docs save serializer and PR #149's markdown fix) so only one write runs at a time.
* fix(slides): mock UI-only imports in save-serialization test (fix canvas in CI)
---------
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
* fix(ai-provider): sanitize Gemini tool schemas for union types and refs (fixes#186)
Gemini FunctionDeclarations use a restricted Schema where type must be
a single string (not an array) and items a single Schema, and $ref/definitions
are not understood. Docs insert_chart/edit_chart use type ['number','null']
and ['string','null'] for nullable values, which caused HTTP 400:
Unknown name "type" at '...value.items': Proto field is not repeating,
cannot start list.
because the proto's type field is not repeated.
- Add sanitizeGeminiSchema() that resolves $ref (paragraphs), collapses
union types to single type + nullable: true, ensures items is single
schema (tuple -> first), and strips definitions.
- Use it in geminiTurn via toGeminiParameters() so every tool's
inputSchema is Gemini-compatible.
Fixes#186
* style: fix formatting for gemini sanitize helper
---------
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
The layout audit flagged ALL vertical-text bodies (vert/eaVert/wordArtVert) as width overflow because it compared pre-rotation run.x/widthPx against innerW. The renderer keeps horizontal layout convention in the lines, so run.x/widthPx describe the pre-rotation advance — comparing them against innerW false-positives on every vertical box. Skip the width check when vert is set (height check via contentHeight still applies). Adds regression test.
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
Every app's AI IPC handler computed `request.maxTokens ?? 8192`, and no
renderer ever sends maxTokens — so the per-turn output budget was a
hardcoded 8192 that BYOK users could not change. For a reasoning model
that cap is shared with thinking: probed against api.deepseek.com/v1 with
max_tokens=3000, usage came back completion_tokens=3000 /
reasoning_tokens=3000 with zero content deltas and finish_reason=length,
i.e. the model never started answering. At the observed ~129 tok/s the
8192 default is exactly the ~60s "empty reply" users reported.
Thinking cannot simply be switched off for these models: registry.ts pins
the *direct* deepseek endpoint to non-thinking because its transcript
could not round-trip reasoning, while modelEchoesReasoning() documents
that DeepSeek V4 rejects tool turns unless the reasoning is echoed back.
So the honest lever is the budget, not the switch.
- AiSettings.maxOutputTokens (absent = default, so existing settings
files keep behaving identically), clamped to [1024, 131072] when read
and when typed: a hand-edited or mistyped value can never be forwarded
to an endpoint verbatim.
- docs/sheets/slides main handlers resolve the cap through
maxOutputTokensOf(settings); markdown and pdf share docs' ai:stream
channel, so all six apps follow the setting from one place.
- Settings ▸ AI model: a numeric field (clamped on blur) labelled in all
19 languages.
- sheets' aiSettingsInputSchema is .strict(), so it had to learn the key
or saving settings would have started failing.
A BYOK reasoning model can spend the whole output budget on thinking and
close the turn with finish_reason=length and no prose at all. The loop
already reports that as `truncated`, and docs appends aiTruncatedNote to
the bubble, but markdown and pdf destructure only
{text, cancelled, turnLimit} — so the run rendered the bare "(no reply)"
(while an empty "(no reply)" turn also made the following turns look like
the assistant had stopped listening).
Probe against api.deepseek.com/v1 (max_tokens=50/3000, thinking on by
default): completion_tokens == reasoning_tokens, content deltas never
start, finish_reason=length — reasoning tokens are billed against
max_tokens, at ~129 tok/s (≈ the agent default cap of 8192 in 60s).
Both panels now take `truncated` and append the note exactly like docs;
aiTruncatedNote is added to all 19 locales of both apps, copied from
apps/docs/src/renderer/i18n/ai/*.ts so the wording stays uniform.
- Docs: DOCX rendering and pagination fidelity (page borders, VML pictures, header/footer images, cross-page tables, anchored floats, character-unit indents, CJK typography)
- Docs: more reliable PDF export for huge documents; AI rewrites keep the replaced content's formatting
- Sheets: merge workbooks; Excel-standard keyboard shortcuts; PDF export with header/footer variants and pictures
- Sheets: rendering, conditional formatting, chart and formula fidelity fixes; right-to-left sheet support
- Slides: WordArt text warp, improved text layout and font substitution; AI table edits keep formatting
Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
* fix docs canvas losing per-section left page margins
The editor pads .doc-page by the FIRST section's margins (--page-pad) and
only ever gave later sections their own wrap width, never their own x
offset. A document whose opening section is full-bleed (w:pgMar
w:left="0", typical for a cover page) therefore lost the 30mm left margin
on every following page: body blocks kept the correct width but were
glued to the paper edge, leaving a dead band on the right.
sectionWidthSpecs now emits a real dx (the block's section marginLeft
minus the canvas inset). It rides the existing visual-translate channel,
composes with column/vAlign offsets, and is neutralized while measuring,
so page slicing is untouched. Gap header/footer strips follow their own
section inset (--gap-ml on the gap box) instead of being pinned to the
first section's column; table gaps keep the canvas target.
Vertical margins were already per-page (the gap bands carry each
section's top/bottom), which is why only the horizontal offset leaked.
* fix docs pct-width tables spanning the whole paper
w:tblW type="pct" (and AutoFit to Window, which parses as 100%) is a share
of the section's TEXT COLUMN. Both rendered a bare width:100%, which
resolves against the canvas' padding box — and that box is padded by the
FIRST section's margins. A document opening with a full-bleed cover
section (w:pgMar w:left="0") therefore laid every later table across the
whole paper, hanging past the right edge as soon as the body sections'
own left inset was applied.
Both paths now resolve through the per-block --doc-content-w that
sectionWidthSpecs already delivers (unset → the old percentage, so
single-section documents are byte-identical). Protected tables get the
same treatment; nested tables keep their cell-relative % since they
inherit the outer table's --doc-content-w.
- Docs: DOCX rendering fidelity - drop caps, hidden (vanish) runs, paragraph pattern shading, floating-table anchoring and clamping, footnote sizing, justified-line spacing
- Docs: editing - page breaks split the paragraph correctly, URLs auto-linkify, Insert Hyperlink prefills from the selection, more stable table pagination
- Sheets: large streamed workbooks are splittable and formula-capable for the AI; copy_range carries live formulas; range sort up to 200k cells; 1M-cell copies over 2x faster
- Sheets: correctness - sort by raw values, shared-formula edits, typed cached strings, empty-string cells, note edits reach the save; risky structural deletes are rejected up front
- Sheets: AI chat can export sheets as standalone files; the formula bar grows to fit wrapped formulas
- Slides: right-to-left support - paragraph direction toggle, RTL tables, mirrored margins and bullets
- Slides: rendering - scaled gradients, embedded fonts, complex-script shaping, chart plot layouts and legends, theme-override colors
- Shell: open documents by dropping them onto the window; per-type document icons for OS file associations
- AI: localized busy message for overloaded providers; degenerate tool loops stopped with a unified turn budget
- Markdown: prompts to save before pasting images into untitled documents
Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
Dropping a local file from Explorer/Finder anywhere over the app previously
did nothing visible: the navigation guard blocks Chromium's default
navigate-to-file, so drops were silently swallowed.
Add a preload-side bridge (@genoffice/electron-utils/drop-open, installed by
every surface's preload) that resolves dropped files via webUtils and forwards
recognized documents to the shell over one IPC channel. The shell routes each
path through the normal File > Open pipeline, reveals its window when the drop
landed in a detached editor, and shows the existing "not supported" dialog for
known legacy formats. Page-level drop zones that cancel their events (AI
attachment panels, slides image insert) keep priority.
While files hover, Home shows a pointer-events-none drop overlay (tokens only,
i18n key in all 19 locales).
The bridge module gets its own package subpath export so sandboxed preloads
bundle only it — importing the barrel would pull node builtins into sandboxed
preloads (bundled) or leave a bare require (externalized), both fatal there.
Co-authored-by: Claude <noreply@anthropic.com>
- Sheets: CSV export and save support, Excel-matching data validation
- Docs: image, shape, WordArt, and chart rendering fixes
- Slides: downloadable font catalog with a missing-font banner
- Slides: better AI text layout and a speaker-notes tool
Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
ProjectPanel's createProject/renameProject/deleteProject calls had no error handling: an IPC rejection (disk error, permission denied) produced an unhandled rejection, onRefresh never ran, and the optimistic UI state was already cleared — the project silently didn't appear/rename/delete. SettingsModal's save() left dirty=true forever on failure with no feedback, and test() dropped rejections leaving the status pill blank. Add try/catch with window.alert for project ops (matching the sibling file-rename pattern) and .catch handlers that surface errors in the existing UI.
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
The Error Checking button only walked Univer's in-memory matrix, so on streamed workbooks it reported the loaded region's errors and either blocked formula-mode files until preload finished or labeled above-cap results as partial. Route it through a paged scan of the underlying file (journal edits included, same budgets as Ctrl+F), jump to the first error after the active cell across all sheets, and load the hit's range before scrolling to it. The full-load gate and the three partial-scan status strings become dead code and are removed.
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
The slides AI skill gains a set_speaker_notes tool that writes or clears a
page's speaker notes through the existing slides:set-notes IPC (persisted
into the .pptx notesSlide part, marks the deck dirty, refreshable via the
annotations nonce). DeckAccess grows an optional setSpeakerNotes hook; the
AiPanel wires it from a new onSetSpeakerNotes prop supplied by App, which
flushes any pending notes edit before invoking the IPC.
Split out from #129 per maintainer feedback — single-purpose, without the
local-environment bits.
Co-authored-by: Claude <noreply@anthropic.com>
The audit only compared laid-out content height against the box, so a line
wider than the box (wrap=false, or a single unbreakable token wider than
the available width) passed silently and then overlapped whatever sits
next to it. collectEntries now also records each text node's widest
laid-out line (run.x already includes marL/indent/alignment, so the
content-area comparison is exact), and auditSlideLayout reports a
'Text overflow (width)' issue past the same tolerance, prompting the AI
to widen the box, shrink the font, or enable wrapping.
Split out from #129 per maintainer feedback.
Co-authored-by: Claude <noreply@anthropic.com>
A proxy truncating one SSE frame or injecting a non-JSON keep-alive caused JSON.parse to throw inside the for-await loop, unwinding the entire turn with a cryptic parser error. Wrap each protocol adapter's event parse in try/catch that skips the bad frame and continues — the same tolerance philosophy the tool-call JSON repair already applies.
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
sseLines acquired a ReadableStream reader but had no try/finally: when a consumer threw inside the for-await loop (the standard path for in-band gateway errors like quota or moderation), the generator's .return() ran with no cleanup — the reader stayed locked and the underlying socket was not returned to the pool until GC finalized it. Wrap the read loop in try/finally that cancels the reader and releases the lock.
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
The close-save handler called doSave('save') which returned false immediately when savingRef was set (blur autosave in flight), so clicking Save in the close dialog silently canceled the close with no feedback. Wait for the in-flight save to finish, skip the retry when the document is already clean, and only then run the explicit save — the same fix the docs app shipped with its save serializer.
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
The in-memory find scan skips rows hidden by an active filter (worksheet.getRowFiltered), but out-of-window hits paged from the underlying file did not — a filtered row could appear in Ctrl+F results, get focused on Enter, and be counted in Replace All. The extension now asks the workbook instance's filter model for every candidate row; it answers regardless of streaming state and fails open when unreachable.
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
readSheetRangeMapped sent the direct (no-ops) path to the sidecar unbatched, so a buffered viewport at far zoom-out could exceed the 20k-cell request cap; the schema rejected it and every subsequent scroll regenerated similar geometry, stalling streaming. Apply the same row-batching the structural-ops path already uses, with an early stop when indexing lags, and share one batch-size constant between both paths.
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
AI-generated slide pages land in <temp>/genoffice-cloud-pages and <temp>/genoffice-local-pages but were never cleaned up, accumulating across sessions. Add a startup TTL sweep (7-day default, mirroring sheets' temp-files.ts) that deletes only expired UUID-named .pptx files in the app-owned directories, best-effort per file, never at land time (markers can be redeemed). Sweep runs once per process via the existing registerSlidesIpc() once-guard.
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
- Add Word-parity Docs shortcuts, shape-text formatting, and safer AI-created documents
- Add selection-scoped Ask AI, right-to-left grids, active row and column highlighting, and full-workbook Find improvements in Sheets
- Add local OCR text layers and persistent AI chat history in PDF
- Add selection Ask AI, effects editing, true vertical text, and rendering fidelity improvements in Slides
- Improve Korean font metrics and Office document layout fidelity across the suite
- Report an OS-locale country dimension in opt-out usage analytics with an updated privacy disclosure
Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
Adds an opt-in reading mode that keeps a translucent band over the active cell's whole row and column while navigating wide sheets. The bands are float-DOM layers anchored to ranges (the same mechanism as the page-break preview), so they follow scroll and zoom; moves are debounced and skipped when the cell did not change. Band extents take the max of the file-backed sheet extent and whatever has already streamed into the grid, so cells beyond the last data row keep their bands. Toggled from the View tab's Show group, persisted in localStorage like the auto-save flag, styled through new --sheets-crosshair-* tokens defined in all three theme blocks.
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
- Convert scanned PDFs to editable text with local OCR, running through the operating system's own engine on macOS and Windows
- Add a much richer AI workflow to Docs, PDF, and Markdown: selection-scoped questions, batched edits, character-level edits, comment and tracked-change awareness, citations back to the source block, and in-document image generation
- Let Slides open the same presentation in a second window and edit it from both
- Improve PDF to Excel table recovery: tables spanning pages merge into one worksheet, and label/value grids and rule-less statement bands become real rows
- Fix a large wave of Word layout fidelity in Docs, Excel parity in Sheets, and PowerPoint import fidelity in Slides
Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
- Add fully local PDF to Word, PowerPoint, and Excel conversion
- Add bring-your-own-key AI providers - Claude, OpenAI, Gemini, DeepSeek, Kimi, GLM, Qwen, Doubao, MiniMax, Grok, Mistral, OpenRouter, and custom OpenAI-compatible endpoints - with a refreshed AI settings UI
- Rework the Slides AI editing surface: canonical edit-op registry, atomic transactions with rollback, durable element ids, and batched apply_ops
- Improve Slides fidelity: chart, font, gradient, table-style, and text-shaping fixes, plus PPT-parity line editing and adjust handles
- Polish Docs: password-protection dialogs, anchored-image wrapping fixes, and selection and clipboard fixes
- Add themed dropdowns suite-wide with accent-derived selection states
Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
- Improve Docs pagination, anchored-object fidelity, password protection, recovery safety, and multilingual font fallback
- Scale Sheets editing and saves for large workbooks with safer AI bulk operations, aggregation, undo, recovery, and richer visual fidelity
- Expand Slides fidelity with 3D rendering, SmartArt and WordArt improvements, pattern and texture fills, and resource cleanup
- Add AI PDF creation, text insertion, reading-position restore, safer atomic saves, and improved comments and page workflows
- Add Markdown math rendering and protect linked assets across save, conversion, and document lifecycle operations
- Read legacy DOC and PPT attachments locally and strengthen document package resource cleanup
- Document default-on usage analytics with a persistent Settings opt-out and a dedicated, tested privacy page
Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
The SaveIcon was not recognizable as a "Save" function, because the used Icon was not a typical floppy disk. Improved UI/UX with the a new standard floppy disk path.
fast-xml-parser already resolves the five named entities in text and
attribute values, so calling decodeEntities() on parser output decoded
them a second time: a document whose visible text literally contains
"<" or "&" turned into "<" / "&" at parse time, and editing the
paragraph then wrote the corrupted text back to word/document.xml.
Split out decodeNumericCharRefs() — numeric character references are
the only thing the parser leaves unresolved — and use it at the call
sites that read text or attributes off the parse tree. Call sites that
decode raw XML slices keep the full decode.
Fixes#88
Co-authored-by: codeAnqiang-ma <273298913+codeAnqiang-ma@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Add text insertion and improved text editing in PDF files
- Expand PDF form filling, annotations, highlighting, and visual signature workflows
- Add PDF image crop, flip, transparency, replacement, and background removal
- Improve Sheets validation rendering, undo behavior, and workbook stability
- Add system font discovery and improve shared Office interface consistency
- Improve AI network resilience and response validation
Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
Changing an element's font leaves Arabic, Hebrew and Indic text on the old
typeface, so the control looks broken for anyone writing in those scripts.
OOXML splits a run's font into three slots and picks by script: a:latin, a:ea
for CJK, and a:cs for complex scripts. Every emit site wrote latin and ea and
left cs alone:
before <a:latin typeface="Calibri"/><a:cs typeface="Traditional Arabic"/>
pick Amiri
after <a:latin typeface="Amiri"/><a:cs typeface="Traditional Arabic"/>
The Latin half of a mixed run changes and the Arabic half does not. A run that
declares no fonts at all, which is the shape the deck fixtures actually use, got
latin and ea injected and still no cs.
Write the three slots together wherever the font is set, and clear csFont with
its latin and ea siblings so a rebuilt run re-derives it from the choice the user
made instead of re-emitting the old typeface.
patchRunFont now works on the direct children of the run's own a:rPr, through the
depth-aware scanner already in this file, rather than searching the whole run
slice. a:ln carries its own extension payloads and a:extLst holds arbitrary ones,
so a typeface nested in either belongs to whatever wrote it and is left alone.
The group is rebuilt whole rather than patched in place, so a run carrying only
a:cs comes back as latin, ea, cs rather than gaining a second a:cs or landing out
of schema order. Elements that were already present keep their other attributes,
pitchFamily, charset and panose among them.
The structured path is taken only when every direct child of the run properties
is a recognised CT_TextCharacterProperties element and the run holds no comment,
CDATA or processing instruction. Any of those can put element-looking text where
a child is not, and a markup-compatibility wrapper supplies its children only
once a consumer picks a branch, whatever prefix it was bound to. Everything else
keeps the previous function unchanged, a:cs untouched included, so a run this
file cannot read structurally is handled exactly as it was before.
Two details the scan needed. XML names may begin with an underscore or a
non-ASCII character, so the child scan was anchored too narrowly and could not
see a wrapper bound to such a prefix. And a slot's typeface is now read from its
start tag alone, by whole attribute name, so a payload nested inside a paired
slot keeps what it declared and an attribute merely ending in "typeface" is left
as it is.
Two details the scan needed. The child scan reads a name as [a-zA-Z][\w:]*,
while XML also allows a leading underscore, a non-ASCII character and an interior
middle dot, so a name outside that is read short and one element is mistaken for
another. Rather than widen a scanner five other callers share, a run carrying any
such name is handled by the previous function. And a slot's typeface is read from
its start tag alone, by whole attribute name, so a payload nested in a paired slot
keeps what it declared and an attribute merely ending in "typeface" is left alone.
The run's properties are taken as a direct child rather than as the first a:rPr
in the text, since an extension payload may carry one of its own, and both its
opening and closing tags are located rather than assumed: a closing tag may carry
whitespace before its bracket, and measuring it by a fixed length splices through
it.
A run that repeats a font slot also goes to the previous function. The schema
allows one of each, and rebuilding the group from one of them would drop the
others along with their attributes.
Setting a slot to the typeface it already carries leaves the element untouched,
which is not the same as the element having no typeface, so the attribute is
added or replaced in one place rather than inferred from an unchanged string. And
a run whose properties cannot be located structurally is handed to the previous
function rather than returned untouched, since a payload carrying its own closing
tag can truncate the slice this is given. A slot's start tag is
sliced at its known boundaries rather than grouped by pattern, since an attribute
pattern permissive enough for unquoted values also swallows the slash of a
self-closing tag.
A structural table edit regenerates each cell from the model, and tableCellXml
hand-built the paragraph properties out of w:numPr and w:jc alone. Everything
else the parser had captured was discarded, w:bidi included.
For an Arabic or Hebrew table that is a visible break. Word writes an RTL cell as
w:bidi plus a logical w:jc, where "left" means start and renders flush right. The
parser converts that to a visual value, and hand-building wrote the visual value
back as though it were the logical one:
cell with <w:bidi/><w:jc w:val="left"/>
before w:bidi present, paragraph is RTL, renders flush right
after w:bidi gone, <w:jc w:val="right"/>, paragraph is LTR
cell with <w:bidi/> and no w:jc
before RTL default, renders flush right
after no w:pPr at all, LTR default, renders flush left
The table keeps w:bidiVisual from its original tblPr, so the result is a shape
Word never writes: right-to-left columns with left-to-right paragraphs inside.
Route the cell through mergePPrFormat, the helper that fixed the same defect for
headers and footers, so the parsed format comes back whole. Shading, spacing,
indent, page-break-before, paragraph borders, tab stops and the drop-cap frame
return with it.
mergePPrFormat needed a correction first. Its interleave branch walks the fresh
children once with a monotonic index, so they have to arrive in schema order, but
only the fresh-build branch sorted them. formatPPrChildren emits by concern and
leaves framePr and tabs until last, so a paragraph carrying a tab stop came back
as w:jc followed by w:tabs, which is the ordering Word offers to repair. Every
table paragraph takes the interleave branch, so this had to be right before the
rest could be. The fresh children are now sorted on both branches.
One trap worth naming: cell.align is read straight off w:jc, so it holds Word's
logical value, while paragraph.align has already been converted to a visual one.
Only left and right differ between the two, so a bidi paragraph takes the cell
fallback for centre and justify and ignores it for left and right, where the two
coordinate systems disagree and the cell value cannot be placed in either with
confidence. Outside bidi the fallback is unchanged.
Not fixed here. keepNext, keepLines, widowControl and contextualSpacing are
parsed into the format model but formatPPrChildren does not emit any of them, so
they are still lost on every rebuild, in tables and elsewhere alike. w:tblPrEx is
neither parsed nor emitted, so a row-level property exception is still dropped.
A cell paragraph carries neither rawPPr nor pPrChange, so a paragraph-level
tracked revision inside a cell does not survive regeneration, on this revision or
before it. All three are separate changes.
Word renders Arabic and Hebrew bold from w:bCs and italic from w:iCs, not from
w:b and w:i. The emitter writes only the Latin half, so clicking Bold on Arabic
text changes nothing on screen.
The pair is in one managed group, so the two halves stay consistent while the
value is unchanged and the original bytes survive untouched. The moment the
value changes, though, the group is rebuilt from the model and only w:b comes
back:
plain Arabic run, Bold on
before <w:rFonts w:cs="Traditional Arabic"/><w:szCs w:val="28"/>
after <w:rFonts w:cs="Traditional Arabic"/><w:b/><w:szCs w:val="28"/>
already bold, Bold off then on
the w:bCs the document arrived with is gone for good
Emit the Cs twin alongside its Latin half. That is what Word writes for either
script, and what this emitter already does one property over: RUN_MANAGED_GROUPS
pairs w:sz with w:szCs, and modelRPrChildren has always written both. Executed
against this revision's parent:
mergeRPrModel('', { bold: true }) -> <w:rPr><w:b/></w:rPr>
mergeRPrModel('', { sizeHalfPoints: 28 }) -> <w:rPr><w:sz w:val="28"/><w:szCs w:val="28"/></w:rPr>
A run whose flag has not changed still keeps its original bytes exactly.
What this does not fix, and why it is left alone. The model holds one flag per
property and cannot tell w:b from w:b plus w:bCs, so any path that rebuilds a run
from the model writes the Cs twin whether or not the original carried it.
Rejecting a tracked format revision is such a path. The same is already true of
w:szCs today.
The model does not see the Cs flags at all, either: the parser reads w:b and w:i
and nothing complex-script, so a run carrying w:bCs without w:b arrives with no
bold at all and any rebuild drops it. That is unchanged here, and it is the same
gap seen from the other side.
The obvious repair is to read the previous properties back out of the w:rPr that
w:rPrChange nests. I built that and took it out again, because the snapshot the
editor keeps is a string with no namespace or entity context, and three separate
shapes of the fix each broke on that:
taking the nested w:rPr whole carries the namespace declarations it inherited,
so a property under a prefix bound above it returns unbound and the part no
longer parses;
taking only the six toggle and size elements avoids that, but the names are
compared lexically, so a w:rPrChange that rebinds the w prefix to another
namespace launders a foreign w:bCs into the document, and an ignorable wrapper
under a Unicode prefix hides history that is then restored as though it were
the run's own;
a w:val written as a numeric character reference survives the round trip
already escaped, so passing it through again yields a value that no longer
parses as a number.
Doing this properly means carrying real namespace and entity context through the
revision snapshot, which is a change to the editor's model rather than to this
emitter, and it belongs to w:sz exactly as much as to w:b.
This adds w:bCs and w:iCs to every newly bold or italic run rather than only to
complex-script ones, matching Word. Four assertions in textbox-edit.test.ts
pinned the old byte output and are updated; the run they leave alone is the one
whose bold was never toggled, which still round-trips verbatim.
- Improve DOCX rendering fidelity, pagination, image handling, and Markdown paste
- Expand PDF text editing with paragraph reflow, style preservation, and more reliable text matching
- Harden XLSX sheet deletion, localized date formats, multi-row autofit, charts, and system font support
- Add inline AI turn rollback and sent-attachment visibility across editors
- Add Office-style ScreenTips and refine ribbons, dialogs, menus, and themes
- Improve Slides cropping, rotate and flip tools, printing, animations, and editing workflows
- Add shell settings, configurable save locations, account credits, and update recovery guidance
- Add Intel macOS and RPM download support and refresh public documentation
Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
- Remove internal Linux release and stable-promotion pipeline files from the public repo (they require internal publish secrets and fail on public main)
Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
- PDF: in-place text editing — paragraph block selection with reflow, bold/italic and alignment controls, selection-level text color, original-font preservation
- PDF: AI image tools (search/generate, insert, transform, delete) plus image rotation and in-place replacement
- Docs: picture rotation and mirror flips, in-place image byte swap for crop/background removal, and several Word-fidelity rendering fixes
- Docs: fix a renderer hang on tab-heavy forms and a crash when exporting large documents
- Slides: AI picture tools (crop, opacity, replace), picture border controls, in-place picture source swap
- Linux: AppImage and deb packaging with stable/beta auto-update channels
- Refresh the README and clean up internal design-audit artifacts
Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>