Skip to content

fix: harden editor and sync edge cases#158

Merged
bholmesdev merged 3 commits into
bholmesdev:mainfrom
ShiroKSH:agent/harden-editor-sync-edge-cases
Jul 11, 2026
Merged

fix: harden editor and sync edge cases#158
bholmesdev merged 3 commits into
bholmesdev:mainfrom
ShiroKSH:agent/harden-editor-sync-edge-cases

Conversation

@ShiroKSH

@ShiroKSH ShiroKSH commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Prevent active-link ranges from merging adjacent links with different attributes.
  • Preserve mixed task and plain list items when toggling list type.
  • Preserve trailing text after inline Markdown images.
  • Prevent duplicate debounced saves and make desktop persistence best-effort.
  • Reject failed asset upload and download responses before updating sync state.
  • Remove the Unix-only CLI postbuild step so Windows CLI builds succeed.

Validation

  • pnpm test: 175 tests passed.
  • pnpm build passed.
  • pnpm check passed.
  • pnpm typecheck passed.

Scope

This change keeps the existing sync and workspace contracts intact. Server-side authentication, ownership, path validation, and conflict resolution remain separate follow-up work.

@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

@ShiroKSH is attempting to deploy a commit to the bholmesdev's projects Team on Vercel.

A member of the Team first needs to authorize it.

Splitting the paragraph around image children keeps the image block
and the surrounding text, instead of dropping the image to alt text
on round-trip. Also warn when localStorage persistence fails.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bholmesdev

Copy link
Copy Markdown
Owner

Thanks for the batch of fixes, these are all real bugs. Two notes:

  1. I pushed a commit to this branch (fed659c). The trailing-text image fix dropped the image node to alt text, so ![diagram](example.png) trailing would rewrite the user's file as diagram trailing on the next save, losing the image reference. Images are block nodes in the editor schema, so the paragraph now splits around image children: the image survives as a block and the surrounding text becomes paragraphs. Also added a console.warn to the localStorage catch so quota/security failures are visible.

  2. The new res.ok throws in sync.ts are the right direction, but no call site catches, so one failed asset aborts the whole sync before state is written, and in hubble cloud watch it becomes an unhandled rejection that kills the watcher. Tracked as a follow-up in Cloud sync: one failed asset transfer aborts the whole run and can crash hubble cloud watch #161, no change needed here.

Comment thread CHANGELOG.md Outdated
@bholmesdev bholmesdev merged commit 19b96f8 into bholmesdev:main Jul 11, 2026
1 check failed
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.

2 participants