Skip to content

1 Intro & Research

Media Explorer edited this page Jun 15, 2026 · 6 revisions

1 Intro

The main goal

The main goal is re-imagine MediaExplorer as modern non-WebView-based browser - transformer that uses:

  • flexible App Bar ( almost hide moe - semi-hide mode, full-size mode);
  • flexible Search mode (URL / AI prompt / some futuristic thing);
  • Magic "Engine/Kernel presets" (NiL.JS / remote / edgeHTML / some AI connector)
  • AI connectors with different "skills" ( Ultra - Claude Fable or Opus / Rich - Perplexity Pro, Poor -- Openrouter free model, Asceti - some micro ONNX-based LLM )

Research Envoding Handling

I need to understand how MediaExplorer currently handles HTTP response encoding. Search the codebase for:

  1. How HTML responses are fetched and decoded (look for HttpClient, ReadAsStringAsync, Encoding in MainPage.xaml.cs, JavaScriptEngine.cs, CustomHtmlEngine.cs, BrowserApi.cs)
  2. Whether there's any charset detection logic (look for "charset", "encoding", "windows-1251", "iso-8859", "Content-Type" across all .cs files)
  3. How the HTML is passed to the parser (look for the flow from HTTP response → string → NiL.JS eval or HTML parser)

Report:

  • Exact file paths and line numbers where encoding is handled
  • Current approach (is it always UTF-8?)
  • Where charset detection should be added
  • Any existing encoding-related code Let me read the key encoding-related sections in detail.

Now let me look at the main page load flow and ResourceManager.cs:

Now let me read the full ResourceManager.cs FetchTextAsync method:

Let me also check the JavaScriptEngine fetch/XHR path and the CustomHtmlEngine's interaction with encoding:

Let me now look at the fetch API response handling and the CustomHtmlEngine render pipeline:

Research CSS edge cases

I need to understand CSS rendering edge cases in MediaExplorer. Search the codebase for:

  1. Table rendering in RenderTreeBuilder.cs and RenderBox.cs — look for "table", "grid", "td", "th", "tr" handling. Report how tables are currently rendered and any known issues (look for TODO, FIXME, HACK comments related to tables).

  2. CSS edge cases we've encountered — search for any TODO, FIXME, HACK, WORKAROUND, KNOWN in:

    • RenderTreeBuilder.cs
    • RenderBox.cs
    • VirtualizingRenderer.cs
    • DomBasicRenderer.cs
    • CssLoader.cs
    • CssComputed.cs
  3. Search for any comments about "overflow", "text-overflow", "ellipsis", "white-space", "word-break", "word-wrap" to understand text rendering limitations.

Report:

  • Table rendering approach and limitations
  • All TODO/FIXME/HACK items found
  • Text overflow/ellipsis handling status
  • Any CSS properties that are parsed but not implemented Good, all six files located. Now let me search for all the requested patterns in parallel.

Now let me read the key sections of each file for deeper context on the table rendering, overflow handling, and text rendering.

Let me now read the table layout function in RenderBox.cs and search for more edge cases.

Let me also look at a few more key areas - the Temporarily Disabled display:none code, the VirtualizingRenderer overflow handling, and check for parsed-but-not-rendered CSS properties.

Let me check a few final pieces - how visibility, float, clear, and line-through are handled (or not) in the renderers.

Let me check the CssLoader.cs for what properties are parsed, and look at one final area - the "white-space" handling in VirtualizingRenderer to confirm the pre-wrap logic.

Clone this wiki locally