Skip to content

Integrate community features, remote MCP, indexing and editor recovery - #35

Open
macros0 wants to merge 13 commits into
xnohat:mainfrom
macros0:codex/upstream-community-integration-20261029
Open

macros0 wants to merge 13 commits into
xnohat:mainfrom
macros0:codex/upstream-community-integration-20261029

Conversation

@macros0

@macros0 macros0 commented Oct 29, 2026 •

Copy link
Copy Markdown

Summary

Integrate community improvements into the original project, retaining source credits, MIT licensing and co-author attribution.

  • Add configurable editing controls, color palettes, text tools and selection/fixed/mobile layouts.
  • Correct Markdown rendering, tables, footnotes, callouts, note embeds and Live Preview code selection boundaries.
  • Integrate preview tabs, explorer sorting, outline, graph gestures, note-relative attachments, PDF downloads, tasks, templates and CLI/MCP tools.
  • Add authenticated remote Streamable HTTP MCP alongside local stdio transport, using scoped API keys.
  • Add cached index startup, file watching/reconciliation, hash audits and automatic search refresh.
  • Replace eval-based plugin loading with same-origin modules, lifecycle cleanup, diagnostics, CAS writes and separate web settings.
  • Add browser draft recovery, conflict resolution and adaptive toolbar overflow; preserve dirty edits and enforce no-clobber/version-aware file operations.
  • Update dependencies and expand browser, integration and dependency-audit checks.

Git and versioned saves

Git pull/sync and version-checked file writes now share the canonical vault mutation queue. A save cannot accept an old version and overwrite a remote update received while its atomic write is pending. The entire Git transaction retains a matching vault/settings snapshot, preventing a queued operation from using another vault's remote after a settings switch.

Real-repository regressions cover save-before-pull/sync, pull/sync-before-save with a version conflict, and a queued push across a vault/remote switch.

Recovery interface and editor folding

  • Hide the empty recovery counter and exclude ordinary active autosaves from the recovery list.
  • Explain browser copies and provide Review text, Download copy and Remove browser copy actions. Removing a browser copy does not delete the vault file.
  • Explain deleted originals and require an explicit separate copy to recover their text.
  • Support Tab/Shift-Tab indentation, including hidden descendants of a folded parent, and undo of the complete indentation change.
  • Match measured Obsidian 1.14.5 folding behavior: inline controls immediately after indentation, expanded controls visible on hover, collapsed controls continuously visible, and no extra generic paragraph or enclosing-code-fence folds.
  • Fold individual indented ABAP/code statements without modifying their text or consuming sibling statements or closing fences.
  • Preserve fold view state in browser storage scoped by vault and note path. Restore after asynchronous document hydration, including headings beyond the initial Markdown parse frontier. Validate document identity before restoring; do not store note text in fold metadata.

Synthetic original-Obsidian observations are recorded in tests/fixtures/rendering/obsidian-folding.json. Both spaces and tabs participate in indentation folding; pasted whitespace is preserved.

The selection screenshot fixture waits for the applied viewport, fonts, measured selection coverage and selected compositor frame. The HTTP smoke waits for authenticated initial-index readiness before its existing missing-file and resolver assertions. All original pixel, background, margin and HTTP response assertions remain unchanged.

Vault preferences and safe file operations

  • Honor Obsidian attachment destinations, note creation locations and link formats, showing effective settings and their sources. Reject blank vault paths and preserve saved state on write failure.
  • Protect attachment deletion with complete Markdown/wiki/HTML/Canvas reference scans, source versions, captured vault scopes and explicit confirmed-mode limits. Preserve shared files and offer selectable cleanup after note deletion.
  • Update resolved links and descendant public shares during rename/move. Version checks and recovery journals retain recovery data when changes are interrupted or conflict.
  • Apply excluded-file policies, readable line width and explicit mobile toolbar imports. Existing notes and attachments are not migrated.
  • Reject dangling destination symlinks before rename planning. Refresh the Electron packaging dependency chain for minimatch/glob advisories, retain full audit enforcement and cover real ASAR creation/native unpack.
  • Include generic shared-network-vault guidance and synthetic original-Obsidian preference fixtures.

Live rendering and browser recovery

  • Render tables once incremental Markdown parsing reaches them. Display formatted link labels and external-link icons without exposing link URLs or titles.
  • Keep one formatting toolbar when navigating between articles, including Source, Live and Reading modes.
  • Show an external-change notice for the active Markdown article. Refresh only on request, preserve local edits through version comparison, and reject stale replies after typing, navigation or vault changes.
  • Automatically remove browser recovery copies only when their complete text exactly matches the saved file. Recheck revision/content atomically and preserve active edits, open comparisons, unavailable files and other vault scopes.
  • Add real Workspace/Editor browser regressions for parsing, navigation, refresh races, recovery cleanup and scope isolation.

