Commit Graph
57 Commits
Author SHA1 Message Date
konghaojie-k2andClaude 2e3e97f53a feat(slides): add a set_speaker_notes agent tool (#153)
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>
2026-08-26 11:38:39 +08:00
konghaojie-k2andClaude 9792915878 feat(slides): flag horizontal text overflow in the layout audit (#154)
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>
2026-08-26 11:34:09 +08:00
ANIRUDDHA ADAKandAniruddha Adak 72a4a42db1 fix(ai-provider): skip malformed SSE frames instead of killing the AI turn (#151)
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>
2026-08-26 11:24:45 +08:00
ANIRUDDHA ADAKandAniruddha Adak b1a01e24da fix(ai-provider): release SSE reader when the consumer abandons the stream mid-flight (#150)
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>
2026-08-26 11:23:23 +08:00
ANIRUDDHA ADAKandAniruddha Adak f81dd3d5b9 fix(markdown): wait for in-flight saves during close instead of silently failing (#149)
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>
2026-08-26 11:23:02 +08:00
ANIRUDDHA ADAKandAniruddha Adak 7a814dbd23 fix(sheets): keep filter-hidden rows out of full-sheet find results (#133)
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>
v0.8.262
2026-08-25 15:56:27 +08:00
ANIRUDDHA ADAKandAniruddha Adak bc1dceb85d fix(sheets): row-batch over-cap sidecar reads so streaming survives big viewports (#140)
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>
2026-08-25 15:35:47 +08:00
ANIRUDDHA ADAKandAniruddha Adak da3b1ca780 fix(slides): sweep generated-page temp files with a TTL at startup (#141)
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>
2026-08-25 11:47:14 +08:00
merrick-2002andGenOffice 5073e4d36b Sync snapshot (2026-08-24) (#143)
- 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>
2026-08-24 23:20:31 +08:00
ANIRUDDHA ADAKandAniruddha Adak cc8cff49a0 feat(sheets): cross-highlight the active cell's row and column (#132)
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>
v0.8.155
2026-08-24 19:20:03 +08:00
ANIRUDDHA ADAK afc6711d9c fix(sheets): extend Ctrl+F beyond the loaded window on streamed workbooks (#131) 2026-08-24 07:20:10 +08:00
merrick-2002andGenOffice 6d9b6812dd Sync snapshot (2026-08-23) (#130)
- 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>
2026-08-23 23:10:02 +08:00
merrick-2002andGenOffice f68df70e22 Sync snapshot (2026-08-20) (#123)
- 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>
v0.7.793 v0.8.0
2026-08-21 00:33:18 +08:00
merrick-2002andGenOffice fe2e17403c Sync snapshot (2026-08-19) (#110)
- 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>
v0.7.686
2026-08-19 20:14:50 +08:00
merrick-2002andGenOffice 04a994b9e9 Sync snapshot (2026-08-16) (#99)
- Docs: print dialog with live preview, EMF/WMF rendering, nested tables, margin comments, Word-style table UX
- Slides: chart and SmartArt fidelity overhaul, Format Background pane, Shape Tools tab, PowerPoint line-spacing model
- Sheets: ribbon batches (themes, page breaks, protection, goal seek), AI formula audit and workbook search, import fidelity fixes
- PDF: comments margin with in-place note editing
- UI: unified color pickers and save icon across apps (icon by @ulangmeier in #96)

Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
v0.7.512
2026-08-17 00:09:18 +08:00
Urs Langmeier e4d9d407c1 Replace unrecognizable SaveIcon with floppy disk (#96)
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.
v0.7.204
2026-08-16 22:11:02 +08:00
merrick-2002andGenOffice d5558b6bbb Sync snapshot (2026-08-13) (#92)
- Docs: print dialog with live page preview and range selection; WYSIWYG print preview across apps
- Docs: header/footer fidelity - alignment, color, size, images, and tab layout (w:tabs, w:ptab)
- Docs: pagination and layout fixes - keepNext crash, blank pages, footnotes, line-height, font substitution, Tamil support
- Sheets: import implicit cell addresses and row/column default styles; keep dialog inputs inside narrow grid columns
- Slides: PowerPoint-style stage rulers, wheel page turning, and notes bar
- Slides: insert 3-D pie and 3-D column charts; render 3-D chart variants as 2-D projections
- PDF: comments margin with pin leader lines, note threads with replies, and selection-level text styles
- PDF: searchable text insertion, page management, and auto-opening of extract/split output

Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
v0.7.110
2026-08-13 21:37:38 +08:00
945c370fb9 fix(docx): decode XML entities exactly once in parsed run text (#89)
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
"&lt;" or "&amp;" 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>
v0.6.389
2026-08-13 15:55:35 +08:00
merrick-2002andGenOffice dc4d7e5927 Sync snapshot (2026-08-12) (#87)
- 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>
v0.6.279
2026-08-12 08:36:35 +08:00
Waiel Al-Shujaa 2c1f0e821a fix(slides): apply a font change to complex-script text as well (#84)
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.
2026-08-11 11:06:10 +08:00
Waiel Al-Shujaa 8e3ad2a7d2 fix(docx): keep table cell paragraph properties through a rebuild (#81)
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.
2026-08-11 11:05:48 +08:00
Waiel Al-Shujaa 1c7f47bfbb fix(docx): carry bold and italic to complex-script text (#83)
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.
2026-08-11 11:05:33 +08:00
merrick-2002andGenOffice 7023e635bd Sync snapshot (2026-08-10) (#80)
- 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>
2026-08-10 23:17:11 +08:00
merrick-2002andGenOffice fd33934dab Sync snapshot (2026-08-09) (#77)
- 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>
v0.6.101
2026-08-10 07:43:12 +08:00
merrick-2002andGenOffice 185040fd2f Sync snapshot (2026-08-09) (#76)
- Update the README download links to the unified v0.6.13 release

Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
2026-08-10 02:03:35 +08:00
merrick-2002andGenOffice e249c3ba81 Sync snapshot (2026-08-09) (#75)
- 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>
2026-08-10 01:43:24 +08:00
Waiel Al-Shujaa 767b87bded fix(sheets): keep the cell alignment attributes the style model omits (#67) v0.6.13 2026-08-09 22:01:15 +08:00
Waiel Al-Shujaa d157d9dff5 docs(sheets): drop the stale claim that duplicate/hide/reorder are blocked (#70) 2026-08-09 21:37:40 +08:00
Waiel Al-Shujaa fbfe63a5d2 fix(docx): do not read a nil paragraph border as a real one (#69) 2026-08-09 21:37:20 +08:00
Waiel Al-Shujaa 920dbf6b80 fix(file-parse): keep pptx line breaks and fields in document order (#66) 2026-08-09 21:34:32 +08:00
jabberwocky238 300ad8fbfc fix(sheets): allow Save As without edits (#60) 2026-08-09 08:52:33 +08:00
Waiel Al-Shujaa d2e03aad1c fix(docx): keep header and footer paragraphs right-to-left on save (#62)
The rich header/footer writer hand-builds its paragraph properties and emits
only w:jc, so editing an RTL header drops w:bidi entirely. It also writes the
alignment back unswapped: parse.ts converts Word's logical w:jc to a visual
direction on read for bidi paragraphs, so para.align holds the visual value,
and writing it straight out turns right into left. Both faults together:

  before  <w:pPr><w:bidi/><w:jc w:val="right"/></w:pPr>
  after   <w:pPr><w:jc w:val="left"/></w:pPr>

The header looks right in the app and is wrong the moment Word reopens it: an
Arabic header carrying a Latin or numeric run loses its paragraph direction,
so the neutral characters around it resolve to the other end of the line.

Build the properties with mergePPrFormat instead, so the bidi swap lives in
one place rather than two. Spacing, indent, borders and tab stops in headers
come along for free.

That makes this the first caller of mergePPrFormat outside the tests, and its
fresh-build branch, the one '<w:pPr/>' takes, joined the model's children in
emission order. Every other path sorts: generateParagraphXml sorts its own
children by PPR_CHILD_ORDER, and so does the interleaving branch of
mergePPrFormat itself. Over every combination of the fourteen ParaFormat
fields formatPPrChildren reads, 8168 of 16384 came out in the wrong CT_PPr
order, the smallest being align plus tabStops emitting w:jc before w:tabs.
Wrong CT_PPr order is what makes Word show the repair dialog, which
schema-order.test.ts already exists to prevent; its cases just never reached
the self-closing branch. Sorted there too, and extended that test to cover it.
2026-08-09 08:52:29 +08:00
Waiel Al-Shujaa 6a2d1cd823 fix(docx): keep the original root namespaces when regenerating a part (#63)
comments.xml and footnotes/endnotes.xml are rebuilt by splicing unchanged
entries back in as their original bytes, then wrapping them in a root with a
hardcoded namespace list. The bytes and the root disagree:

  w:comments declares w and w14, so a preserved comment holding
  <w:hyperlink r:id="..."> leaves r unbound
  NOTE_NS declares w and r, so a preserved paragraph holding w14:paraId,
  which Word writes on every paragraph, leaves w14 unbound

Both parse clean with fast-xml-parser's validator, which is not namespace
aware, and fail a namespace-aware parse with "unbound prefix". Word reports
that as unreadable content, so adding one comment to a document with a linked
comment, or one footnote to any Word-authored document, is enough.

Reuse the original part's root attributes when there is an original, keeping
the literal list only for parts created from scratch. The regression test
checks prefixes are bound rather than calling the XML validator, which cannot
see this class of defect.
2026-08-09 08:52:26 +08:00
Waiel Al-Shujaa d8305ff2dc docs: catch the contributor docs up with the tree (#53)
The markdown app shipped in the 2026-08-07 snapshot and the docs never
followed it. README's intro and CONTRIBUTING's layout section still count
five apps, README still says the shell hosts four editors and that npm run
dev starts four, SECURITY.md's renderer-lockdown list names every window
class except markdown (whose windows do set the same three flags), and
neither issue template offers Markdown even though both dropdowns are
required and the installer registers .md and .markdown associations.

Separately, .nvmrc pinned 20 and CONTRIBUTING said Node 20+, while
package.json engines requires >=22.12.0 and all three workflows run
node-version: 22, so following the checked-in version gives an install npm
rejects and a toolchain that does not match CI.

README's Apps table also has no row for markdown. That one needs product
wording rather than a count, so it is left for a maintainer.
2026-08-08 11:38:54 +08:00
Waiel Al-Shujaa efb24700ad fix(build): include the markdown app's dependencies in the third-party notices (#52)
SRC_GLOBS hardcodes five app source trees and enumerates packages/*
dynamically, so apps/markdown was never scanned. The app ships: shell's
electron-builder config copies ../markdown/out into every installer, and
npm run notices is a prerequisite of dist:mac, dist:win and dist:linux.
So the notices file that ships as extraResources omits the licenses of
everything only markdown imports.

Scanning it alone is not enough. markdown pins @tiptap 3.29.2 while docs
takes ^3.28.0, so npm keeps markdown's copies under its own workspace,
and starter-kit's own extensions land under a scoped package. pkgDir
looked in neither: it iterated the entries of the root node_modules, which
for a scoped package is the scope directory rather than the package, and
never looked at workspace roots.

Adds both lookups, unscoped owners first so packages that already resolved
keep resolving to the same copy. Net effect on the generated file: 29 npm
packages added, none removed, no version changed, and the "not installed,
skipped" warning is now empty.
2026-08-08 11:38:32 +08:00
Waiel Al-Shujaa 091c5994fd fix(file-parse): keep xlsx and pptx attachment text verbatim (#51)
The two XMLParser instances in file-parse ran with fast-xml-parser's
defaults, so element text was numerically coerced and trimmed before it
reached the model: <t>02139</t> read as 2139, and the space carried by an
xml:space="preserve" run was dropped, so a bolded word in a slide turned
"Quarterly revenue grew 12% in Q3" into "Quarterlyrevenuegrew12%inQ3".

Set trimValues and parseTagValue to false on both, matching docx-engine's
xml-utils and pptx-engine's parse. trimValues is per parser rather than
per element, so two readers that were relying on it change with it: the
xlsx parser keeps collapsing attribute whitespace, since r:id, Target and
the cell ref are structural and a padded Target otherwise drops a whole
sheet, and collectText now pushes a primitive only when it came from an
a:t, so an <a:br> written across lines no longer leaks into the paragraph.
2026-08-08 11:36:21 +08:00
jabberwocky238 1a1247abef fix(sheets): open temp file r+ before fsync so Windows saves work (#47)
Saving a workbook on Windows failed with "error invoking remote method
'workbook:save': EPERM: operation not permitted" — the save dialog appeared,
then the save threw regardless of the chosen directory.

promoteFileAtomically (and writeXlsxAtomically) opened the freshly written
temp file read-only ('r') and then called handle.sync(). On Windows,
FlushFileBuffers requires a writable handle, so fsync on a read-only handle
fails with "EPERM: operation not permitted, fsync" — before the rename that
promotes the temp file over the target ever runs.

Open the handle read-write ('r+') at both sites.

Reproduced and verified fixed on Windows 11 Pro: with 'r' the save fails on
fsync with EPERM; with 'r+' the sync and the rename over an existing file
both succeed and the workbook saves.
2026-08-07 15:09:17 +08:00
merrick-2002andGenOffice b3cab39441 Sync snapshot (2026-08-07) (#48)
- New AI Markdown app - the fifth suite app, with local image assets and ribbon AI entry points
- Shell: dark/light/system theme (imports public PR #41) with lint fix and dark-mode onboarding polish
- Docs: Word rendering fidelity fixes, 4x faster repagination, Shape Format contextual tab, auto-refreshing TOC page numbers
- Slides: built-in standard layouts, anchored zoom and jump-free editing, selectable Draw pen thickness
- Sheets: Insert Equation/Checkbox/Timeline, editing polish with undo for manual inserts and localized save errors
- Bump pdfjs-dist to 6.2.108 and js-yaml to 4.3.1

Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
2026-08-07 14:44:01 +08:00
alfirusandalfirus 6e2fc17aad feat(shell): dark/light/system theme + performance optimizations (#41)
* feat(shell): add light/dark/system theme support

Add a theme toggle to the account menu with three options:
- Light: explicit light theme
- Dark: explicit dark theme
- System: follows OS prefers-color-scheme

Changes:
- Add UiTheme type and getTheme/setTheme IPC to home-api
- Add theme persistence in app-settings.json
- Add theme IPC handlers in main process and preload bridge
- Add Theme row + flyout in AccountEntry (same UX as Language)
- Apply data-theme attribute before first paint to avoid flash
- Add dark mode CSS variables for all shell surfaces
- Add dark mode overrides for 40+ hardcoded color selectors
- Add dark mode treatment for onboarding modal
- Add theme i18n strings in all 19 languages

The theme toggle lives in the account popup menu between
Language and Update Channel, using the same flyout pattern.

* perf(shell): cache settings reads + consolidate CSS dark mode + fix button hover

Performance improvements:

#7: Cache settings reads
- Add cachedUpdateChannel/cachedTheme module-level variables
- currentUpdateChannel() and currentTheme() now cache like currentLang()
- set handlers update the cache on write
- Eliminates disk reads on every IPC call

#11: Consolidate CSS dark mode selectors
- Convert 20+ hardcoded colors to CSS custom properties
- Remove ~300 lines of duplicated element-level dark mode overrides
- All element rules now use variables, auto-switch via :root overrides
- Single source of truth for dark mode palette

#17: Replace filter+transform on button hover
- Replace filter: brightness() with opacity transitions
- Add specific hover states for btn-secondary and btn-danger
- Avoids GPU compositing overhead from filter property

---------

Co-authored-by: alfirus <alfirus@users.noreply.github.com>
2026-08-07 11:23:10 +08:00
merrick-2002andGenOffice 9d37beaf57 Sync snapshot (2026-08-06) (#40)
- Draw shapes with a crosshair drag on the canvas across Docs, Sheets, and Slides; the shared 104-preset shape gallery now lives in the UI package
- WordArt insert presets
- Reorganize the README download section into a single platform table
- Deflake the screenshot-insert e2e test by stubbing the OS capturer deterministically

Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
2026-08-06 20:25:35 +08:00
merrick-2002andGenOffice df358f2775 Sync snapshot (2026-08-06) (#38)
- Movable, resizable floating objects and a shared 104-preset shape gallery across Docs, Sheets, and Slides
- Sheets Insert menu: screenshot capture, recommended charts, and an icon library
- Slides: Home slideshow module and slideshow-exit fixes
- Docs: track-changes fixes (IME input, tracked-deletion re-deletion) and Word-parity font handling
- Redact secret-looking tokens from outgoing AI messages (community contribution from PR #32, hardened with narrower patterns and tests)
- Linux packaging: AppImage and deb download instructions

Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
2026-08-06 19:19:36 +08:00
Harshil Joshi c3911b02b6 feat: implement local token masking guardrails in agent execution loop (#32)
- Injected data egress sanitation filter within AgentLoop.beginRun framework orchestration layer.

- Mitigates high-risk contextual leakage of bearer keys, explicit database connection strings, and credential variables.

- Enforced formatting compliance targets cleanly across edited workspace bounds.
2026-08-06 15:02:56 +08:00
merrick-2002andGenOffice d1de6ac44b Sync snapshot (2026-08-05) (#34)
- Add a user-selectable update channel (Stable/Beta) with a manual promote-to-stable release flow
- PDF: image signatures and WYSIWYG typed signatures with better placement, plus a status bar, keyboard navigation, and two-page spread reading upgrades
- Docs: Word-parity ribbon font controls and style gallery, an AI Format one-click preset, and restored headers/footers and TOC formatting for Pages-style docx
- Add GenOffice device-code sign-in for AI features
- Refresh UI: AI panel and ribbon styling aligned with the design system, new icons, save toasts, and content-width status bars beside a full-height AI dock
- AI reliability: retry transient image-download failures, detect empty gateway streams without killing long generations, and forward the resolved proxy to spawned CLI children
- Slides: bullet list gallery, type-ahead font filtering, and shorter clarify buttons across locales
- Add a Linux (AppImage) packaging target

Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
linux-v0.5.149
2026-08-05 21:44:14 +08:00
Harshil Joshi 3a440f7944 docs: standardise technical nomenclature and file extension formatting syntax (#28)
- Normalized file format naming conventions to standard extension formatting (.docx, .xlsx, .pptx, .pdf) across the core application matrix.
- Updated 'TipTap' reference to match official open-source brand naming guidelines (Tiptap).
- Fixed trailing unparallel grammar in the PDF application description block.
- Added missing backtick code blocks to the inner-table docxIndex token string to align with structural styling conventions used across engine package lists.
2026-08-05 17:49:06 +08:00
159974f2f9 fix(ai): keep multi-turn history valid after empty post-tool turns (#27)
Models often finish a tool-using run with no prose. That left an empty
assistant message in history; Anthropic/Gemini/OpenAI then rejected or
ignored follow-ups, so a second prompt collapsed into "AI finished with
no summary" while tools still ran. Fill a stable non-empty terminal
(matching restore), harden provider message converters, and prefer tool
summaries in Sheets when the model left only the placeholder.

Fixes #12
Fixes #22

Co-authored-by: omkar1work <omkar1work@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 17:30:46 +08:00
b7ddf87b5a fix(shell): relayout active tab after X11 maximize bounds settle (#20)
On Linux/X11, Electron's resize event fires before the window manager
applies maximize bounds, so TabManager laid out WebContentsViews with
stale sizes and left blank strips. Layout again on the next tick and
guard against a destroyed window for the deferred call.

Fixes #15

Co-authored-by: omkar1work <omkar1work@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 16:43:52 +08:00
kalyanarandkalyanar f8c7d7291d Add Linux (AppImage) packaging target (#14)
The shell packaged only for mac and win, so there was no way to produce a
Linux artifact even though the tree already builds and runs there: npm
install resolves linux-arm64 for every native optional dep, the xlsx
sidecar compiles natively via cargo, and the full unit suite passes.

Adds a linux target alongside the existing two. Four Linux-only details
the mac/win config never had to handle:

- executableName: linux derives the binary name from package.json "name",
  and "@genoffice/shell" sanitizes to the invalid "@genofficeshell",
  which fails the AppImage build outright. mac/win use productName.
- desktopName + syncDesktopName: otherwise StartupWMClass falls back to
  productName ("GenOffice") while the window reports WM_CLASS "genoffice",
  and X11 compares case-sensitively, so the taskbar shows the window
  unlinked from its launcher entry.
- fileAssociations mimeType: the Linux desktop entry builds its MimeType
  list from this field and drops associations without it. mac and win
  ignore the field and key off ext, so the existing targets are unaffected.
- The sidecar is taken from cargo's host-native target/release/, the same
  source mac uses, so no arch is pinned; electron-builder defaults to the
  build host's.

AppImage only. deb/rpm additionally require a Debian maintainer identity
and homepage in the repo metadata.

Verified on arm64: builds, and the packaged AppImage launches with the
aarch64 sidecar bundled at resources/native/xlsx-sidecar.

Co-authored-by: kalyanar <6203088+kalyanar@users.noreply.github.com>
2026-08-05 16:41:18 +08:00
kalyanarandkalyanar 9e1a9357a4 Fail the build when a module tree is missing from extraResources (#18)
electron-builder only warns for an absent extraResources source:
app-builder-lib's copyFiles logs "file source doesn't exist" and returns,
so the target still builds and the process still exits 0. A dist run
against a partial build:all — one module's build failed or never ran —
therefore produces an installer that launches normally and is simply
missing that editor module, which surfaces only when a user opens the tab.

The config already fails fast for the gsk CLI tree; extend the same guard
to the four module build outputs.

Verified on arm64: removing a module out/ now exits 1 naming the path,
and a complete tree still packages and exits 0.

Co-authored-by: kalyanar <6203088+kalyanar@users.noreply.github.com>
2026-08-05 16:35:17 +08:00
merrick-2002andGenOffice 8f523289d6 Sync snapshot (2026-08-04) (#19)
- Docs: paragraph writing direction (LTR/RTL) toggle with auto-detection
- Docs: hardened file lifecycle, docx fidelity, and editor performance
- PDF: Export as Word via cloud conversion, non-destructive Save As, and an in-progress export dialog
- Slides: treat full-page background shapes as the page background
- Sheets: faster recalculation with a session-resident engine; better xlsx compatibility (builtin number formats, auto-fit row heights, sheet-name resolution)
- AI: surface stream and gateway errors instead of finishing empty turns; parse non-SSE JSON gateway replies; stall watchdogs
- Fixes from alpha feedback batches 3 and 4 (TOC levels, Windows menus, honest AI applies, login flow diagnostics, credits-exhausted notice)
- CI: sheets save round-trip E2E and xlsx compatibility corpus gate
- Start the 0.5 release train (v0.5.0/v0.5.1)

Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
v0.5.83
2026-08-04 21:26:02 +08:00
merrick-2002andGenOffice 4da673d4df Sync snapshot (2026-08-03) (#6)
- Fix AI table read/write column integrity in Sheets (cell text escaping, set_range validation)
- Slides: canvas follows window resize; restyle the AI quick-action toolbar
- Improve onboarding: stable card height, expanded copy across all 19 locales

Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
v0.5.1
2026-08-03 22:02:22 +08:00