Take odrcore 6.11.0 - #185
Merged
Merged
Conversation
Three workarounds this app filed upstream come back fixed, and go: the fit-to-width user script, replaced by odrcore's new viewport mode; the charset check, now that a file which is not text no longer comes back as text; and the handling for a blanket link target, leaving only the web to send to the browser. States the spreadsheet limits rather than inheriting them, as OpenDocument.droid does. Pages, Keynote and Numbers keep the system's rendering. odrcore reads all three now, so the routing that caught them - a container the system knows as a document - no longer fires and they are named instead. It reads their text and not their styles or pictures, which is less than the phone draws. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y7ALzy5VB32UfQn263Tbnk
The view fits itself by applying a zoom now, and webkit leaves that out of getBoundingClientRect while elementFromPoint expects it in - so the tap the test aims at the middle of an editable run landed outside it and hit nothing. odrcore 6.11.0 ships getViewportRect for this. Only the test hit-tests in script; a real tap is webkit's own and was never affected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y7ALzy5VB32UfQn263Tbnk
andiwand
force-pushed
the
take-odrcore-7.0.0
branch
from
August 29, 2026 09:31
0222593 to
86a4992
Compare
andiwand
marked this pull request as ready for review
August 29, 2026 09:32
The same correction as OpenDocument.droid, minus one line. PostScript (EPS) and AutoCAD (DXF) have never been file types odrcore has. Photoshop (PSD) had a type but declared html output it could not produce, and 6.11.0 stops claiming it. HTML has no type either. Four claims with nothing behind them. Going the other way: rtf and Apple iWork were already promised here and are true as of this release, and flat ODF - FODT, FODS, FODP, FODG - opens like the packaged kind, which Info.plist already declares. Markdown is the line this listing does not get. The core opens one, but it has no signature and only decodes when it is asked for by name, and CoreWrapper decodes by detection alone - so a `.md` arrives here as the plain text it also is. `decode(path:as:)` is what would change that, and until something calls it this listing would be promising prose the app does not render. OpenDocument.droid asks, through `nameOutranksText`, and says markdown. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013MnPChoTUsGrb6TMMy8nc1
Two things, both found by driving the app in a simulator. The new viewport mode goes back. It pins initial-scale=1.0 and leaves the fit to a script inside the view, and in a WKWebView that script's zoom never lands: an odt opened at actual size with the body text twice the size and only its first third on screen. Photographed against the shipping build, 11.4% of pixels differed; with the mode off, 1.2%. So the user script stays, and the mode is opendocument-app/OpenDocument.core#761. Markdown has no signature, so odrcore reads a .md as text and only its name can say otherwise. Opening again as the type the name states, under the rule OpenDocument.droid already uses: a document, or a format the core cannot detect from its bytes. Csv is neither and stays the core's own decision. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y7ALzy5VB32UfQn263Tbnk
The line a131cf3 held back. `CoreWrapper` asks by name where the bytes only say text, so the promise is good; the wording is OpenDocument.droid's. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y7ALzy5VB32UfQn263Tbnk
odrcore has no html type, so an .html decodes as text and the reader showed the page's source. It used to be drawn: html, htm and xhtml were in the extension list #183 replaced with "ask the core", and nothing took over. `systemDrawsItBetter` already means what is needed here, so html joins iWork in it, by type rather than by extension. `public.xhtml` conforms to xml and not to html, so both types are named - xml alone would catch flat ODF, which odrcore does render. The listing gets HTML back with it. EPS, DXF and PSD stay out: a WKWebView answers canShowMIMEType false for all three, so there was never a native rendering to promise. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y7ALzy5VB32UfQn263Tbnk
This was referenced Aug 29, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
odrcore 6.10.1 → 6.11.0, resolved against the tag. The release went out as a minor despite carrying a breaking change.
Paired with opendocument-app/OpenDocument.droid#634.
Two workarounds come back fixed, one does not
Three were filed from #183. Two go:
target="_blank"on every viewWKUIDelegateno longer has to catch served linksCoreWrapper.translateThe charset check was always a workaround for the core answering "text" to anything it did not recognise. Now
decodethrows andlistFileTypescomes back empty, which the guard three lines above already catches — and it catches the NUL-padded binaries the charset check missed.The link target needed new code rather than a deletion. Only external links carry
target="_blank"now, so served links navigate in place and never reachcreateWebViewWith; what does reach it is the web, which went nowhere before and now goes to the browser.The fit stays ours
viewportMode = .fitWidthByViewwas the headline of this PR and it is reverted. Driving both builds in a simulator, it makes an ODT render worse than today: the mode pinsinitial-scale=1.0and leaves the fit to a script inside the view, and in WKWebView that script's zoom never lands, so the page sits at actual size with body text at ~2× and only its first third on screen.fitWidthByViewSo the user script stays. Filed as opendocument-app/OpenDocument.core#761 with the emitted viewport for each mode.
Worth recording from the same run: on iOS 26 WKWebView fits a top-level page by itself at load, so in portrait the script is no longer doing anything. It is still needed on rotation — without it, turning the phone leaves the document at the old scale (9% of pixels differ). That is the half
fit_width_by_viewwas meant to take over.Picked up from Android
The spreadsheet limits are stated rather than inherited, the same numbers as droid#623 and droid#634: 100000 × 500 with a 500000-cell budget. Without this the bump silently moves them, since core#757 raised the default from 10000 rows and added the budget.
The apple binding makes this awkward:
spreadsheetLimitis aTableDimensionsboxed in anNSValue, and Swift has no@encode, so the type encoding is a string literal. Filed as opendocument-app/OpenDocument.core#759.HTML is drawn by the system again. odrcore has no html type, so an
.htmldecoded as text and the reader showed the page's source;html,htmandxhtmlwere in the extension list #183 replaced with "ask the core", and nothing took over.systemDrawsItBetteralready means what is wanted, so html joins iWork in it, by type.public.xhtmlconforms to xml and not to html, so both types are named — xml alone would catch flat ODF, which odrcore does render.EPS, DXF and PSD stay out of the listing, and a probe says why: a WKWebView answers
canShowMIMETypefalse for all three (com.adobe.photoshop-image,com.adobe.encapsulated-postscript, and DXF has no declared type at all). There was never a native rendering behind those three claims.Markdown now opens as prose. It has no signature, so odrcore reads a
.mdas text and only the name can say otherwise;CoreWrapper.openFileopens again as the type the name states, under droid's own rule — a document, or a format the core cannot detect from its bytes. Csv is neither and stays the core's decision. This is what a131cf3 held back, so the listing gets its markdown line.iWork keeps the system's rendering
odrcore reads
.pages,.numbersand.keysince core#732/738/739, so they stop being archives and the routing from #183 — it saw a container, the system knows a document — stops firing on its own. Butsrc/odr/internal/iwork/PLAN.mdhas stages 3 and 4, styles and drawables, still open, so a.pagesrenders body text and anchored tables only. That is less than the phone draws, so the three are named explicitly instead.Verified
69 tests, 0 failures;
ODR Full,ODR LiteandODR Screenshotsall build; format clean. CI green.Beyond CI, both builds were driven in an iPhone 17 Pro simulator on iOS 26 and photographed portrait → landscape → portrait for the text, sheet, office and pdf screens, then diffed frame for frame against the shipping build. Sheet is identical, pdf differs by 0.8–2% (the pdf fixes), office by 0.7%. That comparison is what found the viewport regression.
Not covered: a real device, and an iPad.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Y7ALzy5VB32UfQn263Tbnk