Repository navigation
perf(editor): drop ranui select and the MIME table from startup - #295
Merged
Merged
Conversation
chaxus
enabled auto-merge (rebase)
October 24, 2026 12:27
Deploying document with
|
| Latest commit: |
bbc2738
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d4e019bf.document-7hm.pages.dev |
| Branch Preview URL: | https://perf-startup-mime-select.document-7hm.pages.dev |
Only the assistant renders r-select, and its modules import the element themselves, so the editor no longer loads it at startup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The open paths fell back to ranuts' getExtensions for a nameless file, which kept its full MIME table on the editor page. getDocumentExtension reverses DOCUMENT_MIME_MAP instead, and names ppt correctly (getExtensions said pot). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chaxus
force-pushed
the
perf/startup-mime-select
branch
from
October 24, 2026 14:00
f71755a to
bbc2738
Compare
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.
Follow-up to #293, rebased onto main after #294 (which carries the ranui/ranuts 0.5.2 + ranview 0.2.2 upgrade, so this PR no longer touches any dependency file). It removes the last two editor startup items that the sourcemap attribution found.
Change
index.tsimportedranui/select, but only the assistant renders anr-select, and its modules import the element themselves. The element now registers when the assistant loads.lib/converter.tsandpackages/converterfell back to ranuts'getExtensions(file.type)for a nameless file. They now usegetDocumentExtension, which reversesDOCUMENT_MIME_MAP. It gives the same answer for every supported format exceptppt, wheregetExtensionssaidpot.getMimeTypeFromExtensionfrom@ranuts/shared(zero production callers).Measurements (static startup graph from
.vite/manifest.json, gzip -9)75c2cd96/editor/historyStep by step on the editor: the select change takes it from 105 KB to 90 KB, and the
getExtensionsswap from 90 KB to 84 KB. History bytes are unchanged (+0.2 KB raw). Its gzip sum grows about 1 KB only because Rolldown now emits ranui's button as a separate file.Reverse validation
import 'ranui/select'restored, both select cases fail (the select chunk is in startup scripts, andr-selectis defined before the assistant opens).getExtensionsrestored inlib/converter.ts, the editor MIME case fails.CI fix
The first run failed the new select case on
E2E (Docker image) shard 1. With no saved model, the panel switches itself to settings after an async model-cache check, and the gear toggles. If the check finished first, the click went back to chat. I reproduced this locally by forcing that ordering. The case now waits for the cache summary and presses the gear only when the panel is not already in settings (same asagent-portal-layer.spec.ts). It passes under the forced ordering, and 40 repeats pass.Verification
After the rebase:
lint:ts,format:check, and all unit tests (252 files / 6817 tests) pass, and 66 E2E cases pass (startup payload, entry paths, filename matrix, app smoke, history, language menu, assistant portal layer and workspace). The dependency files are identical to main, anddompurifystays at 3.4.17. A fresh-context review found no bugs. Its doc nits are fixed in the last commit.Record:
docs/explorations/2026-10-24-select-and-mime-table.md.🤖 Generated with Claude Code