Skip to content

feat: improve settings UX and production compatibility - #181

Open
miaobuao wants to merge 29 commits into
nutstore:mainfrom
miaobuao:main
Open

miaobuao wants to merge 29 commits into
nutstore:mainfrom
miaobuao:main

Conversation

@miaobuao

@miaobuao miaobuao commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • improve settings search, deletion preferences, plugin information, and web viewer guidance
  • make DOM ownership explicit for settings and browser-compatible element creation
  • streamline lint configuration and remove duplicate lint work
  • compress production assets and align runtime targets and polyfills
  • reduce the packaged artifact size from ~6 MB to ~4 MB

### What

- Settings tab implements Obsidian 1.13 declarative setting definitions:
  every section stays indexed for native search across tabs, search jumps
  activate their owning tab, and the tab bar gains ARIA roles, keyboard
  navigation, and mobile touch sizing. Refreshes ride the host's cached
  definitions via update() instead of manual re-render.
- Vault deletions go through FileManager.trashFile to honor the user's
  deletion preference; hidden internal paths still use the adapter, and
  failed trash now errors instead of falling back to permanent deletion.
- Popout windows create DOM through Obsidian's per-window factories
  (ownerDocument.win.createEl/createDiv/createSpan) with matching Window
  typings; the WebView polyfill now only resolves window.
- Image export and provider transport keep native fetch via a scoped
  eslint allowlist that preserves every other global restriction.
- Chatbox pane resizing switches to pointer capture plus a fixed drag
  overlay, replacing body-wide cursor classes and !important rules
  (css/no-important is now an error).
- Replace lodash-es and ramda with es-toolkit/compat; drop
  crypto-browserify, dotenv, @electron/remote, eslint-plugin-import and
  builtin-modules; pin zod via the workspace catalog; run pnpm audit as
  part of lint; load .env with process.loadEnvFile; cover the compat
  helpers with unit tests.
- Obsidian E2E harness streams lifecycle steps and the active check into
  its result file; the runner awaits plugin initialization instead of
  restarting Obsidian and reports progress on timeout. Adds checks for
  deletion preferences, image export, and searchable settings; drops the
  constructor-name provider check.

### Why

Obsidian 1.13 introduced declarative settings pages, which excluded
sections on inactive tabs from native search and cached definitions
across refreshes. Deleting files ignored the user's trash preference
because callers invoked vault.trash directly. lodash-es and ramda
duplicated utilities already shipped by es-toolkit, and the removed
packages were either unused or replaced by platform built-ins.
Retry iOS and WebKit IndexedDB operations for connection-level UnknownError, InvalidStateError, and AbortError failures. Close the shared localforage connection before one bounded retry and add coverage that preserves data while excluding quota and serialization errors.
Batch master inputs at safe tool boundaries so pending user submissions are materialized without aborting their originating execution. Restore deferred view-image attachments when a turn resumes, and present pending input as an ordered list with regression coverage.\n\nRefresh pnpm-lock.yaml to match the current package dependency ranges.
Keep the active chat session when its draft text and semantic context already match a requested conflict-resolution draft, preventing repeated clicks from creating duplicate sessions.
Keep settings tabs at a fixed height while animating the active tab's fluid edge curves, colors, and borders. Respect reduced-motion preferences for webview accessibility.
Persist unresolved directory reads instead of treating a single child 404 as deletion. Reconcile affected parents, preserve sibling results, resume from saved delta cursors, and avoid exporting incomplete traversal caches. Add regression coverage for retries, resets, nested paths, pagination failures, and Unicode filenames.

This branch has not been deployed

No deployments
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