Conversation
…ing multi-value and PROMPT-02 (#184)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repairs the two failure classes in #184 - and corrects its diagnosis: the prompt/suggester UI renders fine in the headless isolated instance. The failing tests were waiting for modals the product no longer opens.
Root cause. Since #168,
editMetaElementroutes eligible top-level YAML properties (Auto Properties are intercepted first) to theNativePropertyPrompt(Obsidian's native widgets). The 7multi-valuetests andaudit-modalsPROMPT-02 were still driving the pre-#168GenericSuggester+GenericPromptflow, so their.suggestion-item/.metaEditPromptInputwaits timed out with the native modal open - and each stuck modal cascaded modal-count-leak failures into later files. (That the legacy modals render headlessly was already proven green byaudit-suggester.test.ts, which clicks real.suggestion-itemrows and types into.metaEditPromptInput, and bymetaedit-runtime.test.ts's nested-YAML prompt flow; the new inline-Dataview tests below pin it in this suite too.)What changed:
tagsYAML front matter, can we get a list of tags and add multiple tags? #51/comma/cmd:invariants now drive the native prompt's real widget interactions - in-place pill edit (focus pill, Enter, retype, Enter; order preserved), pill add, contenteditable text - with the same exact-YAML assertions as before. The scalar tests additionally pin that neither legacy modal participates. The legacyGenericSuggester+GenericPrompteditor still owns inline Dataview fields, so four new tests pin that surviving surface, including the add-command discrimination (VALUE_SELECTION_PREFIXvs sentinels) that only runs there.input[type=date].mod-dateinside the native host) instead of the legacy prompt's date input, keeping its original assertions on the surface a user actually gets..modal-close-button, silently turning every class-targeted close click into a no-op (same family as test(e2e): survive Obsidian 1.13 settings popout and modal DOM changes quickadd#1523). A sharedcloseAllModals(harness-exported, in-app) closes via Escape through the keymap scope - running realonClosepaths so promises resolve and scopes pop - withapp.workspace.activeModal?.close()as lifecycle-aware fallback and a loud diagnostic error instead of DOM removal. It replaces every.modal-close-buttonclick and rawel.remove()teardown across the audit/runtime/auto-properties/bulk/fluid suites, and is wired into the harness'sbeforeDataRestore, so a FAILED test's leaked modal is unwound before the next test - killing the cascade class at the root.native-properties' in-app helpers moved totests/e2e/nativePromptHelpers.ts(now also used by multi-value), gainingeditPillByTextand a suggest-popover guard: typing in a multi-select opens a fuzzy popover whose scope owns Enter, which would commit the highlighted suggestion instead of the literal text (this was live: adding tag "asia" committed "course-flash/writing-obsidian-plugins").metadataTypeManager.setType(as native-properties already does), because widget resolution follows vault-wide type memory - in the shared dev vault,authorsis typedtextby unrelated notes and would mount the text widget.Verification (Obsidian 1.13.0, isolated instance per AGENTS runbook):
modalCount === 0(temp test removed after verification).pnpm run lint,pnpm run build,pnpm run test(355 unit tests) all green.No product code touched; no release impact.
Fixes #184