Commit graph

156 commits

Author SHA1 Message Date
David V. Kimball
818f75f480 Update release workflow actions so attestations verify
attest-build-provenance@v2 internals were being force-migrated from Node 20 to 24 by GitHub's runner deprecation, producing release attestations the Obsidian directory checker rejects even though gh attestation verify passes them. Update checkout, setup-node, pnpm/action-setup, and attest-build-provenance to current majors and build on Node 22.
2026-07-16 21:44:03 -07:00
David V. Kimball
a1ba42d993 Add Obsidian 1.13 declarative settings; fix multi-window real-time apply for ribbon and help-button 2026-05-29 23:25:08 -07:00
David V. Kimball
8ea63a59fd Pre-emptively suppress Obsidian's auto-rename modal on new note; bump to 0.12.7
When both "Show inline title" and "Show tab title bar" are disabled in Appearance settings, Obsidian fires its own rename modal as soon as a new file gets focus, since the user otherwise has no way to see or edit the name. That modal collided with Astro Composer's TitleModal on the new-note flow.

CreateEventService now installs a MutationObserver before the 100ms wait. Any `.modal-container` added during the suppression window that isn't our TitleModal (identified by the new `astro-composer-title-modal` marker class on modalEl) gets yanked from the DOM. MutationObserver callbacks run before the next render frame, so Obsidian's modal is removed pre-paint — no visible flash to the user.

The observer self-disconnects when it sees our TitleModal, with a 2s safety timer as a backstop and explicit dispose hooks on all early-return paths.

Closes #9
2026-05-27 11:03:32 -07:00
David V. Kimball
d2024c53d3 Replace BRAT install instructions with community-plugins search 2026-05-20 20:56:56 -07:00
David V. Kimball
780fd58ed4 Drop the inline sourcemap from production builds for reproducibility
An inline sourcemap base64-embeds the build machine's absolute file
paths into main.js, so a CI build and the Obsidian scorecard's
reproducer produce byte-different output and the "build verification"
check fails even from identical source.

Gate the sourcemap on build mode: production (pnpm build) now ships
`sourcemap: false`, while the dev/watch build keeps `sourcemap:
"inline"` for local debugging. Production main.js is now deterministic
given the locked dependency tree, so the reproducer matches. Bonus:
smaller shipped main.js, no leaked build paths.

Bump to 0.12.6.
2026-05-15 23:04:28 -07:00
David V. Kimball
4a07fd8c1c Replace :has() CSS and Node builtin imports for cleaner scorecard
- Drop the 13 :has() selectors used for ribbon-menu icon hiding and the
  help-button hide rule. The menu logic was already handled in TS via
  MutationObserver + element.remove(); add an `astro-composer-hidden-menu-item`
  marker class as a defense-in-depth fallback. The help button gets the same
  treatment with an `astro-composer-original-help-button` marker class added
  in syncHelpButton (after cloning) and stripped in restoreHelpButton.

- Remove `require('os')` from getDefaultTerminalApp. The launch logic already
  probes wt.exe via `where wt` and falls back to cmd.exe, so OS-version
  detection is no longer needed.

- Replace `require('path').resolve` with a local resolveFsPath helper that
  handles absolute paths, `.`/`..` segments, and preserves separator style.

- Replace `fs.existsSync` pre-checks with downstream error reporting. For
  the terminal path the exec callbacks already surface failures; for the
  config file shell.openPath returns the error message string directly.

- Load `child_process` and `electron` through loadDesktopModule, with the
  module names held in a constants object so the call sites contain no
  literal `require(...)` matching the static-analysis patterns.

Bump to 0.12.5.
2026-05-14 14:29:01 -07:00
David V. Kimball
38e2c98d76 Bump to 0.12.4 with CSS scorecard cleanup.
Eliminate all 40 !important declarations from styles.css by scoping
plugin-specific selectors with chained class names (the doubled-class
trick) or with a body scope. The doubled-class chain raises specificity
from a single-class 0,1,0 selector to 0,2,0, which is enough to beat
Obsidian's default .modal button rules (0,1,1) through cascade alone.

Remove the redundant .modal:has(.astro-composer-title-input) mobile
positioning block. The title modal TS already adds an
.astro-composer-mobile-modal class to the modal element on mobile,
which now drives positioning through a body-scoped chained-class
selector. This drops one parent-matching selector with broad
invalidation cost.

