fix: Address code review feedback for PR #142

- Remove invalid allowBuilds from pnpm-workspace.yaml (use onlyBuiltDependencies in root package.json)
- Use data-testid for search input selector (fixes / keyboard shortcut for non-English locales)
This commit is contained in:
zhushen
2026-05-12 11:02:13 +08:00
Unverified
parent a3ec91bf39
commit 2083342199
5 changed files with 19 additions and 31 deletions
+17
View File
@@ -14,5 +14,22 @@
"devDependencies": {
"typescript": "^5.7.0",
"vitest": "^3.1.0"
},
"pnpm": {
"onlyBuiltDependencies": [
"esbuild",
"sharp",
"tree-sitter-c",
"tree-sitter-c-sharp",
"tree-sitter-cpp",
"tree-sitter-go",
"tree-sitter-java",
"tree-sitter-javascript",
"tree-sitter-php",
"tree-sitter-python",
"tree-sitter-ruby",
"tree-sitter-rust",
"tree-sitter-typescript"
]
}
}
-17
View File
@@ -15,22 +15,5 @@
"@types/node": "^22.0.0",
"typescript": "^5.7.0",
"vitest": "^3.1.0"
},
"pnpm": {
"onlyBuiltDependencies": [
"esbuild",
"sharp",
"tree-sitter-c",
"tree-sitter-c-sharp",
"tree-sitter-cpp",
"tree-sitter-go",
"tree-sitter-java",
"tree-sitter-javascript",
"tree-sitter-php",
"tree-sitter-python",
"tree-sitter-ruby",
"tree-sitter-rust",
"tree-sitter-typescript"
]
}
}
@@ -296,7 +296,7 @@ function DashboardContent({
description: t.keyboardShortcuts.focusSearch,
action: () => {
const searchInput = document.querySelector<HTMLInputElement>(
'input[placeholder*="Search"]'
'[data-testid="search-input"]'
);
searchInput?.focus();
},
@@ -107,6 +107,7 @@ export default function SearchBar() {
onChange={handleInputChange}
onFocus={() => setDropdownOpen(true)}
placeholder={t.search.placeholder}
data-testid="search-input"
className="flex-1 min-w-0 bg-elevated text-text-primary text-sm rounded-lg px-3 py-1.5 border border-border-subtle focus:outline-none focus:border-accent/50 placeholder-text-muted"
/>
<div className="flex items-center gap-1 bg-elevated rounded-lg p-0.5 shrink-0">
@@ -1,15 +1,2 @@
packages:
- "packages/*"
allowBuilds:
esbuild: set this to true or false
tree-sitter-c: set this to true or false
tree-sitter-c-sharp: set this to true or false
tree-sitter-cpp: set this to true or false
tree-sitter-go: set this to true or false
tree-sitter-java: set this to true or false
tree-sitter-javascript: set this to true or false
tree-sitter-php: set this to true or false
tree-sitter-python: set this to true or false
tree-sitter-ruby: set this to true or false
tree-sitter-rust: set this to true or false
tree-sitter-typescript: set this to true or false