Ordinary URL links

  • Keep standalone and inline HTTP(S) URLs as compact, clickable text in Live, Reading and split preview, including the editable form under the caret.
  • Open the exact destination once per click and preserve article text. Ordinary URLs never request preview metadata or become rich cards.
  • Preserve named Markdown links, code literals and supported media embeds. Public-share backend card rendering remains unchanged.
  • Add a real-browser regression covering exact destinations, caret clicks, source preservation, split preview and absence of metadata requests.

Code files, Canvas and native embeds

  • Add authenticated, path-guarded UTF-8 code viewing in main/split panes, with language mappings, theme-aware highlighting, line numbers, Find and Copy. Files above 10 MiB or unsupported encodings offer download; highlighting stops above 1,000,000 UTF-16 code units.
  • Preserve drafts, mixed-pane focus and explicit navigation when settings or passive refreshes change. Keep selected Canvas groups behind contained cards and remove the duplicate vault settings button.
  • Match ordered tasks, checkbox states/strikethrough, literal note titles and vault-controlled explorer visibility.
  • Share a scoped PDF.js viewer across embedded, full-file, split and public views, including menus, source/file actions, text/annotation/offset fragments and responsive geometry.
  • Unify Wiki/Markdown note, image, media and Canvas embeds; preserve block formatting and reveal source fragments across views, reload and browser history.
  • Require independently enabled, visitor-unlocked child publications for public nested note/Canvas content. Bound reads and retain each child's asset scope. Rebuild generic authored HTTP(S) frames with opaque-origin sandboxing; validated YouTube embeds use the existing trusted-player policy.
  • Include synthetic native-reference captures and browser/server regressions. Bases and physical touch acceptance remain outside the verified scope; browser/OS restrictions are documented.

Native rendering parity

  • Import vault note font size and match property presentation, partial list indentation, task ticks, inline-link geometry and callout folding/source actions.
  • Preserve a bounded inert HTML formatting allowlist through the shared sanitizer. Match late/unclosed/longer code fences, multiline display math, Mermaid colors and source controls without changing stored Markdown.
  • Resolve same-note heading/block references; retain native missing-note/PDF placeholders and compact consecutive image rows.
  • Canonicalize validated YouTube privacy-domain embeds through the existing trusted-player policy. Other authored frames remain opaque-origin sandboxed, and remote framing restrictions still apply.
  • Expand real-browser checks for hover/keyboard actions, source preservation, loaded attachments and repeated PDF instances. Use a deterministic synthetic WebM fixture while retaining playback assertions.

Code colors, Canvas, diagrams and language packs

  • Match native JavaScript/Python/YAML fence colors with lazy grammars. Refine Canvas text spacing, neutral borders, selection controls, arrowheads and initial zoom; add a fingerprinted SVG favicon.
  • Replace the Mermaid runtime with a shared lazy Pele 1.8.0 adapter while retaining existing mermaid fence syntax, note text, source actions and navigation. Cover theme inheritance, embedded origins, resizing, disposal, malformed input and untrusted links/callbacks.
  • Add Settings → Language, compatible UTF-8 translation-file import, English fallback catalogue and blank-template download. Persist compatible strings in authenticated server settings, with startup cache, migration and serialized save/reset operations.
  • Preserve document text, names and custom labels; validate placeholders and refresh existing editor/PDF labels. Include an independently authored Russian translation for manual import.
  • Cover persistence across browser sessions, failed writes/reset, language changes and measured toolbar-overflow readiness. Native Electron menus, public server-rendered pages and plugin strings remain outside localization scope.

Consistent English defaults

  • Use English on fresh installs and after language reset, independently of browser locale, including PDF controls/file actions, missing-file and heading messages, and external-change notices.
  • Route the remaining PDF actions and external-change messages through the language catalogue. Explicit translation imports update existing controls; reset restores English.
  • Expand the independently authored Russian import file to all 975 catalogue entries. Browser regressions force ru-RU and verify startup, explicit import and reset without document changes.

Provenance

The integration commit e3ba3fd23148da42b78372c2169ace08f8230179 has upstream c41967a93317b2a0f08511c349ef3dbaf78fc882 as its sole parent. Twelve subsequent commits implement Git/save safety, recovery, editor/vault/rendering compatibility, code viewing, Canvas, diagrams, language packs and consistent English defaults. The current contribution head is cc238ec59fd58c981d6fa68dc71e98a12628f8cb.

The contribution includes the changes from merged fork PRs through #18.

Community source snapshots:

  • phamtruonghung/webobsidian@80106c6818fa44f7f92c8d894c7da71717c1980b
  • lakylekidd/webobsidian@340af34a98bbc47e5a72fbf7976bb22cddb99f48

docs/FORK_INTEGRATION.md records source credits and integration decisions. README/contributor routing and desktop publishing target xnohat/webobsidian. Source-specific deployment and scheduled issue workflows remain guarded to their original repository.