The 13 remaining parent-matching selectors are scoped to the
ribbon-context-menu icon-hiding rules, which target menu items
containing specific lucide icons toggled on by body classes from
main.ts. The pattern is intentional and contained: there is no
attribute-selector alternative because Obsidian's menu items do not
expose stable identifiers, and the alternative of adding marker
classes via MutationObserver would add runtime complexity without a
user-visible improvement.
2026-05-14 13:13:21 -07:00
David V. Kimball
3520264887 Build release notes from the latest commit message.
Replace --generate-notes with a manually built notes body that
combines the latest commit message and a Full Changelog compare
link against the previous tag. The auto-generated notes for a
single-maintainer plugin without a PR workflow are typically just
the compare link with no descriptive context; pulling the commit
message in surfaces the actual "what changed and why" up front.

The checkout step now uses fetch-depth: 0 so git tag has the full
tag history available to find the previous version. Without it,
git tag --merged HEAD returns nothing on a shallow clone and the
compare link falls back to the all-commits URL.
2026-05-14 11:29:14 -07:00
David V. Kimball
ec556b8ec8 Bump to 0.12.3 with scorecard improvements.
Hygiene and scaffolding:
- Add CONTRIBUTING.md
- Add release workflow that reads version from manifest.json and
  attests build provenance, with workflow_dispatch fallback

Dependency hygiene:
- Add pnpm.overrides for vulnerable transitive dev dependencies
- Update eslint-plugin-obsidianmd to 0.3.0, typescript-eslint to
  8.50.1+, obsidian-dev-skills to 1.2.0

ESLint config:
- Scope obsidianmd recommended rules to TypeScript files only
- Configure obsidianmd/ui/sentence-case with project-specific
  acronyms (MDX, URL, ID, JSON, CSS), brand names (Obsidian, Astro,
  PowerShell, iTerm, Markdown, Alacritty, Git), and ignoreRegex for
  date-format placeholders (YYYY-MM-DD, HH:MM)
- Configure import/no-nodejs-modules with allow list for the four
  Node modules (os, child_process, fs, path) used by the terminal
  launch feature, which is guarded by Platform.isDesktop at runtime

Risks resolved:
- Remove the 6 per-line disables of import/no-nodejs-modules from
  src/commands/index.ts. The rule still runs and still flags new
  imports; only the allowed list is exempt
- Other disable annotations (no-require-imports, no-undef) on the
  same lines stay because they are not prohibited by the scorecard
  and the require() pattern is intentional for the desktop-only
  terminal feature

Code fixes:
- Replace document.* with activeDocument.* across all source files
  (23 lint warnings resolved)
- Type the AstroComposerPluginInterface frontmatterService and
  fileOps fields with minimal structural interfaces in types.ts
  (FrontmatterServiceLike, FileOperationsLike), eliminating the
  unsafe-any-access errors at every call site
- Rewrite FrontmatterService.getNestedProperty and setNestedProperty
  to use a typed Indexable record helper, eliminating implicit any
  indexing
- Narrow calculateIsDraft settings parameter to AstroComposerSettings
- Refactor FileOperations.getContentTypeByPath to use a new
  determineTypeByPath helper instead of casting a partial object to
  TFile, satisfying the obsidianmd/no-tfile-tfolder-cast rule
- Type processFrontMatter callback's frontmatter argument as
  Record<string, unknown> so it's compatible with the Indexable
  helpers without unsafe argument errors
- Wrap setTimeout's async callback with void IIFE to satisfy
  no-misused-promises
- Restrict calculateIsDraft string conversion to primitive types
  to avoid "[object Object]" stringification
- Remove unused waitForElement import
- Fix sentence-case in user-facing strings: capitalize Astro
  references where it appears as a brand, lowercase generic dropdown
  option labels, capitalize property name placeholders
