fix(history): 历史页搜索框可点击、可搜索 (#612)#627
Merged
Merged
Conversation
历史页顶部带搜索图标的区域此前是静态 div,只显示「共 N 条 · 显示 M」统计, 无法获得焦点、无法输入、无过滤逻辑(issue #612,Windows beta 实测)。 - 把静态 span 改为真实 `<input type="search">`,可聚焦输入;统计文案下移为独立小字。 - 按关键词实时过滤左侧列表,匹配 finalText / rawTranscript / appName(大小写不敏感、trim); 与现有 mode 筛选叠加。 - 清空关键词恢复显示全部(受当前 mode 筛选)。 - ⌘K / Ctrl+K 聚焦搜索框(设计稿预期)。 - 搜索无结果时显示专门提示 history.searchNoMatch,区别于「暂无历史」。 - 新增 i18n: history.searchPlaceholder / history.searchNoMatch(en/ja/ko/zh-CN/zh-TW)。
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
H-Chris233
approved these changes
Jun 9, 2026
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.
User description
背景
issue #612:设置 → 历史记录页,顶部带搜索图标的区域无法点击、无法获得焦点、无法输入,只能看到「共 N 条 · 显示 M」统计文案,无法按关键词过滤历史条目。
History.tsx实现为静态div,未使用input,也无搜索逻辑。改动(
History.tsx+ 5 个 i18n,单一职责)<span>替换为真实<input type="search">,可聚焦、可输入;原统计文案下移为独立小字行。finalText/rawTranscript/appName(大小写不敏感、trim),与现有 mode 筛选叠加。pages.jsx预期)。history.searchNoMatch,区别于「暂无历史」。history.searchPlaceholder/history.searchNoMatch(en / ja / ko / zh-CN / zh-TW)。type="search"在 WebKit 内提供原生清除按钮,无需自绘。验收对照
验证
npm run build(tsc 类型检查 + vite 构建)✅🤖 Generated with Claude Code
PR Type
Bug fix
Description
Replace static div with real
Add real-time filtering by finalText/rawTranscript/appName
Add keyboard shortcut (⌘K/Ctrl+K) to focus search box
Add i18n keys for search placeholder and no-match message
Diagram Walkthrough
File Walkthrough
en.ts
Add i18n keys for search placeholder and no-match (en)openless-all/app/src/i18n/en.ts
history.searchPlaceholderwith shortcut interpolationhistory.searchNoMatchfor empty search resultsja.ts
Add i18n keys for search placeholder and no-match (ja)openless-all/app/src/i18n/ja.ts
history.searchPlaceholdertranslationhistory.searchNoMatchtranslationko.ts
Add i18n keys for search placeholder and no-match (ko)openless-all/app/src/i18n/ko.ts
history.searchPlaceholdertranslationhistory.searchNoMatchtranslationzh-CN.ts
Add i18n keys for search placeholder and no-match (zh-CN)openless-all/app/src/i18n/zh-CN.ts
history.searchPlaceholdertranslationhistory.searchNoMatchtranslationzh-TW.ts
Add i18n keys for search placeholder and no-match (zh-TW)openless-all/app/src/i18n/zh-TW.ts
history.searchPlaceholdertranslationhistory.searchNoMatchtranslationHistory.tsx
Implement search input and filtering logicopenless-all/app/src/pages/History.tsx
useRefanduseStatefor search query statequerystate andsearchRefreffilteredmemo to include keyword matching on finalText,rawTranscript, appName
with realelementsearchNoMatchtext when query is non-empty and results empty