Skip to content

Drop the charset checks and file bridge the core made obsolete - #789

Merged
andiwand merged 1 commit into
mainfrom
drop-core-workarounds
Dec 4, 2026
Merged

andiwand merged 1 commit into
mainfrom
drop-core-workarounds

Conversation

@andiwand

@andiwand andiwand commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Removes code that worked around older versions of core.

  • Charset checks: core refuses bytes that are not text, so the app no longer checks for a known charset itself.
  • Empty files: core reads an empty file as text, so an empty .odt would open as a blank page without those checks. FileIdentifier now rejects a file of size 0. The old check waited for a MIME type that core no longer returns.
  • PageView.sendFile: nothing has called it since Let the core render the raw files it has learned to render #564, and it let page scripts make the app open a file.

Tests: two new device tests cover binary and empty files, and all of CoreTest passes, as do lint and the unit tests. The full device suite did not pass locally: a few UI tests failed, different ones on each run, on a heavily loaded machine. One of them, the search test, also fails there on main. CI has to confirm the UI tests.

Core refuses bytes that are not text, so the app need not check for a
known charset. It reads an empty file as text, so FileIdentifier now
rejects one by its size. No page has called sendFile since #564.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW6WZZdVv7JbM9FVRtHWUP
@andiwand
andiwand merged commit 261743e into main Dec 4, 2026
11 of 13 checks passed
@andiwand
andiwand deleted the drop-core-workarounds branch December 4, 2026 08:57
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