Compatibility

  • Node >=22.12; CI and Docker use Node 22. Existing Mermaid fence syntax is rendered by Pele 1.8.0; diagram layout can differ from the previous runtime.
  • Remote HTTP MCP is disabled by default. Configure a public HTTPS URL and scoped keys before enabling it; local stdio remains supported.
  • Plugin JavaScript runs as trusted code in the application page. The Obsidian compatibility API remains partial; docs/PLUGIN_COMPATIBILITY.md describes the tested surface and limitations.
  • Browser drafts provide recovery rather than a complete offline application. Fold view state is local to the browser and vault, not written into Markdown.
  • Trash retention defaults to 0 (keep forever); existing explicit positive settings remain effective.
  • A legacy CLI 123456 recovery override is treated as unconfigured. Chosen credentials, strong recovery overrides and Electron's generated secret remain supported.
  • External Obsidian/NFS writers remain outside the process mutation queue; detected conflicts retain recovery data.
  • Mapped legacy text formats become read-only while the code viewer is enabled; removing mappings or disabling it restores their previous editor. PDF/browser OS integration and physical touch limits are documented in docs/embed-controls-audit-2026-11-01.md.
  • Unsupported complex YAML remains in source form. docs/rendering-compatibility.md records verified behavior and remaining visual coverage.

Validation

Fresh Windows validation of the current contribution:

  • All workspace and desktop typechecks pass.
  • Production and desktop builds pass.
  • Complete npm test: 391 server + 521 web tests pass; ten Windows capability checks are skipped.
  • HTTP/stdio MCP: all three integration tests pass.
  • Expanded disposable HTTP smoke and the 28-copy secure-dependency baseline pass.
  • Regression coverage includes vault preference sources, attachments, reference scans, deletion confirmations, link rewriting, shares, rename recovery, real ASAR packaging, editor folding, incremental rendering, external-update refresh races, browser recovery workflows, compact URL rendering/clicks, read-only code panes, Canvas hit testing, PDF menus/fragments, public child-publication scopes sandboxed web frames, inert HTML formatting, longer/unclosed code fences, property presentation, math, hover/keyboard source actions, native code colors, Canvas layout, Pele diagrams and server-synced language packs and English startup/reset across browser locales.
  • Independent transfer review confirmed source runtime/configuration/test parity, upstream routing and sanitized product documentation.
  • The initial Windows run hit a fetch-blocked random port in an HTTP fixture. Its isolated ten-test retry and complete-suite rerun passed without code or assertion changes.

The exact contribution head cc238ec59fd58c981d6fa68dc71e98a12628f8cb passed complete Linux CI run 41597319728. All three jobs passed: full server/web/Electron tests, HTTP/stdio MCP integration, both runtime smoke suites, Docker image/MCP smoke, dependency audit, production/desktop builds and Linux desktop packaging. The all-severity audit reported zero vulnerabilities.

Related

PRD FR-1 / FR-2, Agent API, MCP, plugin compatibility and security requirements. Product requirements and implementation progress accompany the integrated changes.

Type of change

  • Bug fix
  • New feature
  • Refactor / chore
  • Documentation

Checklist

  • Workspace typechecks pass
  • Production build passes
  • Implementation progress and measured original-editor behavior documented
  • Authentication, key-scope and path guards retained
  • Synthetic fixtures only; no operator credentials or local deployment artifacts included

Remaining visual coverage is documented without claiming complete pixel parity.

@macros0
macros0 force-pushed the codex/upstream-community-integration-20261029 branch from e8fedb9 to 10aa8b6 Compare October 29, 2026 20:00
Combine community navigation, vault and media features with refreshed dependencies,
formatting controls and Markdown rendering corrections. Add authenticated remote
MCP, resilient cached indexing, module-based plugin loading, local draft recovery,
conflict resolution and adaptive toolbar layouts. Retain data-safety fixes and
browser, integration and dependency regression coverage. Wait for asynchronous
viewport layout before asserting browser zoom geometry.

Source contributions: phamtruonghung/webobsidian, lakylekidd/webobsidian and
macros0/webobsidian. MIT license and contributor attribution retained.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com>
Co-authored-by: openai-code-agent[bot] <242516109+Codex@users.noreply.github.com>
Co-authored-by: lakylekidd <9472854+lakylekidd@users.noreply.github.com>
Co-authored-by: Cosmo <aditya@latticelabs.au>
Co-authored-by: Billy Vlachos <billy.vlachos@greenflux.com>
Co-authored-by: Charles Bine <charles.bine@gmail.com>
Co-authored-by: Jeff Stephens <jeff@athentech.com>
Co-authored-by: JulienJBO <kephuro+github@gmail.com>
Co-authored-by: Maximo Diaz <maximo.diaz@conectareus.com>
Co-authored-by: ziuus <noelyt101@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Phil Palmieri <philpalmieri@me.com>
Co-authored-by: Robert Jones <robert@justjones.org>
Co-authored-by: phamtruonghung <trh.bkdn@gmail.com>
Co-authored-by: Billy Vlachos <williamcaminiti@live.com>
@macros0
macros0 force-pushed the codex/upstream-community-integration-20261029 branch from 10aa8b6 to e3ba3fd Compare October 30, 2026 17:34
@macros0 macros0 changed the title Integrate community fork features, dependency updates and editor rendering fixes Integrate community features, remote MCP, indexing and editor recovery Oct 30, 2026
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