Skip to content

Drop the raw and online loaders - #581

Merged
andiwand merged 4 commits into
mainfrom
drop-the-raw-and-online-loaders
Aug 10, 2026
Merged

Drop the raw and online loaders#581
andiwand merged 4 commits into
mainfrom
drop-the-raw-and-online-loaders

Conversation

@andiwand

@andiwand andiwand commented Aug 10, 2026

Copy link
Copy Markdown
Member

Bumps odrcore to 6.5.0 and takes the two loaders that routed around it with the bump.

RawLoader

It existed for exactly two formats — svg, which the WebView drew from the file, and xml, which the core named without a decoder. 6.5.0 renders both, so LoaderService no longer has to ask anything before the core. nameSays goes with it: routing by filename was only ever there to guard that one decision, and the core identifies by content.

OnlineLoader

The last thing in the app that sent a document off the device — to use.opendocument.app for conversion, or to transfer.opendocument.app and on to Google's or Microsoft's viewer. What it still reached was .rtf and WordPerfect; those are the engine's to learn. A file the core cannot open now gets the reopen bar and the contact dialog, which is already what a file it could name but not open got.

Gone with it: the upload dialog and its strings in all 31 locales, ProgressDialogFragment's upload mode, the third-party-viewer passthrough in PageView.shouldOverrideUrlLoading, and the TTS gate that existed because those viewers had no javascript bridge.

What is left

Not just CoreLoaderMetadataLoader stays, and it is load-bearing: it caches the file, resolves the filename, mime type and extension every downstream decision reads, and keeps the recent-documents list and its uri grants. So FileLoader, LoaderService and LoaderServiceQueue stay too. LoaderType is down to CORE and METADATA.

INTERNET stays in the manifest — ads and the consent SDK need it in the lite build — but no document reaches the network any more.

Checks

assembleDebug (all three flavors), lintProDebug, testProDebugUnitTest and assembleProDebugAndroidTest all pass. They were run against 6.4.0, since odrcore 6.5.0 is not published yet — Maven Central has 6.4.0 as the latest. This cannot build green until the release is cut, and CoreLoaderTest.xmlIsSupported is the assertion that will fail until then.

🤖 Generated with Claude Code

odrcore 6.5 renders svg and xml itself, which is the whole of what RawLoader
existed for, so the routing around the core goes with it - along with nameSays,
which only guarded that routing.

OnlineLoader goes too. It was the last thing that sent a document off the
device, to use.opendocument.app or to google's and microsoft's viewers, and
what it still reached was rtf and WordPerfect. Those are the engine's to learn.
A file the core cannot open now says so instead of offering an upload.

That leaves MetadataLoader and CoreLoader, so the FileLoader base, LoaderService
and LoaderServiceQueue stay: metadata still has to cache, name and type a file
before the core sees it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CAJTcj3dfmn1yC5TpqdCeb
@andiwand
andiwand marked this pull request as ready for review August 10, 2026 19:34

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba61904d12

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread gradle/libs.versions.toml
Comment thread app/src/main/java/app/opendocument/droid/background/FileLoader.kt Outdated
andiwand and others added 2 commits August 10, 2026 21:40
Saved instance state outlives an app update, and DocumentFragment restores a
parcelled Result from it. One written by the shipped version can name RAW or
ONLINE, which valueOf raises IllegalArgumentException on - inside the
getParcelable meant to bring the document back, where no caller can catch it.

CORE is the right answer for both: what those two loaded is the core's now.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CAJTcj3dfmn1yC5TpqdCeb
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CAJTcj3dfmn1yC5TpqdCeb
@andiwand
andiwand enabled auto-merge (squash) August 10, 2026 19:51
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CAJTcj3dfmn1yC5TpqdCeb
@andiwand
andiwand merged commit ed8a40a into main Aug 10, 2026
7 checks passed
@andiwand
andiwand deleted the drop-the-raw-and-online-loaders branch August 10, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant