Commit Graph
224 Commits
Author SHA1 Message Date
ANIRUDDHA ADAK 46282ec12c fix(file-parse): include footnote and endnote text in docx extraction (#425) 2026-09-16 08:11:37 +08:00
ANIRUDDHA ADAK f4d97b84f6 fix(docx): honor single-quoted xml:space preserve on part roots (#424) 2026-09-16 08:11:27 +08:00
ANIRUDDHA ADAK fcb2ca8249 fix(docx): read single-quoted TOC tab stop values and leaders (#423) 2026-09-16 08:11:14 +08:00
ANIRUDDHA ADAK 748d0c8f36 fix(docx): read uppercase checkbox checked values as checked (#422) 2026-09-16 08:10:56 +08:00
ANIRUDDHA ADAK 311e2c0816 fix(docx): read single-quoted footnote separator types and ids (#421) 2026-09-16 08:10:37 +08:00
ANIRUDDHA ADAK b0dad7c329 fix(markdown): serve sibling images of filesystem-root documents (#420) 2026-09-16 08:10:26 +08:00
ANIRUDDHA ADAK 572d6c56c8 fix(sheets): flag modern Excel error values in Error Checking taxonomy (#419) 2026-09-16 08:10:14 +08:00
ANIRUDDHA ADAK f06ad3d9fd fix(sheets): shift whole-row spans on copy/fill like whole-column spans (#418) 2026-09-16 08:09:59 +08:00
ANIRUDDHA ADAK 38669c42fd fix(pdf): sanitize fields in encodeStyle so crafted styles cannot shift key fields (#417) 2026-09-16 08:07:16 +08:00
ANIRUDDHA ADAK a54b152deb fix(pdf2docx): anchor arabic leader detection to line end and cap page digits (#416) 2026-09-16 08:07:08 +08:00
ANIRUDDHA ADAK 093ecfb909 fix(ai-provider): treat whitespace-only keys, URLs, and models as unconfigured (#415) 2026-09-16 08:06:57 +08:00
ANIRUDDHA ADAK 672de2183e fix(html): escape apostrophes in single-quoted style attributes on set_style (#414) 2026-09-16 08:06:42 +08:00
ANIRUDDHA ADAK 68ed56fc35 fix(pdf): fold AI-tool search queries the same way as the search index (#413) 2026-09-16 08:06:29 +08:00
ANIRUDDHA ADAK 8dd05f147c fix(docs): exclude supplementary private-use and variation selectors from asian char count (#412) 2026-09-16 08:06:17 +08:00
ANIRUDDHA ADAK a5f181f323 fix(shell): validate raw rename name before trimming so trailing-space gate holds (#411) 2026-09-16 08:06:03 +08:00
ANIRUDDHA ADAK 789f94ee52 fix(docx): fold field code split across paragraphs with single-quoted fldCharType (#410) 2026-09-16 08:05:45 +08:00
Xianheng Zhang 1113835359 fix mcp review findings in the docs family and the stdio bridge (#409) 2026-09-16 08:05:19 +08:00
ANIRUDDHA ADAK c00f9fb7e4 fix(markdown): normalize pasted math delimiters to dollars (#390) 2026-09-16 08:02:00 +08:00
Xianheng Zhang 70e5149e81 add a local MCP server so external agents can drive the Word editor (#406)
Motivation in genspark-ai/genoffice#338: agents asked to produce Word
documents today write python-docx or drive Office over COM. GenOffice
already ships a correct, fast docx engine, but only its in-app AI panel
can reach it. This exposes that capability to Claude Desktop, Cursor and
any MCP client.

The server lives in the shell main process, is off by default, binds
127.0.0.1 only and validates Host/Origin (it has no authentication).
Settings > General gets an enable switch, port, log toggle and a
capability summary.

Two things MCP adds beyond the existing genoffice CLI, one per the
maintainer's reply in #338:

- driving the editor the user has open: create_session opens a real docs
  tab and the content tools push editor commands through a renderer
  bridge, so the user watches each step instead of writing bytes behind
  the UI;
- reaching clients that cannot run a shell: plus a legacy SSE transport
  and a stdio bridge for clients that only speak stdio.

Headless generation and reading (create_docx / read_docx) delegate to the
bundled genoffice CLI rather than reimplementing conversion, so there is
one engine, not two.

Checked: npm run typecheck, npm run lint, npm run licenses, npm run
check:english-comments, npm run fixtures; apps/shell/tests/mcp plus
settings-mcp (71 tests) and the mcp-visible-doc e2e spec.
2026-09-15 17:38:26 +08:00
ANIRUDDHA ADAKandAniruddha Adak c72a214c54 fix(docx): honor none and case in vanish collapse (#403)
staysVanished missed none, case variants, and single quotes, hiding visible paragraphs.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:49:33 +08:00
ANIRUDDHA ADAKandAniruddha Adak cb382a44f7 fix(file-parse): read lowercase xlsx cell refs (#400)
columnIndex assumed uppercase; third-party lowercase refs dropped cells.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:49:20 +08:00
ANIRUDDHA ADAKandAniruddha Adak 102d781349 fix(slides): reject non-RRGGBB input in recent colors (#395)
Missing end anchor truncated RGBA and garbage to 6 digits, storing wrong swatches.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:49:07 +08:00
ANIRUDDHA ADAKandAniruddha Adak 3d8ab0e98c fix(docx): honor off and case in footnote bold flags (#402)
noteRichParas treated off, uppercase, and single-quoted falsy vals as bold.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:48:54 +08:00
ANIRUDDHA ADAKandAniruddha Adak e691e32a06 fix(pdf2docx): detect hyphen leaders in TOC entries (#401)
Monospaced producers emit dashes instead of dots; convert those lines too.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:48:37 +08:00
ANIRUDDHA ADAKandAniruddha Adak ab955150ba fix(pdf): use length-preserving case folding in search (#399)
toLowerCase grows dotted capitals, shifting highlight offsets. Reuse shared foldCase.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:48:25 +08:00
ANIRUDDHA ADAKandAniruddha Adak 82d56ae0d2 fix(html): escape ampersands in single-quoted attrs (#398)
* fix(html): escape ampersands in single-quoted attrs

Single-quoted branch skipped amp escaping, corrupting values containing & on round-trip.

* fix(html): prettier format attr escape

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:48:13 +08:00
ANIRUDDHA ADAKandAniruddha Adak 05bd6daf61 fix(shell): reject trailing spaces in rename gate (#397)
Windows strips trailing spaces like dots; gate now matches its comment.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:48:04 +08:00
ANIRUDDHA ADAKandAniruddha Adak f9c65f67a9 fix(electron-utils): block trailing-dot internal hostnames (#396)
* fix(electron-utils): block trailing-dot internal hostnames

DNS treats localhost. as localhost; strip trailing dots before the hostname gate.

* fix(electron-utils): prettier format trailing-dot guard

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:47:53 +08:00
ANIRUDDHA ADAKandAniruddha Adak f994dd9c8c fix(i18n): use own-property check in format (#394)
in operator leaked prototype members like toString into UI strings.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:47:40 +08:00
ANIRUDDHA ADAKandAniruddha Adak 72eeca5e41 fix(ai-provider): match vision guard case-insensitively (#393)
* fix(ai-provider): match vision guard case-insensitively

Uppercase DeepSeek ids bypassed the text-only guard and sent images to a text-only model.

* fix(ai-provider): prettier format vision guard

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:47:28 +08:00
ANIRUDDHA ADAKandAniruddha Adak 0e83b97e6f fix(docx): balance single-quoted field char runs (#392)
TOKEN_RE only matched double-quoted fldCharType, so single-quoted fields unbalanced on save.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 15:47:18 +08:00
ANIRUDDHA ADAKandAniruddha Adak 2c25b86402 fix(ai-provider): bound fixed-sampling match and guard missing model (#383)
Add trailing boundary so o10/o30/gpt-50 do not omit temperature. Guard opencode route against undefined model.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:23:13 +08:00
William EchoandWilliam Echo e4cfcea7c7 fix(sheets): infer pivot source from a single selected cell (#387)
Co-authored-by: William Echo <175406538+qinghuanandejiangshi@users.noreply.github.com>
2026-09-15 11:22:34 +08:00
William EchoandWilliam Echo 0d89426252 fix(pptx): validate schemas from checkout paths with spaces (#386)
Co-authored-by: William Echo <175406538+qinghuanandejiangshi@users.noreply.github.com>
2026-09-15 11:22:27 +08:00
ANIRUDDHA ADAKandAniruddha Adak 4c17dc0036 fix(docx): inline EQ fields with single-quoted fldCharType (#382)
FLD_CHAR_RE only matched double quotes, leaving single-quoted EQ fields as raw instrText.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:22:01 +08:00
ANIRUDDHA ADAKandAniruddha Adak ef04164b02 fix(sheets): map common OOXML paper sizes instead of A4 fallback (#379)
B4/B5/Folio/Statement and other ECMA-376 codes fell back to A4, mis-scaling print output. Add explicit inch mappings.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:21:52 +08:00
ANIRUDDHA ADAKandAniruddha Adak b9cf38318a fix(slides): localize find replace close button label (#384)
Use existing paneCsdClose string for aria-label instead of hardcoded Esc.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:21:15 +08:00
ANIRUDDHA ADAKandAniruddha Adak a03f7accd7 fix(slides): use theme tokens in cutout dialog (#380)
* fix(slides): use theme tokens in cutout dialog

Replace hardcoded chrome colors with semantic tokens so dark theme stays readable. Mirrors docs PictureDialogs pattern.

* fix(slides): prettier format cutout dialog

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:21:04 +08:00
ANIRUDDHA ADAKandAniruddha Adak 92383a3ad1 fix(file-parse): keep pptx tab stops as tabs (#378)
Inline a:tab between runs was dropped, collapsing tab-separated columns to joined text. Emit tab character to preserve extraction fidelity.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:20:56 +08:00
ANIRUDDHA ADAKandAniruddha Adak 69c1213c95 fix(pdf2docx): detect underscore leaders in hasDotLeaderRun (#377)
TOC_LINE_RE already handles underscores but hasDotLeaderRun only accepted dot and middle-dot, so underscore index pages never triggered leaderIndexPage path. Include underscore to match.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:20:48 +08:00
ANIRUDDHA ADAKandAniruddha Adak 5ae4a8a555 fix(docx): read single-quoted checkbox glyph values (#381)
sdtCheckboxGlyphs only matched double-quoted w14:val, falling back to default glyphs for single-quoted producers.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:20:39 +08:00
ANIRUDDHA ADAKandAniruddha Adak e35048ec71 fix(docx): read single-quoted protection hash salt spin sid (#376)
Some producers emit single-quoted XML attributes. edit/enforcement already handled both quote styles, but hash/salt/spin/sid and recommended only matched double quotes, dropping credentials and weakening protection verification.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:20:29 +08:00
ANIRUDDHA ADAKandAniruddha Adak 692c929c8d fix(pdf): stream print pages with per-page budget and cleanup (#354)
* fix(pdf): stream print pages with per-page budget and cleanup

* fix(sheets): satisfy exactOptionalPropertyTypes for LazyCellMatch rawValue

* fix(pdf): render over-budget pages at reduced scale instead of skipping

- Keep the skip only for degenerate NaN/zero-area pages; pages exceeding MAX_PAGE_PIXELS now render at scale * sqrt(MAX_PAGE_PIXELS / (w*h)). Per-page cleanup retained.

Test updated: huge page renders reduced (2 imgs), NaN skipped; getPage mock selects viewports by page number so measure+render passes align.

* fix(pdf): update print tests for measure-then-render getPage counts

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-15 11:20:18 +08:00
Hanlin e064f3ad68 fix(dev): make npm run dev work on Windows (#374)
spawnSync('npm') without a shell fails with ENOENT on Windows because npm is npm.cmd, not npm.exe. The root dev script also used Unix VAR=value prefixes, which cmd.exe rejects.

Use shell: true when spawning npm on Windows, and set renderer URLs with cross-env.
2026-09-14 19:04:22 +08:00
ANIRUDDHA ADAKandAniruddha Adak ed2bb86536 feat(sheets): infer table range from current region (fixes #298) (#371)
Clicking a single cell inside a continuous data block and choosing
Insert -> Table (Format as Table) now expands the selection to the
surrounding CurrentRegion, matching Excel. The helper scans outward
from the anchor while edge cells have values, bounded by the used
range, and requires at least header plus one data row.

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-14 16:39:43 +08:00
ANIRUDDHA ADAKandAniruddha Adak 616a7acf5a fix(markdown): resolve sibling images for filesystem-root files (#366)
Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-14 14:26:03 +08:00
ANIRUDDHA ADAKandAniruddha Adak cbcd289e49 fix(docx): handle numeric char refs, NBSP edges and empty self-closing runs in field patch (#359)
* fix(docx): handle numeric char refs, NBSP edges and empty self-closing runs in field patch

* fix(docx): correct NBSP test expectation for trimmed fieldDisplay

* fix(docx): guard char-ref codepoints and assert NBSP on patched XML only

- decodeXmlText leaves out-of-range (>0x10FFFF) and surrogate (0xD800-0xDFFF) refs untouched instead of throwing RangeError; regression test covers &#99999999;, &#xFFFFFFFF; and surrogates.

NBSP edge test now asserts patched XML only (xml:space preserve + NBSP in <w:t>), dropping the fieldDisplay round-trip which normalizes edge whitespace regardless of xml:space.

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-14 14:25:09 +08:00
ANIRUDDHA ADAKandAniruddha Adak 78f133c216 fix(ai-search): normalize media MIME type case-insensitively (#358)
* fix(ai-search): normalize media MIME type case-insensitively

* fix(sheets): satisfy exactOptionalPropertyTypes for LazyCellMatch rawValue

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-14 10:55:55 +08:00
ANIRUDDHA ADAKandAniruddha Adak 6797e48c15 fix(shell): share ext family between recents and starred filters (#357)
* fix(shell): share ext family between recents and starred filters

* fix(sheets): satisfy exactOptionalPropertyTypes for LazyCellMatch rawValue

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-14 10:55:43 +08:00
ANIRUDDHA ADAKandAniruddha Adak af9a63e462 fix(print-range): accept em-dash, tilde and fullwidth dash variants (#356)
* fix(print-range): accept em-dash, tilde and fullwidth dash variants

* fix(sheets): satisfy exactOptionalPropertyTypes for LazyCellMatch rawValue

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-14 10:55:34 +08:00