Skip to content

feat(open-knowledge): settings scope badges and sidebar search (#2756)#721

Merged
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync
Jul 21, 2026
Merged

feat(open-knowledge): settings scope badges and sidebar search (#2756)#721
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown
Contributor

Copybara-translated 1 Inkeep OSS change. Rebase-merge this PR so the prepared commit lands directly on public main.

* 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
@inkeep-oss-sync
inkeep-oss-sync Bot merged commit 1fd3982 into main Jul 21, 2026
@inkeep-oss-sync
inkeep-oss-sync Bot deleted the copybara/sync branch July 21, 2026 01:23
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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