Commit Graph
16 Commits
Author SHA1 Message Date
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 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
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 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
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
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>
2026-08-05 21:44:14 +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
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>
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>
2026-08-03 22:02:22 +08:00
GenOffice ed084e0808 Sync snapshot (2026-08-02) 2026-08-02 21:32:13 +08:00
GenOffice d2fe8ddaae Initial public release 2026-08-02 19:52:16 +08:00