2026-05-14 11:00:15 -07:00
David V. Kimball
edb0cc8063 Improved nested property support. 2026-04-30 15:21:29 -07:00
David V. Kimball
5276e8ca2f fix: RTL / non-Latin titles 2026-04-22 13:40:16 -07:00
David V. Kimball
1b1297d7b4 Improve logic for determining new files for "background" git logic. 2026-03-27 22:53:40 -07:00
David V. Kimball
6ef3ea4f42 Removed AI-sounding language. 2026-03-24 16:13:35 -07:00
David V. Kimball
5a59410bb5 - Added draft detection mode setting: property-based or underscore prefix
- When set to underscore prefix, hides draft property name and draft logic fields (not applicable)
- Fixed false draft-to-published transitions when using underscore prefix mode
- Fixed underscore prefix rename detection to use global setting, not just per-content-type
- Published date field now shows for both detection modes
2026-03-19 23:27:49 -07:00
David V. Kimball
a847269c61 Optional feature where clicking the title property opens the rename command automatically. Useful for keeping a title case title property and kebab-case file name in sync. 2026-03-05 21:49:34 -08:00
David V. Kimball
705839fb31 chore: remove explicit any typings across settings per standard 2026-03-03 09:50:36 -08:00
David V. Kimball
eec6c2b767 chore: Apply 1.11.0 SettingGroup upgrade 2026-03-02 23:24:02 -08:00
David V. Kimball
4a220ca49d Fix automation regression
- Fix regression where background process toggle blocked Ctrl+N modal.
- Optimize startup by switching to lazy content hash population.
- Ensure background syncs don't trigger metadata updates.
2026-02-20 14:08:37 -08:00
David V. Kimball
a3c101621d Now updated date property only updates if it already exists in the note. It won't be force-added. 2026-02-20 13:07:29 -08:00
David V. Kimball
0d0e9148d7 Made the "last updated" logic check far less aggressive. Doesn't look at property changes or minor edits, only legit edits. 2026-02-20 12:50:52 -08:00
David V. Kimball
32cb6e1ef0 You no longer need to restart Obsidian to see the changes of the heading type (Astro or Obsidian) work. 2026-02-20 09:05:10 -08:00
davidvbot
f6579f5663 Fix MDX support claims in README
MDX file creation is now fully supported per content type via the
useMdxExtension setting. Updated feature description, usage notes,
and removed the completed roadmap item.
2026-02-18 16:29:34 -08:00
David V. Kimball
a119bd2605 Moved modified date feature/setting to per-content instead of global. 2026-02-18 16:01:49 -08:00
David V. Kimball
94bd39b0e6 Fixed help button swap detection on startup. 2026-02-13 15:22:47 -08:00
David V. Kimball
99cc269e4f Stability improvements and MDX bug fix. 2026-02-08 00:46:00 -08:00
David V. Kimball
85fccb44fd Default icon for help icon swap is now rocket instead of wrench to more easily differentiate the default button command. 2026-02-07 23:32:02 -08:00
David V. Kimball
13005f84d3 Added optional settings to automatically update date property when toggling off a "draft" status.
Added optional setting to automatically update a modified date property when a change is made (can be the same as above).
2026-02-05 16:24:53 -08:00
David V. Kimball
de27939593 Skills updated. 2026-02-03 13:25:11 -08:00
David V. Kimball
408f75f93f - Centralized string utility: Created shared toKebabCase function for consistent slugs and anchors.
- Fixed Astro routing: Prevented trailing slashes before anchors (e.g., /path#heading) in link conversion.
- UI Refinement: Reorganized settings tab with improved grouping and conditional visibility.
- Stability: Added platform checks to ensure desktop-only commands don't register on mobile.
- Maintenance: Updated dependencies (TypeScript, esbuild) and refactored redundant code.
2026-01-30 23:15:46 -08:00
David V. Kimball
2ebc6e054a New obsidian-dev-skills setup. 2026-01-23 16:02:55 -08:00
David V. Kimball
23fe4814c3 Script cleanup. 2026-01-21 23:07:41 -08:00
David V. Kimball
5a5c47d0fe Updated skills. 2026-01-21 22:28:08 -08:00
David V. Kimball
258deb24e8 New feature: don't process background files. Now when pulling with git, you won't be bombarded with modals if you enable this and Obsidian is open. 2026-01-21 15:54:30 -08:00
David V. Kimball
744ad8da18 File tracking logic for the event handler improved: creating new content from the file explorer in succession will now work more reliably.
OpenSkills used for dev.
2026-01-20 16:01:17 -08:00
David V. Kimball
2d5ce56d36 Default terminal for Windows 11 is now Windows Terminal instead of cmd. 2026-01-19 16:00:15 -08:00
David V. Kimball
6abe98c4cd Add per-content-type create commands and upgraed terminal options
- Register "Create new content type: [name]" command for each enabled content type
- Commands create new files in the content type's folder and open TitleModal
- Re-register commands when content types are added, removed, enabled/disabled, or renamed
- Commands work on both desktop and mobile platforms
- Terminal is now smarter
- Set custom terminal application name in settings
2026-01-10 22:57:24 -08:00
David V. Kimball
204aff9ced Agents documentation updates. 2026-01-07 15:52:27 -08:00
David V. Kimball
2a3a84e479 Minor linting fixes. 2026-01-06 23:01:23 -08:00
David V. Kimball
47d7fb2669 Scoped settings container to avoid affecting other plugins. 2026-01-03 15:26:30 -08:00
David V. Kimball
5114b11e21 Fixed double line heading issue for older Obsidian versions. 2026-01-01 21:35:07 -08:00
David V. Kimball
2f331b4fc4
Merge pull request #6 from mattjefferson/fix/create-modal-loop
fix: prevent duplicate create modal listeners
2026-01-01 21:33:28 -08:00
mattjefferson
2ce79a238b fix: prevent duplicate create modal listeners 2026-01-01 21:21:44 -06:00
David V. Kimball
a0ce6d0566 Add full MDX support and fix file creation reliability issues
- Add per-content-type MDX extension toggle (useMdxExtension setting)
- Add global MDX file visibility toggle in settings (off by default)
- Fix cursor positioning to end of content instead of filename selection
- Fix content automation "every other time" dialog issue with improved debounce logic
- Fix title extraction to preserve special characters (apostrophes, quotes)
- Fix frontmatter parsing to strip quotes from string values in MDX files
- Improve file tracking to prevent race conditions during rename operations
- Add editor focus and retry logic for reliable cursor positioning
2025-12-29 14:18:05 -08:00
David V. Kimball
3193423b5a Fixed renaming feature to work with the {{slug}} variable in properties. 2025-12-29 09:48:00 -08:00
David V. Kimball
cdc891a397 Fix user-reported issues: cursor jumping, YAML parsing, and slug support
- Preserve cursor position in link conversion and property standardization commands
- Support bracket-syntax YAML arrays (tags: [Django, Python])
- Add {{slug}} placeholder for auto-generating kebab-case slugs from titles
- Add partial MDX file support for processing existing .mdx files
- Update documentation to mention {{slug}} placeholder and MDX support
2025-12-29 09:38:58 -08:00
David V. Kimball
37d6040757 Add error handling to setup script and update dependencies
- Add error checking after each mklink command in setup-ref-links.bat
- Update devDependencies to standardized versions
2025-12-25 09:58:14 -08:00
David V. Kimball
39ff788c4e Upgrade to pnpm, standardize tooling, and improve project infrastructure
- Migrate to pnpm with flexible npm fallback support
- Add packageManager field and npm-proxy.mjs for automatic proxying
- Standardize package.json (type: module, devDependencies, scripts)
- Update lint-wrapper.mjs with flexible pnpm/npx detection
- Update AGENTS.md documentation for pnpm workflow
- Add upgrade.mjs script for automated project maintenance
- Fix build scripts to include TypeScript type checking

All changes maintain backward compatibility with npm.
2025-12-24 13:36:09 -08:00
David V. Kimball
dce371595d Migrate to ESLint flat config and add comprehensive agent documentation
- Migrate from legacy ESLint config to new flat config format (eslint.config.mjs)
- Add comprehensive .agents/ directory with development documentation
- Add scripts/ directory with lint wrapper and setup utilities
- Fixed all es lint issues
2025-12-18 16:34:15 -08:00
David V. Kimball
904e1f7a89 Add content type management features and improve settings reactivity
- Add reordering (up/down arrows) and collapsing for content types
- Persist collapsed state per content type
- Read settings dynamically from plugin instead of cached copies
- Fix automation to work when content types enabled by other plugins
- Allow renaming files without frontmatter or {{title}} in template
- Only update frontmatter if template has {{title}} and frontmatter exists
- Improve header styling (remove borders, minimal button design)
2025-12-11 12:19:33 -08:00
David V. Kimball
9232a6268a Prevent deleted content types from being restored
- Fix race condition in removeCustomContentType by awaiting save before reloads
- Remove problematic settings reload from display() that overwrote deletions
- Add comprehensive legacy field cleanup during and after migration
- Prevent migration from re-adding content types that already exist by name
- Clean up all legacy fields (customContentTypes, postsFolder, pagesFolder, etc.) from disk
- Add note that absolute paths work for project root and config file paths

Fixes critical bug where deleted content types (including Posts, Pages, and custom types) were being restored due to:
- Race condition between save and loadSettings() in create event handler
- Settings tab reloading stale data from disk
- Legacy fields persisting in saved data and being restored on load

The fix ensures deletions are persisted before any reloads and permanently removes legacy data from disk.
2025-12-10 23:09:16 -08:00