Skip to content

ENG-2312 Release mobile-supported DG obsidian - #1533

Open
trangdoan982 wants to merge 7 commits into
mainfrom
eng-2312-release-mobile-supported-dg-obsidian
Open

trangdoan982 wants to merge 7 commits into
mainfrom
eng-2312-release-mobile-supported-dg-obsidian

Conversation

@trangdoan982

@trangdoan982 trangdoan982 commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Reviewer brief

  • Result: the plugin loads and runs on Obsidian mobile, verified on a device against the 1.7.1-beta.2 prerelease. Desktop behaviour is unchanged.
  • Review focus: apps/obsidian/src/utils/mimeType.ts. Its caller skips every text/ attachment, so an extension missing from the table silently starts uploading transcluded notes as binary assets. The table is generated from mime-db rather than hand-curated for that reason: a hand-curated table left out 92 text/ extensions, so .markdown, .mdx and .htm embeds would have started uploading, and it typed three more wrongly — including .xml, which flipped from uploaded to skipped.
  • Risk or follow-up: touch-only reachability is unchanged and out of scope — the hover-only node tag tooltip, canvas right-click menu, wikilink drag, and tag hotkey have no touch equivalent. All 17 commands work from the mobile command palette, and the docs note says so. tldraw's Google Maps embed builder reads process.env unguarded and would throw on mobile on that path only; pre-existing, not touched here.

Two review findings are accepted rather than fixed, recorded here so they are decisions and not surprises:

  • An attachment type outside Obsidian's own set (docx, zip, epub, heic, fonts) is now stored with application/octet-stream as its Supabase content type instead of a specific one. Nothing stops uploading, since the skip gate is text/ only, and Obsidian does not render these inline. Covering every type would mean a 41.5 KB table in place of 3.9 KB.
  • Schema export and import stay listed on mobile, where they cannot succeed. They degrade to a Notice rather than crashing. Hiding them needs a Platform.isMobile guard, which is the first of the touch-affordance work and belongs with it.

Verification

Equivalence with the replaced packages was established by differential testing against the real implementations, not by inspection:

  • mimeType.ts vs mime-types across all 1,239 known extensions: 0 upload/skip decision changes; every Obsidian attachment type byte-identical.
  • splitFrontmatter + parseYaml vs gray-matter across 394 real vault notes: 0 frontmatter-presence diffs, 0 body diffs, and 0 diffs in nodeTypeId / importedFromRid, the only fields any caller reads. Ground truth came from Obsidian's own metadataCache.
  • Markdown-link regex, old lookbehind vs new captured group, across 394 notes plus 14 adversarial cases (!![x], escaped bang, newline-separated bang, nested brackets): 0 differences.
  • Bundle: no require("fs") or require("path"), zero lookbehind assertions.
  • pnpm check-types, pnpm lint (0 errors), pnpm test:unit (181 passed).
  • Live desktop reload over CDP: plugin loads, 17 commands registered, settings intact.
  • On device: installed 1.7.1-beta.2 on Obsidian mobile and confirmed it loads.

Two behaviour changes are deliberate and worth a reviewer's eye:

  • Malformed YAML frontmatter no longer throws; it is treated as absent, matching how Obsidian itself tolerates it.
  • An unquoted date in frontmatter stays a string instead of becoming a Date. Obsidian's parseYaml is the yaml package, not js-yaml, so this makes the plugin agree with metadataCache. No caller reads a date field.

Loom video

Outstanding — to be added before review.

Scope check

  • Ran $scope-check against ENG-2312 and the final diff.
  • Scope beyond Done When: None.

Standards check

  • Ran $dg-pr-adherence-check against the final diff and PR metadata.

Local delegated full review

  • Ran a comprehensive review of the entire final diff in a subagent with a fresh context. Use $dg-delegated-full-review when no other full-review workflow is available.

Devin Review

trangdoan982 and others added 5 commits October 8, 2026 13:19
gray-matter requires `fs` and mime-types requires `path` at module load,
so both throw at plugin load on Obsidian mobile. Replace them with local
utilities and stop marking Node builtins external, so a future Node import
fails the build instead of shipping.

The mime table is generated from mime-db rather than curated: the caller
skips every `text/` attachment, so an extension missing from it would
silently start uploading transcluded notes as binary assets.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Entire-Checkpoint: 01M4E8D4VYPYHG3FRYDTXXG58A
parseFrontmatter now calls parseYaml, which the stub did not export, so
importRelations' tests read every frontmatter as empty. Obsidian's parseYaml
is `YAML.parse` from the `yaml` package, so the stub delegates to it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Entire-Checkpoint: 01M4EK4RJSMRSJP7DA5VCAXSWG
The engine swap and the swallowed parse error had no tests of their own,
and the comment on the markdown-link replacer pointed at the image pass
as being above it when it runs below.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Entire-Checkpoint: 01M4EK777W55T20BNRYMHXH4RD
@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
discourse-graph Ready Ready Preview Oct 9, 2026 9:15pm UTC

Request Review

@supabase

supabase Bot commented Oct 8, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@linear-code

linear-code Bot commented Oct 8, 2026

Copy link
Copy Markdown

ENG-2312

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Devin Review

Comment thread apps/obsidian/src/utils/mimeType.ts
An attachment named `x.constructor` read an inherited member out of the
mime table, and the caller's `.startsWith` on it threw and ended the
node's asset sync. `mime-types` returned the default here, so this was a
regression. Null-prototyping the table makes the miss structural.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Entire-Checkpoint: 01M4H0QVME2ME0S3ENM6X7V6AP
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Entire-Checkpoint: 01M4H7Q15TT8N88A88452CJCZE

This branch was successfully deployed

1 active deployment
Preview — 6048373c Deployed Oct 9, 2026 by vercel[bot]
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