Skip to content

Sync main into builtin-engines (2026-11-13) - #1477

Open
KnifeLemon wants to merge 916 commits into
builtin-enginesfrom
sync/main-into-builtin-1113
Open

KnifeLemon wants to merge 916 commits into
builtin-enginesfrom
sync/main-into-builtin-1113

Conversation

@KnifeLemon

Copy link
Copy Markdown
Owner

Brings main (e92b546, 911 commits since the merge base 7fc129f of 2026-10-30) into builtin-engines with a real merge commit, then fixes what the merge broke.

Conflicts (52 files)

  • CI and packages: .github/workflows/ci.yml, Directory.Packages.props, src/Filee.Engines/Filee.Engines.csproj, THIRD-PARTY-NOTICES.md
  • Docs: docs/ARCHITECTURE.md, docs/ENGINES.md
  • i18n: the 18 locale files main and the branch both had (both keys kept; it.json merged after turning the branch's literal \\n into \n, as main did)
  • Core: IConverter.cs, RoutePlanner.cs, AppSettings.cs
  • Archives: ArchiveConverter.cs, ArchiveExtractor.cs, ArchiveFiles.cs, ArchivePacker.cs, LzipReader.cs
  • Engines: EngineRegistry.cs, EngineInstaller.cs, ComplexScripts.cs, MagickImageConverter.cs, OpcPackage.cs, OdsReader.cs, RhwpFonts.cs
  • HWP/HWPX/DOCX: DocxReader.cs, DocxReader.Drawing.cs, DocxReader.Styles.cs, DocxReader.Tables.cs, HwpxModel.cs, HwpxReader.cs, HwpxReader.Body.cs, HwpxWriter.cs, MarkdownReader.cs
  • UnhwpConverter.cs (main modified it, the branch deleted it)
  • Tests: tests/Filee.App.Tests/EnginesPageTests.cs, tests/Filee.Engines.Tests/ArabicSheetTests.cs

Judgement calls

  • Unhwp stays removed. Main's HWPX line-break fix ([Bug]: HWPX → TXT/MD drops line breaks inside a paragraph (Unhwp ignores <hp:lineBreak/>) #1416, UnhwpLineBreaks) is dropped with UnhwpConverter and its tests: the built-in hwp-text engine reads hp:lineBreak itself.
  • Settings schema: the branch's steps become 89 (Unhwp → hwp-text in the engine order) and 90 (LibreOffice-for-HWP → Filee renderer). This leaves 88 free for feat(archive): read NuGet and Android packages like JAR #1470. Their tests and docs/ENGINES.md are renumbered to match.
  • Archives: the branch's in-process readers stay, and so does main's hardening:
    • Mark of the Web goes onto every unpacked file, including files from the in-process readers.
    • 7-Zip keeps -snz.
    • The single-stream cap applies to the in-process decoders and to the 7-Zip -so fallback.
    • RefuseLinks, FreeSpace and EnsureRoom are main's.
    • Main's ZXP, Minecraft/Modrinth packs, folder → archive and archive → ISO edges are added. Without 7-Zip, they are limited to the in-process formats.
    • lzip now decodes to the end marker, so data longer than the trailer states is refused rather than cut off. Main's test expects this.
  • Document readers: the branch's DocumentPackage and DocumentBudget stay, and main's protections are layered on top:
    • Main's UnpackLimit counts picture extraction in the HWPX, DOCX and OPC readers, in both OPC modes.
    • The readers run on main's large stack.
    • Main's link, field and nesting caps sit behind the budget.
    • The unlimited OpcPackage path reads XML through BoundedXml.
    • The ODT and PPTX writers now flatten deep models, like main's writers.
    • Main's tests for DOCX/HWPX nesting now expect the branch's refusal (error.document_too_complex) instead of flattening.
  • DOCX pictures: main's reader writes a cropped copy for the writers. The model's Crop is now set only when that copy can't be made (EMF), so the renderer never crops twice. Main's header-moves-body, paragraph borders and table-style reset for notes are kept next to the branch's layout data.
  • rhwp fonts: main's measured-Latin rule ([Bug]: Markdown → PDF renders English/Latin characters in a mismatched font (中转 PDF 时英文字符字体异常) #1207) moves into the shared FontSubstitution.Plan behind a parameter that only RhwpFonts passes.
  • Markdown code blocks: main's code box (There is an issue with the format conversion of the MD document #406) is kept. Its lines carry the code role, so the PPTX writer and the renderer still see code. The markup writers open the box back into a code block. Speaker notes keep plain code lines.
  • Image references: main's DocumentFiles resolves them, and PmlReader now uses it too. Notebook attachments, which Filee writes to the media folder, are allowed as a second root.
  • Spreadsheets: main's "Persian number format is refused without LibreOffice" test now expects the built-in sheet print to draw it.
  • H2Orestart: main's LibreOffice-extension update test is dropped because the branch no longer installs .oxt components. Main's ncnn model folders are kept.
  • New locales (bn-BD, fa, vi): they get the branch's 17 keys, translated, and lose the 4 keys the branch removed.

Fixes after the merge

  • SharpCompress left a 7z with encrypted names open when it couldn't read it. Main's ISO test exposed this. The in-process reader now opens the file itself.
  • MobiWriter now uses AlphaAction (Magick.NET 15).
  • Two tests still referenced the removed EngineEnvironment.LibreOfficeForHwp / hwpToPdf and were updated.

Tests

  • dotnet build Filee.slnx: 0 errors.
  • Filee.Core.Tests: 1424 passed, 0 failed.
  • Filee.Engines.Tests, full suite with the bundled 7-Zip present: 4134 passed, 5 failed, 296 skipped. The 5 failures are not caused by the merge:
    • 4 already fail on origin/builtin-engines here: ParagraphLayoutTests.Condense_keeps_a_word_that_fits_once_the_spaces_shrink, PageComposerTests.Code_lines_of_another_format_are_set_solid_with_the_space_after_their_block, PageComposerTests.A_wide_table_of_another_format_is_scaled_to_the_text_width_and_hangul_keeps_its_widths (missing repository fonts) and FileeRendererConverterTests.Off_by_default_no_route_takes_it (no rhwp in the worktree).
    • 1 already fails on origin/main here: SizeLimitTests.A_video_too_long_for_its_percentage_limit_is_refused.
  • Filee.App.Tests, filtered to EnginesPageTests, Localization*, DefaultPlacementTests and SettingsPage*: 255 passed and 9 skipped. DefaultPlacementTests.Every_default_slot_runs_on_some_input_of_its_donut needs the bundled 7-Zip: it failed without it and passes (10/10 in the class) with it.
  • dotnet format --verify-no-changes: clean on Filee.Core, Filee.Engines and the three test projects.

🤖 Generated with Claude Code

KnifeLemon and others added 30 commits November 9, 2026 00:05
fix(upscale): read an animated AVIF as a sequence
In a Chinese or Japanese document RhwpFonts swapped the Korean default
fonts for the language font in every slot, Latin included. rhwp 0.8.7
has no width tables for Microsoft YaHei, Yu Gothic and the other CJK
fonts and guesses 0.5 em, so English came out evenly spaced and
stretched. The Latin slot now gets an installed Latin font of the same
style that rhwp measures (Segoe UI, Times New Roman, ...), and the
language font only when there is none.

Closes #1207

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
docs: move the translated READMEs into docs/readme
feat(iso): create ISO images from folders and archives
fix(engines): use the move cursor on the drag handle
fix(rhwp): Markdown → PDF: set English in Chinese and Japanese text in a Latin font rhwp can measure
Clarified comments regarding text handling for various scripts and added a newline at the end of the file.
test
- Package installer/linux/hyprland/filee-donut.conf with Hyprland 0.53+
  windowrule syntax, including cursor centering move expressions.
- Bundle installer/linux/hyprland into release packages via build-portable.ps1
  alongside kwin and gnome scripts.
- Update installer/linux/INSTALL.txt with rule syntax across Hyprland versions:
  Lua config for 0.55+, windowrule block and packaged source line for 0.53-0.56,
  and legacy windowrulev2 for older versions.
feat(linux): bundle Hyprland window rules and update documentation
…dialog

fix(macos): show save location dialog on active full-screen Space (#596)
…ers-stuck-pdf

fix(rhwp): Cyrillic, Greek and extended Latin letters stuck together in PDF
#1278 spaces Cyrillic, Greek and extended Latin letters to the real width of the
font rhwp draws them with, so ENGINES.md no longer says the text overlaps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eet-colours

fix(html): apply colours from <style> rules and keep the rule after @import
docs: rhwp letters beyond Latin-1 no longer overlap
Code keeps the light code shade even when a dark highlight theme set a
dark background (#1257), so the theme's token colours, picked for that
dark background, sit at 1.3 to 2.9 contrast on it. Readable() only
stepped in below 1.25 and kept them pale. Coloured text on the code
shade now needs a contrast of 3; light theme tokens stay above that.

Refs #1237

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Avalonia's Adreno blocklist moves Snapdragon PCs to the Microsoft Basic
Render Driver, so the whole app draws on the CPU and scrolls slowly. On a
Snapdragon X Elite, FILEE_RENDERING=gpu was the smoothest and kept the
donut transparent; vulkan drew the donut on black and wgl failed to start.

An unset FILEE_RENDERING on ARM64 now means gpu. Set values stay as they
are, and auto still asks for Avalonia's own choice. The start-up log says
which one ran.

Refs #236

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KnifeLemon and others added 28 commits November 12, 2026 21:09
fix: convert RTF to TXT through LibreOffice
feat(image): read and write Paint.NET .pdn files, keeping layers with PSD
Neither is on Google Fonts, so the search found nothing. Aptos (Office's
default since 2023) goes to Microsoft's download for local installation,
DengXian to its Microsoft typography page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test(placement): check long-image placement and share the default report
A Ctrl + drag out of xplorer² (xplorer2_64) now opens the donut with the
default "File managers and desktop" scope, like File Pilot (#633).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rhwp 0.8.7 takes the height of a text box's text, which centring and
bottom alignment need, from the paragraphs' stored lines. Filee's HWPX
writer stores none, so the text counted as 0 high: the bottom-aligned
title of PowerPoint's Title Slide layout came out a whole line below its
box, over the subtitle, and every centred slide title half a line low.

In the copy rhwp renders, such boxes become top-aligned with the room
above their text added to the top margin. The text height follows rhwp's
layout: lines as tall as their largest characters, spaced by the
paragraph's line spacing, wrapped by the installed fonts' advances.
Paragraphs with stored lines (files saved by Hangul) are left alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unhwp skips <hp:lineBreak/>, so HWPX -> TXT/MD/HTML put every line of a
paragraph on one line. For an HWPX whose sections have line breaks, Unhwp
now reads a copy (in the step's work directory) where each one is a
private-use character the document doesn't use; Unhwp keeps it, and the
output gets a newline (TXT), a backslash hard break (MD; <br> in table
rows and headings) or a hard break with no-break-space indentation (HTML).
Block markers at the start of a new line are escaped and emphasis that
Unhwp closes after a break is closed before it.

Closes #1416

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(fonts): Get fonts opens Microsoft's pages for Aptos and DengXian
feat(windows): count xplorer² as a file manager for gestures
A new install had no way on the images donut to make one PDF of several
pictures (#1413): the #806 table left Merge PDF only on the document
donuts. It goes on the images front after PDF, like on the office,
spreadsheet and presentation donuts. New installs and Reset to default
only; existing libraries keep their layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(hwp): keep line breaks inside HWPX paragraphs in TXT and Markdown
…ance-1352

PPTX to PDF: keep bottom-aligned and centred slide titles in their boxes (#1352)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThemeService.Apply set a custom accent's 64 keys, the radii, the font
and the reading direction in Application.Resources one by one. Each
raised a resource change that reached every control of every open
window, and TestServices.EnsureInitialized applies the theme for almost
every App test, so the later tests got slower and slower (#1153 took the
accent from 13 keys to 64). They are now collected and published with
one SetItems, as #636 did for the language strings.

Fixes #1414
feat(presets): Merge PDF back on the images donut, next to PDF
Arduino sketches are C++ and Processing sketches (and the old Arduino .pde ones) are Java: plain text either way.
The TXT format now takes .ino and .pde, so they convert to PDF, Markdown, HTML, DOCX and the other text targets.
They are only read, never compiled, uploaded or run. Settings schema 87 teaches existing text donuts the two
extensions unless a donut of the user already claims them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BPxh5spZ5RqJChg4u7VEpX
Hikvision cameras and NVRs record MPEG program streams. iVMS-4200 / NVR
exports start with a 40-byte "IMKH" header and FFmpeg's mpeg demuxer
already reads them, whatever their extension (.mp4, .264). The recordings
on a camera's SD card or a NAS (hiv00000.mp4) are the same stream without
the header, and FFmpeg then reads their G.711 mu-law sound (stream type
0x91) as MP2 and fails. When a program stream's map lists mu-law sound and
the header is missing, Filee gives FFmpeg the header in front of the file
through the concat protocol, without copying the recording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BPxh5pgy6HfVPDtxbszvh3
The disk image opened as a plain Finder window. dmgbuild now builds it
with a background, a fixed window size and icon positions, and a short
DMG-only INSTALL.txt. The app is still copied with ditto, so its
signature is kept; the image stays UDZO, HFS+, volume name Filee.
dmgbuild ignores a failed copy, so the settings check the app's
signature and INSTALL.txt inside the image before it is closed.

The bottom 56 points of the background are a plain band that Finder's
path and status bars cover when a user has them on.

Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
feat(formats): read Arduino and Processing sketches (.ino, .pde) as text
feat(media): read Hikvision SD-card recordings with mu-law sound
…ange

fix(theme): publish a custom accent in one resource change, so App tests aren't slowed by it
build(macos): lay out the disk image window with a background
fix(ui): prevent sidebar collapse animation overshoot
Brings origin/main (e92b546, 911 commits since 7fc129f) into the built-in
engines branch. Conflicts are resolved keeping both sides; where a main fix
and a branch feature cover the same behaviour, main's protection is kept and
the built-in path follows it:

- Unhwp stays removed (built-in hwp-text reads HWPX line breaks itself), so
  UnhwpConverter, UnhwpLineBreaks and their tests go; System.Formats.Nrbf,
  DiscUtils and QRCoder from main stay.
- Settings: the branch's engine-order and LibreOffice-for-HWP steps are
  renumbered to 89 and 90, after main.
- Archives: in-process readers kept; main's Mark of the Web, single-stream cap
  (now also on the in-process decoders), 7-Zip -so fallback, game packs, ZXP,
  folder and ISO edges added.
- Document readers: DocumentPackage/DocumentBudget kept, main's UnpackLimit
  layered on picture extraction, readers run on the large stack, main's
  nesting/link/field caps kept behind the budget; ODT and PPTX writers
  flatten deep models like main's writers.
- DOCX: main's picture crop, header-moves-body, paragraph borders and note
  table-style reset kept with the branch's crop/transform model.
- rhwp fonts: main's measured-Latin rule (#1207) moved into the shared
  FontSubstitution behind a parameter.
- Markdown: main's code box with code-role lines, so the PPTX writer and the
  renderer still see code.
- i18n: both sides' keys; it.json merged after normalising literal \n; the
  branch's keys added to bn-BD, fa and vi.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Markup writers (and Markdown out of MarkupConverter) open Markdown's code
  boxes back into code lines, so notebooks, reStructuredText and the rest
  keep code blocks; IsCodeBox moves to MarkupBlocks for the PPTX writer too.
- A notebook's attachments, written to the media folder, may be named by
  its Markdown cells: MarkdownReader takes that folder as a second root
  (DocumentFiles still refuses everything else).
- Main's nesting tests for the DOCX and HWPX readers now expect the
  built-in branch's DocumentLimits refusal (error.document_too_complex at
  32 levels, 512 XML levels, 64 MB parts); the equation test stays within
  the XML depth. The DOCX crop test expects the cut copy main's reader makes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A 7z with encrypted names failed as password-protected, but SharpCompress
kept the file it had opened by path, so the job's folder (and main's ISO
test cleanup) could not be cleared. The in-process reader and the solid-7z
check now open the file themselves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KnifeLemon KnifeLemon added the built-in engines Filee: built-in engines (Project 4), on the builtin-engines branch, not released yet label Nov 13, 2026
…heet's column

Main's HwpxWriter now asks for the font's own space (useFontSpace, #510). Every
document of the render matrix is written by it, so rhwp and Filee's renderer
both lay out narrower spaces: rhwp's unshaped complex-script words come closer
(more overlapping glyphs), the table cell no longer wraps (one line of six off
instead of one of eight), and the line-spacing documents now match rhwp line
for line. The thresholds move to the values the Windows runners measured.

ArabicSheetTests: the printed page ends with column A, and at its default
width the Arabic statement fits only just, so wider fonts lost a letter at the
edge (linux-arm64). The column is now wide enough for any font.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

built-in engines Filee: built-in engines (Project 4), on the builtin-engines branch, not released yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.