fix(frontend): inline な SearchMarker のパスが正しくない問題を修正 (#16301)

* replace URL path for inlined SearchMarkers

The search index looks like:

```ts
[
 {
   id: 'foo', label: 'security',
   path: '/settings/security', inlining: ['2fa'],
 },
 {
   id: '2fa',
   label: 'two-factor auth',
   path: '/settings/2fa', // guessed wrong by the index generation
 },
 {
   id: 'aaaa',
   parentId: '2fa',
   label: 'totp',
 },
 …
]
```

This file post-processes that index and re-parents the inlined
sections. Problem was, it left the (wrong) `path` untouched.

Replacing the `path` makes the search work fine.

* Update Changelog

---------

Co-authored-by: dakkar <dakkar@thenautilus.net>
This commit is contained in:
かっこかり 2025-07-30 14:39:55 +09:00 committed by GitHub
parent 1dec8b2329
commit 927aa9dc3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -4,7 +4,8 @@
-
### Client
-
- Fix: 一部の設定検索結果が存在しないパスになる問題を修正
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1171)
### Server
-

View File

@ -24,6 +24,7 @@ for (const item of generated) {
const inline = rootMods.get(id);
if (inline) {
inline.parentId = item.id;
inline.path = item.path;
} else {
console.log('[Settings Search Index] Failed to inline', id);
}