Global search (Cmd/Ctrl+J) never sorts results by relevance
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 74/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- nextjs, react, typescript
調査の方向性
apps/dokploy/package.json から始めます。ここでは cmdk が ^0.2.1 に固定されています。次に components/ui/command.tsx を読みます。issue によると、これはすでに cmdk 1.x の wrapper と一致しています。^1.1.1 に上げ、dashboard を実行し、billing という名前の service で Cmd/Ctrl+J を使って再現します。ranking がまだおかしい場合は、components/dashboard/search-command.tsx で任意の value/keywords 変更を適用し、92 行目と 121 行目の周辺にあるネストされた CommandList wrapper を削除します。完了とは、完全な名前一致が最初に並び、Enter でそれが開くことです。
索引モデルが issue の本文から書いたものです。
説明
What happens
Typing a service name in the global search palette filters the list but does not rank it. Results stay in project order, so an exact name match can sit far below weak fuzzy matches. Pressing Enter opens the first item, which is often the wrong service.
Steps to reproduce
- Have several projects with a few services each. Create a new service in a later project, e.g.
billing. - Press Cmd/Ctrl+J and type
billing. - Every service whose text contains the letters of
billingin order shows up, in project order. Thebillingservice is not at the top. - Press Enter. It opens the first item in the list, not
billing.
Root cause
apps/dokploy/package.json pins cmdk to ^0.2.1. That version's sort is broken:
- Scores are stored per item id:
filtered.items.set(id, score). - The sort reads the score by the item's
data-value, which is its lowercased text:e.get(item.getAttribute("data-value")). - That lookup always returns
undefined, so every score counts as 0 and no item moves. Groups are sorted the same way and have the same bug.
cmdk 1.x fixes this by sorting on item.getAttribute("id") (checked in the published [email protected] dist/index.mjs).
The palette's own markup makes the bad order more likely to bite:
- With no
valueprop, each service item's value is its full text:project / environment / nameplus the service id in a hidden div (components/dashboard/search-command.tsx:159). The random id adds more chance fuzzy matches. - Each group wraps its items in an extra
<CommandList>(lines 92 and 121) inside the outer one.
Suggested fix
- Bump
cmdkto^1.1.1.components/ui/command.tsxalready looks like the newer shadcn wrapper written for cmdk 1.x, so the change should be small. Note that 1.x matchesvaluecase-sensitively and adds akeywordsprop. - Optional: give each service item
value={service.name}andkeywords={[project.name, environment.name]}, and drop the hidden id div, so the name ranks first and ids stop matching. - Optional: remove the nested
<CommandList>wrappers inside the groups.
Related: #5986 (wants Cmd/Ctrl+K for this palette; a separate issue).
- 主要言語
- TypeScript
- スター
- 38.8k
- フォーク
- 3.2k
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 110
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Dokploy/dokploy のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Dokploy/dokploy#6151 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Healthy Swarm task shows an empty `(Error:)` suffix on the last row of the Containers tab対応中かも @AyhamJo7 が 4 日前に担当しました。 オープンneeds-triage🔍
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Dokploy/dokploy#6115 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
`utils/dns/ovh.ts`: the zone-listing 403 handler replaces the provider's error instead of chaining it対応中かも @SyncWithRaj が 8 日前に担当しました。 オープンbug
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
Dokploy/dokploy#6075 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
MongoDB with Replica Sets enabled: container exits with code 0 and restarts in a loop (generated startup script never waits on mongod)対応中かも @ghazy2001 が 10 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Dokploy/dokploy#6051 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Dokploy monitoring API returns partial container metrics with HTTP 200 when a row read fails対応中かも @PAtreju が 12 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Dokploy/dokploy#6029 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
Dokploy/dokploy の issue をすべて見る
似ている issue
-
[Bug]: RUN_STARTED resets the run's tool-call tally even when a subscriber suppresses the eventオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
ag-ui-protocol/ag-ui#3504 ·
メンテナーはふだん 1 日以内に返信
-
area/profiles area/sessions comp/desktop desktop/chat desktop/sessions P2 type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
NousResearch/hermes-agent#161712 ·
メンテナーはふだん 1 日以内に返信
-
bug p3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
rothgar/rabble.radio#283 ·
メンテナーはふだん 1 日以内に返信
-
bug from-app needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
nightly-labs/openbot#19805 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
OHDSI/Data2Evidence#3760 ·
メンテナーはふだん 3 日以内に返信