feat(open-knowledge): settings scope badges and sidebar search (#2756)#721
Merged
Conversation
* feat(open-knowledge): settings scope badges and sidebar search Add a User/Project scope badge to the plugin settings panels (markdownlint is project scope, Themes is user scope), so it is clear where a change is stored, plus a search box pinned at the top of the settings sidebar. The search indexes every section, the schema settings, and all markdownlint rules (only while the plugin is enabled), reusing the command palette's matchesCommandQuery and splitTextByQueryMatches helpers and the cmdk Command primitives. Results navigate: sections switch panels, a setting scrolls to and briefly flashes its field, and a markdownlint rule opens the markdownlint panel pre-filtered to that rule. The section list scrolls beneath the pinned search box. Closes PRD-7377. * chore(open-knowledge): drop tracker-ticket refs from test comments md-audit comment-discipline forbids tracker tickets in source comments. * test(open-knowledge): migrate touched settings tests off bun:test The new check-no-new-bun-test-imports guard (merged from main) forbids bun:test imports in changed files. Convert the settings test files this PR touches to native vitest: mock.module -> vi.doMock (non-hoisted, so the existing dynamic-import + mutable-mock-state pattern is unchanged), spyOn -> vi.spyOn. Behavior is identical; full settings DOM + unit + e2e suites pass. * chore(open-knowledge): bump combined JS size budget 3.35->3.36 MB The settings scope-badge + search feature adds a small amount of JS (search index, ScopeBadge, sidebar search UI), which tipped the 'all JS chunks combined' gzip budget over by 131 B (3,350,131 vs 3,350,000). Bump the limit modestly (~10 kB headroom). The main app bundle (476/482 kB) and CSS (54.9/55 kB) budgets are unchanged and still pass. * test(server): okignore drift guard allows repo-specific suffix The dogfood root .okignore gained repo-specific docs-MDX exclusions (#2768), which broke the byte-equality drift guard for every OK PR (the change was path-filtered out of OK validation, so it merged unseen). Keep the guard's teeth: the scaffold template must remain a byte-exact prefix of the committed file (sliced compare so drift still prints a real diff); repo-specific patterns may follow. * test(server): migrate init-project.test.ts off bun:test Touched by the drift-guard fix, so the no-new-bun-test guard requires the vitest import (import-line-only change; no mock usage in this file). * chore(server): fix import sort in init-project.test.ts biome organizeImports orders 'vitest' differently than the removed 'bun:test' specifier. * review: settings search a11y + cleanups from PR review - ScopeBadge: tabIndex + focus ring so the scope tooltip is keyboard-reachable (Radix opens on focus); pinned by a dom test - Settings search: polite sr-only live region announcing the result count - Drop the dead nonce from fieldFlash (object identity already re-fires the flash effect; the nonce is only load-bearing for ruleQuery's prop-threaded primitive keys) - Rename SettingsDialogSearch.dom.test.tsx -> SettingsDialogShell.search.dom.test.tsx per the Component.aspect convention - Wire settings-search.e2e.ts into the CI test:e2e subset GitOrigin-RevId: b896f20cc74882bd5fafc0f3380e0aaf542d5f25
|
|
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.
Copybara-translated 1 Inkeep OSS change. Rebase-merge this PR so the prepared commit lands directly on public main.